diff options
Diffstat (limited to 'py/emitcpy.c')
-rw-r--r-- | py/emitcpy.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c index 119cf818cf..e90b5c428a 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -228,6 +228,11 @@ STATIC void emit_cpy_load_const_verbatim_str(emit_t *emit, const char *str) { } } +STATIC void emit_cpy_load_null(emit_t *emit) { + // unused for cpy + assert(0); +} + STATIC void emit_cpy_load_fast(emit_t *emit, qstr qstr, uint id_flags, int local_num) { emit_pre(emit, 1, 3); if (emit->pass == PASS_3) { @@ -764,7 +769,8 @@ STATIC void emit_cpy_make_function(emit_t *emit, scope_t *scope, uint n_pos_defa } } -STATIC void emit_cpy_make_closure(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults) { +STATIC void emit_cpy_make_closure(emit_t *emit, scope_t *scope, uint n_closed_over, uint n_pos_defaults, uint n_kw_defaults) { + emit_cpy_build_tuple(emit, n_closed_over); load_cpy_const_code_and_name(emit, scope->simple_name); emit_pre(emit, -2 - n_pos_defaults - 2 * n_kw_defaults, 3); if (emit->pass == PASS_3) { @@ -815,6 +821,7 @@ const emit_method_table_t emit_cpython_method_table = { emit_cpy_load_const_id, emit_cpy_load_const_str, emit_cpy_load_const_verbatim_str, + emit_cpy_load_null, emit_cpy_load_fast, emit_cpy_load_deref, emit_cpy_load_closure, |