diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-29 18:58:52 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-29 18:58:52 +0000 |
commit | 08d075592f3fa958ac3f24e176bee5ab56e78f49 (patch) | |
tree | 6b09520f0cabc7330dda34bd2da8c17bff3d8b79 /py/vm.c | |
parent | 1ba1facaaa112c02fd3dcc1bfcb8e228787629ed (diff) | |
download | micropython-08d075592f3fa958ac3f24e176bee5ab56e78f49.tar.gz micropython-08d075592f3fa958ac3f24e176bee5ab56e78f49.zip |
py: Fix bug with LOAD_METHOD; fix int->machine_int_t for small int.
LOAD_METHOD bug was: emitbc did not correctly calculate the amount of
stack usage for a LOAD_METHOD operation.
small int bug was: int was being used to pass small ints, when it should
have been machine_int_t.
Diffstat (limited to 'py/vm.c')
-rw-r--r-- | py/vm.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -26,8 +26,6 @@ #define SET_TOP(val) *sp = (val) mp_obj_t mp_execute_byte_code(const byte *code, const mp_obj_t *args, uint n_args, uint n_state) { - n_state += 1; // XXX there is a bug somewhere which doesn't count enough state... (conwaylife and mandel have the bug) - // allocate state for locals and stack mp_obj_t temp_state[10]; mp_obj_t *state = &temp_state[0]; @@ -479,8 +477,7 @@ bool mp_execute_byte_code_2(const byte *code_info, const byte **ip_in_out, mp_ob case MP_BC_MAKE_CLOSURE: DECODE_UINT; - obj1 = POP(); - PUSH(rt_make_closure_from_id(unum, obj1)); + SET_TOP(rt_make_closure_from_id(unum, TOP())); break; case MP_BC_CALL_FUNCTION: |