diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-04-07 00:08:17 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-04-07 00:08:17 +0100 |
| commit | c9aa1883ed87da61d5745036dc55c382c3f4d6ca (patch) | |
| tree | d4967e844be00547c329f38606f4ac3fc7fc4728 /py/showbc.c | |
| parent | 78772ada0ddc9222c0338f94a42e33e10bb24b55 (diff) | |
py: Simplify bytecode prelude when encoding closed over variables.
Diffstat (limited to 'py/showbc.c')
| -rw-r--r-- | py/showbc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/py/showbc.c b/py/showbc.c index 3a468326d..c9eeaff9f 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -95,10 +95,8 @@ void mp_bytecode_print(const void *descr, mp_uint_t n_total_args, const byte *ip // bytecode prelude: initialise closed over variables { - uint n_local = *ip++; - printf("(NUM_LOCAL %u)\n", n_local); - for (; n_local > 0; n_local--) { - uint local_num = *ip++; + uint local_num; + while ((local_num = *ip++) != 255) { printf("(INIT_CELL %u)\n", local_num); } len -= ip - mp_showbc_code_start; |
