summaryrefslogtreecommitdiff
path: root/py/emit.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-13 15:55:54 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-13 15:55:54 +0000
commitdab1385177558f1d27c03b59e443b6fa25a2cdc0 (patch)
treeda284535f901727c739266c2bf50ed5bbec88f1a /py/emit.h
parentd710cef6610eff758e96f351e6b91c1c9d8df9f6 (diff)
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.
Diffstat (limited to 'py/emit.h')
-rw-r--r--py/emit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/emit.h b/py/emit.h
index 49bb76ead..06a4201e7 100644
--- a/py/emit.h
+++ b/py/emit.h
@@ -80,6 +80,7 @@ typedef struct _emit_method_table_t {
void (*load_const_int)(emit_t *emit, qstr qst);
void (*load_const_dec)(emit_t *emit, qstr qst);
void (*load_const_str)(emit_t *emit, qstr qst, bool bytes);
+ void (*load_const_obj)(emit_t *emit, void *obj);
void (*load_null)(emit_t *emit);
void (*load_fast)(emit_t *emit, qstr qst, mp_uint_t id_flags, mp_uint_t local_num);
void (*load_deref)(emit_t *emit, qstr qst, mp_uint_t local_num);