diff options
author | Damien <damien.p.george@gmail.com> | 2013-10-05 13:37:10 +0100 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-10-05 13:37:10 +0100 |
commit | b05d707b2329a9534121e09e26eb9f8fef1917d3 (patch) | |
tree | 6c1bdbaa07b85d718283b6bfe66df15cfb1940c5 /py/emitx64.c | |
parent | 415eb6f8507cc8c912143e8173bd9b451f6af917 (diff) | |
download | micropython-b05d707b2329a9534121e09e26eb9f8fef1917d3.tar.gz micropython-b05d707b2329a9534121e09e26eb9f8fef1917d3.zip |
Further factorise PASS_1 out of specific emit code.
Diffstat (limited to 'py/emitx64.c')
-rw-r--r-- | py/emitx64.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/py/emitx64.c b/py/emitx64.c index 38d519063e..c9307dc00d 100644 --- a/py/emitx64.c +++ b/py/emitx64.c @@ -64,9 +64,6 @@ static void emit_x64_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scope) emit->last_emit_was_return_value = false; emit->need_to_push = NEED_TO_PUSH_NOTHING; emit->scope = scope; - if (pass == PASS_1) { - scope->unique_code_id = rt_get_new_unique_code_id(); - } asm_x64_start_pass(emit->as, pass); @@ -763,9 +760,9 @@ static const emit_method_table_t emit_x64_method_table = { emit_x64_yield_from, }; -void emit_new_x64(emit_t **emit_out, const emit_method_table_t **emit_method_table_out) { +void emit_x64_new(emit_t **emit_out, const emit_method_table_t **emit_method_table_out, uint max_num_labels) { emit_t *emit = m_new(emit_t, 1); - emit->as = asm_x64_new(); + emit->as = asm_x64_new(max_num_labels); emit->do_native_types = false; *emit_out = emit; |