Mailing List Archive

python/dist/src/Python newcompile.c,1.1.2.12,1.1.2.13
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv12002/Python

Modified Files:
Tag: ast-branch
newcompile.c
Log Message:
Restructure struct compiler into two parts.

Each block needs to store its own state. This state had been stored
in struct compiler initially. Now stored in struct compiler_unit.
The compiler_unit is changed whenever a block is entered or exited,
using c_stack.

XXX This makes a lot of code a lot uglier because there are two
pointer dereferences. The extra dereference seems preferable to
passing it as a separate argument everywhere. Probably need to rework
individual functions to use local variable.

Function objects are now created, although their code objects are bogus.

Also, extend switch statements to handle Param.


Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -C2 -d -r1.1.2.12 -r1.1.2.13
*** newcompile.c 1 Oct 2002 19:35:36 -0000 1.1.2.12
--- newcompile.c 2 Oct 2002 11:58:53 -0000 1.1.2.13
***************
*** 23,26 ****
--- 23,50 ----
};

+ /* The following items change on entry and exit of code blocks.
+ They must be saved and restored when returning to a block.
+ */
+ struct compiler_unit {
+ PySTEntryObject *u_ste;
+
+ PyObject *u_name;
+ PyObject *u_consts;
+ PyObject *u_names;
+ PyObject *u_varnames;
+
+ int u_argcount;
+ int u_nblocks;
+ int u_curblock;
+ struct basicblock u_entry;
+ struct basicblock u_exit;
+ struct basicblock **u_blocks;
+
+ int u_nfblocks;
+ struct fblockinfo u_fblock[CO_MAXBLOCKS];
+
+ int u_lineno;
+ };
+
struct compiler {
const char *c_filename;
***************
*** 31,53 ****
int c_interactive;

! /* info that changes for each code block */
! PySTEntryObject *c_ste;
!
! PyObject *c_name;
! PyObject *c_consts;
! PyObject *c_names;
! PyObject *c_varnames;
!
! int c_argcount;
! int c_nblocks;
! int c_curblock;
! struct basicblock c_entry;
! struct basicblock c_exit;
! struct basicblock **c_blocks;
!
! int c_nfblocks;
! struct fblockinfo c_fblock[CO_MAXBLOCKS];
!
! int c_lineno;
};

--- 55,60 ----
int c_interactive;

! struct compiler_unit *u;
! PyObject *c_stack;
};

***************
*** 86,89 ****
--- 93,99 ----
#define IS_JUMP(I) ((I)->i_jrel || (I)->i_jabs)

+ #define BLOCK(U, I) (U)->u_blocks[I]
+ #define CURBLOCK(U) BLOCK(U, (U)->u_curblock)
+
int
_Py_Mangle(char *p, char *name, char *buffer, size_t maxlen)
***************
*** 119,122 ****
--- 129,136 ----
memset(c, 0, sizeof(struct compiler));

+ c->c_stack = PyList_New(0);
+ if (!c->c_stack)
+ return 0;
+
return 1;
}
***************
*** 152,156 ****

