From 882b363564b64204c12726d5d2cd7f596322729f Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 2 Apr 2014 15:56:31 +0100 Subject: 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. --- py/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/builtin.c') 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); -- cgit v1.2.3