diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-02 15:56:31 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-02 15:56:31 +0100 |
commit | 882b363564b64204c12726d5d2cd7f596322729f (patch) | |
tree | c6f15da0c4cbbaa9413692685a0d6fa0c96f3079 /py/emitbc.c | |
parent | 929a675a3d2d37fb8c6acbec1b999b9bdd84ff23 (diff) | |
download | micropython-882b363564b64204c12726d5d2cd7f596322729f.tar.gz micropython-882b363564b64204c12726d5d2cd7f596322729f.zip |
py: Move to Python 3.4.0 compatibility.
Very little has changed. In Python 3.4 they removed the opcode
STORE_LOCALS, but in Micro Python we only ever used this for CPython
compatibility, so it was a trivial thing to remove. It also allowed to
clean up some dead code (eg the 0xdeadbeef in class construction), and
now class builders use 1 less stack word.
Python 3.4.0 introduced the LOAD_CLASSDEREF opcode, which I have not
yet understood. Still, all tests (apart from bytecode test) still pass.
Bytecode tests needs some more attention, but they are not that
important anymore.
Diffstat (limited to 'py/emitbc.c')
-rw-r--r-- | py/emitbc.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/py/emitbc.c b/py/emitbc.c index 0a83448559..11519fdd80 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -486,12 +486,6 @@ STATIC void emit_bc_store_subscr(emit_t *emit) { emit_write_byte_code_byte(emit, MP_BC_STORE_SUBSCR); } -STATIC void emit_bc_store_locals(emit_t *emit) { - // not needed - emit_bc_pre(emit, -1); - emit_write_byte_code_byte(emit, MP_BC_POP_TOP); -} - STATIC void emit_bc_delete_fast(emit_t *emit, qstr qstr, int local_num) { assert(local_num >= 0); emit_bc_pre(emit, 0); @@ -860,7 +854,6 @@ const emit_method_table_t emit_bc_method_table = { emit_bc_store_global, emit_bc_store_attr, emit_bc_store_subscr, - emit_bc_store_locals, emit_bc_delete_fast, emit_bc_delete_deref, emit_bc_delete_name, |