fprintf(stderr, "ast %s\n", filename);
-
c.c_st = PySymtable_Build(mod, filename, c.c_future);
if (c.c_st == NULL) {
--- 166,169 ----
***************
*** 173,190 ****
compiler_free(struct compiler *c)
{
- int i;
-
if (c->c_st)
PySymtable_Free(c->c_st);
if (c->c_future)
PyObject_Free((void *)c->c_future);
! for (i = 0; i < c->c_nblocks; i++)
! PyObject_Free((void *)c->c_blocks[i]);
! if (c->c_blocks)
! PyObject_Free((void *)c->c_blocks);
! Py_XDECREF(c->c_name);
! Py_XDECREF(c->c_consts);
! Py_XDECREF(c->c_names);
! Py_XDECREF(c->c_varnames);
}

--- 186,194 ----
compiler_free(struct compiler *c)
{
if (c->c_st)
PySymtable_Free(c->c_st);
if (c->c_future)
PyObject_Free((void *)c->c_future);
! Py_DECREF(c->c_stack);
}

***************
*** 192,220 ****
compiler_enter_scope(struct compiler *c, identifier name, void *key)
{
! c->c_ste = PySymtable_Lookup(c->c_st, key);
! if (!c->c_ste) {
return 0;
}
Py_INCREF(name);
! c->c_name = name;
! c->c_varnames = c->c_ste->ste_varnames;
! Py_INCREF(c->c_varnames);
fprintf(stderr, "block %s varnames %s\n",
PyObject_REPR(name),
! PyObject_REPR(c->c_varnames));
! c->c_nblocks = 0;
! c->c_blocks = (struct basicblock **)PyObject_Malloc(
! sizeof(struct basicblock *) * DEFAULT_BLOCKS);
! if (!c->c_blocks)
return 0;
! memset(c->c_blocks, 0, sizeof(struct basicblock *) * DEFAULT_BLOCKS);
! if (compiler_use_new_block(c) < 0)
return 0;
! c->c_consts = PyDict_New();
! if (!c->c_consts)
return 0;
! c->c_names = PyDict_New();
! if (!c->c_names)
return 0;
return 1;
}
--- 196,240 ----
compiler_enter_scope(struct compiler *c, identifier name, void *key)
{
! struct compiler_unit *u;
!
! u = PyObject_Malloc(sizeof(struct compiler_unit));
! u->u_argcount = 0;
! u->u_ste = PySymtable_Lookup(c->c_st, key);
! if (!u->u_ste) {
return 0;
}
Py_INCREF(name);
! u->u_name = name;
! u->u_varnames = u->u_ste->ste_varnames;
! Py_INCREF(u->u_varnames);
fprintf(stderr, "block %s varnames %s\n",
PyObject_REPR(name),
! PyObject_REPR(u->u_varnames));
! u->u_nblocks = 0;
! u->u_blocks = (struct basicblock **)PyObject_Malloc(
! sizeof(struct basicblock *) * DEFAULT_BLOCKS);
! if (!u->u_blocks)
return 0;
! memset(u->u_blocks, 0, sizeof(struct basicblock *) * DEFAULT_BLOCKS);
! u->u_consts = PyDict_New();
! if (!u->u_consts)
return 0;
! u->u_names = PyDict_New();
! if (!u->u_names)
return 0;
!
! /* Push the old compiler_unit on the stack. */
! if (c->u) {
! PyObject *wrapper = PyCObject_FromVoidPtr(c->u, NULL);
! if (PyList_Append(c->c_stack, wrapper) < 0)
! return 0;
! Py_DECREF(wrapper);
! fprintf(stderr, "stack = %s\n", PyObject_REPR(c->c_stack));
! }
! c->u = u;
!
! if (compiler_use_new_block(c) < 0)
return 0;
+
return 1;
}
***************
*** 223,234 ****
compiler_exit_scope(struct compiler *c)
{
! Py_DECREF(c->c_name);
! c->c_name = NULL;
! Py_DECREF(c->c_consts);
! c->c_consts = NULL;
! Py_DECREF(c->c_names);
! c->c_names = NULL;
! Py_DECREF(c->c_varnames);
! c->c_varnames = NULL;
return 1; /* XXX void? */
}
--- 243,272 ----
compiler_exit_scope(struct compiler *c)
{
! struct compiler_unit *u = c->u;
! int i, n;
! PyObject *wrapper;
!
! for (i = 0; i < u->u_nblocks; i++)
! PyObject_Free((void *)u->u_blocks[i]);
! if (u->u_blocks)
! PyObject_Free((void *)u->u_blocks);
! Py_XDECREF(u->u_name);
! Py_XDECREF(u->u_consts);
! Py_XDECREF(u->u_names);
! Py_XDECREF(u->u_varnames);
!
! PyObject_Free(u);
!
! /* Restore c->u to the parent unit. */
! n = PyList_GET_SIZE(c->c_stack) - 1;
! if (n >= 0) {
! wrapper = PyList_GET_ITEM(c->c_stack, n);
! c->u = (struct compiler_unit *)PyCObject_AsVoidPtr(wrapper);
! if (PySequence_DelItem(c->c_stack, n) < 0)
! return 0;
! }
! else
! c->u = NULL;
!
return 1; /* XXX void? */
}
***************
*** 242,253 ****
{
struct basicblock *b;
int block;

! if (c->c_nblocks && c->c_nblocks % DEFAULT_BLOCKS == 0) {
/* XXX should double */
! int newsize = c->c_nblocks + DEFAULT_BLOCKS;
! c->c_blocks = (struct basicblock **)PyObject_Realloc(
! c->c_blocks, newsize);
! if (c->c_blocks == NULL)
return -1;
}
--- 280,293 ----
{
struct basicblock *b;
+ struct compiler_unit *u;
int block;

! u = c->u;
! if (u->u_nblocks && u->u_nblocks % DEFAULT_BLOCKS == 0) {
/* XXX should double */
! int newsize = u->u_nblocks + DEFAULT_BLOCKS;
! u->u_blocks = (struct basicblock **)PyObject_Realloc(
! u->u_blocks, newsize);
! if (u->u_blocks == NULL)
return -1;
}
***************
*** 257,262 ****
memset((void *)b, 0, sizeof(struct basicblock));
b->b_ialloc = DEFAULT_BLOCK_SIZE;
! block = c->c_nblocks++;
! c->c_blocks[block] = b;
return block;
}
--- 297,302 ----
memset((void *)b, 0, sizeof(struct basicblock));
b->b_ialloc = DEFAULT_BLOCK_SIZE;
! block = u->u_nblocks++;
! u->u_blocks[block] = b;
return block;
}
***************
*** 265,271 ****
compiler_use_block(struct compiler *c, int block)
{
! assert(block < c->c_nblocks);
! c->c_curblock = block;
! assert(c->c_blocks[block]);
}

--- 305,311 ----
compiler_use_block(struct compiler *c, int block)
{
! assert(block < c->u->u_nblocks);
! c->u->u_curblock = block;
! assert(c->u->u_blocks[block]);
}

***************
*** 276,280 ****
if (block < 0)
return 0;
! c->c_curblock = block;
return block;
}
--- 316,320 ----
if (block < 0)
return 0;
! c->u->u_curblock = block;
return block;
}
***************
*** 286,291 ****
if (block < 0)
return 0;
! c->c_blocks[c->c_curblock]->b_next = block;
! c->c_curblock = block;
return block;
}
--- 326,331 ----
if (block < 0)
return 0;
! c->u->u_blocks[c->u->u_curblock]->b_next = block;
! c->u->u_curblock = block;
return block;
}
***************
*** 294,301 ****
compiler_use_next_block(struct compiler *c, int block)
{
! assert(block < c->c_nblocks);
! c->c_blocks[c->c_curblock]->b_next = block;
! assert(c->c_blocks[block]);
! c->c_curblock = block;
return block;
}
--- 334,341 ----
compiler_use_next_block(struct compiler *c, int block)
{
! assert(block < c->u->u_nblocks);
! c->u->u_blocks[c->u->u_curblock]->b_next = block;
! assert(c->u->u_blocks[block]);
! c->u->u_curblock = block;
return block;
}
***************
*** 310,315 ****
{
struct basicblock *b;
! assert(block < c->c_nblocks);
! b = c->c_blocks[block];
assert(b);
if (b->b_iused == b->b_ialloc) {
--- 350,355 ----
{
struct basicblock *b;
! assert(block < c->u->u_nblocks);
! b = c->u->u_blocks[block];
assert(b);
if (b->b_iused == b->b_ialloc) {
***************
*** 324,328 ****
return -1;
if (ptr != (void *)b)
! c->c_blocks[block] = (struct basicblock *)ptr;
}
return b->b_iused++;
--- 364,368 ----
return -1;
if (ptr != (void *)b)
! c->u->u_blocks[block] = (struct basicblock *)ptr;
}
return b->b_iused++;
***************
*** 338,345 ****
struct instr *i;
int off;
! off = compiler_next_instr(c, c->c_curblock);
if (off < 0)
return 0;
! i = &c->c_blocks[c->c_curblock]->b_instr[off];
i->i_opcode = opcode;
i->i_hasarg = 0;
--- 378,385 ----
struct instr *i;
int off;
! off = compiler_next_instr(c, c->u->u_curblock);
if (off < 0)
return 0;
! i = &c->u->u_blocks[c->u->u_curblock]->b_instr[off];
i->i_opcode = opcode;
i->i_hasarg = 0;
***************
*** 380,387 ****
struct instr *i;
int off;
! off = compiler_next_instr(c, c->c_curblock);
if (off < 0)
return 0;
! i = &c->c_blocks[c->c_curblock]->b_instr[off];
i->i_opcode = opcode;
i->i_oparg = oparg;
--- 420,427 ----
struct instr *i;
int off;
! off = compiler_next_instr(c, c->u->u_curblock);
if (off < 0)
return 0;
! i = &c->u->u_blocks[c->u->u_curblock]->b_instr[off];
i->i_opcode = opcode;
i->i_oparg = oparg;
***************
*** 395,402 ****
struct instr *i;
int off;
! off = compiler_next_instr(c, c->c_curblock);
if (off < 0)
return 0;
! i = &c->c_blocks[c->c_curblock]->b_instr[off];
i->i_opcode = opcode;
i->i_oparg = block;
--- 435,442 ----
struct instr *i;
int off;
! off = compiler_next_instr(c, c->u->u_curblock);
if (off < 0)
return 0;
! i = &c->u->u_blocks[c->u->u_curblock]->b_instr[off];
i->i_opcode = opcode;
i->i_oparg = block;
***************
*** 432,436 ****

#define ADDOP_O(C, OP, O, TYPE) { \
! if (!compiler_addop_o((C), (OP), (C)->c_ ## TYPE, (O))) \
return 0; \
}
--- 472,476 ----

#define ADDOP_O(C, OP, O, TYPE) { \
! if (!compiler_addop_o((C), (OP), (C)->u->u_ ## TYPE, (O))) \
return 0; \
}
***************
*** 518,527 ****
if (!compiler_enter_scope(c, s->v.FunctionDef.name, (void *)s))
return 0;
! ndefs += asdl_seq_LEN(args->args);
! c->c_argcount = ndefs;
! if (args->vararg)
! ndefs++;
! if (args->kwarg)
! ndefs++;
VISIT_SEQ(c, stmt, s->v.FunctionDef.body);
co = assemble(c);
--- 558,562 ----
if (!compiler_enter_scope(c, s->v.FunctionDef.name, (void *)s))
return 0;
! c->u->u_argcount = ndefs;
VISIT_SEQ(c, stmt, s->v.FunctionDef.body);
co = assemble(c);
***************
*** 601,605 ****
elif = 1;
s = t;
! c->c_lineno = t->lineno;
}
}
--- 636,640 ----
elif = 1;
s = t;
! c->u->u_lineno = t->lineno;
}
}
***************
*** 689,707 ****
int i;

