py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode.

This allows to directly load a Python object to the Python stack.  See
issue #722 for background.
This commit is contained in:
Damien George
2015-01-13 15:55:54 +00:00
parent d710cef661
commit dab1385177
8 changed files with 33 additions and 0 deletions

View File

@@ -224,6 +224,12 @@ dispatch_loop:
DISPATCH();
}
ENTRY(MP_BC_LOAD_CONST_OBJ): {
DECODE_PTR;
PUSH(ptr);
DISPATCH();
}
ENTRY(MP_BC_LOAD_NULL):
PUSH(MP_OBJ_NULL);
DISPATCH();