aboutsummaryrefslogtreecommitdiff
path: root/py/emit.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-03-09 10:59:25 +1100
committerDamien George <damien.p.george@gmail.com>2019-03-14 12:22:25 +1100
commitd9d92f27d7cce287850d971abf3104d2230092fa (patch)
treee69b50bfa4b143f0a6e4efe76fc1d9834e7356fc /py/emit.h
parent0e4c24ec08c19773b26a662abb133c05b474b1fa (diff)
py/compile: Add support to select the native emitter at runtime.
Diffstat (limited to 'py/emit.h')
-rw-r--r--py/emit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/emit.h b/py/emit.h
index 2a5da8e8e..7b97372bc 100644
--- a/py/emit.h
+++ b/py/emit.h
@@ -98,6 +98,11 @@ typedef struct _mp_emit_method_table_id_ops_t {
} mp_emit_method_table_id_ops_t;
typedef struct _emit_method_table_t {
+ #if MICROPY_DYNAMIC_COMPILER
+ emit_t *(*emit_new)(mp_obj_t *error_slot, uint *label_slot, mp_uint_t max_num_labels);
+ void (*emit_free)(emit_t *emit);
+ #endif
+
void (*start_pass)(emit_t *emit, pass_kind_t pass, scope_t *scope);
void (*end_pass)(emit_t *emit);
bool (*last_emit_was_return_value)(emit_t *emit);