summaryrefslogtreecommitdiff
path: root/py/showbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-07 00:08:17 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-07 00:08:17 +0100
commitc9aa1883ed87da61d5745036dc55c382c3f4d6ca (patch)
treed4967e844be00547c329f38606f4ac3fc7fc4728 /py/showbc.c
parent78772ada0ddc9222c0338f94a42e33e10bb24b55 (diff)
py: Simplify bytecode prelude when encoding closed over variables.
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c6
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;