! if (!c->c_nfblocks)
return compiler_error(c, "'continue' outside loop");
! i = c->c_nfblocks - 1;
! switch (c->c_fblock[i].fb_type) {
case LOOP:
! ADDOP_JABS(c, JUMP_ABSOLUTE, c->c_fblock[i].fb_block);
NEW_BLOCK(c);
break;
case EXCEPT:
case FINALLY_TRY:
! while (--i > 0 && c->c_fblock[i].fb_type != LOOP)
;
if (i == -1)
return compiler_error(c, "'continue' outside loop");
! ADDOP_I(c, CONTINUE_LOOP, c->c_fblock[i].fb_block);
NEW_BLOCK(c);
break;
--- 724,742 ----
int i;

! if (!c->u->u_nfblocks)
return compiler_error(c, "'continue' outside loop");
! i = c->u->u_nfblocks - 1;
! switch (c->u->u_fblock[i].fb_type) {
case LOOP:
! ADDOP_JABS(c, JUMP_ABSOLUTE, c->u->u_fblock[i].fb_block);
NEW_BLOCK(c);
break;
case EXCEPT:
case FINALLY_TRY:
! while (--i > 0 && c->u->u_fblock[i].fb_type != LOOP)
;
if (i == -1)
return compiler_error(c, "'continue' outside loop");
! ADDOP_I(c, CONTINUE_LOOP, c->u->u_fblock[i].fb_block);
NEW_BLOCK(c);
break;
***************
*** 722,726 ****
fprintf(stderr, "compile stmt %d lineno %d\n",
s->kind, s->lineno);
! c->c_lineno = s->lineno; /* XXX this isn't right */
switch (s->kind) {
case FunctionDef_kind:
--- 757,761 ----
fprintf(stderr, "compile stmt %d lineno %d\n",
s->kind, s->lineno);
! c->u->u_lineno = s->lineno; /* XXX this isn't right */
switch (s->kind) {
case FunctionDef_kind:
***************
*** 822,826 ****
break;
case Break_kind:
! if (!c->c_nfblocks)
return compiler_error(c, "'break' outside loop");
ADDOP(c, BREAK_LOOP);
--- 857,861 ----
break;
case Break_kind:
! if (!c->u->u_nfblocks)
return compiler_error(c, "'break' outside loop");
ADDOP(c, BREAK_LOOP);
***************
*** 893,897 ****
op = 0;
optype = OP_NAME;
! scope = PyST_GetScope(c->c_ste, name);
switch (scope) {
case FREE:
--- 928,932 ----
op = 0;
optype = OP_NAME;
! scope = PyST_GetScope(c->u->u_ste, name);
switch (scope) {
case FREE:
***************
*** 900,908 ****
break;
case LOCAL:
! if (c->c_ste->ste_type == FunctionBlock)
optype = OP_FAST;
break;
case GLOBAL_IMPLICIT:
! if (c->c_ste->ste_optimized)
optype = OP_GLOBAL;
break;
--- 935,943 ----
break;
case LOCAL:
! if (c->u->u_ste->ste_type == FunctionBlock)
optype = OP_FAST;
break;
case GLOBAL_IMPLICIT:
! if (c->u->u_ste->ste_optimized)
optype = OP_GLOBAL;
break;
***************
*** 920,923 ****
--- 955,959 ----
break;
case Del:
+ case Param:
assert(0); /* impossible */
}
***************
*** 929,932 ****
--- 965,970 ----
case AugStore:
break;
+ case Param:
+ assert(0); /* impossible */
}
case OP_GLOBAL:
***************
*** 937,940 ****
--- 975,980 ----
case AugStore:
break;
+ case Param:
+ assert(0); /* impossible */
}
case OP_NAME:
***************
*** 945,948 ****
--- 985,990 ----
case AugStore:
break;
+ case Param:
+ assert(0); /* impossible */
}
}
***************
*** 1055,1058 ****
--- 1097,1103 ----
/* XXX */
break;
+ case Param:
+ assert(0);
+ break;
}
break;
***************
*** 1081,1087 ****
{
struct fblockinfo *f;
! if (c->c_nfblocks >= CO_MAXBLOCKS)
return 0;
! f = &c->c_fblock[c->c_nfblocks++];
f->fb_type = t;
f->fb_block = b;
--- 1126,1132 ----
{
struct fblockinfo *f;
! if (c->u->u_nfblocks >= CO_MAXBLOCKS)
return 0;
! f = &c->u->u_fblock[c->u->u_nfblocks++];
f->fb_type = t;
f->fb_block = b;
***************
*** 1092,1099 ****
compiler_pop_fblock(struct compiler *c, enum fblocktype t, int b)
{
! assert(c->c_nfblocks > 0);
! c->c_nfblocks--;
! assert(c->c_fblock[c->c_nfblocks].fb_type == t);
! assert(c->c_fblock[c->c_nfblocks].fb_block == b);
}

--- 1137,1145 ----
compiler_pop_fblock(struct compiler *c, enum fblocktype t, int b)
{
! struct compiler_unit *u = c->u;
! assert(u->u_nfblocks > 0);
! u->u_nfblocks--;
! assert(u->u_fblock[u->u_nfblocks].fb_type == t);
! assert(u->u_fblock[u->u_nfblocks].fb_block == b);
}

***************
*** 1108,1117 ****
PyObject *u = NULL, *v = NULL;

! loc = PyErr_ProgramText(c->c_filename, c->c_lineno);
if (!loc) {
Py_INCREF(Py_None);
loc = Py_None;
}
! u = Py_BuildValue("(ziOO)", c->c_filename, c->c_lineno, Py_None, loc);
if (!u)
goto exit;
--- 1154,1164 ----
PyObject *u = NULL, *v = NULL;

! loc = PyErr_ProgramText(c->c_filename, c->u->u_lineno);
if (!loc) {
Py_INCREF(Py_None);
loc = Py_None;
}
! u = Py_BuildValue("(ziOO)", c->c_filename, c->u->u_lineno,
! Py_None, loc);
if (!u)
goto exit;
***************
*** 1146,1152 ****
struct instr *instr = NULL;

! if (block >= c->c_nblocks)
return;
! b = c->c_blocks[block];
if (b->b_seen)
return;
--- 1193,1199 ----
struct instr *instr = NULL;

! if (block >= c->u->u_nblocks)
return;
! b = c->u->u_blocks[block];
if (b->b_seen)
return;
***************
*** 1235,1239 ****
code = PyString_AS_STRING(a->a_bytecode) + a->a_offset;
fprintf(stderr,
! "emit %3d %-10s %5d\toffset = %2d\tsize = %d\text = %d\n",
i->i_opcode, opnames[i->i_opcode],
i->i_oparg, a->a_offset, size, ext);
--- 1282,1286 ----
code = PyString_AS_STRING(a->a_bytecode) + a->a_offset;
fprintf(stderr,
! "emit %3d %-15s %5d\toffset = %2d\tsize = %d\text = %d\n",
i->i_opcode, opnames[i->i_opcode],
i->i_oparg, a->a_offset, size, ext);
***************
*** 1270,1279 ****
for (i = a->a_nblocks - 1; i >= 0; i--) {
int block = a->a_postorder[i];
! bsize = blocksize(c->c_blocks[block]);
blockoff[block] = totsize;
totsize += bsize;
}
! for (i = 0; i < c->c_nblocks; i++) {
! struct basicblock *b = c->c_blocks[i];
bsize = blockoff[i];
for (j = 0; j < b->b_iused; j++) {
--- 1317,1326 ----
for (i = a->a_nblocks - 1; i >= 0; i--) {
int block = a->a_postorder[i];
! bsize = blocksize(c->u->u_blocks[block]);
blockoff[block] = totsize;
totsize += bsize;
}
! for (i = 0; i < c->u->u_nblocks; i++) {
! struct basicblock *b = c->u->u_blocks[i];
bsize = blockoff[i];
for (j = 0; j < b->b_iused; j++) {
***************
*** 1325,1335 ****
PyObject *nil = PyTuple_New(0);

! consts = dict_keys_inorder(c->c_consts, 0);
if (!consts)
goto error;
! names = dict_keys_inorder(c->c_names, 0);
if (!names)
goto error;
! varnames = PySequence_Tuple(c->c_varnames);
if (!varnames)
goto error;
--- 1372,1382 ----
PyObject *nil = PyTuple_New(0);

! consts = dict_keys_inorder(c->u->u_consts, 0);
if (!consts)
goto error;
! names = dict_keys_inorder(c->u->u_names, 0);
if (!names)
goto error;
! varnames = PySequence_Tuple(c->u->u_varnames);
if (!varnames)
goto error;
***************
*** 1338,1345 ****
goto error;

! co = PyCode_New(c->c_argcount, 0, stackdepth(c), 0,
a->a_bytecode, consts, names, varnames,
nil, nil,
! filename, c->c_name,
0,
filename); /* XXX lnotab */
--- 1385,1392 ----
goto error;

! co = PyCode_New(c->u->u_argcount, 0, stackdepth(c), 0,
a->a_bytecode, consts, names, varnames,
nil, nil,
! filename, c->u->u_name,
0,
filename); /* XXX lnotab */
***************
*** 1369,1373 ****
ADDOP(c, RETURN_VALUE);

! if (!assemble_init(&a, c->c_nblocks))
goto error;
dfs(c, 0, &a);
--- 1416,1420 ----
ADDOP(c, RETURN_VALUE);

! if (!assemble_init(&a, c->u->u_nblocks))
goto error;
dfs(c, 0, &a);
***************
*** 1379,1383 ****
/* Emit code in reverse postorder from dfs. */
for (i = a.a_nblocks - 1; i >= 0; i--) {
! struct basicblock *b = c->c_blocks[a.a_postorder[i]];
fprintf(stderr, "block %d(%d): used=%d alloc=%d\n",
i, a.a_postorder[i], b->b_iused, b->b_ialloc);
--- 1426,1430 ----
/* Emit code in reverse postorder from dfs. */
for (i = a.a_nblocks - 1; i >= 0; i--) {
! struct basicblock *b = c->u->u_blocks[a.a_postorder[i]];
fprintf(stderr, "block %d(%d): used=%d alloc=%d\n",
i, a.a_postorder[i], b->b_iused, b->b_ialloc);
***************
*** 1387,1390 ****
--- 1434,1438 ----
}
}
+ fprintf(stderr, "\n");

if (_PyString_Resize(&a.a_bytecode, a.a_offset) < 0)