py/persistentcode: Bump .mpy version to 5.
The bytecode opcodes have changed (there are more, and they have been reordered).
This commit is contained in:
parent
96f2a38075
commit
5716c5cf65
@ -31,7 +31,7 @@
|
||||
#include "py/emitglue.h"
|
||||
|
||||
// The current version of .mpy files
|
||||
#define MPY_VERSION 4
|
||||
#define MPY_VERSION 5
|
||||
|
||||
enum {
|
||||
MP_NATIVE_ARCH_NONE = 0,
|
||||
|
@ -50,11 +50,11 @@ class UserFS:
|
||||
# these are the test .mpy files
|
||||
user_files = {
|
||||
# bad architecture
|
||||
'/mod0.mpy': b'M\x04\xff\x00\x10',
|
||||
'/mod0.mpy': b'M\x05\xff\x00\x10',
|
||||
|
||||
# test loading of viper and asm
|
||||
'/mod1.mpy': (
|
||||
b'M\x04\x0b\x1f\x20' # header
|
||||
b'M\x05\x0b\x1f\x20' # header
|
||||
|
||||
b'\x38' # n bytes, bytecode
|
||||
b'\x01\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\xff' # prelude
|
||||
|
@ -57,7 +57,7 @@ class FreezeError(Exception):
|
||||
return 'error while freezing %s: %s' % (self.rawcode.source_file, self.msg)
|
||||
|
||||
class Config:
|
||||
MPY_VERSION = 4
|
||||
MPY_VERSION = 5
|
||||
MICROPY_LONGINT_IMPL_NONE = 0
|
||||
MICROPY_LONGINT_IMPL_LONGLONG = 1
|
||||
MICROPY_LONGINT_IMPL_MPZ = 2
|
||||
|
Loading…
Reference in New Issue
Block a user