py: Simplify bytecode prelude when encoding closed over variables.

This commit is contained in:
Damien George
2015-04-07 00:08:17 +01:00
parent 78772ada0d
commit c9aa1883ed
5 changed files with 8 additions and 27 deletions

View File

@@ -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;