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/builtin.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/builtin.c')
-rw-r--r-- | py/builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/builtin.c b/py/builtin.c index 678b3c76bb..67b0e46a66 100644 --- a/py/builtin.c +++ b/py/builtin.c @@ -26,7 +26,7 @@ STATIC mp_obj_t mp_builtin___build_class__(uint n_args, const mp_obj_t *args) { mp_locals_set(mp_obj_dict_get_map(class_locals)); // call the class code - mp_obj_t cell = mp_call_function_1(args[0], (mp_obj_t)0xdeadbeef); + mp_obj_t cell = mp_call_function_0(args[0]); // restore old __locals__ object mp_locals_set(old_locals); |