diff options
author | Damien <damien.p.george@gmail.com> | 2013-10-20 15:07:49 +0100 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-10-20 15:07:49 +0100 |
commit | 27fb45eb1c95f9cc02f4ed1b9d573ece0d4c1a18 (patch) | |
tree | ceac81236ebc3e0dcd201888f251016cb2af50ba /py/emitcpy.c | |
parent | a5185f4bc8f60fb2be82580e6f2d93fec53d0a33 (diff) | |
download | micropython-27fb45eb1c95f9cc02f4ed1b9d573ece0d4c1a18.tar.gz micropython-27fb45eb1c95f9cc02f4ed1b9d573ece0d4c1a18.zip |
Add local_num skeleton framework to deref/closure emit calls.
Diffstat (limited to 'py/emitcpy.c')
-rw-r--r-- | py/emitcpy.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c index 089352c0fe..428e6fd00a 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -279,17 +279,17 @@ static void emit_cpy_load_global(emit_t *emit, qstr qstr) { } } -static void emit_cpy_load_deref(emit_t *emit, qstr qstr) { +static void emit_cpy_load_deref(emit_t *emit, qstr qstr, int local_num) { emit_pre(emit, 1, 3); if (emit->pass == PASS_3) { - printf("LOAD_DEREF %s\n", qstr_str(qstr)); + printf("LOAD_DEREF %d %s\n", local_num, qstr_str(qstr)); } } -static void emit_cpy_load_closure(emit_t *emit, qstr qstr) { +static void emit_cpy_load_closure(emit_t *emit, qstr qstr, int local_num) { emit_pre(emit, 1, 3); if (emit->pass == PASS_3) { - printf("LOAD_CLOSURE %s\n", qstr_str(qstr)); + printf("LOAD_CLOSURE %d %s\n", local_num, qstr_str(qstr)); } } @@ -332,10 +332,10 @@ static void emit_cpy_store_global(emit_t *emit, qstr qstr) { } } -static void emit_cpy_store_deref(emit_t *emit, qstr qstr) { +static void emit_cpy_store_deref(emit_t *emit, qstr qstr, int local_num) { emit_pre(emit, -1, 3); if (emit->pass == PASS_3) { - printf("STORE_DEREF %s\n", qstr_str(qstr)); + printf("STORE_DEREF %d %s\n", local_num, qstr_str(qstr)); } } @@ -381,10 +381,10 @@ static void emit_cpy_delete_global(emit_t *emit, qstr qstr) { } } -static void emit_cpy_delete_deref(emit_t *emit, qstr qstr) { +static void emit_cpy_delete_deref(emit_t *emit, qstr qstr, int local_num) { emit_pre(emit, 0, 3); if (emit->pass == PASS_3) { - printf("DELETE_DEREF %s\n", qstr_str(qstr)); + printf("DELETE_DEREF %d %s\n", local_num, qstr_str(qstr)); } } |