[svn:parrot] r44258 - branches/sys_mem_reduce/compilers/imcc

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Feb 20 22:58:37 UTC 2010


Author: bacek
Date: Sat Feb 20 22:58:35 2010
New Revision: 44258
URL: https://trac.parrot.org/parrot/changeset/44258

Log:
Switch IMCC to GC allocations

Modified:
   branches/sys_mem_reduce/compilers/imcc/cfg.c
   branches/sys_mem_reduce/compilers/imcc/cfg.h
   branches/sys_mem_reduce/compilers/imcc/imc.c
   branches/sys_mem_reduce/compilers/imcc/imcc.l
   branches/sys_mem_reduce/compilers/imcc/imcc.y
   branches/sys_mem_reduce/compilers/imcc/imclexer.c
   branches/sys_mem_reduce/compilers/imcc/imcparser.c
   branches/sys_mem_reduce/compilers/imcc/imcparser.h
   branches/sys_mem_reduce/compilers/imcc/parser_util.c
   branches/sys_mem_reduce/compilers/imcc/pbc.c
   branches/sys_mem_reduce/compilers/imcc/pcc.c
   branches/sys_mem_reduce/compilers/imcc/reg_alloc.c
   branches/sys_mem_reduce/compilers/imcc/sets.c
   branches/sys_mem_reduce/compilers/imcc/sets.h
   branches/sys_mem_reduce/compilers/imcc/symreg.c
   branches/sys_mem_reduce/compilers/imcc/symreg.h

Modified: branches/sys_mem_reduce/compilers/imcc/cfg.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/cfg.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/cfg.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -35,27 +35,30 @@
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
-static void analyse_life_block(
+static void analyse_life_block(PARROT_INTERP,
     ARGIN(const Basic_block* bb),
     ARGMOD(SymReg *r))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*r);
 
-static void analyse_life_symbol(
+static void analyse_life_symbol(PARROT_INTERP,
     ARGIN(const IMC_Unit *unit),
     ARGMOD(SymReg* r))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(* r);
 
-static void bb_add_edge(
+static void bb_add_edge(PARROT_INTERP,
     ARGMOD(IMC_Unit *unit),
     ARGIN(Basic_block *from),
     ARGMOD(Basic_block *to))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
         FUNC_MODIFIES(*unit)
         FUNC_MODIFIES(*to);
 
@@ -110,17 +113,19 @@
         __attribute__nonnull__(1)
         FUNC_MODIFIES(*unit);
 
-static void init_basic_blocks(ARGMOD(IMC_Unit *unit))
+static void init_basic_blocks(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
         __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
         FUNC_MODIFIES(*unit);
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
-static Basic_block* make_basic_block(
+static Basic_block* make_basic_block(PARROT_INTERP,
     ARGMOD(IMC_Unit *unit),
     ARGMOD(Instruction *ins))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*unit)
         FUNC_MODIFIES(*ins);
 
@@ -145,13 +150,16 @@
         __attribute__nonnull__(2);
 
 #define ASSERT_ARGS_analyse_life_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(bb) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(bb) \
     , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_analyse_life_symbol __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit) \
     , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_bb_add_edge __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit) \
     , PARROT_ASSERT_ARG(from) \
     , PARROT_ASSERT_ARG(to))
 #define ASSERT_ARGS_bb_check_set_addr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -180,9 +188,11 @@
 #define ASSERT_ARGS_free_loops __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_init_basic_blocks __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_make_basic_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit) \
     , PARROT_ASSERT_ARG(ins))
 #define ASSERT_ARGS_mark_loop __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
@@ -267,7 +277,7 @@
     unsigned int          i;
 
     IMCC_info(interp, 2, "find_basic_blocks\n");
-    init_basic_blocks(unit);
+    init_basic_blocks(interp, unit);
 
     for (i = 0; i < hsh->size; i++) {
         SymReg *r;
@@ -288,7 +298,7 @@
 
     ins->index = i = 0;
 
-    bb         = make_basic_block(unit, ins);
+    bb         = make_basic_block(interp, unit, ins);
 
     if (ins->type & ITBRANCH) {
         SymReg * const addr = get_branch_reg(bb->end);
@@ -326,7 +336,7 @@
             nu = 0;
         else if (ins->type & ITLABEL) {
             bb->end = ins->prev;
-            bb      = make_basic_block(unit, ins);
+            bb      = make_basic_block(interp, unit, ins);
         }
 
         /* a branch is the end of a basic block
@@ -342,7 +352,7 @@
                 continue;
 
             if (ins->next)
-                bb = make_basic_block(unit, ins->next);
+                bb = make_basic_block(interp, unit, ins->next);
 
             nu = 1;
         }
@@ -380,8 +390,8 @@
                     ins->symregs[1]->name);
 
             /* connect this block with first and last block */
-            bb_add_edge(unit, unit->bb_list[0], bb);
-            bb_add_edge(unit, unit->bb_list[unit->n_basic_blocks - 1], bb);
+            bb_add_edge(interp, unit, unit->bb_list[0], bb);
+            bb_add_edge(interp, unit, unit->bb_list[unit->n_basic_blocks - 1], bb);
 
             /* and mark the instruction as being kind of a branch */
             bb->start->type |= ITADDR;
@@ -419,7 +429,7 @@
 
         /* if the block can fall-through */
         if (i > 0 && ! (last->end->type & IF_goto))
-            bb_add_edge(unit, last, bb);
+            bb_add_edge(interp, unit, last, bb);
 
         /* check first ins, if label try to find a set_addr op */
         if (bb->start->type & ITLABEL)
@@ -433,7 +443,7 @@
         else if (STREQ(bb->start->opname, "invoke")
              ||  STREQ(bb->start->opname, "invokecc")) {
             if (check_invoke_type(interp, unit, bb->start) == INVOKE_SUB_LOOP)
-                bb_add_edge(unit, bb, unit->bb_list[0]);
+                bb_add_edge(interp, unit, bb, unit->bb_list[0]);
         }
 
         last = bb;
@@ -486,14 +496,14 @@
     const SymReg * const r = find_sym(interp, label->name);
 
     if (r && (r->type & VTADDRESS) && r->first_ins)
-        bb_add_edge(unit, from, unit->bb_list[r->first_ins->bbindex]);
+        bb_add_edge(interp, unit, from, unit->bb_list[r->first_ins->bbindex]);
     else {
         IMCC_debug(interp, DEBUG_CFG, "register branch %I ", from->end);
         for (ins = from->end; ins; ins = ins->prev) {
             if ((ins->type & ITBRANCH)
             &&   STREQ(ins->opname, "set_addr")
             &&   ins->symregs[1]->first_ins) {
-                bb_add_edge(unit, from,
+                bb_add_edge(interp, unit, from,
                     unit-> bb_list[ins->symregs[1]->first_ins->bbindex]);
                 IMCC_debug(interp, DEBUG_CFG, "(%s) ", ins->symregs[1]->name);
                 break;
@@ -538,8 +548,8 @@
 
 /*
 
-=item C<static void bb_add_edge(IMC_Unit *unit, Basic_block *from, Basic_block
-*to)>
+=item C<static void bb_add_edge(PARROT_INTERP, IMC_Unit *unit, Basic_block
+*from, Basic_block *to)>
 
 Adds an edge between the two given blocks.
 
@@ -548,8 +558,10 @@
 */
 
 static void
-bb_add_edge(ARGMOD(IMC_Unit *unit), ARGIN(Basic_block  *from),
-                                    ARGMOD(Basic_block *to))
+bb_add_edge(PARROT_INTERP,
+        ARGMOD(IMC_Unit *unit),
+        ARGIN(Basic_block  *from),
+        ARGMOD(Basic_block *to))
 {
     ASSERT_ARGS(bb_add_edge)
     Edge *e;
@@ -558,7 +570,7 @@
 
     /* we assume that the data is correct, and thus if the edge is not
      * on the predecessors of 'from', it won't be on the successors of 'to' */
-    e             = mem_allocate_typed(Edge);
+    e             = mem_gc_allocate_typed(interp, Edge);
 
     e->succ_next  = from->succ_list;
     e->from       = from;
@@ -708,13 +720,14 @@
     IMCC_info(interp, 2, "life_analysis\n");
 
     for (i = 0; i < unit->n_symbols; i++)
-        analyse_life_symbol(unit, reglist[i]);
+        analyse_life_symbol(interp, unit, reglist[i]);
 }
 
 
 /*
 
-=item C<static void analyse_life_symbol(const IMC_Unit *unit, SymReg* r)>
+=item C<static void analyse_life_symbol(PARROT_INTERP, const IMC_Unit *unit,
+SymReg* r)>
 
 Analyzes the lifetime for a given symbol.
 
@@ -723,7 +736,8 @@
 */
 
 static void
-analyse_life_symbol(ARGIN(const IMC_Unit *unit), ARGMOD(SymReg* r))
+analyse_life_symbol(PARROT_INTERP,
+        ARGIN(const IMC_Unit *unit), ARGMOD(SymReg* r))
 {
     ASSERT_ARGS(analyse_life_symbol)
     unsigned int i;
@@ -735,13 +749,13 @@
     if (r->life_info)
         free_life_info(unit, r);
 
-    r->life_info = mem_allocate_n_zeroed_typed(unit->n_basic_blocks,
+    r->life_info = mem_gc_allocate_n_zeroed_typed(interp, unit->n_basic_blocks,
                                                Life_range *);
 
     /* First we make a pass to each block to gather the information
      * that can be obtained locally */
     for (i = 0; i < unit->n_basic_blocks; i++) {
-        analyse_life_block(unit->bb_list[i], r);
+        analyse_life_block(interp, unit->bb_list[i], r);
     }
 
     /* Now we need to consider the relations between blocks */
@@ -807,7 +821,8 @@
 
 /*
 
-=item C<static void analyse_life_block(const Basic_block* bb, SymReg *r)>
+=item C<static void analyse_life_block(PARROT_INTERP, const Basic_block* bb,
+SymReg *r)>
 
 Studies the state of the var r in the block bb.
 
@@ -819,10 +834,10 @@
 */
 
 static void
-analyse_life_block(ARGIN(const Basic_block* bb), ARGMOD(SymReg *r))
+analyse_life_block(PARROT_INTERP, ARGIN(const Basic_block* bb), ARGMOD(SymReg *r))
 {
     ASSERT_ARGS(analyse_life_block)
-    Life_range  * const l        = make_life_range(r, bb->index);
+    Life_range  * const l        = make_life_range(interp, r, bb->index);
     Instruction         *special = NULL;
     Instruction         *ins;
 
@@ -985,19 +1000,19 @@
     const unsigned int n = unit->n_basic_blocks;
     IMCC_info(interp, 2, "compute_dominators\n");
 
-    unit->idoms          = mem_allocate_n_zeroed_typed(n, int);
-    dominators           = mem_allocate_n_zeroed_typed(n, Set *);
+    unit->idoms          = mem_gc_allocate_n_zeroed_typed(interp, n, int);
+    dominators           = mem_gc_allocate_n_zeroed_typed(interp, n, Set *);
     unit->dominators     = dominators;
 
-    dominators[0]        = set_make(n);
+    dominators[0]        = set_make(interp, n);
     set_add(dominators[0], 0);
 
     for (i = n - 1; i; --i) {
         if (unit->bb_list[i]->pred_list) {
-            dominators[i] = set_make_full(n);
+            dominators[i] = set_make_full(interp, n);
         }
         else {
-            dominators[i] = set_make(n);
+            dominators[i] = set_make(interp, n);
             set_add(dominators[i], i);
         }
     }
@@ -1034,7 +1049,7 @@
 
         /* TODO: This 'for' should be a breadth-first search for speed */
         for (i = 1; i < n; i++) {
-            Set  * const s = set_copy(dominators[i]);
+            Set  * const s = set_copy(interp, dominators[i]);
             Edge *edge;
 
             for (edge = unit->bb_list[i]->pred_list;
@@ -1113,12 +1128,12 @@
 
     const int    n                   = unit->n_basic_blocks;
     Set ** const dominance_frontiers = unit->dominance_frontiers =
-        mem_allocate_n_typed(n, Set *);
+            mem_gc_allocate_n_typed(interp, n, Set *);
 
     IMCC_info(interp, 2, "compute_dominance_frontiers\n");
 
     for (i = 0; i < n; i++) {
-        dominance_frontiers[i] = set_make(n);
+        dominance_frontiers[i] = set_make(interp, n);
     }
 
     /* for all nodes, b */
@@ -1416,7 +1431,7 @@
                 "\tcan't determine loop entry block (%d found)\n" , i);
     }
 
-    loop = set_make(unit->n_basic_blocks);
+    loop = set_make(interp, unit->n_basic_blocks);
     set_add(loop, footer->index);
     set_add(loop, header->index);
 
@@ -1427,7 +1442,7 @@
         search_predecessors_not_in(footer, loop);
     }
 
-    exits = set_make(unit->n_basic_blocks);
+    exits = set_make(interp, unit->n_basic_blocks);
 
     for (i = 1; i < unit->n_basic_blocks; i++) {
         if (set_contains(loop, i)) {
@@ -1443,9 +1458,10 @@
 
     /* now 'loop' contains the set of nodes inside the loop.  */
     n_loops                       = unit->n_loops;
-    loop_info                     = mem_realloc_n_typed(unit->loop_info,
-                                        n_loops + 1, Loop_info *);
-    loop_info[n_loops]            = mem_allocate_typed(Loop_info);
+    loop_info                     = mem_gc_realloc_n_typed(interp,
+                                            unit->loop_info,
+                                            n_loops + 1, Loop_info *);
+    loop_info[n_loops]            = mem_gc_allocate_typed(interp, Loop_info);
     loop_info[n_loops]->loop      = loop;
     loop_info[n_loops]->exits     = exits;
     loop_info[n_loops]->depth     = footer->loop_depth;
@@ -1453,6 +1469,8 @@
     loop_info[n_loops]->header    = header->index;
     loop_info[n_loops]->preheader = natural_preheader(unit, loop_info[n_loops]);
 
+    unit->loop_info = loop_info;
+
     unit->n_loops++;
 }
 
@@ -1518,7 +1536,7 @@
 
 /*
 
-=item C<static void init_basic_blocks(IMC_Unit *unit)>
+=item C<static void init_basic_blocks(PARROT_INTERP, IMC_Unit *unit)>
 
 Initializes the basic blocks memory for this unit.
 
@@ -1527,7 +1545,7 @@
 */
 
 static void
-init_basic_blocks(ARGMOD(IMC_Unit *unit))
+init_basic_blocks(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
 {
     ASSERT_ARGS(init_basic_blocks)
 
@@ -1537,8 +1555,8 @@
     unit->n_basic_blocks = 0;
     unit->edge_list      = NULL;
     unit->bb_list_size   = 256;
-    unit->bb_list        = mem_allocate_n_zeroed_typed(unit->bb_list_size,
-                                                     Basic_block *);
+    unit->bb_list        = mem_gc_allocate_n_zeroed_typed(interp,
+                                    unit->bb_list_size, Basic_block *);
 }
 
 
@@ -1576,7 +1594,8 @@
 
 /*
 
-=item C<static Basic_block* make_basic_block(IMC_Unit *unit, Instruction *ins)>
+=item C<static Basic_block* make_basic_block(PARROT_INTERP, IMC_Unit *unit,
+Instruction *ins)>
 
 Creates, initializes, and returns a new Basic_block.
 
@@ -1587,10 +1606,10 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 static Basic_block*
-make_basic_block(ARGMOD(IMC_Unit *unit), ARGMOD(Instruction *ins))
+make_basic_block(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGMOD(Instruction *ins))
 {
     ASSERT_ARGS(make_basic_block)
-    Basic_block * const bb = mem_allocate_typed(Basic_block);
+    Basic_block * const bb = mem_gc_allocate_typed(interp, Basic_block);
     int                 n  = unit->n_basic_blocks;
 
     bb->start      = ins;
@@ -1605,7 +1624,8 @@
 
     if (n == unit->bb_list_size) {
         unit->bb_list_size *= 2;
-        mem_realloc_n_typed(unit->bb_list, unit->bb_list_size, Basic_block *);
+        unit->bb_list = mem_gc_realloc_n_typed(interp, unit->bb_list,
+                    unit->bb_list_size, Basic_block *);
     }
 
     unit->bb_list[n] = bb;
@@ -1617,7 +1637,7 @@
 
 /*
 
-=item C<Life_range * make_life_range(SymReg *r, int idx)>
+=item C<Life_range * make_life_range(PARROT_INTERP, SymReg *r, int idx)>
 
 Creates and returns a Life_range for the given register at the specified index.
 
@@ -1628,10 +1648,10 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 Life_range *
-make_life_range(ARGMOD(SymReg *r), int idx)
+make_life_range(PARROT_INTERP, ARGMOD(SymReg *r), int idx)
 {
     ASSERT_ARGS(make_life_range)
-    Life_range * const l = mem_allocate_zeroed_typed(Life_range);
+    Life_range * const l = mem_gc_allocate_zeroed_typed(interp, Life_range);
     r->life_info[idx]    = l;
 
     return l;

Modified: branches/sys_mem_reduce/compilers/imcc/cfg.h
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/cfg.h	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/cfg.h	Sat Feb 20 22:58:35 2010	(r44258)
@@ -100,8 +100,9 @@
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Life_range * make_life_range(ARGMOD(SymReg *r), int idx)
+Life_range * make_life_range(PARROT_INTERP, ARGMOD(SymReg *r), int idx)
         __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
         FUNC_MODIFIES(*r);
 
 PARROT_WARN_UNUSED_RESULT
@@ -147,7 +148,8 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_make_life_range __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(r))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_natural_preheader __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(unit) \
     , PARROT_ASSERT_ARG(loop_info))

Modified: branches/sys_mem_reduce/compilers/imcc/imc.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/imc.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/imc.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -39,12 +39,14 @@
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
-static IMC_Unit * imc_new_unit(IMC_Unit_Type t);
+static IMC_Unit * imc_new_unit(PARROT_INTERP, IMC_Unit_Type t)
+        __attribute__nonnull__(1);
 
 #define ASSERT_ARGS_imc_free_unit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_imc_new_unit __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_imc_new_unit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
@@ -153,7 +155,7 @@
 
 /*
 
-=item C<static IMC_Unit * imc_new_unit(IMC_Unit_Type t)>
+=item C<static IMC_Unit * imc_new_unit(PARROT_INTERP, IMC_Unit_Type t)>
 
 Creates a new IMC_Unit of the given IMC_Unit_Type C<t>.
 
@@ -164,11 +166,11 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
 static IMC_Unit *
-imc_new_unit(IMC_Unit_Type t)
+imc_new_unit(PARROT_INTERP, IMC_Unit_Type t)
 {
     ASSERT_ARGS(imc_new_unit)
-    IMC_Unit * const unit = mem_allocate_zeroed_typed(IMC_Unit);
-    create_symhash(&unit->hash);
+    IMC_Unit * const unit = mem_gc_allocate_zeroed_typed(interp, IMC_Unit);
+    create_symhash(interp, &unit->hash);
     unit->type = t;
     return unit;
 }
@@ -191,14 +193,14 @@
 imc_open_unit(PARROT_INTERP, IMC_Unit_Type t)
 {
     ASSERT_ARGS(imc_open_unit)
-    IMC_Unit   * const unit     = imc_new_unit(t);
+    IMC_Unit   * const unit     = imc_new_unit(interp, t);
     imc_info_t * const imc_info = IMCC_INFO(interp);
 
     if (!imc_info->imc_units)
         imc_info->imc_units = unit;
 
     if (!imc_info->ghash.data)
-        create_symhash(&imc_info->ghash);
+        create_symhash(interp, &imc_info->ghash);
 
     unit->prev = imc_info->last_unit;
 

Modified: branches/sys_mem_reduce/compilers/imcc/imcc.l
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/imcc.l	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/imcc.l	Sat Feb 20 22:58:35 2010	(r44258)
@@ -787,7 +787,7 @@
 static macro_frame_t *
 new_frame(PARROT_INTERP) {
     static int label   = 0;
-    macro_frame_t * const tmp = mem_allocate_zeroed_typed(macro_frame_t);
+    macro_frame_t * const tmp = mem_gc_allocate_zeroed_typed(interp, macro_frame_t);
 
     tmp->label         = ++label;
     tmp->s.line        = IMCC_INFO(interp)->line;
@@ -1107,7 +1107,7 @@
         m->expansion = NULL;
     }
     else {
-        m = mem_allocate_zeroed_typed(macro_t);
+        m = mem_gc_allocate_zeroed_typed(interp, macro_t);
 
         if (!IMCC_INFO(interp)->macros)
             IMCC_INFO(interp)->macros = parrot_new_cstring_hash(interp);

Modified: branches/sys_mem_reduce/compilers/imcc/imcc.y
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/imcc.y	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/imcc.y	Sat Feb 20 22:58:35 2010	(r44258)
@@ -43,57 +43,62 @@
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
-static void add_pcc_named_arg(
+static void add_pcc_named_arg(PARROT_INTERP,
     ARGMOD(SymReg *cur_call),
     ARGMOD(SymReg *name),
     ARGMOD(SymReg *value))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
         FUNC_MODIFIES(*cur_call)
         FUNC_MODIFIES(*name)
         FUNC_MODIFIES(*value);
 
-static void add_pcc_named_arg_var(
+static void add_pcc_named_arg_var(PARROT_INTERP,
     ARGMOD(SymReg *cur_call),
     ARGMOD(SymReg *name),
     ARGMOD(SymReg *value))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
         FUNC_MODIFIES(*cur_call)
         FUNC_MODIFIES(*name)
         FUNC_MODIFIES(*value);
 
-static void add_pcc_named_param(
+static void add_pcc_named_param(PARROT_INTERP,
     ARGMOD(SymReg *cur_call),
     ARGMOD(SymReg *name),
     ARGMOD(SymReg *value))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
         FUNC_MODIFIES(*cur_call)
         FUNC_MODIFIES(*name)
         FUNC_MODIFIES(*value);
 
-static void add_pcc_named_result(
+static void add_pcc_named_result(PARROT_INTERP,
     ARGMOD(SymReg *cur_call),
     ARGMOD(SymReg *name),
     ARGMOD(SymReg *value))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
         FUNC_MODIFIES(*cur_call)
         FUNC_MODIFIES(*name)
         FUNC_MODIFIES(*value);
 
-static void add_pcc_named_return(
+static void add_pcc_named_return(PARROT_INTERP,
     ARGMOD(SymReg *cur_call),
     ARGMOD(SymReg *name),
     ARGMOD(SymReg *value))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
         FUNC_MODIFIES(*cur_call)
         FUNC_MODIFIES(*name)
         FUNC_MODIFIES(*value);
@@ -251,23 +256,28 @@
         FUNC_MODIFIES(*name);
 
 #define ASSERT_ARGS_add_pcc_named_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_arg_var __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_return __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_adv_named_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -648,7 +658,7 @@
     Instruction * const i = iLABEL(interp, unit, r);
 
     r->type    = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : VT_PCC_SUB;
-    r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+    r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
 
     IMCC_INFO(interp)->cur_call = r;
     i->line                     = IMCC_INFO(interp)->line;
@@ -899,105 +909,111 @@
 
 /*
 
-=item C<static void add_pcc_named_arg(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_arg(ARGMOD(SymReg *cur_call),
+add_pcc_named_arg(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_arg)
     name->type  |= VT_NAMED;
 
-    add_pcc_arg(cur_call, name);
-    add_pcc_arg(cur_call, value);
+    add_pcc_arg(interp, cur_call, name);
+    add_pcc_arg(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_arg_var(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg_var(PARROT_INTERP, SymReg *cur_call,
+SymReg *name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_arg_var(ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name), ARGMOD(SymReg *value))
+add_pcc_named_arg_var(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
+        ARGMOD(SymReg *name),
+        ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_arg_var)
     name->type |= VT_NAMED;
-    add_pcc_arg(cur_call, name);
-    add_pcc_arg(cur_call, value);
+    add_pcc_arg(interp, cur_call, name);
+    add_pcc_arg(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_result(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_result(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_result(ARGMOD(SymReg *cur_call),
+add_pcc_named_result(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_result)
     name->type         |= VT_NAMED;
 
-    add_pcc_result(cur_call, name);
-    add_pcc_result(cur_call, value);
+    add_pcc_result(interp, cur_call, name);
+    add_pcc_result(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_param(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_param(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_param(ARGMOD(SymReg *cur_call),
+add_pcc_named_param(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_param)
     name->type         |= VT_NAMED;
 
-    add_pcc_arg(cur_call, name);
-    add_pcc_arg(cur_call, value);
+    add_pcc_arg(interp, cur_call, name);
+    add_pcc_arg(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_return(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_return(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_return(ARGMOD(SymReg *cur_call),
+add_pcc_named_return(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_return)
     name->type         |= VT_NAMED;
 
-    add_pcc_result(cur_call, name);
-    add_pcc_result(cur_call, value);
+    add_pcc_result(interp, cur_call, name);
+    add_pcc_result(interp, cur_call, value);
 }
 
 /*
@@ -1387,12 +1403,12 @@
    | sub_params sub_param '\n'
          {
            if (IMCC_INFO(interp)->adv_named_id) {
-                 add_pcc_named_param(IMCC_INFO(interp)->cur_call,
+                 add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
                                      IMCC_INFO(interp)->adv_named_id, $2);
                  IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_arg(IMCC_INFO(interp)->cur_call, $2);
+               add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $2);
          }
    ;
 
@@ -1516,17 +1532,17 @@
 multi_types:
      /* empty */
          {
-           add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
+           add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
          }
    | multi_types COMMA multi_type
          {
            $$ = 0;
-           add_pcc_multi(IMCC_INFO(interp)->cur_call, $3);
+           add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, $3);
          }
    | multi_type
          {
            $$ = 0;
-           add_pcc_multi(IMCC_INFO(interp)->cur_call, $1);
+           add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, $1);
          }
    ;
 
@@ -1673,7 +1689,7 @@
 
 pcc_args:
      /* empty */               { $$ = 0; }
-   | pcc_args pcc_arg '\n'     { add_pcc_arg(IMCC_INFO(interp)->cur_call, $2); }
+   | pcc_args pcc_arg '\n'     { add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $2); }
    ;
 
 pcc_arg:
@@ -1686,7 +1702,7 @@
    | pcc_results pcc_result '\n'
          {
            if ($2)
-               add_pcc_result(IMCC_INFO(interp)->cur_call, $2);
+               add_pcc_result(interp, IMCC_INFO(interp)->cur_call, $2);
          }
    ;
 
@@ -1745,12 +1761,12 @@
    | pcc_returns '\n'
          {
            if ($1)
-               add_pcc_result(IMCC_INFO(interp)->sr_return, $1);
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $1);
          }
    | pcc_returns pcc_return '\n'
          {
            if ($2)
-               add_pcc_result(IMCC_INFO(interp)->sr_return, $2);
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $2);
          }
    ;
 
@@ -1759,12 +1775,12 @@
    | pcc_yields '\n'
          {
            if ($1)
-               add_pcc_result(IMCC_INFO(interp)->sr_return, $1);
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $1);
          }
    | pcc_yields pcc_set_yield '\n'
          {
            if ($2)
-               add_pcc_result(IMCC_INFO(interp)->sr_return, $2);
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $2);
          }
    ;
 
@@ -1799,32 +1815,32 @@
    | arg
          {
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+               add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
                                     IMCC_INFO(interp)->adv_named_id, $1);
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_result(IMCC_INFO(interp)->sr_return, $1);
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $1);
          }
    | STRINGC ADV_ARROW var
          {
             SymReg * const name = mk_const(interp, $1, 'S');
-            add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, $3);
+            add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, $3);
          }
    | var_returns COMMA arg
          {
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+               add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
                                     IMCC_INFO(interp)->adv_named_id, $3);
                IMCC_INFO(interp)->adv_named_id = NULL;
              }
              else
-                 add_pcc_result(IMCC_INFO(interp)->sr_return, $3);
+                 add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $3);
          }
    | var_returns COMMA STRINGC ADV_ARROW var
          {
            SymReg * const name = mk_const(interp, $3, 'S');
-           add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, $5);
+           add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, $5);
          }
    ;
 
@@ -1908,7 +1924,7 @@
 id_list_id :
      IDENTIFIER opt_unique_reg
          {
-           IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
+           IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
            l->id           = $1;
            l->unique_reg   = $2;
            $$ = l;
@@ -2053,7 +2069,7 @@
      /* Subroutine call the short way */
    | target  '=' sub_call
          {
-           add_pcc_result($3->symregs[0], $1);
+           add_pcc_result(interp, $3->symregs[0], $1);
            IMCC_INFO(interp)->cur_call = NULL;
            $$ = 0;
          }
@@ -2209,38 +2225,38 @@
          {
            $$ = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
+               add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_arg(IMCC_INFO(interp)->cur_call, $3);
+               add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $3);
          }
    | arg
          {
            $$ = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
+               add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_arg(IMCC_INFO(interp)->cur_call, $1);
+               add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $1);
          }
    | arglist COMMA STRINGC ADV_ARROW var
          {
            $$ = 0;
-           add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+           add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
                 mk_const(interp, $3, 'S'), $5);
            mem_sys_free($3);
          }
    | var ADV_ARROW var
          {
            $$ = 0;
-           add_pcc_named_arg_var(IMCC_INFO(interp)->cur_call, $1, $3);
+           add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, $1, $3);
          }
    | STRINGC ADV_ARROW var
          {
            $$ = 0;
-           add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+           add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
                 mk_const(interp, $1, 'S'), $3);
            mem_sys_free($1);
          }
@@ -2274,31 +2290,31 @@
          {
            $$ = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
+               add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_result(IMCC_INFO(interp)->cur_call, $3);
+               add_pcc_result(interp, IMCC_INFO(interp)->cur_call, $3);
          }
    | targetlist COMMA STRINGC ADV_ARROW target
          {
-            add_pcc_named_result(IMCC_INFO(interp)->cur_call,
-            mk_const(interp, $3, 'S'), $5);
+            add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
+                    mk_const(interp, $3, 'S'), $5);
             mem_sys_free($3);
          }
    | result
          {
            $$ = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
+               add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_result(IMCC_INFO(interp)->cur_call, $1);
+               add_pcc_result(interp, IMCC_INFO(interp)->cur_call, $1);
          }
    | STRINGC ADV_ARROW target
          {
-           add_pcc_named_result(IMCC_INFO(interp)->cur_call, mk_const(interp, $1, 'S'), $3);
+           add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, $1, 'S'), $3);
            mem_sys_free($1);
          }
    | /* empty */                { $$ = 0; }

Modified: branches/sys_mem_reduce/compilers/imcc/imclexer.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/imclexer.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/imclexer.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -5209,7 +5209,7 @@
 static macro_frame_t *
 new_frame(PARROT_INTERP) {
     static int label   = 0;
-    macro_frame_t * const tmp = mem_allocate_zeroed_typed(macro_frame_t);
+    macro_frame_t * const tmp = mem_gc_allocate_zeroed_typed(interp, macro_frame_t);
 
     tmp->label         = ++label;
     tmp->s.line        = IMCC_INFO(interp)->line;
@@ -5529,7 +5529,7 @@
         m->expansion = NULL;
     }
     else {
-        m = mem_allocate_zeroed_typed(macro_t);
+        m = mem_gc_allocate_zeroed_typed(interp, macro_t);
 
         if (!IMCC_INFO(interp)->macros)
             IMCC_INFO(interp)->macros = parrot_new_cstring_hash(interp);

Modified: branches/sys_mem_reduce/compilers/imcc/imcparser.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/imcparser.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/imcparser.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -9,26 +9,27 @@
  */
 /* HEADERIZER HFILE: none */
 /* HEADERIZER STOP */
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
+
+   This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -39,7 +40,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
@@ -57,7 +58,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -65,146 +66,394 @@
 /* Pure parsers.  */
 #define YYPURE 1
 
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 
 
-/* Copy the first part of user declarations.  */
-
-/* Line 189 of yacc.c  */
-#line 1 "compilers/imcc/imcc.y"
-
-/*
- * imcc.y
- *
- * Intermediate Code Compiler for Parrot.
- *
- * Copyright (C) 2002 Melvin Smith <melvin.smith at mindspring.com>
- * Copyright (C) 2002-2009, Parrot Foundation.
- *
- * Grammar of the PIR language parser.
- *
- * $Id$
- *
- */
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define _PARSER
-#define PARSER_MAIN
-#include "imc.h"
-#include "parrot/dynext.h"
-#include "pmc/pmc_callcontext.h"
-#include "pbc.h"
-#include "parser.h"
-#include "optimizer.h"
-
-/* prevent declarations of malloc() and free() in the generated parser. */
-#define YYMALLOC
-#define YYFREE
-
-#ifndef YYENABLE_NLS
-#  define YYENABLE_NLS 0
-#endif
-
-#ifndef YYLTYPE_IS_TRIVIAL
-#  define YYLTYPE_IS_TRIVIAL 0
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     LOW_PREC = 258,
+     PARAM = 259,
+     HLL = 260,
+     TK_LINE = 261,
+     TK_FILE = 262,
+     GOTO = 263,
+     ARG = 264,
+     IF = 265,
+     UNLESS = 266,
+     PNULL = 267,
+     SET_RETURN = 268,
+     SET_YIELD = 269,
+     ADV_FLAT = 270,
+     ADV_SLURPY = 271,
+     ADV_OPTIONAL = 272,
+     ADV_OPT_FLAG = 273,
+     ADV_NAMED = 274,
+     ADV_ARROW = 275,
+     NEW = 276,
+     ADV_INVOCANT = 277,
+     ADV_CALL_SIG = 278,
+     NAMESPACE = 279,
+     DOT_METHOD = 280,
+     SUB = 281,
+     SYM = 282,
+     LOCAL = 283,
+     LEXICAL = 284,
+     CONST = 285,
+     ANNOTATE = 286,
+     INC = 287,
+     DEC = 288,
+     GLOBAL_CONST = 289,
+     PLUS_ASSIGN = 290,
+     MINUS_ASSIGN = 291,
+     MUL_ASSIGN = 292,
+     DIV_ASSIGN = 293,
+     CONCAT_ASSIGN = 294,
+     BAND_ASSIGN = 295,
+     BOR_ASSIGN = 296,
+     BXOR_ASSIGN = 297,
+     FDIV = 298,
+     FDIV_ASSIGN = 299,
+     MOD_ASSIGN = 300,
+     SHR_ASSIGN = 301,
+     SHL_ASSIGN = 302,
+     SHR_U_ASSIGN = 303,
+     SHIFT_LEFT = 304,
+     SHIFT_RIGHT = 305,
+     INTV = 306,
+     FLOATV = 307,
+     STRINGV = 308,
+     PMCV = 309,
+     LOG_XOR = 310,
+     RELOP_EQ = 311,
+     RELOP_NE = 312,
+     RELOP_GT = 313,
+     RELOP_GTE = 314,
+     RELOP_LT = 315,
+     RELOP_LTE = 316,
+     RESULT = 317,
+     RETURN = 318,
+     TAILCALL = 319,
+     YIELDT = 320,
+     GET_RESULTS = 321,
+     POW = 322,
+     SHIFT_RIGHT_U = 323,
+     LOG_AND = 324,
+     LOG_OR = 325,
+     COMMA = 326,
+     ESUB = 327,
+     DOTDOT = 328,
+     PCC_BEGIN = 329,
+     PCC_END = 330,
+     PCC_CALL = 331,
+     PCC_SUB = 332,
+     PCC_BEGIN_RETURN = 333,
+     PCC_END_RETURN = 334,
+     PCC_BEGIN_YIELD = 335,
+     PCC_END_YIELD = 336,
+     NCI_CALL = 337,
+     METH_CALL = 338,
+     INVOCANT = 339,
+     MAIN = 340,
+     LOAD = 341,
+     INIT = 342,
+     IMMEDIATE = 343,
+     POSTCOMP = 344,
+     METHOD = 345,
+     ANON = 346,
+     OUTER = 347,
+     NEED_LEX = 348,
+     MULTI = 349,
+     VTABLE_METHOD = 350,
+     LOADLIB = 351,
+     SUB_INSTANCE_OF = 352,
+     SUBID = 353,
+     NS_ENTRY = 354,
+     UNIQUE_REG = 355,
+     LABEL = 356,
+     EMIT = 357,
+     EOM = 358,
+     IREG = 359,
+     NREG = 360,
+     SREG = 361,
+     PREG = 362,
+     IDENTIFIER = 363,
+     REG = 364,
+     MACRO = 365,
+     ENDM = 366,
+     STRINGC = 367,
+     INTC = 368,
+     FLOATC = 369,
+     USTRINGC = 370,
+     PARROT_OP = 371,
+     VAR = 372,
+     LINECOMMENT = 373,
+     FILECOMMENT = 374,
+     DOT = 375,
+     CONCAT = 376
+   };
 #endif
-
-/* HEADERIZER HFILE: compilers/imcc/imc.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-
-static void add_pcc_named_arg(
-    ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name),
-    ARGMOD(SymReg *value))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*cur_call)
-        FUNC_MODIFIES(*name)
-        FUNC_MODIFIES(*value);
-
-static void add_pcc_named_arg_var(
-    ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name),
-    ARGMOD(SymReg *value))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*cur_call)
-        FUNC_MODIFIES(*name)
-        FUNC_MODIFIES(*value);
-
-static void add_pcc_named_param(
-    ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name),
-    ARGMOD(SymReg *value))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*cur_call)
-        FUNC_MODIFIES(*name)
-        FUNC_MODIFIES(*value);
-
-static void add_pcc_named_result(
-    ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name),
-    ARGMOD(SymReg *value))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*cur_call)
-        FUNC_MODIFIES(*name)
-        FUNC_MODIFIES(*value);
-
-static void add_pcc_named_return(
-    ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name),
-    ARGMOD(SymReg *value))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        FUNC_MODIFIES(*cur_call)
-        FUNC_MODIFIES(*name)
-        FUNC_MODIFIES(*value);
-
-static void adv_named_set(PARROT_INTERP, ARGIN(const char *name))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static void adv_named_set_u(PARROT_INTERP, ARGIN(const char *name))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static void begin_return_or_yield(PARROT_INTERP, int yield)
-        __attribute__nonnull__(1);
-
-static void clear_state(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
-static void do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static Instruction* func_ins(PARROT_INTERP,
-    ARGMOD(IMC_Unit *unit),
-    ARGIN(SymReg *lhs),
-    ARGIN(const char *op),
-    ARGMOD(SymReg **r),
+/* Tokens.  */
+#define LOW_PREC 258
+#define PARAM 259
+#define HLL 260
+#define TK_LINE 261
+#define TK_FILE 262
+#define GOTO 263
+#define ARG 264
+#define IF 265
+#define UNLESS 266
+#define PNULL 267
+#define SET_RETURN 268
+#define SET_YIELD 269
+#define ADV_FLAT 270
+#define ADV_SLURPY 271
+#define ADV_OPTIONAL 272
+#define ADV_OPT_FLAG 273
+#define ADV_NAMED 274
+#define ADV_ARROW 275
+#define NEW 276
+#define ADV_INVOCANT 277
+#define ADV_CALL_SIG 278
+#define NAMESPACE 279
+#define DOT_METHOD 280
+#define SUB 281
+#define SYM 282
+#define LOCAL 283
+#define LEXICAL 284
+#define CONST 285
+#define ANNOTATE 286
+#define INC 287
+#define DEC 288
+#define GLOBAL_CONST 289
+#define PLUS_ASSIGN 290
+#define MINUS_ASSIGN 291
+#define MUL_ASSIGN 292
+#define DIV_ASSIGN 293
+#define CONCAT_ASSIGN 294
+#define BAND_ASSIGN 295
+#define BOR_ASSIGN 296
+#define BXOR_ASSIGN 297
+#define FDIV 298
+#define FDIV_ASSIGN 299
+#define MOD_ASSIGN 300
+#define SHR_ASSIGN 301
+#define SHL_ASSIGN 302
+#define SHR_U_ASSIGN 303
+#define SHIFT_LEFT 304
+#define SHIFT_RIGHT 305
+#define INTV 306
+#define FLOATV 307
+#define STRINGV 308
+#define PMCV 309
+#define LOG_XOR 310
+#define RELOP_EQ 311
+#define RELOP_NE 312
+#define RELOP_GT 313
+#define RELOP_GTE 314
+#define RELOP_LT 315
+#define RELOP_LTE 316
+#define RESULT 317
+#define RETURN 318
+#define TAILCALL 319
+#define YIELDT 320
+#define GET_RESULTS 321
+#define POW 322
+#define SHIFT_RIGHT_U 323
+#define LOG_AND 324
+#define LOG_OR 325
+#define COMMA 326
+#define ESUB 327
+#define DOTDOT 328
+#define PCC_BEGIN 329
+#define PCC_END 330
+#define PCC_CALL 331
+#define PCC_SUB 332
+#define PCC_BEGIN_RETURN 333
+#define PCC_END_RETURN 334
+#define PCC_BEGIN_YIELD 335
+#define PCC_END_YIELD 336
+#define NCI_CALL 337
+#define METH_CALL 338
+#define INVOCANT 339
+#define MAIN 340
+#define LOAD 341
+#define INIT 342
+#define IMMEDIATE 343
+#define POSTCOMP 344
+#define METHOD 345
+#define ANON 346
+#define OUTER 347
+#define NEED_LEX 348
+#define MULTI 349
+#define VTABLE_METHOD 350
+#define LOADLIB 351
+#define SUB_INSTANCE_OF 352
+#define SUBID 353
+#define NS_ENTRY 354
+#define UNIQUE_REG 355
+#define LABEL 356
+#define EMIT 357
+#define EOM 358
+#define IREG 359
+#define NREG 360
+#define SREG 361
+#define PREG 362
+#define IDENTIFIER 363
+#define REG 364
+#define MACRO 365
+#define ENDM 366
+#define STRINGC 367
+#define INTC 368
+#define FLOATC 369
+#define USTRINGC 370
+#define PARROT_OP 371
+#define VAR 372
+#define LINECOMMENT 373
+#define FILECOMMENT 374
+#define DOT 375
+#define CONCAT 376
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 1 "compilers/imcc/imcc.y"
+
+/*
+ * imcc.y
+ *
+ * Intermediate Code Compiler for Parrot.
+ *
+ * Copyright (C) 2002 Melvin Smith <melvin.smith at mindspring.com>
+ * Copyright (C) 2002-2009, Parrot Foundation.
+ *
+ * Grammar of the PIR language parser.
+ *
+ * $Id$
+ *
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define _PARSER
+#define PARSER_MAIN
+#include "imc.h"
+#include "parrot/dynext.h"
+#include "pmc/pmc_callcontext.h"
+#include "pbc.h"
+#include "parser.h"
+#include "optimizer.h"
+
+/* prevent declarations of malloc() and free() in the generated parser. */
+#define YYMALLOC
+#define YYFREE
+
+#ifndef YYENABLE_NLS
+#  define YYENABLE_NLS 0
+#endif
+
+#ifndef YYLTYPE_IS_TRIVIAL
+#  define YYLTYPE_IS_TRIVIAL 0
+#endif
+
+/* HEADERIZER HFILE: compilers/imcc/imc.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
+
+static void add_pcc_named_arg(PARROT_INTERP,
+    ARGMOD(SymReg *cur_call),
+    ARGMOD(SymReg *name),
+    ARGMOD(SymReg *value))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*cur_call)
+        FUNC_MODIFIES(*name)
+        FUNC_MODIFIES(*value);
+
+static void add_pcc_named_arg_var(PARROT_INTERP,
+    ARGMOD(SymReg *cur_call),
+    ARGMOD(SymReg *name),
+    ARGMOD(SymReg *value))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*cur_call)
+        FUNC_MODIFIES(*name)
+        FUNC_MODIFIES(*value);
+
+static void add_pcc_named_param(PARROT_INTERP,
+    ARGMOD(SymReg *cur_call),
+    ARGMOD(SymReg *name),
+    ARGMOD(SymReg *value))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*cur_call)
+        FUNC_MODIFIES(*name)
+        FUNC_MODIFIES(*value);
+
+static void add_pcc_named_result(PARROT_INTERP,
+    ARGMOD(SymReg *cur_call),
+    ARGMOD(SymReg *name),
+    ARGMOD(SymReg *value))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*cur_call)
+        FUNC_MODIFIES(*name)
+        FUNC_MODIFIES(*value);
+
+static void add_pcc_named_return(PARROT_INTERP,
+    ARGMOD(SymReg *cur_call),
+    ARGMOD(SymReg *name),
+    ARGMOD(SymReg *value))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*cur_call)
+        FUNC_MODIFIES(*name)
+        FUNC_MODIFIES(*value);
+
+static void adv_named_set(PARROT_INTERP, ARGIN(const char *name))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+static void adv_named_set_u(PARROT_INTERP, ARGIN(const char *name))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+static void begin_return_or_yield(PARROT_INTERP, int yield)
+        __attribute__nonnull__(1);
+
+static void clear_state(PARROT_INTERP)
+        __attribute__nonnull__(1);
+
+static void do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+static Instruction* func_ins(PARROT_INTERP,
+    ARGMOD(IMC_Unit *unit),
+    ARGIN(SymReg *lhs),
+    ARGIN(const char *op),
+    ARGMOD(SymReg **r),
     int n,
     int keyv,
     int emit)
@@ -333,23 +582,28 @@
         FUNC_MODIFIES(*name);
 
 #define ASSERT_ARGS_add_pcc_named_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_arg_var __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_add_pcc_named_return __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(cur_call) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(cur_call) \
     , PARROT_ASSERT_ARG(name) \
     , PARROT_ASSERT_ARG(value))
 #define ASSERT_ARGS_adv_named_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -730,7 +984,7 @@
     Instruction * const i = iLABEL(interp, unit, r);
 
     r->type    = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : VT_PCC_SUB;
-    r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+    r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
 
     IMCC_INFO(interp)->cur_call = r;
     i->line                     = IMCC_INFO(interp)->line;
@@ -981,105 +1235,111 @@
 
 /*
 
-=item C<static void add_pcc_named_arg(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_arg(ARGMOD(SymReg *cur_call),
+add_pcc_named_arg(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_arg)
     name->type  |= VT_NAMED;
 
-    add_pcc_arg(cur_call, name);
-    add_pcc_arg(cur_call, value);
+    add_pcc_arg(interp, cur_call, name);
+    add_pcc_arg(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_arg_var(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg_var(PARROT_INTERP, SymReg *cur_call,
+SymReg *name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_arg_var(ARGMOD(SymReg *cur_call),
-    ARGMOD(SymReg *name), ARGMOD(SymReg *value))
+add_pcc_named_arg_var(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
+        ARGMOD(SymReg *name),
+        ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_arg_var)
     name->type |= VT_NAMED;
-    add_pcc_arg(cur_call, name);
-    add_pcc_arg(cur_call, value);
+    add_pcc_arg(interp, cur_call, name);
+    add_pcc_arg(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_result(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_result(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_result(ARGMOD(SymReg *cur_call),
+add_pcc_named_result(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_result)
     name->type         |= VT_NAMED;
 
-    add_pcc_result(cur_call, name);
-    add_pcc_result(cur_call, value);
+    add_pcc_result(interp, cur_call, name);
+    add_pcc_result(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_param(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_param(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_param(ARGMOD(SymReg *cur_call),
+add_pcc_named_param(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_param)
     name->type         |= VT_NAMED;
 
-    add_pcc_arg(cur_call, name);
-    add_pcc_arg(cur_call, value);
+    add_pcc_arg(interp, cur_call, name);
+    add_pcc_arg(interp, cur_call, value);
 }
 
 /*
 
-=item C<static void add_pcc_named_return(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_return(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
 
 =cut
 
 */
 
 static void
-add_pcc_named_return(ARGMOD(SymReg *cur_call),
+add_pcc_named_return(PARROT_INTERP,
+        ARGMOD(SymReg *cur_call),
         ARGMOD(SymReg *name),
         ARGMOD(SymReg *value))
 {
     ASSERT_ARGS(add_pcc_named_return)
     name->type         |= VT_NAMED;
 
-    add_pcc_result(cur_call, name);
-    add_pcc_result(cur_call, value);
+    add_pcc_result(interp, cur_call, name);
+    add_pcc_result(interp, cur_call, value);
 }
 
 /*
@@ -1122,324 +1382,65 @@
 
 =cut
 
-*/
-
-static void
-do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
-{
-    ASSERT_ARGS(do_loadlib)
-    STRING * const s = Parrot_str_unescape(interp, lib + 1, '"', NULL);
-    PMC    *ignored  = Parrot_load_lib(interp, s, NULL);
-    UNUSED(ignored);
-    Parrot_register_HLL_lib(interp, s);
-}
-
-/* HEADERIZER STOP */
-
-
-
-/* Line 189 of yacc.c  */
-#line 1132 "compilers/imcc/imcparser.c"
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     LOW_PREC = 258,
-     PARAM = 259,
-     HLL = 260,
-     TK_LINE = 261,
-     TK_FILE = 262,
-     GOTO = 263,
-     ARG = 264,
-     IF = 265,
-     UNLESS = 266,
-     PNULL = 267,
-     SET_RETURN = 268,
-     SET_YIELD = 269,
-     ADV_FLAT = 270,
-     ADV_SLURPY = 271,
-     ADV_OPTIONAL = 272,
-     ADV_OPT_FLAG = 273,
-     ADV_NAMED = 274,
-     ADV_ARROW = 275,
-     NEW = 276,
-     ADV_INVOCANT = 277,
-     ADV_CALL_SIG = 278,
-     NAMESPACE = 279,
-     DOT_METHOD = 280,
-     SUB = 281,
-     SYM = 282,
-     LOCAL = 283,
-     LEXICAL = 284,
-     CONST = 285,
-     ANNOTATE = 286,
-     INC = 287,
-     DEC = 288,
-     GLOBAL_CONST = 289,
-     PLUS_ASSIGN = 290,
-     MINUS_ASSIGN = 291,
-     MUL_ASSIGN = 292,
-     DIV_ASSIGN = 293,
-     CONCAT_ASSIGN = 294,
-     BAND_ASSIGN = 295,
-     BOR_ASSIGN = 296,
-     BXOR_ASSIGN = 297,
-     FDIV = 298,
-     FDIV_ASSIGN = 299,
-     MOD_ASSIGN = 300,
-     SHR_ASSIGN = 301,
-     SHL_ASSIGN = 302,
-     SHR_U_ASSIGN = 303,
-     SHIFT_LEFT = 304,
-     SHIFT_RIGHT = 305,
-     INTV = 306,
-     FLOATV = 307,
-     STRINGV = 308,
-     PMCV = 309,
-     LOG_XOR = 310,
-     RELOP_EQ = 311,
-     RELOP_NE = 312,
-     RELOP_GT = 313,
-     RELOP_GTE = 314,
-     RELOP_LT = 315,
-     RELOP_LTE = 316,
-     RESULT = 317,
-     RETURN = 318,
-     TAILCALL = 319,
-     YIELDT = 320,
-     GET_RESULTS = 321,
-     POW = 322,
-     SHIFT_RIGHT_U = 323,
-     LOG_AND = 324,
-     LOG_OR = 325,
-     COMMA = 326,
-     ESUB = 327,
-     DOTDOT = 328,
-     PCC_BEGIN = 329,
-     PCC_END = 330,
-     PCC_CALL = 331,
-     PCC_SUB = 332,
-     PCC_BEGIN_RETURN = 333,
-     PCC_END_RETURN = 334,
-     PCC_BEGIN_YIELD = 335,
-     PCC_END_YIELD = 336,
-     NCI_CALL = 337,
-     METH_CALL = 338,
-     INVOCANT = 339,
-     MAIN = 340,
-     LOAD = 341,
-     INIT = 342,
-     IMMEDIATE = 343,
-     POSTCOMP = 344,
-     METHOD = 345,
-     ANON = 346,
-     OUTER = 347,
-     NEED_LEX = 348,
-     MULTI = 349,
-     VTABLE_METHOD = 350,
-     LOADLIB = 351,
-     SUB_INSTANCE_OF = 352,
-     SUBID = 353,
-     NS_ENTRY = 354,
-     UNIQUE_REG = 355,
-     LABEL = 356,
-     EMIT = 357,
-     EOM = 358,
-     IREG = 359,
-     NREG = 360,
-     SREG = 361,
-     PREG = 362,
-     IDENTIFIER = 363,
-     REG = 364,
-     MACRO = 365,
-     ENDM = 366,
-     STRINGC = 367,
-     INTC = 368,
-     FLOATC = 369,
-     USTRINGC = 370,
-     PARROT_OP = 371,
-     VAR = 372,
-     LINECOMMENT = 373,
-     FILECOMMENT = 374,
-     DOT = 375,
-     CONCAT = 376
-   };
-#endif
-/* Tokens.  */
-#define LOW_PREC 258
-#define PARAM 259
-#define HLL 260
-#define TK_LINE 261
-#define TK_FILE 262
-#define GOTO 263
-#define ARG 264
-#define IF 265
-#define UNLESS 266
-#define PNULL 267
-#define SET_RETURN 268
-#define SET_YIELD 269
-#define ADV_FLAT 270
-#define ADV_SLURPY 271
-#define ADV_OPTIONAL 272
-#define ADV_OPT_FLAG 273
-#define ADV_NAMED 274
-#define ADV_ARROW 275
-#define NEW 276
-#define ADV_INVOCANT 277
-#define ADV_CALL_SIG 278
-#define NAMESPACE 279
-#define DOT_METHOD 280
-#define SUB 281
-#define SYM 282
-#define LOCAL 283
-#define LEXICAL 284
-#define CONST 285
-#define ANNOTATE 286
-#define INC 287
-#define DEC 288
-#define GLOBAL_CONST 289
-#define PLUS_ASSIGN 290
-#define MINUS_ASSIGN 291
-#define MUL_ASSIGN 292
-#define DIV_ASSIGN 293
-#define CONCAT_ASSIGN 294
-#define BAND_ASSIGN 295
-#define BOR_ASSIGN 296
-#define BXOR_ASSIGN 297
-#define FDIV 298
-#define FDIV_ASSIGN 299
-#define MOD_ASSIGN 300
-#define SHR_ASSIGN 301
-#define SHL_ASSIGN 302
-#define SHR_U_ASSIGN 303
-#define SHIFT_LEFT 304
-#define SHIFT_RIGHT 305
-#define INTV 306
-#define FLOATV 307
-#define STRINGV 308
-#define PMCV 309
-#define LOG_XOR 310
-#define RELOP_EQ 311
-#define RELOP_NE 312
-#define RELOP_GT 313
-#define RELOP_GTE 314
-#define RELOP_LT 315
-#define RELOP_LTE 316
-#define RESULT 317
-#define RETURN 318
-#define TAILCALL 319
-#define YIELDT 320
-#define GET_RESULTS 321
-#define POW 322
-#define SHIFT_RIGHT_U 323
-#define LOG_AND 324
-#define LOG_OR 325
-#define COMMA 326
-#define ESUB 327
-#define DOTDOT 328
-#define PCC_BEGIN 329
-#define PCC_END 330
-#define PCC_CALL 331
-#define PCC_SUB 332
-#define PCC_BEGIN_RETURN 333
-#define PCC_END_RETURN 334
-#define PCC_BEGIN_YIELD 335
-#define PCC_END_YIELD 336
-#define NCI_CALL 337
-#define METH_CALL 338
-#define INVOCANT 339
-#define MAIN 340
-#define LOAD 341
-#define INIT 342
-#define IMMEDIATE 343
-#define POSTCOMP 344
-#define METHOD 345
-#define ANON 346
-#define OUTER 347
-#define NEED_LEX 348
-#define MULTI 349
-#define VTABLE_METHOD 350
-#define LOADLIB 351
-#define SUB_INSTANCE_OF 352
-#define SUBID 353
-#define NS_ENTRY 354
-#define UNIQUE_REG 355
-#define LABEL 356
-#define EMIT 357
-#define EOM 358
-#define IREG 359
-#define NREG 360
-#define SREG 361
-#define PREG 362
-#define IDENTIFIER 363
-#define REG 364
-#define MACRO 365
-#define ENDM 366
-#define STRINGC 367
-#define INTC 368
-#define FLOATC 369
-#define USTRINGC 370
-#define PARROT_OP 371
-#define VAR 372
-#define LINECOMMENT 373
-#define FILECOMMENT 374
-#define DOT 375
-#define CONCAT 376
+*/
+
+static void
+do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
+{
+    ASSERT_ARGS(do_loadlib)
+    STRING * const s = Parrot_str_unescape(interp, lib + 1, '"', NULL);
+    PMC    *ignored  = Parrot_load_lib(interp, s, NULL);
+    UNUSED(ignored);
+    Parrot_register_HLL_lib(interp, s);
+}
+
+/* HEADERIZER STOP */
+
 
 
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
 
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+#line 1075 "compilers/imcc/imcc.y"
 {
-
-/* Line 214 of yacc.c  */
-#line 1059 "compilers/imcc/imcc.y"
-
     IdList * idlist;
     int t;
     char * s;
     SymReg * sr;
     Instruction *i;
-
-
-
-/* Line 214 of yacc.c  */
+}
+/* Line 187 of yacc.c.  */
 #line 1420 "compilers/imcc/imcparser.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
+
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 1432 "compilers/imcc/imcparser.c"
+/* Line 216 of yacc.c.  */
+#line 1433 "compilers/imcc/imcparser.c"
 
 #ifdef short
 # undef short
@@ -1514,14 +1515,14 @@
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int yyi)
+YYID (int i)
 #else
 static int
-YYID (yyi)
-    int yyi;
+YYID (i)
+    int i;
 #endif
 {
-  return yyi;
+  return i;
 }
 #endif
 
@@ -1602,9 +1603,9 @@
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-};
+  yytype_int16 yyss;
+  YYSTYPE yyvs;
+  };
 
 /* The size of the maximum gap between one aligned stack and the next.  */
 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -1638,12 +1639,12 @@
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+# define YYSTACK_RELOCATE(Stack)					\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
-	Stack = &yyptr->Stack_alloc;					\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -1860,40 +1861,40 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,  1154,  1154,  1158,  1159,  1163,  1164,  1165,  1171,  1177,
-    1178,  1179,  1180,  1184,  1185,  1194,  1200,  1208,  1220,  1233,
-    1233,  1242,  1242,  1249,  1249,  1258,  1259,  1263,  1264,  1268,
-    1269,  1270,  1271,  1272,  1273,  1274,  1277,  1277,  1286,  1285,
-    1298,  1302,  1315,  1319,  1323,  1323,  1335,  1337,  1341,  1356,
-    1360,  1365,  1369,  1373,  1364,  1385,  1386,  1387,  1400,  1400,
-    1404,  1430,  1434,  1440,  1449,  1455,  1464,  1470,  1479,  1485,
-    1494,  1502,  1507,  1518,  1521,  1526,  1534,  1535,  1536,  1537,
-    1538,  1549,  1560,  1563,  1565,  1570,  1569,  1602,  1603,  1607,
-    1608,  1612,  1613,  1617,  1618,  1622,  1623,  1624,  1625,  1626,
-    1627,  1628,  1629,  1630,  1631,  1632,  1633,  1634,  1635,  1639,
-    1644,  1648,  1653,  1657,  1661,  1666,  1675,  1676,  1680,  1685,
-    1686,  1694,  1695,  1695,  1710,  1711,  1715,  1716,  1717,  1718,
-    1719,  1720,  1721,  1722,  1727,  1727,  1730,  1738,  1738,  1744,
-    1745,  1750,  1758,  1759,  1764,  1772,  1776,  1781,  1780,  1793,
-    1794,  1798,  1799,  1809,  1814,  1824,  1833,  1834,  1846,  1850,
-    1852,  1853,  1854,  1855,  1856,  1860,  1861,  1865,  1866,  1870,
-    1881,  1882,  1893,  1900,  1909,  1919,  1920,  1925,  1926,  1927,
-    1927,  1943,  1960,  1973,  1973,  1980,  1981,  1981,  1987,  1993,
-    1997,  2009,  2010,  2011,  2012,  2013,  2014,  2018,  2019,  2020,
-    2021,  2025,  2038,  2040,  2042,  2044,  2046,  2051,  2054,  2061,
-    2060,  2069,  2070,  2071,  2072,  2080,  2081,  2082,  2086,  2087,
-    2088,  2089,  2090,  2091,  2092,  2093,  2094,  2095,  2096,  2097,
-    2098,  2099,  2100,  2101,  2102,  2103,  2104,  2105,  2106,  2107,
-    2108,  2114,  2113,  2125,  2130,  2131,  2132,  2133,  2134,  2135,
-    2136,  2137,  2138,  2139,  2140,  2141,  2142,  2147,  2158,  2159,
-    2160,  2161,  2167,  2181,  2187,  2193,  2199,  2198,  2207,  2208,
-    2218,  2228,  2235,  2240,  2250,  2254,  2255,  2259,  2260,  2261,
-    2264,  2265,  2269,  2273,  2283,  2289,  2299,  2304,  2308,  2309,
-    2313,  2317,  2321,  2328,  2332,  2336,  2343,  2344,  2348,  2349,
-    2350,  2351,  2352,  2353,  2357,  2358,  2362,  2363,  2367,  2368,
-    2372,  2373,  2380,  2387,  2388,  2389,  2393,  2394,  2398,  2399,
-    2403,  2404,  2408,  2409,  2413,  2413,  2425,  2425,  2437,  2438,
-    2446,  2453,  2454,  2455,  2456,  2457,  2461,  2462,  2463,  2464
+       0,  1170,  1170,  1174,  1175,  1179,  1180,  1181,  1187,  1193,
+    1194,  1195,  1196,  1200,  1201,  1210,  1216,  1224,  1236,  1249,
+    1249,  1258,  1258,  1265,  1265,  1274,  1275,  1279,  1280,  1284,
+    1285,  1286,  1287,  1288,  1289,  1290,  1293,  1293,  1302,  1301,
+    1314,  1318,  1331,  1335,  1339,  1339,  1351,  1353,  1357,  1372,
+    1376,  1381,  1385,  1389,  1380,  1401,  1402,  1403,  1416,  1416,
+    1420,  1446,  1450,  1456,  1465,  1471,  1480,  1486,  1495,  1501,
+    1510,  1518,  1523,  1534,  1537,  1542,  1550,  1551,  1552,  1553,
+    1554,  1565,  1576,  1579,  1581,  1586,  1585,  1618,  1619,  1623,
+    1624,  1628,  1629,  1633,  1634,  1638,  1639,  1640,  1641,  1642,
+    1643,  1644,  1645,  1646,  1647,  1648,  1649,  1650,  1651,  1655,
+    1660,  1664,  1669,  1673,  1677,  1682,  1691,  1692,  1696,  1701,
+    1702,  1710,  1711,  1711,  1726,  1727,  1731,  1732,  1733,  1734,
+    1735,  1736,  1737,  1738,  1743,  1743,  1746,  1754,  1754,  1760,
+    1761,  1766,  1774,  1775,  1780,  1788,  1792,  1797,  1796,  1809,
+    1810,  1814,  1815,  1825,  1830,  1840,  1849,  1850,  1862,  1866,
+    1868,  1869,  1870,  1871,  1872,  1876,  1877,  1881,  1882,  1886,
+    1897,  1898,  1909,  1916,  1925,  1935,  1936,  1941,  1942,  1943,
+    1943,  1959,  1976,  1989,  1989,  1996,  1997,  1997,  2003,  2009,
+    2013,  2025,  2026,  2027,  2028,  2029,  2030,  2034,  2035,  2036,
+    2037,  2041,  2054,  2056,  2058,  2060,  2062,  2067,  2070,  2077,
+    2076,  2085,  2086,  2087,  2088,  2096,  2097,  2098,  2102,  2103,
+    2104,  2105,  2106,  2107,  2108,  2109,  2110,  2111,  2112,  2113,
+    2114,  2115,  2116,  2117,  2118,  2119,  2120,  2121,  2122,  2123,
+    2124,  2130,  2129,  2141,  2146,  2147,  2148,  2149,  2150,  2151,
+    2152,  2153,  2154,  2155,  2156,  2157,  2158,  2163,  2174,  2175,
+    2176,  2177,  2183,  2197,  2203,  2209,  2215,  2214,  2223,  2224,
+    2234,  2244,  2251,  2256,  2266,  2270,  2271,  2275,  2276,  2277,
+    2280,  2281,  2285,  2289,  2299,  2305,  2315,  2320,  2324,  2325,
+    2329,  2333,  2337,  2344,  2348,  2352,  2359,  2360,  2364,  2365,
+    2366,  2367,  2368,  2369,  2373,  2374,  2378,  2379,  2383,  2384,
+    2388,  2389,  2396,  2403,  2404,  2405,  2409,  2410,  2414,  2415,
+    2419,  2420,  2424,  2425,  2429,  2429,  2441,  2441,  2453,  2454,
+    2462,  2469,  2470,  2471,  2472,  2473,  2477,  2478,  2479,  2480
 };
 #endif
 
@@ -1923,31 +1924,30 @@
   "EMIT", "EOM", "IREG", "NREG", "SREG", "PREG", "IDENTIFIER", "REG",
   "MACRO", "ENDM", "STRINGC", "INTC", "FLOATC", "USTRINGC", "PARROT_OP",
   "VAR", "LINECOMMENT", "FILECOMMENT", "DOT", "CONCAT", "'='", "'['",
-  "']'", "'('", "')'", "'n'", "'!'", "'~'", "'-'", "'+'", "'*'", "'/'",
+  "']'", "'('", "')'", "'new'", "'!'", "'~'", "'-'", "'+'", "'*'", "'/'",
   "'%'", "'&'", "'|'", "';'", "$accept", "program", "compilation_units",
   "compilation_unit", "pragma", "location_directive", "annotate_directive",
-  "hll_def", "constdef", "$@1", "pmc_const", "$@2", "$@3", "any_string",
-  "pasmcode", "pasmline", "pasm_inst", "$@4", "$@5", "pasm_args", "emit",
-  "$@6", "opt_pasmcode", "class_namespace", "maybe_ns", "sub", "$@7",
-  "$@8", "$@9", "sub_params", "sub_param", "$@10", "sub_param_type_def",
-  "multi", "outer", "vtable", "method", "ns_entry_name", "instanceof",
-  "subid", "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@11",
+  "hll_def", "constdef", "@1", "pmc_const", "@2", "@3", "any_string",
+  "pasmcode", "pasmline", "pasm_inst", "@4", "@5", "pasm_args", "emit",
+  "@6", "opt_pasmcode", "class_namespace", "maybe_ns", "sub", "@7", "@8",
+  "@9", "sub_params", "sub_param", "@10", "sub_param_type_def", "multi",
+  "outer", "vtable", "method", "ns_entry_name", "instanceof", "subid",
+  "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@11",
   "opt_label", "opt_invocant", "sub_proto", "sub_proto_list", "proto",
-  "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "$@12",
-  "paramtype_list", "paramtype", "pcc_ret", "$@13", "pcc_yield", "$@14",
+  "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "@12",
+  "paramtype_list", "paramtype", "pcc_ret", "@13", "pcc_yield", "@14",
   "pcc_returns", "pcc_yields", "pcc_return", "pcc_set_yield",
-  "pcc_return_many", "$@15", "return_or_yield", "var_returns",
-  "statements", "helper_clear_state", "statement", "labels", "_labels",
-  "label", "instruction", "id_list", "id_list_id", "opt_unique_reg",
-  "labeled_inst", "$@16", "$@17", "$@18", "type", "classname",
-  "assignment", "@19", "un_op", "bin_op", "get_results", "@20",
-  "op_assign", "assign_op", "func_assign", "the_sub", "sub_call", "@21",
-  "arglist", "arg", "argtype_list", "argtype", "result", "targetlist",
-  "conditional_statement", "unless_statement", "if_statement",
-  "comma_or_goto", "relop", "target", "vars", "_vars", "_var_or_i",
-  "sub_label_op_c", "sub_label_op", "label_op", "var_or_i", "var",
-  "keylist", "$@22", "keylist_force", "$@23", "_keylist", "key", "reg",
-  "const", 0
+  "pcc_return_many", "@15", "return_or_yield", "var_returns", "statements",
+  "helper_clear_state", "statement", "labels", "_labels", "label",
+  "instruction", "id_list", "id_list_id", "opt_unique_reg", "labeled_inst",
+  "@16", "@17", "@18", "type", "classname", "assignment", "@19", "un_op",
+  "bin_op", "get_results", "@20", "op_assign", "assign_op", "func_assign",
+  "the_sub", "sub_call", "@21", "arglist", "arg", "argtype_list",
+  "argtype", "result", "targetlist", "conditional_statement",
+  "unless_statement", "if_statement", "comma_or_goto", "relop", "target",
+  "vars", "_vars", "_var_or_i", "sub_label_op_c", "sub_label_op",
+  "label_op", "var_or_i", "var", "keylist", "@22", "keylist_force", "@23",
+  "_keylist", "key", "reg", "const", 0
 };
 #endif
 
@@ -2605,20 +2605,17 @@
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
 #else
 static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+    yytype_int16 *bottom;
+    yytype_int16 *top;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
   YYFPRINTF (stderr, "\n");
 }
 
@@ -2654,11 +2651,11 @@
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      fprintf (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
 		       		       , yyscanner, interp);
-      YYFPRINTF (stderr, "\n");
+      fprintf (stderr, "\n");
     }
 }
 
@@ -2942,8 +2939,10 @@
 	break;
     }
 }
+
 
 /* Prevent warnings from -Wmissing-prototypes.  */
+
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -2962,9 +2961,10 @@
 
 
 
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -2989,46 +2989,22 @@
 #endif
 #endif
 {
-/* The lookahead symbol.  */
+  /* The look-ahead symbol.  */
 int yychar;
 
-/* The semantic value of the lookahead symbol.  */
+/* The semantic value of the look-ahead symbol.  */
 YYSTYPE yylval;
 
-    /* Number of syntax errors so far.  */
-    int yynerrs;
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    YYSIZE_T yystacksize;
+/* Number of syntax errors so far.  */
+int yynerrs;
 
+  int yystate;
   int yyn;
   int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int yytoken = 0;
 #if YYERROR_VERBOSE
   /* Buffer for error messages, and its allocated size.  */
   char yymsgbuf[128];
@@ -3036,28 +3012,51 @@
   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  yytype_int16 yyssa[YYINITDEPTH];
+  yytype_int16 *yyss = yyssa;
+  yytype_int16 *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  YYSTYPE *yyvsp;
+
+
+
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yystacksize = YYINITDEPTH;
-
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
 
   /* Initialize stack pointers.
      Waste one element of value and location stack
      so that they stay on the same level as the state stack.
      The wasted elements are never initialized.  */
+
   yyssp = yyss;
   yyvsp = yyvs;
 
@@ -3087,6 +3086,7 @@
 	YYSTYPE *yyvs1 = yyvs;
 	yytype_int16 *yyss1 = yyss;
 
+
 	/* Each stack pointer address is followed by the size of the
 	   data in use in that stack, in bytes.  This used to be a
 	   conditional around just the two extra args, but that might
@@ -3094,6 +3094,7 @@
 	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
+
 		    &yystacksize);
 
 	yyss = yyss1;
@@ -3116,8 +3117,9 @@
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss_alloc, yyss);
-	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -3128,6 +3130,7 @@
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
+
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
@@ -3137,9 +3140,6 @@
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
   goto yybackup;
 
 /*-----------.
@@ -3148,16 +3148,16 @@
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
+     look-ahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to lookahead token.  */
+  /* First try to decide what to do without reference to look-ahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a lookahead token if don't already have one.  */
+  /* Not known => get a look-ahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -3189,16 +3189,20 @@
       goto yyreduce;
     }
 
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the lookahead token.  */
+  /* Shift the look-ahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
+  /* Discard the shifted token unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -3238,30 +3242,22 @@
   switch (yyn)
     {
         case 2:
-
-/* Line 1455 of yacc.c  */
-#line 1154 "compilers/imcc/imcc.y"
+#line 1170 "compilers/imcc/imcc.y"
     { if (yynerrs) YYABORT; (yyval.i) = 0; }
     break;
 
   case 5:
-
-/* Line 1455 of yacc.c  */
-#line 1163 "compilers/imcc/imcc.y"
+#line 1179 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 6:
-
-/* Line 1455 of yacc.c  */
-#line 1164 "compilers/imcc/imcc.y"
+#line 1180 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 7:
-
-/* Line 1455 of yacc.c  */
-#line 1166 "compilers/imcc/imcc.y"
+#line 1182 "compilers/imcc/imcc.y"
     {
            (yyval.i) = (yyvsp[(1) - (1)].i);
            imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3270,9 +3266,7 @@
     break;
 
   case 8:
-
-/* Line 1455 of yacc.c  */
-#line 1172 "compilers/imcc/imcc.y"
+#line 1188 "compilers/imcc/imcc.y"
     {
            (yyval.i) = (yyvsp[(1) - (1)].i);
            imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3281,44 +3275,32 @@
     break;
 
   case 9:
-
-/* Line 1455 of yacc.c  */
-#line 1177 "compilers/imcc/imcc.y"
+#line 1193 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 10:
-
-/* Line 1455 of yacc.c  */
-#line 1178 "compilers/imcc/imcc.y"
+#line 1194 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 11:
-
-/* Line 1455 of yacc.c  */
-#line 1179 "compilers/imcc/imcc.y"
+#line 1195 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 12:
-
-/* Line 1455 of yacc.c  */
-#line 1180 "compilers/imcc/imcc.y"
+#line 1196 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 13:
-
-/* Line 1455 of yacc.c  */
-#line 1184 "compilers/imcc/imcc.y"
+#line 1200 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 14:
-
-/* Line 1455 of yacc.c  */
-#line 1186 "compilers/imcc/imcc.y"
+#line 1202 "compilers/imcc/imcc.y"
     {
            (yyval.i) = 0;
            do_loadlib(interp, (yyvsp[(2) - (3)].s));
@@ -3327,9 +3309,7 @@
     break;
 
   case 15:
-
-/* Line 1455 of yacc.c  */
-#line 1195 "compilers/imcc/imcc.y"
+#line 1211 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
            /* set_filename() frees the STRINGC */
@@ -3338,9 +3318,7 @@
     break;
 
   case 16:
-
-/* Line 1455 of yacc.c  */
-#line 1201 "compilers/imcc/imcc.y"
+#line 1217 "compilers/imcc/imcc.y"
     {
            /* set_filename() frees the STRINGC */
            set_filename(interp, (yyvsp[(2) - (3)].s));
@@ -3348,9 +3326,7 @@
     break;
 
   case 17:
-
-/* Line 1455 of yacc.c  */
-#line 1209 "compilers/imcc/imcc.y"
+#line 1225 "compilers/imcc/imcc.y"
     {
           /* We'll want to store an entry while emitting instructions, so just
            * store annotation like it's an instruction. */
@@ -3361,9 +3337,7 @@
     break;
 
   case 18:
-
-/* Line 1455 of yacc.c  */
-#line 1221 "compilers/imcc/imcc.y"
+#line 1237 "compilers/imcc/imcc.y"
     {
             STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
             Parrot_pcc_set_HLL(interp, CURRENT_CONTEXT(interp),
@@ -3376,16 +3350,12 @@
     break;
 
   case 19:
-
-/* Line 1455 of yacc.c  */
-#line 1233 "compilers/imcc/imcc.y"
+#line 1249 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 20:
-
-/* Line 1455 of yacc.c  */
-#line 1234 "compilers/imcc/imcc.y"
+#line 1250 "compilers/imcc/imcc.y"
     {
              mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
              mem_sys_free((yyvsp[(4) - (6)].s));
@@ -3394,16 +3364,12 @@
     break;
 
   case 21:
-
-/* Line 1455 of yacc.c  */
-#line 1242 "compilers/imcc/imcc.y"
+#line 1258 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 22:
-
-/* Line 1455 of yacc.c  */
-#line 1243 "compilers/imcc/imcc.y"
+#line 1259 "compilers/imcc/imcc.y"
     {
            (yyval.i) = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
            mem_sys_free((yyvsp[(6) - (6)].s));
@@ -3412,16 +3378,12 @@
     break;
 
   case 23:
-
-/* Line 1455 of yacc.c  */
-#line 1249 "compilers/imcc/imcc.y"
+#line 1265 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 24:
-
-/* Line 1455 of yacc.c  */
-#line 1250 "compilers/imcc/imcc.y"
+#line 1266 "compilers/imcc/imcc.y"
     {
            (yyval.i) = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
            mem_sys_free((yyvsp[(3) - (6)].s));
@@ -3431,51 +3393,37 @@
     break;
 
   case 29:
-
-/* Line 1455 of yacc.c  */
-#line 1268 "compilers/imcc/imcc.y"
+#line 1284 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;  }
     break;
 
   case 30:
-
-/* Line 1455 of yacc.c  */
-#line 1269 "compilers/imcc/imcc.y"
+#line 1285 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;  }
     break;
 
   case 31:
-
-/* Line 1455 of yacc.c  */
-#line 1270 "compilers/imcc/imcc.y"
+#line 1286 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;  }
     break;
 
   case 32:
-
-/* Line 1455 of yacc.c  */
-#line 1271 "compilers/imcc/imcc.y"
+#line 1287 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;  }
     break;
 
   case 33:
-
-/* Line 1455 of yacc.c  */
-#line 1272 "compilers/imcc/imcc.y"
+#line 1288 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 36:
-
-/* Line 1455 of yacc.c  */
-#line 1277 "compilers/imcc/imcc.y"
+#line 1293 "compilers/imcc/imcc.y"
     { clear_state(interp); }
     break;
 
   case 37:
-
-/* Line 1455 of yacc.c  */
-#line 1279 "compilers/imcc/imcc.y"
+#line 1295 "compilers/imcc/imcc.y"
     {
            (yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
                     (yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
@@ -3485,9 +3433,7 @@
     break;
 
   case 38:
-
-/* Line 1455 of yacc.c  */
-#line 1286 "compilers/imcc/imcc.y"
+#line 1302 "compilers/imcc/imcc.y"
     {
            imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
            IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
@@ -3495,9 +3441,7 @@
     break;
 
   case 39:
-
-/* Line 1455 of yacc.c  */
-#line 1291 "compilers/imcc/imcc.y"
+#line 1307 "compilers/imcc/imcc.y"
     {
            (yyval.i) = iSUBROUTINE(interp,
                     IMCC_INFO(interp)->cur_unit,
@@ -3508,18 +3452,14 @@
     break;
 
   case 40:
-
-/* Line 1455 of yacc.c  */
-#line 1299 "compilers/imcc/imcc.y"
+#line 1315 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
          }
     break;
 
   case 41:
-
-/* Line 1455 of yacc.c  */
-#line 1303 "compilers/imcc/imcc.y"
+#line 1319 "compilers/imcc/imcc.y"
     {
            char   *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
            SymReg *r    = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
@@ -3535,23 +3475,17 @@
     break;
 
   case 42:
-
-/* Line 1455 of yacc.c  */
-#line 1315 "compilers/imcc/imcc.y"
+#line 1331 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;}
     break;
 
   case 44:
-
-/* Line 1455 of yacc.c  */
-#line 1323 "compilers/imcc/imcc.y"
+#line 1339 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
     break;
 
   case 45:
-
-/* Line 1455 of yacc.c  */
-#line 1326 "compilers/imcc/imcc.y"
+#line 1342 "compilers/imcc/imcc.y"
     {
            /* if (optimizer_level & OPT_PASM)
                          imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3562,9 +3496,7 @@
     break;
 
   case 48:
-
-/* Line 1455 of yacc.c  */
-#line 1342 "compilers/imcc/imcc.y"
+#line 1358 "compilers/imcc/imcc.y"
     {
            int re_open = 0;
            (yyval.i) = 0;
@@ -3579,43 +3511,33 @@
     break;
 
   case 49:
-
-/* Line 1455 of yacc.c  */
-#line 1357 "compilers/imcc/imcc.y"
+#line 1373 "compilers/imcc/imcc.y"
     {
             (yyval.sr) = (yyvsp[(2) - (3)].sr);
         }
     break;
 
   case 50:
-
-/* Line 1455 of yacc.c  */
-#line 1360 "compilers/imcc/imcc.y"
+#line 1376 "compilers/imcc/imcc.y"
     { (yyval.sr) = NULL; }
     break;
 
   case 51:
-
-/* Line 1455 of yacc.c  */
-#line 1365 "compilers/imcc/imcc.y"
+#line 1381 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
          }
     break;
 
   case 52:
-
-/* Line 1455 of yacc.c  */
-#line 1369 "compilers/imcc/imcc.y"
+#line 1385 "compilers/imcc/imcc.y"
     {
            iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 53:
-
-/* Line 1455 of yacc.c  */
-#line 1373 "compilers/imcc/imcc.y"
+#line 1389 "compilers/imcc/imcc.y"
     {
           IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t);
           if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) {
@@ -3626,59 +3548,45 @@
     break;
 
   case 54:
-
-/* Line 1455 of yacc.c  */
-#line 1381 "compilers/imcc/imcc.y"
+#line 1397 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 55:
-
-/* Line 1455 of yacc.c  */
-#line 1385 "compilers/imcc/imcc.y"
+#line 1401 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 56:
-
-/* Line 1455 of yacc.c  */
-#line 1386 "compilers/imcc/imcc.y"
+#line 1402 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 57:
-
-/* Line 1455 of yacc.c  */
-#line 1388 "compilers/imcc/imcc.y"
+#line 1404 "compilers/imcc/imcc.y"
     {
            if (IMCC_INFO(interp)->adv_named_id) {
-                 add_pcc_named_param(IMCC_INFO(interp)->cur_call,
+                 add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
                                      IMCC_INFO(interp)->adv_named_id, (yyvsp[(2) - (3)].sr));
                  IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
+               add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
          }
     break;
 
   case 58:
-
-/* Line 1455 of yacc.c  */
-#line 1400 "compilers/imcc/imcc.y"
+#line 1416 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 59:
-
-/* Line 1455 of yacc.c  */
-#line 1400 "compilers/imcc/imcc.y"
+#line 1416 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
     break;
 
   case 60:
-
-/* Line 1455 of yacc.c  */
-#line 1405 "compilers/imcc/imcc.y"
+#line 1421 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(3) - (3)].t) & VT_UNIQUE_REG)
                (yyval.sr) = mk_ident_ur(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
@@ -3702,16 +3610,12 @@
     break;
 
   case 61:
-
-/* Line 1455 of yacc.c  */
-#line 1430 "compilers/imcc/imcc.y"
+#line 1446 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 62:
-
-/* Line 1455 of yacc.c  */
-#line 1435 "compilers/imcc/imcc.y"
+#line 1451 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
@@ -3720,9 +3624,7 @@
     break;
 
   case 63:
-
-/* Line 1455 of yacc.c  */
-#line 1441 "compilers/imcc/imcc.y"
+#line 1457 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3731,9 +3633,7 @@
     break;
 
   case 64:
-
-/* Line 1455 of yacc.c  */
-#line 1450 "compilers/imcc/imcc.y"
+#line 1466 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_VTABLE;
            IMCC_INFO(interp)->cur_unit->vtable_name      = NULL;
@@ -3742,9 +3642,7 @@
     break;
 
   case 65:
-
-/* Line 1455 of yacc.c  */
-#line 1456 "compilers/imcc/imcc.y"
+#line 1472 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_VTABLE;
            IMCC_INFO(interp)->cur_unit->vtable_name      = (yyvsp[(3) - (4)].s);
@@ -3753,9 +3651,7 @@
     break;
 
   case 66:
-
-/* Line 1455 of yacc.c  */
-#line 1465 "compilers/imcc/imcc.y"
+#line 1481 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_METHOD;
            IMCC_INFO(interp)->cur_unit->method_name = NULL;
@@ -3764,9 +3660,7 @@
     break;
 
   case 67:
-
-/* Line 1455 of yacc.c  */
-#line 1471 "compilers/imcc/imcc.y"
+#line 1487 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_METHOD;
            IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
@@ -3775,9 +3669,7 @@
     break;
 
   case 68:
-
-/* Line 1455 of yacc.c  */
-#line 1480 "compilers/imcc/imcc.y"
+#line 1496 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->ns_entry_name     = NULL;
@@ -3786,9 +3678,7 @@
     break;
 
   case 69:
-
-/* Line 1455 of yacc.c  */
-#line 1486 "compilers/imcc/imcc.y"
+#line 1502 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
@@ -3797,9 +3687,7 @@
     break;
 
   case 70:
-
-/* Line 1455 of yacc.c  */
-#line 1495 "compilers/imcc/imcc.y"
+#line 1511 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
@@ -3807,9 +3695,7 @@
     break;
 
   case 71:
-
-/* Line 1455 of yacc.c  */
-#line 1503 "compilers/imcc/imcc.y"
+#line 1519 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->subid = NULL;
@@ -3817,9 +3703,7 @@
     break;
 
   case 72:
-
-/* Line 1455 of yacc.c  */
-#line 1508 "compilers/imcc/imcc.y"
+#line 1524 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3829,66 +3713,50 @@
     break;
 
   case 73:
-
-/* Line 1455 of yacc.c  */
-#line 1518 "compilers/imcc/imcc.y"
+#line 1534 "compilers/imcc/imcc.y"
     {
-           add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
+           add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
          }
     break;
 
   case 74:
-
-/* Line 1455 of yacc.c  */
-#line 1522 "compilers/imcc/imcc.y"
+#line 1538 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
-           add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
+           add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 75:
-
-/* Line 1455 of yacc.c  */
-#line 1527 "compilers/imcc/imcc.y"
+#line 1543 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
-           add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
+           add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
          }
     break;
 
   case 76:
-
-/* Line 1455 of yacc.c  */
-#line 1534 "compilers/imcc/imcc.y"
+#line 1550 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, "INTVAL",   'S'); }
     break;
 
   case 77:
-
-/* Line 1455 of yacc.c  */
-#line 1535 "compilers/imcc/imcc.y"
+#line 1551 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
     break;
 
   case 78:
-
-/* Line 1455 of yacc.c  */
-#line 1536 "compilers/imcc/imcc.y"
+#line 1552 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, "PMC",      'S'); }
     break;
 
   case 79:
-
-/* Line 1455 of yacc.c  */
-#line 1537 "compilers/imcc/imcc.y"
+#line 1553 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, "STRING",   'S'); }
     break;
 
   case 80:
-
-/* Line 1455 of yacc.c  */
-#line 1539 "compilers/imcc/imcc.y"
+#line 1555 "compilers/imcc/imcc.y"
     {
            SymReg *r;
            if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3902,9 +3770,7 @@
     break;
 
   case 81:
-
-/* Line 1455 of yacc.c  */
-#line 1550 "compilers/imcc/imcc.y"
+#line 1566 "compilers/imcc/imcc.y"
     {
            SymReg *r;
            if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3918,16 +3784,12 @@
     break;
 
   case 82:
-
-/* Line 1455 of yacc.c  */
-#line 1560 "compilers/imcc/imcc.y"
+#line 1576 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(2) - (3)].sr); }
     break;
 
   case 85:
-
-/* Line 1455 of yacc.c  */
-#line 1570 "compilers/imcc/imcc.y"
+#line 1586 "compilers/imcc/imcc.y"
     {
            char name[128];
            SymReg *r, *r1;
@@ -3954,114 +3816,82 @@
     break;
 
   case 86:
-
-/* Line 1455 of yacc.c  */
-#line 1598 "compilers/imcc/imcc.y"
+#line 1614 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 87:
-
-/* Line 1455 of yacc.c  */
-#line 1602 "compilers/imcc/imcc.y"
+#line 1618 "compilers/imcc/imcc.y"
     { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
     break;
 
   case 88:
-
-/* Line 1455 of yacc.c  */
-#line 1603 "compilers/imcc/imcc.y"
+#line 1619 "compilers/imcc/imcc.y"
     { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
     break;
 
   case 89:
-
-/* Line 1455 of yacc.c  */
-#line 1607 "compilers/imcc/imcc.y"
+#line 1623 "compilers/imcc/imcc.y"
     { (yyval.i) = NULL; }
     break;
 
   case 90:
-
-/* Line 1455 of yacc.c  */
-#line 1608 "compilers/imcc/imcc.y"
+#line 1624 "compilers/imcc/imcc.y"
     { (yyval.i) = NULL;  IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
     break;
 
   case 91:
-
-/* Line 1455 of yacc.c  */
-#line 1612 "compilers/imcc/imcc.y"
+#line 1628 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 93:
-
-/* Line 1455 of yacc.c  */
-#line 1617 "compilers/imcc/imcc.y"
+#line 1633 "compilers/imcc/imcc.y"
     { (yyval.t) = (yyvsp[(1) - (1)].t); }
     break;
 
   case 94:
-
-/* Line 1455 of yacc.c  */
-#line 1618 "compilers/imcc/imcc.y"
+#line 1634 "compilers/imcc/imcc.y"
     { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 95:
-
-/* Line 1455 of yacc.c  */
-#line 1622 "compilers/imcc/imcc.y"
+#line 1638 "compilers/imcc/imcc.y"
     { (yyval.t) = P_LOAD; }
     break;
 
   case 96:
-
-/* Line 1455 of yacc.c  */
-#line 1623 "compilers/imcc/imcc.y"
+#line 1639 "compilers/imcc/imcc.y"
     { (yyval.t) = P_INIT; }
     break;
 
   case 97:
-
-/* Line 1455 of yacc.c  */
-#line 1624 "compilers/imcc/imcc.y"
+#line 1640 "compilers/imcc/imcc.y"
     { (yyval.t) = P_MAIN; }
     break;
 
   case 98:
-
-/* Line 1455 of yacc.c  */
-#line 1625 "compilers/imcc/imcc.y"
+#line 1641 "compilers/imcc/imcc.y"
     { (yyval.t) = P_IMMEDIATE; }
     break;
 
   case 99:
-
-/* Line 1455 of yacc.c  */
-#line 1626 "compilers/imcc/imcc.y"
+#line 1642 "compilers/imcc/imcc.y"
     { (yyval.t) = P_POSTCOMP; }
     break;
 
   case 100:
-
-/* Line 1455 of yacc.c  */
-#line 1627 "compilers/imcc/imcc.y"
+#line 1643 "compilers/imcc/imcc.y"
     { (yyval.t) = P_ANON; }
     break;
 
   case 101:
-
-/* Line 1455 of yacc.c  */
-#line 1628 "compilers/imcc/imcc.y"
+#line 1644 "compilers/imcc/imcc.y"
     { (yyval.t) = P_NEED_LEX; }
     break;
 
   case 109:
-
-/* Line 1455 of yacc.c  */
-#line 1640 "compilers/imcc/imcc.y"
+#line 1656 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
            add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
@@ -4069,18 +3899,14 @@
     break;
 
   case 110:
-
-/* Line 1455 of yacc.c  */
-#line 1645 "compilers/imcc/imcc.y"
+#line 1661 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
          }
     break;
 
   case 111:
-
-/* Line 1455 of yacc.c  */
-#line 1649 "compilers/imcc/imcc.y"
+#line 1665 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
            IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
@@ -4088,27 +3914,21 @@
     break;
 
   case 112:
-
-/* Line 1455 of yacc.c  */
-#line 1654 "compilers/imcc/imcc.y"
+#line 1670 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
          }
     break;
 
   case 113:
-
-/* Line 1455 of yacc.c  */
-#line 1658 "compilers/imcc/imcc.y"
+#line 1674 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
          }
     break;
 
   case 114:
-
-/* Line 1455 of yacc.c  */
-#line 1662 "compilers/imcc/imcc.y"
+#line 1678 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
            add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
@@ -4116,9 +3936,7 @@
     break;
 
   case 115:
-
-/* Line 1455 of yacc.c  */
-#line 1667 "compilers/imcc/imcc.y"
+#line 1683 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S'));
            add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
@@ -4126,61 +3944,45 @@
     break;
 
   case 116:
-
-/* Line 1455 of yacc.c  */
-#line 1675 "compilers/imcc/imcc.y"
+#line 1691 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 117:
-
-/* Line 1455 of yacc.c  */
-#line 1676 "compilers/imcc/imcc.y"
-    { add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
+#line 1692 "compilers/imcc/imcc.y"
+    { add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
     break;
 
   case 118:
-
-/* Line 1455 of yacc.c  */
-#line 1680 "compilers/imcc/imcc.y"
+#line 1696 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(2) - (2)].sr); }
     break;
 
   case 119:
-
-/* Line 1455 of yacc.c  */
-#line 1685 "compilers/imcc/imcc.y"
+#line 1701 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 120:
-
-/* Line 1455 of yacc.c  */
-#line 1687 "compilers/imcc/imcc.y"
+#line 1703 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(2) - (3)].sr))
-               add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
          }
     break;
 
   case 121:
-
-/* Line 1455 of yacc.c  */
-#line 1694 "compilers/imcc/imcc.y"
+#line 1710 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
     break;
 
   case 122:
-
-/* Line 1455 of yacc.c  */
-#line 1695 "compilers/imcc/imcc.y"
+#line 1711 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 123:
-
-/* Line 1455 of yacc.c  */
-#line 1696 "compilers/imcc/imcc.y"
+#line 1712 "compilers/imcc/imcc.y"
     {
            IdList * const l = (yyvsp[(4) - (4)].idlist);
            SymReg *ignored;
@@ -4195,93 +3997,67 @@
     break;
 
   case 124:
-
-/* Line 1455 of yacc.c  */
-#line 1710 "compilers/imcc/imcc.y"
+#line 1726 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 125:
-
-/* Line 1455 of yacc.c  */
-#line 1711 "compilers/imcc/imcc.y"
+#line 1727 "compilers/imcc/imcc.y"
     { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 126:
-
-/* Line 1455 of yacc.c  */
-#line 1715 "compilers/imcc/imcc.y"
+#line 1731 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_FLAT;   }
     break;
 
   case 127:
-
-/* Line 1455 of yacc.c  */
-#line 1716 "compilers/imcc/imcc.y"
+#line 1732 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_OPTIONAL; }
     break;
 
   case 128:
-
-/* Line 1455 of yacc.c  */
-#line 1717 "compilers/imcc/imcc.y"
+#line 1733 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_OPT_FLAG; }
     break;
 
   case 129:
-
-/* Line 1455 of yacc.c  */
-#line 1718 "compilers/imcc/imcc.y"
+#line 1734 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_NAMED; }
     break;
 
   case 130:
-
-/* Line 1455 of yacc.c  */
-#line 1719 "compilers/imcc/imcc.y"
+#line 1735 "compilers/imcc/imcc.y"
     { adv_named_set(interp, (yyvsp[(3) - (4)].s));   (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); }
     break;
 
   case 131:
-
-/* Line 1455 of yacc.c  */
-#line 1720 "compilers/imcc/imcc.y"
+#line 1736 "compilers/imcc/imcc.y"
     { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); }
     break;
 
   case 132:
-
-/* Line 1455 of yacc.c  */
-#line 1721 "compilers/imcc/imcc.y"
+#line 1737 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_UNIQUE_REG; }
     break;
 
   case 133:
-
-/* Line 1455 of yacc.c  */
-#line 1722 "compilers/imcc/imcc.y"
+#line 1738 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_CALL_SIG; }
     break;
 
   case 134:
-
-/* Line 1455 of yacc.c  */
-#line 1727 "compilers/imcc/imcc.y"
+#line 1743 "compilers/imcc/imcc.y"
     { begin_return_or_yield(interp, 0); }
     break;
 
   case 135:
-
-/* Line 1455 of yacc.c  */
-#line 1729 "compilers/imcc/imcc.y"
+#line 1745 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
     break;
 
   case 136:
-
-/* Line 1455 of yacc.c  */
-#line 1731 "compilers/imcc/imcc.y"
+#line 1747 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->asm_state = AsmDefault;
            (yyval.i) = 0;
@@ -4289,91 +4065,69 @@
     break;
 
   case 137:
-
-/* Line 1455 of yacc.c  */
-#line 1738 "compilers/imcc/imcc.y"
+#line 1754 "compilers/imcc/imcc.y"
     { begin_return_or_yield(interp, 1); }
     break;
 
   case 138:
-
-/* Line 1455 of yacc.c  */
-#line 1740 "compilers/imcc/imcc.y"
+#line 1756 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
     break;
 
   case 139:
-
-/* Line 1455 of yacc.c  */
-#line 1744 "compilers/imcc/imcc.y"
+#line 1760 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 140:
-
-/* Line 1455 of yacc.c  */
-#line 1746 "compilers/imcc/imcc.y"
+#line 1762 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(1) - (2)].sr))
-               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
          }
     break;
 
   case 141:
-
-/* Line 1455 of yacc.c  */
-#line 1751 "compilers/imcc/imcc.y"
+#line 1767 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(2) - (3)].sr))
-               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
          }
     break;
 
   case 142:
-
-/* Line 1455 of yacc.c  */
-#line 1758 "compilers/imcc/imcc.y"
+#line 1774 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 143:
-
-/* Line 1455 of yacc.c  */
-#line 1760 "compilers/imcc/imcc.y"
+#line 1776 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(1) - (2)].sr))
-               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
          }
     break;
 
   case 144:
-
-/* Line 1455 of yacc.c  */
-#line 1765 "compilers/imcc/imcc.y"
+#line 1781 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(2) - (3)].sr))
-               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
          }
     break;
 
   case 145:
-
-/* Line 1455 of yacc.c  */
-#line 1772 "compilers/imcc/imcc.y"
+#line 1788 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
     break;
 
   case 146:
-
-/* Line 1455 of yacc.c  */
-#line 1776 "compilers/imcc/imcc.y"
+#line 1792 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
     break;
 
   case 147:
-
-/* Line 1455 of yacc.c  */
-#line 1781 "compilers/imcc/imcc.y"
+#line 1797 "compilers/imcc/imcc.y"
     {
           if (IMCC_INFO(interp)->asm_state == AsmDefault)
               begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
@@ -4381,9 +4135,7 @@
     break;
 
   case 148:
-
-/* Line 1455 of yacc.c  */
-#line 1786 "compilers/imcc/imcc.y"
+#line 1802 "compilers/imcc/imcc.y"
     {
           IMCC_INFO(interp)->asm_state = AsmDefault;
           (yyval.t) = 0;
@@ -4391,136 +4143,104 @@
     break;
 
   case 149:
-
-/* Line 1455 of yacc.c  */
-#line 1793 "compilers/imcc/imcc.y"
+#line 1809 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 150:
-
-/* Line 1455 of yacc.c  */
-#line 1794 "compilers/imcc/imcc.y"
+#line 1810 "compilers/imcc/imcc.y"
     { (yyval.t) = 1; }
     break;
 
   case 151:
-
-/* Line 1455 of yacc.c  */
-#line 1798 "compilers/imcc/imcc.y"
+#line 1814 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 152:
-
-/* Line 1455 of yacc.c  */
-#line 1800 "compilers/imcc/imcc.y"
+#line 1816 "compilers/imcc/imcc.y"
     {
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+               add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
                                     IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (1)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (1)].sr));
          }
     break;
 
   case 153:
-
-/* Line 1455 of yacc.c  */
-#line 1810 "compilers/imcc/imcc.y"
+#line 1826 "compilers/imcc/imcc.y"
     {
             SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S');
-            add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
+            add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 154:
-
-/* Line 1455 of yacc.c  */
-#line 1815 "compilers/imcc/imcc.y"
+#line 1831 "compilers/imcc/imcc.y"
     {
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+               add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
                                     IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
                IMCC_INFO(interp)->adv_named_id = NULL;
              }
              else
-                 add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (3)].sr));
+                 add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 155:
-
-/* Line 1455 of yacc.c  */
-#line 1825 "compilers/imcc/imcc.y"
+#line 1841 "compilers/imcc/imcc.y"
     {
            SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S');
-           add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
+           add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
          }
     break;
 
   case 158:
-
-/* Line 1455 of yacc.c  */
-#line 1846 "compilers/imcc/imcc.y"
+#line 1862 "compilers/imcc/imcc.y"
     { clear_state(interp); }
     break;
 
   case 159:
-
-/* Line 1455 of yacc.c  */
-#line 1851 "compilers/imcc/imcc.y"
+#line 1867 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(2) - (2)].i); }
     break;
 
   case 160:
-
-/* Line 1455 of yacc.c  */
-#line 1852 "compilers/imcc/imcc.y"
+#line 1868 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 161:
-
-/* Line 1455 of yacc.c  */
-#line 1853 "compilers/imcc/imcc.y"
+#line 1869 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 162:
-
-/* Line 1455 of yacc.c  */
-#line 1854 "compilers/imcc/imcc.y"
+#line 1870 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 163:
-
-/* Line 1455 of yacc.c  */
-#line 1855 "compilers/imcc/imcc.y"
+#line 1871 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 164:
-
-/* Line 1455 of yacc.c  */
-#line 1856 "compilers/imcc/imcc.y"
+#line 1872 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 165:
-
-/* Line 1455 of yacc.c  */
-#line 1860 "compilers/imcc/imcc.y"
+#line 1876 "compilers/imcc/imcc.y"
     { (yyval.i) = NULL; }
     break;
 
   case 169:
-
-/* Line 1455 of yacc.c  */
-#line 1871 "compilers/imcc/imcc.y"
+#line 1887 "compilers/imcc/imcc.y"
     {
              Instruction * const i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s)));
              mem_sys_free((yyvsp[(1) - (1)].s));
@@ -4529,16 +4249,12 @@
     break;
 
   case 170:
-
-/* Line 1455 of yacc.c  */
-#line 1881 "compilers/imcc/imcc.y"
+#line 1897 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(2) - (3)].i); }
     break;
 
   case 171:
-
-/* Line 1455 of yacc.c  */
-#line 1883 "compilers/imcc/imcc.y"
+#line 1899 "compilers/imcc/imcc.y"
     {
            if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
                IMCC_warning(interp, "Too many errors. Correct some first.\n");
@@ -4549,9 +4265,7 @@
     break;
 
   case 172:
-
-/* Line 1455 of yacc.c  */
-#line 1894 "compilers/imcc/imcc.y"
+#line 1910 "compilers/imcc/imcc.y"
     {
            IdList* const l = (yyvsp[(1) - (1)].idlist);
            l->next = NULL;
@@ -4560,9 +4274,7 @@
     break;
 
   case 173:
-
-/* Line 1455 of yacc.c  */
-#line 1901 "compilers/imcc/imcc.y"
+#line 1917 "compilers/imcc/imcc.y"
     {
            IdList* const l = (yyvsp[(3) - (3)].idlist);
            l->next = (yyvsp[(1) - (3)].idlist);
@@ -4571,11 +4283,9 @@
     break;
 
   case 174:
-
-/* Line 1455 of yacc.c  */
-#line 1910 "compilers/imcc/imcc.y"
+#line 1926 "compilers/imcc/imcc.y"
     {
-           IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
+           IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
            l->id           = (yyvsp[(1) - (2)].s);
            l->unique_reg   = (yyvsp[(2) - (2)].t);
            (yyval.idlist) = l;
@@ -4583,30 +4293,22 @@
     break;
 
   case 175:
-
-/* Line 1455 of yacc.c  */
-#line 1919 "compilers/imcc/imcc.y"
+#line 1935 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 176:
-
-/* Line 1455 of yacc.c  */
-#line 1920 "compilers/imcc/imcc.y"
+#line 1936 "compilers/imcc/imcc.y"
     { (yyval.t) = 1; }
     break;
 
   case 179:
-
-/* Line 1455 of yacc.c  */
-#line 1927 "compilers/imcc/imcc.y"
+#line 1943 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 180:
-
-/* Line 1455 of yacc.c  */
-#line 1928 "compilers/imcc/imcc.y"
+#line 1944 "compilers/imcc/imcc.y"
     {
            IdList *l = (yyvsp[(4) - (4)].idlist);
            while (l) {
@@ -4625,9 +4327,7 @@
     break;
 
   case 181:
-
-/* Line 1455 of yacc.c  */
-#line 1944 "compilers/imcc/imcc.y"
+#line 1960 "compilers/imcc/imcc.y"
     {
             if ((yyvsp[(4) - (4)].sr)->set != 'P') {
                 mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4647,9 +4347,7 @@
     break;
 
   case 182:
-
-/* Line 1455 of yacc.c  */
-#line 1961 "compilers/imcc/imcc.y"
+#line 1977 "compilers/imcc/imcc.y"
     {
             if ((yyvsp[(4) - (4)].sr)->set != 'P') {
                 mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4665,16 +4363,12 @@
     break;
 
   case 183:
-
-/* Line 1455 of yacc.c  */
-#line 1973 "compilers/imcc/imcc.y"
+#line 1989 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 184:
-
-/* Line 1455 of yacc.c  */
-#line 1974 "compilers/imcc/imcc.y"
+#line 1990 "compilers/imcc/imcc.y"
     {
            mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
            IMCC_INFO(interp)->is_def = 0;
@@ -4683,16 +4377,12 @@
     break;
 
   case 186:
-
-/* Line 1455 of yacc.c  */
-#line 1981 "compilers/imcc/imcc.y"
+#line 1997 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 187:
-
-/* Line 1455 of yacc.c  */
-#line 1982 "compilers/imcc/imcc.y"
+#line 1998 "compilers/imcc/imcc.y"
     {
            mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
            IMCC_INFO(interp)->is_def = 0;
@@ -4701,9 +4391,7 @@
     break;
 
   case 188:
-
-/* Line 1455 of yacc.c  */
-#line 1988 "compilers/imcc/imcc.y"
+#line 2004 "compilers/imcc/imcc.y"
     {
            (yyval.i) = NULL;
            IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
@@ -4712,18 +4400,14 @@
     break;
 
   case 189:
-
-/* Line 1455 of yacc.c  */
-#line 1994 "compilers/imcc/imcc.y"
+#line 2010 "compilers/imcc/imcc.y"
     {
             (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
          }
     break;
 
   case 190:
-
-/* Line 1455 of yacc.c  */
-#line 1998 "compilers/imcc/imcc.y"
+#line 2014 "compilers/imcc/imcc.y"
     {
            (yyval.i) = INS(interp,
                     IMCC_INFO(interp)->cur_unit,
@@ -4738,65 +4422,47 @@
     break;
 
   case 191:
-
-/* Line 1455 of yacc.c  */
-#line 2009 "compilers/imcc/imcc.y"
+#line 2025 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
     break;
 
   case 192:
-
-/* Line 1455 of yacc.c  */
-#line 2010 "compilers/imcc/imcc.y"
+#line 2026 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 193:
-
-/* Line 1455 of yacc.c  */
-#line 2011 "compilers/imcc/imcc.y"
+#line 2027 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 196:
-
-/* Line 1455 of yacc.c  */
-#line 2014 "compilers/imcc/imcc.y"
+#line 2030 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;}
     break;
 
   case 197:
-
-/* Line 1455 of yacc.c  */
-#line 2018 "compilers/imcc/imcc.y"
+#line 2034 "compilers/imcc/imcc.y"
     { (yyval.t) = 'I'; }
     break;
 
   case 198:
-
-/* Line 1455 of yacc.c  */
-#line 2019 "compilers/imcc/imcc.y"
+#line 2035 "compilers/imcc/imcc.y"
     { (yyval.t) = 'N'; }
     break;
 
   case 199:
-
-/* Line 1455 of yacc.c  */
-#line 2020 "compilers/imcc/imcc.y"
+#line 2036 "compilers/imcc/imcc.y"
     { (yyval.t) = 'S'; }
     break;
 
   case 200:
-
-/* Line 1455 of yacc.c  */
-#line 2021 "compilers/imcc/imcc.y"
+#line 2037 "compilers/imcc/imcc.y"
     { (yyval.t) = 'P'; }
     break;
 
   case 201:
-
-/* Line 1455 of yacc.c  */
-#line 2026 "compilers/imcc/imcc.y"
+#line 2042 "compilers/imcc/imcc.y"
     {
            /* there'd normally be a mem_sys_strdup() here, but the lexer already
             * copied the string, so it's safe to use directly */
@@ -4809,71 +4475,53 @@
     break;
 
   case 202:
-
-/* Line 1455 of yacc.c  */
-#line 2039 "compilers/imcc/imcc.y"
+#line 2055 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));  }
     break;
 
   case 203:
-
-/* Line 1455 of yacc.c  */
-#line 2041 "compilers/imcc/imcc.y"
+#line 2057 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr));  }
     break;
 
   case 204:
-
-/* Line 1455 of yacc.c  */
-#line 2043 "compilers/imcc/imcc.y"
+#line 2059 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(4) - (5)].s), 3, (yyvsp[(1) - (5)].sr), (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); }
     break;
 
   case 205:
-
-/* Line 1455 of yacc.c  */
-#line 2045 "compilers/imcc/imcc.y"
+#line 2061 "compilers/imcc/imcc.y"
     { (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); }
     break;
 
   case 206:
-
-/* Line 1455 of yacc.c  */
-#line 2047 "compilers/imcc/imcc.y"
+#line 2063 "compilers/imcc/imcc.y"
     { (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
     break;
 
   case 207:
-
-/* Line 1455 of yacc.c  */
-#line 2052 "compilers/imcc/imcc.y"
+#line 2068 "compilers/imcc/imcc.y"
     { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].s), (yyvsp[(6) - (7)].sr), 1); }
     break;
 
   case 208:
-
-/* Line 1455 of yacc.c  */
-#line 2055 "compilers/imcc/imcc.y"
+#line 2071 "compilers/imcc/imcc.y"
     {
-           add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
+           add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
            IMCC_INFO(interp)->cur_call = NULL;
            (yyval.i) = 0;
          }
     break;
 
   case 209:
-
-/* Line 1455 of yacc.c  */
-#line 2061 "compilers/imcc/imcc.y"
+#line 2077 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
          }
     break;
 
   case 210:
-
-/* Line 1455 of yacc.c  */
-#line 2065 "compilers/imcc/imcc.y"
+#line 2081 "compilers/imcc/imcc.y"
     {
            IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
            IMCC_INFO(interp)->cur_call = NULL;
@@ -4881,200 +4529,144 @@
     break;
 
   case 214:
-
-/* Line 1455 of yacc.c  */
-#line 2073 "compilers/imcc/imcc.y"
+#line 2089 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
          }
     break;
 
   case 215:
-
-/* Line 1455 of yacc.c  */
-#line 2080 "compilers/imcc/imcc.y"
+#line 2096 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"not"; }
     break;
 
   case 216:
-
-/* Line 1455 of yacc.c  */
-#line 2081 "compilers/imcc/imcc.y"
+#line 2097 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bnot"; }
     break;
 
   case 217:
-
-/* Line 1455 of yacc.c  */
-#line 2082 "compilers/imcc/imcc.y"
+#line 2098 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"neg"; }
     break;
 
   case 218:
-
-/* Line 1455 of yacc.c  */
-#line 2086 "compilers/imcc/imcc.y"
+#line 2102 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"sub"; }
     break;
 
   case 219:
-
-/* Line 1455 of yacc.c  */
-#line 2087 "compilers/imcc/imcc.y"
+#line 2103 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"add"; }
     break;
 
   case 220:
-
-/* Line 1455 of yacc.c  */
-#line 2088 "compilers/imcc/imcc.y"
+#line 2104 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mul"; }
     break;
 
   case 221:
-
-/* Line 1455 of yacc.c  */
-#line 2089 "compilers/imcc/imcc.y"
+#line 2105 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"div"; }
     break;
 
   case 222:
-
-/* Line 1455 of yacc.c  */
-#line 2090 "compilers/imcc/imcc.y"
+#line 2106 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mod"; }
     break;
 
   case 223:
-
-/* Line 1455 of yacc.c  */
-#line 2091 "compilers/imcc/imcc.y"
+#line 2107 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"fdiv"; }
     break;
 
   case 224:
-
-/* Line 1455 of yacc.c  */
-#line 2092 "compilers/imcc/imcc.y"
+#line 2108 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"pow"; }
     break;
 
   case 225:
-
-/* Line 1455 of yacc.c  */
-#line 2093 "compilers/imcc/imcc.y"
+#line 2109 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"concat"; }
     break;
 
   case 226:
-
-/* Line 1455 of yacc.c  */
-#line 2094 "compilers/imcc/imcc.y"
+#line 2110 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"iseq"; }
     break;
 
   case 227:
-
-/* Line 1455 of yacc.c  */
-#line 2095 "compilers/imcc/imcc.y"
+#line 2111 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isne"; }
     break;
 
   case 228:
-
-/* Line 1455 of yacc.c  */
-#line 2096 "compilers/imcc/imcc.y"
+#line 2112 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isgt"; }
     break;
 
   case 229:
-
-/* Line 1455 of yacc.c  */
-#line 2097 "compilers/imcc/imcc.y"
+#line 2113 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isge"; }
     break;
 
   case 230:
-
-/* Line 1455 of yacc.c  */
-#line 2098 "compilers/imcc/imcc.y"
+#line 2114 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"islt"; }
     break;
 
   case 231:
-
-/* Line 1455 of yacc.c  */
-#line 2099 "compilers/imcc/imcc.y"
+#line 2115 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isle"; }
     break;
 
   case 232:
-
-/* Line 1455 of yacc.c  */
-#line 2100 "compilers/imcc/imcc.y"
+#line 2116 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shl"; }
     break;
 
   case 233:
-
-/* Line 1455 of yacc.c  */
-#line 2101 "compilers/imcc/imcc.y"
+#line 2117 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shr"; }
     break;
 
   case 234:
-
-/* Line 1455 of yacc.c  */
-#line 2102 "compilers/imcc/imcc.y"
+#line 2118 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"lsr"; }
     break;
 
   case 235:
-
-/* Line 1455 of yacc.c  */
-#line 2103 "compilers/imcc/imcc.y"
+#line 2119 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"and"; }
     break;
 
   case 236:
-
-/* Line 1455 of yacc.c  */
-#line 2104 "compilers/imcc/imcc.y"
+#line 2120 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"or"; }
     break;
 
   case 237:
-
-/* Line 1455 of yacc.c  */
-#line 2105 "compilers/imcc/imcc.y"
+#line 2121 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"xor"; }
     break;
 
   case 238:
-
-/* Line 1455 of yacc.c  */
-#line 2106 "compilers/imcc/imcc.y"
+#line 2122 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"band"; }
     break;
 
   case 239:
-
-/* Line 1455 of yacc.c  */
-#line 2107 "compilers/imcc/imcc.y"
+#line 2123 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bor"; }
     break;
 
   case 240:
-
-/* Line 1455 of yacc.c  */
-#line 2108 "compilers/imcc/imcc.y"
+#line 2124 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bxor"; }
     break;
 
   case 241:
-
-/* Line 1455 of yacc.c  */
-#line 2114 "compilers/imcc/imcc.y"
+#line 2130 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
            (yyval.i)->type &= ~ITCALL;
@@ -5083,114 +4675,82 @@
     break;
 
   case 242:
-
-/* Line 1455 of yacc.c  */
-#line 2119 "compilers/imcc/imcc.y"
+#line 2135 "compilers/imcc/imcc.y"
     {  (yyval.i) = 0; }
     break;
 
   case 243:
-
-/* Line 1455 of yacc.c  */
-#line 2126 "compilers/imcc/imcc.y"
+#line 2142 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
     break;
 
   case 244:
-
-/* Line 1455 of yacc.c  */
-#line 2130 "compilers/imcc/imcc.y"
+#line 2146 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"add"; }
     break;
 
   case 245:
-
-/* Line 1455 of yacc.c  */
-#line 2131 "compilers/imcc/imcc.y"
+#line 2147 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"sub"; }
     break;
 
   case 246:
-
-/* Line 1455 of yacc.c  */
-#line 2132 "compilers/imcc/imcc.y"
+#line 2148 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mul"; }
     break;
 
   case 247:
-
-/* Line 1455 of yacc.c  */
-#line 2133 "compilers/imcc/imcc.y"
+#line 2149 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"div"; }
     break;
 
   case 248:
-
-/* Line 1455 of yacc.c  */
-#line 2134 "compilers/imcc/imcc.y"
+#line 2150 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mod"; }
     break;
 
   case 249:
-
-/* Line 1455 of yacc.c  */
-#line 2135 "compilers/imcc/imcc.y"
+#line 2151 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"fdiv"; }
     break;
 
   case 250:
-
-/* Line 1455 of yacc.c  */
-#line 2136 "compilers/imcc/imcc.y"
+#line 2152 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"concat"; }
     break;
 
   case 251:
-
-/* Line 1455 of yacc.c  */
-#line 2137 "compilers/imcc/imcc.y"
+#line 2153 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"band"; }
     break;
 
   case 252:
-
-/* Line 1455 of yacc.c  */
-#line 2138 "compilers/imcc/imcc.y"
+#line 2154 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bor"; }
     break;
 
   case 253:
-
-/* Line 1455 of yacc.c  */
-#line 2139 "compilers/imcc/imcc.y"
+#line 2155 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bxor"; }
     break;
 
   case 254:
-
-/* Line 1455 of yacc.c  */
-#line 2140 "compilers/imcc/imcc.y"
+#line 2156 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shr"; }
     break;
 
   case 255:
-
-/* Line 1455 of yacc.c  */
-#line 2141 "compilers/imcc/imcc.y"
+#line 2157 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shl"; }
     break;
 
   case 256:
-
-/* Line 1455 of yacc.c  */
-#line 2142 "compilers/imcc/imcc.y"
+#line 2158 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"lsr"; }
     break;
 
   case 257:
-
-/* Line 1455 of yacc.c  */
-#line 2148 "compilers/imcc/imcc.y"
+#line 2164 "compilers/imcc/imcc.y"
     {
         (yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
                       IMCC_INFO(interp) -> regs,
@@ -5201,30 +4761,22 @@
     break;
 
   case 258:
-
-/* Line 1455 of yacc.c  */
-#line 2158 "compilers/imcc/imcc.y"
+#line 2174 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s));       mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 259:
-
-/* Line 1455 of yacc.c  */
-#line 2159 "compilers/imcc/imcc.y"
+#line 2175 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 260:
-
-/* Line 1455 of yacc.c  */
-#line 2160 "compilers/imcc/imcc.y"
+#line 2176 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));     mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 261:
-
-/* Line 1455 of yacc.c  */
-#line 2162 "compilers/imcc/imcc.y"
+#line 2178 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = (yyvsp[(1) - (1)].sr);
            if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -5233,9 +4785,7 @@
     break;
 
   case 262:
-
-/* Line 1455 of yacc.c  */
-#line 2168 "compilers/imcc/imcc.y"
+#line 2184 "compilers/imcc/imcc.y"
     {
             /* disallow bareword method names; SREG name constants are fine */
             const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -5252,9 +4802,7 @@
     break;
 
   case 263:
-
-/* Line 1455 of yacc.c  */
-#line 2182 "compilers/imcc/imcc.y"
+#line 2198 "compilers/imcc/imcc.y"
     {
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -5263,9 +4811,7 @@
     break;
 
   case 264:
-
-/* Line 1455 of yacc.c  */
-#line 2188 "compilers/imcc/imcc.y"
+#line 2204 "compilers/imcc/imcc.y"
     {
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -5274,16 +4820,12 @@
     break;
 
   case 265:
-
-/* Line 1455 of yacc.c  */
-#line 2193 "compilers/imcc/imcc.y"
+#line 2209 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
     break;
 
   case 266:
-
-/* Line 1455 of yacc.c  */
-#line 2199 "compilers/imcc/imcc.y"
+#line 2215 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
            IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
@@ -5291,360 +4833,276 @@
     break;
 
   case 267:
-
-/* Line 1455 of yacc.c  */
-#line 2203 "compilers/imcc/imcc.y"
+#line 2219 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(2) - (5)].i); }
     break;
 
   case 268:
-
-/* Line 1455 of yacc.c  */
-#line 2207 "compilers/imcc/imcc.y"
+#line 2223 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 269:
-
-/* Line 1455 of yacc.c  */
-#line 2209 "compilers/imcc/imcc.y"
+#line 2225 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
+               add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
+               add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 270:
-
-/* Line 1455 of yacc.c  */
-#line 2219 "compilers/imcc/imcc.y"
+#line 2235 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
+               add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
+               add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
          }
     break;
 
   case 271:
-
-/* Line 1455 of yacc.c  */
-#line 2229 "compilers/imcc/imcc.y"
+#line 2245 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
-           add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+           add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
                 mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
            mem_sys_free((yyvsp[(3) - (5)].s));
          }
     break;
 
   case 272:
-
-/* Line 1455 of yacc.c  */
-#line 2236 "compilers/imcc/imcc.y"
+#line 2252 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
-           add_pcc_named_arg_var(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
+           add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 273:
-
-/* Line 1455 of yacc.c  */
-#line 2241 "compilers/imcc/imcc.y"
+#line 2257 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
-           add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+           add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
                 mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
            mem_sys_free((yyvsp[(1) - (3)].s));
          }
     break;
 
   case 274:
-
-/* Line 1455 of yacc.c  */
-#line 2250 "compilers/imcc/imcc.y"
+#line 2266 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
     break;
 
   case 275:
-
-/* Line 1455 of yacc.c  */
-#line 2254 "compilers/imcc/imcc.y"
+#line 2270 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 276:
-
-/* Line 1455 of yacc.c  */
-#line 2255 "compilers/imcc/imcc.y"
+#line 2271 "compilers/imcc/imcc.y"
     { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 277:
-
-/* Line 1455 of yacc.c  */
-#line 2259 "compilers/imcc/imcc.y"
+#line 2275 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_FLAT;     }
     break;
 
   case 278:
-
-/* Line 1455 of yacc.c  */
-#line 2260 "compilers/imcc/imcc.y"
+#line 2276 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_NAMED;    }
     break;
 
   case 279:
-
-/* Line 1455 of yacc.c  */
-#line 2261 "compilers/imcc/imcc.y"
+#line 2277 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_CALL_SIG; }
     break;
 
   case 280:
-
-/* Line 1455 of yacc.c  */
-#line 2264 "compilers/imcc/imcc.y"
+#line 2280 "compilers/imcc/imcc.y"
     { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
     break;
 
   case 281:
-
-/* Line 1455 of yacc.c  */
-#line 2265 "compilers/imcc/imcc.y"
+#line 2281 "compilers/imcc/imcc.y"
     { adv_named_set(interp, (yyvsp[(3) - (4)].s));   (yyval.t) = 0; }
     break;
 
   case 282:
-
-/* Line 1455 of yacc.c  */
-#line 2269 "compilers/imcc/imcc.y"
+#line 2285 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
     break;
 
   case 283:
-
-/* Line 1455 of yacc.c  */
-#line 2274 "compilers/imcc/imcc.y"
+#line 2290 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
+               add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
          }
     break;
 
   case 284:
-
-/* Line 1455 of yacc.c  */
-#line 2284 "compilers/imcc/imcc.y"
+#line 2300 "compilers/imcc/imcc.y"
     {
-            add_pcc_named_result(IMCC_INFO(interp)->cur_call,
-            mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
+            add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
+                    mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
             mem_sys_free((yyvsp[(3) - (5)].s));
          }
     break;
 
   case 285:
-
-/* Line 1455 of yacc.c  */
-#line 2290 "compilers/imcc/imcc.y"
+#line 2306 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
-               add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
+               add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
                IMCC_INFO(interp)->adv_named_id = NULL;
            }
            else
-               add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
+               add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
          }
     break;
 
   case 286:
-
-/* Line 1455 of yacc.c  */
-#line 2300 "compilers/imcc/imcc.y"
+#line 2316 "compilers/imcc/imcc.y"
     {
-           add_pcc_named_result(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
+           add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
            mem_sys_free((yyvsp[(1) - (3)].s));
          }
     break;
 
   case 287:
-
-/* Line 1455 of yacc.c  */
-#line 2304 "compilers/imcc/imcc.y"
+#line 2320 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 288:
-
-/* Line 1455 of yacc.c  */
-#line 2308 "compilers/imcc/imcc.y"
+#line 2324 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 289:
-
-/* Line 1455 of yacc.c  */
-#line 2309 "compilers/imcc/imcc.y"
+#line 2325 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 290:
-
-/* Line 1455 of yacc.c  */
-#line 2314 "compilers/imcc/imcc.y"
+#line 2330 "compilers/imcc/imcc.y"
     {
            (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, inv_op((yyvsp[(3) - (6)].s)), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
          }
     break;
 
   case 291:
-
-/* Line 1455 of yacc.c  */
-#line 2318 "compilers/imcc/imcc.y"
+#line 2334 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
          }
     break;
 
   case 292:
-
-/* Line 1455 of yacc.c  */
-#line 2322 "compilers/imcc/imcc.y"
+#line 2338 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
          }
     break;
 
   case 293:
-
-/* Line 1455 of yacc.c  */
-#line 2329 "compilers/imcc/imcc.y"
+#line 2345 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
          }
     break;
 
   case 294:
-
-/* Line 1455 of yacc.c  */
-#line 2333 "compilers/imcc/imcc.y"
+#line 2349 "compilers/imcc/imcc.y"
     {
            (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
          }
     break;
 
   case 295:
-
-/* Line 1455 of yacc.c  */
-#line 2337 "compilers/imcc/imcc.y"
+#line 2353 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
          }
     break;
 
   case 296:
-
-/* Line 1455 of yacc.c  */
-#line 2343 "compilers/imcc/imcc.y"
+#line 2359 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 297:
-
-/* Line 1455 of yacc.c  */
-#line 2344 "compilers/imcc/imcc.y"
+#line 2360 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 298:
-
-/* Line 1455 of yacc.c  */
-#line 2348 "compilers/imcc/imcc.y"
+#line 2364 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"eq"; }
     break;
 
   case 299:
-
-/* Line 1455 of yacc.c  */
-#line 2349 "compilers/imcc/imcc.y"
+#line 2365 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"ne"; }
     break;
 
   case 300:
-
-/* Line 1455 of yacc.c  */
-#line 2350 "compilers/imcc/imcc.y"
+#line 2366 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"gt"; }
     break;
 
   case 301:
-
-/* Line 1455 of yacc.c  */
-#line 2351 "compilers/imcc/imcc.y"
+#line 2367 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"ge"; }
     break;
 
   case 302:
-
-/* Line 1455 of yacc.c  */
-#line 2352 "compilers/imcc/imcc.y"
+#line 2368 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"lt"; }
     break;
 
   case 303:
-
-/* Line 1455 of yacc.c  */
-#line 2353 "compilers/imcc/imcc.y"
+#line 2369 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"le"; }
     break;
 
   case 306:
-
-/* Line 1455 of yacc.c  */
-#line 2362 "compilers/imcc/imcc.y"
+#line 2378 "compilers/imcc/imcc.y"
     { (yyval.sr) = NULL; }
     break;
 
   case 307:
-
-/* Line 1455 of yacc.c  */
-#line 2363 "compilers/imcc/imcc.y"
+#line 2379 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 308:
-
-/* Line 1455 of yacc.c  */
-#line 2367 "compilers/imcc/imcc.y"
+#line 2383 "compilers/imcc/imcc.y"
     { (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
     break;
 
   case 310:
-
-/* Line 1455 of yacc.c  */
-#line 2372 "compilers/imcc/imcc.y"
+#line 2388 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 311:
-
-/* Line 1455 of yacc.c  */
-#line 2374 "compilers/imcc/imcc.y"
+#line 2390 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
            IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs);
@@ -5654,9 +5112,7 @@
     break;
 
   case 312:
-
-/* Line 1455 of yacc.c  */
-#line 2381 "compilers/imcc/imcc.y"
+#line 2397 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
            (yyval.sr) = (yyvsp[(2) - (3)].sr);
@@ -5664,60 +5120,44 @@
     break;
 
   case 314:
-
-/* Line 1455 of yacc.c  */
-#line 2388 "compilers/imcc/imcc.y"
+#line 2404 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 315:
-
-/* Line 1455 of yacc.c  */
-#line 2389 "compilers/imcc/imcc.y"
+#line 2405 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));  mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 316:
-
-/* Line 1455 of yacc.c  */
-#line 2393 "compilers/imcc/imcc.y"
+#line 2409 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 317:
-
-/* Line 1455 of yacc.c  */
-#line 2394 "compilers/imcc/imcc.y"
+#line 2410 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 318:
-
-/* Line 1455 of yacc.c  */
-#line 2398 "compilers/imcc/imcc.y"
+#line 2414 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 319:
-
-/* Line 1455 of yacc.c  */
-#line 2399 "compilers/imcc/imcc.y"
+#line 2415 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 324:
-
-/* Line 1455 of yacc.c  */
-#line 2413 "compilers/imcc/imcc.y"
+#line 2429 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->nkeys    = 0;
          }
     break;
 
   case 325:
-
-/* Line 1455 of yacc.c  */
-#line 2417 "compilers/imcc/imcc.y"
+#line 2433 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = link_keys(interp,
                           IMCC_INFO(interp)->nkeys,
@@ -5726,18 +5166,14 @@
     break;
 
   case 326:
-
-/* Line 1455 of yacc.c  */
-#line 2425 "compilers/imcc/imcc.y"
+#line 2441 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->nkeys = 0;
          }
     break;
 
   case 327:
-
-/* Line 1455 of yacc.c  */
-#line 2429 "compilers/imcc/imcc.y"
+#line 2445 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = link_keys(interp,
                           IMCC_INFO(interp)->nkeys,
@@ -5746,16 +5182,12 @@
     break;
 
   case 328:
-
-/* Line 1455 of yacc.c  */
-#line 2437 "compilers/imcc/imcc.y"
+#line 2453 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 329:
-
-/* Line 1455 of yacc.c  */
-#line 2439 "compilers/imcc/imcc.y"
+#line 2455 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
            (yyval.sr) = IMCC_INFO(interp)->keys[0];
@@ -5763,81 +5195,60 @@
     break;
 
   case 330:
-
-/* Line 1455 of yacc.c  */
-#line 2447 "compilers/imcc/imcc.y"
+#line 2463 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = (yyvsp[(1) - (1)].sr);
          }
     break;
 
   case 331:
-
-/* Line 1455 of yacc.c  */
-#line 2453 "compilers/imcc/imcc.y"
+#line 2469 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
     break;
 
   case 332:
-
-/* Line 1455 of yacc.c  */
-#line 2454 "compilers/imcc/imcc.y"
+#line 2470 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
     break;
 
   case 333:
-
-/* Line 1455 of yacc.c  */
-#line 2455 "compilers/imcc/imcc.y"
+#line 2471 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
     break;
 
   case 334:
-
-/* Line 1455 of yacc.c  */
-#line 2456 "compilers/imcc/imcc.y"
+#line 2472 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
     break;
 
   case 335:
-
-/* Line 1455 of yacc.c  */
-#line 2457 "compilers/imcc/imcc.y"
+#line 2473 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 336:
-
-/* Line 1455 of yacc.c  */
-#line 2461 "compilers/imcc/imcc.y"
+#line 2477 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 337:
-
-/* Line 1455 of yacc.c  */
-#line 2462 "compilers/imcc/imcc.y"
+#line 2478 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 338:
-
-/* Line 1455 of yacc.c  */
-#line 2463 "compilers/imcc/imcc.y"
+#line 2479 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 339:
-
-/* Line 1455 of yacc.c  */
-#line 2464 "compilers/imcc/imcc.y"
+#line 2480 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
 
-
-/* Line 1455 of yacc.c  */
-#line 5830 "compilers/imcc/imcparser.c"
+/* Line 1267 of yacc.c.  */
+#line 5241 "compilers/imcc/imcparser.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5848,6 +5259,7 @@
 
   *++yyvsp = yyval;
 
+
   /* Now `shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
@@ -5912,7 +5324,7 @@
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse lookahead token after an
+      /* If just tried and failed to reuse look-ahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -5929,7 +5341,7 @@
 	}
     }
 
-  /* Else will try to reuse lookahead token after shifting the error
+  /* Else will try to reuse look-ahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -5986,6 +5398,9 @@
       YY_STACK_PRINT (yyss, yyssp);
     }
 
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
   *++yyvsp = yylval;
 
 
@@ -6010,7 +5425,7 @@
   yyresult = 1;
   goto yyreturn;
 
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -6021,7 +5436,7 @@
 #endif
 
 yyreturn:
-  if (yychar != YYEMPTY)
+  if (yychar != YYEOF && yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
 		 yytoken, &yylval, yyscanner, interp);
   /* Do not reclaim the symbols of the rule which action triggered
@@ -6047,9 +5462,7 @@
 }
 
 
-
-/* Line 1675 of yacc.c  */
-#line 2470 "compilers/imcc/imcc.y"
+#line 2486 "compilers/imcc/imcc.y"
 
 
 /* I need this prototype somewhere... */

Modified: branches/sys_mem_reduce/compilers/imcc/imcparser.h
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/imcparser.h	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/imcparser.h	Sat Feb 20 22:58:35 2010	(r44258)
@@ -9,26 +9,27 @@
  */
 /* HEADERIZER HFILE: none */
 /* HEADERIZER STOP */
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
+
+   This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -39,11 +40,10 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
-
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -297,27 +297,21 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+#line 1075 "compilers/imcc/imcc.y"
 {
-
-/* Line 1676 of yacc.c  */
-#line 1059 "compilers/imcc/imcc.y"
-
     IdList * idlist;
     int t;
     char * s;
     SymReg * sr;
     Instruction *i;
-
-
-
-/* Line 1676 of yacc.c  */
-#line 304 "compilers/imcc/imcparser.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 1489 of yacc.c.  */
+#line 299 "compilers/imcc/imcparser.h"
+	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
 
-

Modified: branches/sys_mem_reduce/compilers/imcc/parser_util.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/parser_util.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/parser_util.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -638,7 +638,7 @@
 
     if (IMCC_INFO(interp)->last_unit) {
         /* a reentrant compile */
-        imc_info          = mem_allocate_zeroed_typed(imc_info_t);
+        imc_info          = mem_gc_allocate_zeroed_typed(interp, imc_info_t);
         imc_info->ghash   = IMCC_INFO(interp)->ghash;
         imc_info->prev    = IMCC_INFO(interp);
         IMCC_INFO(interp) = imc_info;
@@ -907,7 +907,7 @@
 
     if (IMCC_INFO(interp)->last_unit) {
         /* a reentrant compile */
-        imc_info          = mem_allocate_zeroed_typed(imc_info_t);
+        imc_info          = mem_gc_allocate_zeroed_typed(interp, imc_info_t);
         imc_info->prev    = IMCC_INFO(interp);
         imc_info->ghash   = IMCC_INFO(interp)->ghash;
         IMCC_INFO(interp) = imc_info;

Modified: branches/sys_mem_reduce/compilers/imcc/pbc.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/pbc.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/pbc.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -357,11 +357,11 @@
     /* Update the constant count and reallocate */
     if (interp->code->const_table->constants)
         interp->code->const_table->constants =
-            mem_realloc_n_typed(interp->code->const_table->constants,
+            mem_gc_realloc_n_typed(interp, interp->code->const_table->constants,
                 newcount, PackFile_Constant *);
     else
         interp->code->const_table->constants =
-            mem_allocate_n_typed(newcount, PackFile_Constant *);
+            mem_gc_allocate_n_typed(interp, newcount, PackFile_Constant *);
 
     interp->code->const_table->constants[oldcount] = new_constant;
     interp->code->const_table->const_count         = newcount;
@@ -432,10 +432,10 @@
 e_pbc_open(PARROT_INTERP, SHIM(void *param))
 {
     ASSERT_ARGS(e_pbc_open)
-    code_segment_t * const cs = mem_allocate_zeroed_typed(code_segment_t);
+    code_segment_t * const cs = mem_gc_allocate_zeroed_typed(interp, code_segment_t);
 
     if (!IMCC_INFO(interp)->globals)
-        IMCC_INFO(interp)->globals = mem_allocate_zeroed_typed(imcc_globals);
+        IMCC_INFO(interp)->globals = mem_gc_allocate_zeroed_typed(interp, imcc_globals);
 
     if (IMCC_INFO(interp)->globals->cs)
         clear_sym_hash(&IMCC_INFO(interp)->globals->cs->key_consts);
@@ -445,7 +445,7 @@
     }
 
     /* free previous cached key constants if any */
-    create_symhash(&cs->key_consts);
+    create_symhash(interp, &cs->key_consts);
 
     cs->next     = NULL;
     cs->prev     = IMCC_INFO(interp)->globals->cs;
@@ -496,7 +496,7 @@
 make_new_sub(PARROT_INTERP, ARGIN(IMC_Unit *unit))
 {
     ASSERT_ARGS(make_new_sub)
-    subs_t * const s = mem_allocate_zeroed_typed(subs_t);
+    subs_t * const s = mem_gc_allocate_zeroed_typed(interp, subs_t);
 
     s->prev          = IMCC_INFO(interp)->globals->cs->subs;
     s->unit          = unit;
@@ -510,7 +510,7 @@
 
     IMCC_INFO(interp)->globals->cs->subs = s;
 
-    create_symhash(&s->fixup);
+    create_symhash(interp, &s->fixup);
 }
 
 
@@ -615,7 +615,7 @@
 {
     ASSERT_ARGS(store_key_const)
     SymReg * const c =
-        _mk_const(&IMCC_INFO(interp)->globals->cs->key_consts, str, 0);
+        _mk_const(interp, &IMCC_INFO(interp)->globals->cs->key_consts, str, 0);
     c->color = idx;
 }
 
@@ -1478,7 +1478,7 @@
     if (r)
         return r->color;
 
-    pfc = mem_allocate_typed(PackFile_Constant);
+    pfc = mem_gc_allocate_typed(interp, PackFile_Constant);
     rc  = PackFile_Constant_unpack_key(interp,
             interp->code->const_table, pfc, key);
 
@@ -2188,7 +2188,7 @@
             /* need a dummy to hold register usage */
             SymReg * const r = mk_sub_label(interp, "(null)");
             r->type          = VT_PCC_SUB;
-            r->pcc_sub       = mem_allocate_zeroed_typed(pcc_sub_t);
+            r->pcc_sub       = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
 
             add_const_pmc_sub(interp, r, oldsize, oldsize + code_size);
         }

Modified: branches/sys_mem_reduce/compilers/imcc/pcc.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/pcc.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/pcc.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -108,9 +108,12 @@
         __attribute__nonnull__(3)
         __attribute__nonnull__(4);
 
-static void unshift_self(ARGIN(SymReg *sub), ARGIN(SymReg *obj))
+static void unshift_self(PARROT_INTERP,
+    ARGIN(SymReg *sub),
+    ARGIN(SymReg *obj))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3);
 
 #define ASSERT_ARGS_insert_tail_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
@@ -143,7 +146,8 @@
     , PARROT_ASSERT_ARG(ins) \
     , PARROT_ASSERT_ARG(sub))
 #define ASSERT_ARGS_unshift_self __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(sub) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(sub) \
     , PARROT_ASSERT_ARG(obj))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
@@ -267,15 +271,15 @@
     SymReg *regcache[PCC_GET_ARGS_LIMIT + 1];
     char bufcache[sizeof (pref) + sizeof (item) * PCC_GET_ARGS_LIMIT + sizeof (subf)];
 
-    SymReg ** const regs  = n < PCC_GET_ARGS_LIMIT ?
-        regcache :
-        mem_allocate_n_zeroed_typed(n + 1, SymReg *);
+    SymReg ** const regs  = n < PCC_GET_ARGS_LIMIT
+                                ? regcache
+                                : mem_gc_allocate_n_zeroed_typed(interp, n + 1, SymReg *);
 
     unsigned int  bufpos  = 0;
     unsigned int  bufsize = lenpref + lenitem * n + lensubf;
-    char         *buf     = n < PCC_GET_ARGS_LIMIT ?
-        bufcache :
-        mem_allocate_n_typed(bufsize, char);
+    char         *buf     = n < PCC_GET_ARGS_LIMIT
+                                ? bufcache
+                                : mem_gc_allocate_n_typed(interp, bufsize, char);
 
     memcpy(buf, pref, lenpref);
     bufpos += lenpref;
@@ -362,7 +366,7 @@
 
 /*
 
-=item C<static void unshift_self(SymReg *sub, SymReg *obj)>
+=item C<static void unshift_self(PARROT_INTERP, SymReg *sub, SymReg *obj)>
 
 prepend the object to args or self to params
 
@@ -371,15 +375,15 @@
 */
 
 static void
-unshift_self(ARGIN(SymReg *sub), ARGIN(SymReg *obj))
+unshift_self(PARROT_INTERP, ARGIN(SymReg *sub), ARGIN(SymReg *obj))
 {
     ASSERT_ARGS(unshift_self)
     struct pcc_sub_t * const pcc_sub = sub->pcc_sub;
     const int                n       = pcc_sub->nargs;
     int                      i;
 
-    mem_realloc_n_typed(pcc_sub->args,      n + 1, SymReg *);
-    mem_realloc_n_typed(pcc_sub->arg_flags, n + 1, int);
+    pcc_sub->args       = mem_gc_realloc_n_typed(interp, pcc_sub->args,      n + 1, SymReg *);
+    pcc_sub->arg_flags  = mem_gc_realloc_n_typed(interp, pcc_sub->arg_flags, n + 1, int);
 
     for (i = n; i; --i) {
         pcc_sub->args[i]      = pcc_sub->args[i - 1];
@@ -419,7 +423,7 @@
             self->type = VTIDENTIFIER;
         }
 
-        unshift_self(sub, self);
+        unshift_self(interp, sub, self);
     }
 
     /* Don't generate any parameter checking code if there
@@ -821,7 +825,7 @@
     }
 
     if (sub->pcc_sub->object)
-        unshift_self(sub, sub->pcc_sub->object);
+        unshift_self(interp, sub, sub->pcc_sub->object);
 
     /* insert arguments */
     n   = sub->pcc_sub->nargs;

Modified: branches/sys_mem_reduce/compilers/imcc/reg_alloc.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/reg_alloc.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/reg_alloc.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -59,7 +59,8 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*unit);
 
-static void build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit))
+static void build_reglist(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
+        __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*unit);
 
@@ -73,11 +74,12 @@
         FUNC_MODIFIES(*r);
 
 PARROT_WARN_UNUSED_RESULT
-static unsigned int first_avail(
+static unsigned int first_avail(PARROT_INTERP,
     ARGIN(const IMC_Unit *unit),
     int reg_set,
     ARGOUT_NULLOK(Set **avail))
         __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
         FUNC_MODIFIES(*avail);
 
 PARROT_WARN_UNUSED_RESULT
@@ -162,7 +164,8 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-static void vanilla_reg_alloc(SHIM_INTERP, ARGMOD(IMC_Unit *unit))
+static void vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
+        __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*unit);
 
@@ -179,14 +182,16 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_build_reglist __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_compute_du_chain __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_compute_one_du_chain __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(r) \
     , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_first_avail __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_ig_allocate __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
 #define ASSERT_ARGS_ig_find_color __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(unit) \
@@ -223,7 +228,8 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_vanilla_reg_alloc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(unit))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(unit))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
@@ -636,7 +642,7 @@
 
 /*
 
-=item C<static void build_reglist(NULLOK_INTERP, IMC_Unit *unit)>
+=item C<static void build_reglist(PARROT_INTERP, IMC_Unit *unit)>
 
 make a linear list of IDENTs and VARs, set n_symbols
 TODO
@@ -654,7 +660,7 @@
 */
 
 static void
-build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit))
+build_reglist(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
 {
     ASSERT_ARGS(build_reglist)
     SymHash  const *hsh = &unit->hash;
@@ -670,7 +676,7 @@
     if (count == 0)
         return;
 
-    unit->reglist = mem_allocate_n_typed(count, SymReg *);
+    unit->reglist = mem_gc_allocate_n_typed(interp, count, SymReg *);
 
     for (i = count = 0; i < hsh->size; i++) {
         SymReg *r;
@@ -1043,7 +1049,7 @@
     if (!n)
         return;
 
-    avail = mem_allocate_n_typed(n, char);
+    avail = mem_gc_allocate_n_typed(interp, n, char);
 
     for (i = 0; i < unit->n_symbols; ++i) {
         int     already_allocated, color;
@@ -1122,8 +1128,8 @@
 
 /*
 
-=item C<static unsigned int first_avail(const IMC_Unit *unit, int reg_set, Set
-**avail)>
+=item C<static unsigned int first_avail(PARROT_INTERP, const IMC_Unit *unit, int
+reg_set, Set **avail)>
 
 find first available register of the given reg_set
 
@@ -1133,13 +1139,15 @@
 
 PARROT_WARN_UNUSED_RESULT
 static unsigned int
-first_avail(ARGIN(const IMC_Unit *unit), int reg_set, ARGOUT_NULLOK(Set **avail))
+first_avail(PARROT_INTERP,
+        ARGIN(const IMC_Unit *unit), int reg_set,
+        ARGOUT_NULLOK(Set **avail))
 {
     ASSERT_ARGS(first_avail)
     int n                     = (int)unit->n_symbols > unit->max_color
                               ? (int)unit->n_symbols
                               : unit->max_color;
-    Set         *allocated    = set_make((unsigned int)n + 1);
+    Set         *allocated    = set_make(interp, (unsigned int)n + 1);
 
     const SymHash * const hsh = &unit->hash;
 
@@ -1205,7 +1213,7 @@
                 Set         *avail     = sets[j];
                 unsigned int first_reg = avail
                                        ? set_first_zero(avail)
-                                       : first_avail(unit, (int)r->set, &avail);
+                                       : first_avail(interp, unit, (int)r->set, &avail);
                 set_add(avail, first_reg);
                 r->color = first_reg++;
 
@@ -1244,7 +1252,7 @@
 */
 
 static void
-vanilla_reg_alloc(SHIM_INTERP, ARGMOD(IMC_Unit *unit))
+vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
 {
     ASSERT_ARGS(vanilla_reg_alloc)
     const char   type[] = "INSP";
@@ -1266,7 +1274,7 @@
     /* Assign new colors. */
     for (j = 0; j < 4; j++) {
         reg_set   = type[j];
-        first_reg = first_avail(unit, reg_set, &avail);
+        first_reg = first_avail(interp, unit, reg_set, &avail);
 
         /* XXX Use a different loop variable that doesn't shadow outer i */
         for (i = 0; i < hsh->size; i++) {
@@ -1276,7 +1284,7 @@
                     continue;
                 if (REG_NEEDS_ALLOC(r) && (r->color == -1) && r->use_count) {
                     if (set_contains(avail, first_reg))
-                        first_reg = first_avail(unit, reg_set, NULL);
+                        first_reg = first_avail(interp, unit, reg_set, NULL);
 
                     set_add(avail, first_reg);
                     r->color = first_reg++;

Modified: branches/sys_mem_reduce/compilers/imcc/sets.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/sets.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/sets.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -38,7 +38,7 @@
 
 /*
 
-=item C<Set* set_make(unsigned int length)>
+=item C<Set* set_make(PARROT_INTERP, unsigned int length)>
 
 Creates a new Set object.
 
@@ -49,13 +49,13 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 Set*
-set_make(unsigned int length)
+set_make(PARROT_INTERP, unsigned int length)
 {
     ASSERT_ARGS(set_make)
-    Set * const s = mem_allocate_zeroed_typed(Set);
+    Set * const s = mem_gc_allocate_zeroed_typed(interp, Set);
     s->length     = length;
-    s->bmp        = mem_allocate_n_zeroed_typed(NUM_BYTES(length),
-                        unsigned char);
+    s->bmp        = mem_gc_allocate_n_zeroed_typed(interp,
+                            NUM_BYTES(length), unsigned char);
 
     return s;
 }
@@ -63,7 +63,7 @@
 
 /*
 
-=item C<Set* set_make_full(unsigned int length)>
+=item C<Set* set_make_full(PARROT_INTERP, unsigned int length)>
 
 Creates a new Set object of C<length> items, setting them all to full.
 
@@ -74,10 +74,10 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 Set*
-set_make_full(unsigned int length)
+set_make_full(PARROT_INTERP, unsigned int length)
 {
     ASSERT_ARGS(set_make_full)
-    Set * const s      = set_make(length);
+    Set * const s      = set_make(interp, length);
     const size_t bytes = NUM_BYTES(length);
 
     if (bytes)
@@ -128,7 +128,7 @@
 
 /*
 
-=item C<Set* set_copy(const Set *s)>
+=item C<Set* set_copy(PARROT_INTERP, const Set *s)>
 
 Copies the set C<s>, returning a new set pointer.
 
@@ -139,10 +139,10 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 Set*
-set_copy(ARGIN(const Set *s))
+set_copy(PARROT_INTERP, ARGIN(const Set *s))
 {
     ASSERT_ARGS(set_copy)
-    Set * const d = set_make(s->length);
+    Set * const d = set_make(interp, s->length);
 
     memcpy(d->bmp, s->bmp, NUM_BYTES(d->length));
     return d;
@@ -286,7 +286,7 @@
 
 /*
 
-=item C<Set * set_union(const Set *s1, const Set *s2)>
+=item C<Set * set_union(PARROT_INTERP, const Set *s1, const Set *s2)>
 
 Computes the union of the two Set arguments, returning it as a new Set.
 
@@ -299,11 +299,11 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 Set *
-set_union(ARGIN(const Set *s1), ARGIN(const Set *s2))
+set_union(PARROT_INTERP, ARGIN(const Set *s1), ARGIN(const Set *s2))
 {
     ASSERT_ARGS(set_union)
     unsigned int i;
-    Set * const s = set_make(s1->length);
+    Set * const s = set_make(interp, s1->length);
 
     if (s1->length != s2->length)
         fatal(1, "set_union", "Sets don't have the same length\n");
@@ -318,7 +318,7 @@
 
 /*
 
-=item C<Set * set_intersec(const Set *s1, const Set *s2)>
+=item C<Set * set_intersec(PARROT_INTERP, const Set *s1, const Set *s2)>
 
 Creates a new Set object that is the intersection of the Set arguments (defined
 through the binary C<and> operator.)
@@ -332,11 +332,11 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 Set *
-set_intersec(ARGIN(const Set *s1), ARGIN(const Set *s2))
+set_intersec(PARROT_INTERP, ARGIN(const Set *s1), ARGIN(const Set *s2))
 {
     ASSERT_ARGS(set_intersec)
     unsigned int i;
-    Set * const  s = set_make(s1->length);
+    Set * const  s = set_make(interp, s1->length);
 
     if (s1->length != s2->length)
         fatal(1, "set_intersec", "Sets don't have the same length\n");

Modified: branches/sys_mem_reduce/compilers/imcc/sets.h
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/sets.h	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/sets.h	Sat Feb 20 22:58:35 2010	(r44258)
@@ -29,8 +29,9 @@
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Set* set_copy(ARGIN(const Set *s))
-        __attribute__nonnull__(1);
+Set* set_copy(PARROT_INTERP, ARGIN(const Set *s))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
 int set_equal(ARGIN(const Set *s1), ARGIN(const Set *s2))
         __attribute__nonnull__(1)
@@ -47,9 +48,12 @@
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Set * set_intersec(ARGIN(const Set *s1), ARGIN(const Set *s2))
+Set * set_intersec(PARROT_INTERP,
+    ARGIN(const Set *s1),
+    ARGIN(const Set *s2))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3);
 
 void set_intersec_inplace(ARGMOD(Set *s1), ARGIN(const Set *s2))
         __attribute__nonnull__(1)
@@ -58,17 +62,20 @@
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Set* set_make(unsigned int length);
+Set* set_make(PARROT_INTERP, unsigned int length)
+        __attribute__nonnull__(1);
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Set* set_make_full(unsigned int length);
+Set* set_make_full(PARROT_INTERP, unsigned int length)
+        __attribute__nonnull__(1);
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Set * set_union(ARGIN(const Set *s1), ARGIN(const Set *s2))
+Set * set_union(PARROT_INTERP, ARGIN(const Set *s1), ARGIN(const Set *s2))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3);
 
 #define ASSERT_ARGS_set_add __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(s))
@@ -77,7 +84,8 @@
 #define ASSERT_ARGS_set_contains __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(s))
 #define ASSERT_ARGS_set_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(s))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(s))
 #define ASSERT_ARGS_set_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(s1) \
     , PARROT_ASSERT_ARG(s2))
@@ -86,15 +94,19 @@
 #define ASSERT_ARGS_set_free __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(s))
 #define ASSERT_ARGS_set_intersec __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(s1) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(s1) \
     , PARROT_ASSERT_ARG(s2))
 #define ASSERT_ARGS_set_intersec_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(s1) \
     , PARROT_ASSERT_ARG(s2))
-#define ASSERT_ARGS_set_make __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_set_make_full __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_set_make __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_set_make_full __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_set_union __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(s1) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(s1) \
     , PARROT_ASSERT_ARG(s2))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: compilers/imcc/sets.c */

Modified: branches/sys_mem_reduce/compilers/imcc/symreg.c
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/symreg.c	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/symreg.c	Sat Feb 20 22:58:35 2010	(r44258)
@@ -48,19 +48,21 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
-static char * _mk_fullname(
+static char * _mk_fullname(PARROT_INTERP,
     ARGIN_NULLOK(const Namespace *ns),
     ARGIN(const char *name))
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(3);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
-static SymReg * _mk_symreg(
+static SymReg * _mk_symreg(PARROT_INTERP,
     ARGMOD(SymHash *hsh),
     ARGIN(const char *name),
     int t)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*hsh);
 
 PARROT_WARN_UNUSED_RESULT
@@ -95,17 +97,20 @@
         FUNC_MODIFIES(*unit)
         FUNC_MODIFIES(*rhs);
 
-static void resize_symhash(ARGMOD(SymHash *hsh))
+static void resize_symhash(PARROT_INTERP, ARGMOD(SymHash *hsh))
         __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
         FUNC_MODIFIES(*hsh);
 
 #define ASSERT_ARGS__get_sym_typed __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(hsh) \
     , PARROT_ASSERT_ARG(name))
 #define ASSERT_ARGS__mk_fullname __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(name))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(name))
 #define ASSERT_ARGS__mk_symreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(hsh) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(hsh) \
     , PARROT_ASSERT_ARG(name))
 #define ASSERT_ARGS_add_ns __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
@@ -121,7 +126,8 @@
     , PARROT_ASSERT_ARG(left) \
     , PARROT_ASSERT_ARG(rhs))
 #define ASSERT_ARGS_resize_symhash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(hsh))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(hsh))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
@@ -139,7 +145,7 @@
 push_namespace(PARROT_INTERP, ARGIN(const char *name))
 {
     ASSERT_ARGS(push_namespace)
-    Namespace * const ns = mem_allocate_zeroed_typed(Namespace);
+    Namespace * const ns = mem_gc_allocate_zeroed_typed(interp, Namespace);
 
     ns->parent = IMCC_INFO(interp)->namespace_stack;
     ns->name   = mem_sys_strdup(name);
@@ -244,7 +250,8 @@
 
 /*
 
-=item C<static SymReg * _mk_symreg(SymHash *hsh, const char *name, int t)>
+=item C<static SymReg * _mk_symreg(PARROT_INTERP, SymHash *hsh, const char
+*name, int t)>
 
 Makes a new SymReg in the given SymHash from a varname and type.
 
@@ -255,20 +262,20 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 static SymReg *
-_mk_symreg(ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
+_mk_symreg(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
 {
     ASSERT_ARGS(_mk_symreg)
     SymReg * r = _get_sym_typed(hsh, name, t);
 
     if (!r) {
-        r             = mem_allocate_zeroed_typed(SymReg);
+        r             = mem_gc_allocate_zeroed_typed(interp, SymReg);
         r->set        = t;
         r->type       = VTREG;
         r->name       = mem_sys_strdup(name);
         r->color      = -1;
         r->want_regno = -1;
 
-        _store_symreg(hsh, r);
+        _store_symreg(interp, hsh, r);
     }
 
     return r;
@@ -296,7 +303,7 @@
     /* Check for the condition that fires up a segfault in TT #162 */
     PARROT_ASSERT(unit != NULL);
 
-    return _mk_symreg(&unit->hash, name, t);
+    return _mk_symreg(interp, &unit->hash, name, t);
 }
 
 
@@ -386,10 +393,10 @@
 {
     ASSERT_ARGS(mk_pcc_sub)
     IMC_Unit * const unit = IMCC_INFO(interp)->last_unit;
-    SymReg   * const r    = _mk_symreg(&unit->hash, name, proto);
+    SymReg   * const r    = _mk_symreg(interp, &unit->hash, name, proto);
 
     r->type    = VT_PCC_SUB;
-    r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+    r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
 
     return r;
 }
@@ -420,7 +427,7 @@
     if (unit->prev && unit->prev->_namespace == ns)
         unit->_namespace = ns;
     else {
-        SymReg * const g = dup_sym(ns);
+        SymReg * const g = dup_sym(interp, ns);
         SymReg * const r = _get_sym(&IMCC_INFO(interp)->ghash, g->name);
 
         unit->_namespace     = g;
@@ -430,7 +437,7 @@
         /* this unit should free its namespace only if it's the only thing
          * holding onto it */
         if (!r || r->type != VT_CONSTP) {
-            _store_symreg(&IMCC_INFO(interp)->ghash, g);
+            _store_symreg(interp, &IMCC_INFO(interp)->ghash, g);
             unit->owns_namespace = 0;
         }
         else
@@ -441,7 +448,7 @@
 
 /*
 
-=item C<void add_pcc_arg(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_arg(PARROT_INTERP, SymReg *r, SymReg *arg)>
 
 Adds a register or constant to the function arg list.
 
@@ -450,14 +457,14 @@
 */
 
 void
-add_pcc_arg(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+add_pcc_arg(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
 {
     ASSERT_ARGS(add_pcc_arg)
     pcc_sub_t * const sub = r->pcc_sub;
     const int         n   = sub->nargs;
 
-    mem_realloc_n_typed(sub->args,      n + 1, SymReg *);
-    mem_realloc_n_typed(sub->arg_flags, n + 1, int);
+    sub->args       = mem_gc_realloc_n_typed(interp, sub->args,      n + 1, SymReg *);
+    sub->arg_flags  = mem_gc_realloc_n_typed(interp, sub->arg_flags, n + 1, int);
 
     sub->args[n]      = arg;
     sub->arg_flags[n] = arg->type;
@@ -470,7 +477,7 @@
 
 /*
 
-=item C<void add_pcc_result(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_result(PARROT_INTERP, SymReg *r, SymReg *arg)>
 
 Adds a register or constant to the function's return list.
 
@@ -479,14 +486,14 @@
 */
 
 void
-add_pcc_result(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+add_pcc_result(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
 {
     ASSERT_ARGS(add_pcc_result)
     pcc_sub_t * const sub = r->pcc_sub;
     const int         n   = sub->nret;
 
-    mem_realloc_n_typed(sub->ret,       n + 1, SymReg *);
-    mem_realloc_n_typed(sub->ret_flags, n + 1, int);
+    sub->ret        = mem_gc_realloc_n_typed(interp, sub->ret,       n + 1, SymReg *);
+    sub->ret_flags  = mem_gc_realloc_n_typed(interp, sub->ret_flags, n + 1, int);
 
     /* we can't keep the flags in the SymReg as the SymReg
      * maybe used with different flags for different calls */
@@ -501,7 +508,7 @@
 
 /*
 
-=item C<void add_pcc_multi(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_multi(PARROT_INTERP, SymReg *r, SymReg *arg)>
 
 Adds a :multi signature to the sub.
 
@@ -510,13 +517,13 @@
 */
 
 void
-add_pcc_multi(ARGMOD(SymReg *r), ARGIN_NULLOK(SymReg *arg))
+add_pcc_multi(PARROT_INTERP, ARGMOD(SymReg *r), ARGIN_NULLOK(SymReg *arg))
 {
     ASSERT_ARGS(add_pcc_multi)
     pcc_sub_t * const sub = r->pcc_sub;
     const int n           = sub->nmulti;
 
-    mem_realloc_n_typed(sub->multi, n + 1, SymReg *);
+    sub->multi = mem_gc_realloc_n_typed(interp, sub->multi, n + 1, SymReg *);
     sub->multi[n] = arg;
     sub->nmulti++;
 }
@@ -592,7 +599,8 @@
 
 /*
 
-=item C<static char * _mk_fullname(const Namespace *ns, const char *name)>
+=item C<static char * _mk_fullname(PARROT_INTERP, const Namespace *ns, const
+char *name)>
 
 Combines the namespace and name together, separated by a C<::>.  If there's no
 namespace, the name is returned on its own.
@@ -607,12 +615,12 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
 static char *
-_mk_fullname(ARGIN_NULLOK(const Namespace *ns), ARGIN(const char *name))
+_mk_fullname(PARROT_INTERP, ARGIN_NULLOK(const Namespace *ns), ARGIN(const char *name))
 {
     ASSERT_ARGS(_mk_fullname)
     if (ns) {
         const size_t len = strlen(name) + strlen(ns->name) + 3;
-        char *result = (char *) mem_sys_allocate(len);
+        char *result = mem_gc_allocate_n_typed(interp, len, char);
         snprintf(result, len, "%s::%s", ns->name, name);
         return result;
     }
@@ -637,7 +645,7 @@
 mk_ident(PARROT_INTERP, ARGIN(const char *name), int t)
 {
     ASSERT_ARGS(mk_ident)
-    char   * const fullname = _mk_fullname(IMCC_INFO(interp)->namespace_stack, name);
+    char   * const fullname = _mk_fullname(interp, IMCC_INFO(interp)->namespace_stack, name);
     SymReg *r = get_sym_by_name(&(IMCC_INFO(interp)->last_unit->hash), name);
     if (r && r->set != t)
         IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
@@ -648,7 +656,7 @@
 
 
     if (IMCC_INFO(interp)->namespace_stack) {
-        Identifier * const ident = mem_allocate_zeroed_typed(Identifier);
+        Identifier * const ident = mem_gc_allocate_zeroed_typed(interp, Identifier);
 
         ident->name        = fullname;
         ident->next        = IMCC_INFO(interp)->namespace_stack->idents;
@@ -784,7 +792,7 @@
             IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "global PMC constant not allowed");
 
-        r = _mk_symreg(&IMCC_INFO(interp)->ghash, name, t);
+        r = _mk_symreg(interp, &IMCC_INFO(interp)->ghash, name, t);
     }
     else {
         r = mk_ident(interp, name, t);
@@ -802,7 +810,8 @@
 
 /*
 
-=item C<SymReg * _mk_const(SymHash *hsh, const char *name, int t)>
+=item C<SymReg * _mk_const(PARROT_INTERP, SymHash *hsh, const char *name, int
+t)>
 
 Makes a new constant (internal use only).
 
@@ -813,10 +822,10 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 SymReg *
-_mk_const(ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
+_mk_const(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
 {
     ASSERT_ARGS(_mk_const)
-    SymReg * const r = _mk_symreg(hsh, name, t);
+    SymReg * const r = _mk_symreg(interp, hsh, name, t);
     r->type          = VTCONST;
 
     if (t == 'U') {
@@ -902,9 +911,9 @@
     SymHash * const h = &IMCC_INFO(interp)->ghash;
 
     if (!h->data)
-        create_symhash(h);
+        create_symhash(interp, h);
 
-    return _mk_const(h, name, t);
+    return _mk_const(interp, h, name, t);
 }
 
 
@@ -981,10 +990,10 @@
         if (r && r->usage & U_LEXICAL)
             is_lexical = 1;
 
-        r       = mem_allocate_zeroed_typed(SymReg);
+        r       = mem_gc_allocate_zeroed_typed(interp, SymReg);
         r->type = VTADDRESS;
         r->name = mem_sys_strdup(name);
-        _store_symreg(hsh, r);
+        _store_symreg(interp, hsh, r);
 
         if (is_lexical)
             r->usage |= U_LEXICAL;
@@ -1011,7 +1020,7 @@
             }
         }
 
-        r       = _mk_symreg(hsh, sub_name, 0);
+        r       = _mk_symreg(interp, hsh, sub_name, 0);
         r->type = VTADDRESS;
 
         if (uniq) {
@@ -1119,7 +1128,7 @@
 
 /*
 
-=item C<SymReg * dup_sym(const SymReg *r)>
+=item C<SymReg * dup_sym(PARROT_INTERP, const SymReg *r)>
 
 Links keys to a keys structure = SymReg
 
@@ -1164,15 +1173,15 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 SymReg *
-dup_sym(ARGIN(const SymReg *r))
+dup_sym(PARROT_INTERP, ARGIN(const SymReg *r))
 {
     ASSERT_ARGS(dup_sym)
-    SymReg * const new_sym = mem_allocate_zeroed_typed(SymReg);
+    SymReg * const new_sym = mem_gc_allocate_zeroed_typed(interp, SymReg);
     STRUCT_COPY(new_sym, r);
     new_sym->name = mem_sys_strdup(r->name);
 
     if (r->nextkey)
-        new_sym->nextkey = dup_sym(r->nextkey);
+        new_sym->nextkey = dup_sym(interp, r->nextkey);
 
     return new_sym;
 }
@@ -1236,7 +1245,7 @@
     }
 
     /* no, need a new one */
-    keychain       = mem_allocate_zeroed_typed(SymReg);
+    keychain       = mem_gc_allocate_zeroed_typed(interp, SymReg);
     keychain->type = VTCONST;
 
     ++keychain->use_count;
@@ -1249,7 +1258,7 @@
         if (REG_NEEDS_ALLOC(keys[i]))
             keychain->type |= VTREGKEY;
 
-        key->nextkey = dup_sym(keys[i]);
+        key->nextkey = dup_sym(interp, keys[i]);
         key          = key->nextkey;
 
         /* for registers, point ->reg to the original, needed by
@@ -1262,7 +1271,7 @@
     keychain->set   = 'K';
     keychain->color = -1;
 
-    _store_symreg(h, keychain);
+    _store_symreg(interp, h, keychain);
 
     return keychain;
 }
@@ -1316,7 +1325,7 @@
 
 /*
 
-=item C<void create_symhash(SymHash *hash)>
+=item C<void create_symhash(PARROT_INTERP, SymHash *hash)>
 
 Creates a symbol hash table with space for 16 entries.
 
@@ -1325,10 +1334,10 @@
 */
 
 void
-create_symhash(ARGOUT(SymHash *hash))
+create_symhash(PARROT_INTERP, ARGOUT(SymHash *hash))
 {
     ASSERT_ARGS(create_symhash)
-    hash->data    = mem_allocate_n_zeroed_typed(16, SymReg *);
+    hash->data    = mem_gc_allocate_n_zeroed_typed(interp, 16, SymReg *);
     hash->size    = 16;
     hash->entries = 0;
 }
@@ -1336,7 +1345,7 @@
 
 /*
 
-=item C<static void resize_symhash(SymHash *hsh)>
+=item C<static void resize_symhash(PARROT_INTERP, SymHash *hsh)>
 
 Resizes a symbol hash table.
 
@@ -1345,16 +1354,16 @@
 */
 
 static void
-resize_symhash(ARGMOD(SymHash *hsh))
+resize_symhash(PARROT_INTERP, ARGMOD(SymHash *hsh))
 {
     ASSERT_ARGS(resize_symhash)
     const int    new_size = hsh->size << 1; /* new size is twice as large */
     int          n_next   = 16;
-    SymReg     **next_r   = mem_allocate_n_zeroed_typed(n_next, SymReg *);
+    SymReg     **next_r   = mem_gc_allocate_n_zeroed_typed(interp, n_next, SymReg *);
     SymHash      nh;                        /* new symbol table */
     unsigned int i;
 
-    nh.data = mem_allocate_n_zeroed_typed(new_size, SymReg *);
+    nh.data = mem_gc_allocate_n_zeroed_typed(interp, new_size, SymReg *);
 
     for (i = 0; i < hsh->size; i++) {
         SymReg *r, *next;
@@ -1367,7 +1376,7 @@
             /* remember all the chained next pointers and clear r->next */
             if (j >= n_next) {
                 n_next <<= 1;
-                mem_realloc_n_typed(next_r, n_next, SymReg *);
+                next_r = mem_gc_realloc_n_typed(interp, next_r, n_next, SymReg *);
             }
 
             r->next     = NULL;
@@ -1396,7 +1405,7 @@
 
 /*
 
-=item C<void _store_symreg(SymHash *hsh, SymReg *r)>
+=item C<void _store_symreg(PARROT_INTERP, SymHash *hsh, SymReg *r)>
 
 Stores a symbol in the hash (internal use only).
 
@@ -1405,7 +1414,7 @@
 */
 
 void
-_store_symreg(ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
+_store_symreg(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
 {
     ASSERT_ARGS(_store_symreg)
     const int i = hash_str(r->name) % hsh->size;
@@ -1418,7 +1427,7 @@
     hsh->entries++;
 
     if (hsh->entries >= hsh->size)
-        resize_symhash(hsh);
+        resize_symhash(interp, hsh);
 }
 
 
@@ -1436,7 +1445,7 @@
 store_symreg(PARROT_INTERP, ARGMOD(SymReg *r))
 {
     ASSERT_ARGS(store_symreg)
-    _store_symreg(&IMCC_INFO(interp)->cur_unit->hash, r);
+    _store_symreg(interp, &IMCC_INFO(interp)->cur_unit->hash, r);
 }
 
 
@@ -1512,7 +1521,7 @@
     SymReg          *p;
 
     for (ns = nspace; ns; ns = ns->parent) {
-        char * const fullname = _mk_fullname(ns, name);
+        char * const fullname = _mk_fullname(interp, ns, name);
         p                     = _get_sym(hsh, fullname);
 
         mem_sys_free(fullname);

Modified: branches/sys_mem_reduce/compilers/imcc/symreg.h
==============================================================================
--- branches/sys_mem_reduce/compilers/imcc/symreg.h	Sat Feb 20 22:57:57 2010	(r44257)
+++ branches/sys_mem_reduce/compilers/imcc/symreg.h	Sat Feb 20 22:58:35 2010	(r44258)
@@ -138,14 +138,19 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
-SymReg * _mk_const(ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
+SymReg * _mk_const(PARROT_INTERP,
+    ARGMOD(SymHash *hsh),
+    ARGIN(const char *name),
+    int t)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*hsh);
 
-void _store_symreg(ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
+void _store_symreg(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*hsh)
         FUNC_MODIFIES(*r);
 
@@ -154,9 +159,10 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*unit);
 
-void add_pcc_arg(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+void add_pcc_arg(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*r)
         FUNC_MODIFIES(*arg);
 
@@ -165,13 +171,17 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*r);
 
-void add_pcc_multi(ARGMOD(SymReg *r), ARGIN_NULLOK(SymReg *arg))
+void add_pcc_multi(PARROT_INTERP,
+    ARGMOD(SymReg *r),
+    ARGIN_NULLOK(SymReg *arg))
         __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
         FUNC_MODIFIES(*r);
 
-void add_pcc_result(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+void add_pcc_result(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
+        __attribute__nonnull__(3)
         FUNC_MODIFIES(*r)
         FUNC_MODIFIES(*arg);
 
@@ -188,8 +198,9 @@
         __attribute__nonnull__(1)
         FUNC_MODIFIES(*hsh);
 
-void create_symhash(ARGOUT(SymHash *hash))
+void create_symhash(PARROT_INTERP, ARGOUT(SymHash *hash))
         __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
         FUNC_MODIFIES(*hash);
 
 void debug_dump_sym_hash(ARGIN(const SymHash *hsh))
@@ -197,8 +208,9 @@
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-SymReg * dup_sym(ARGIN(const SymReg *r))
-        __attribute__nonnull__(1);
+SymReg * dup_sym(PARROT_INTERP, ARGIN(const SymReg *r))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
 PARROT_CAN_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
@@ -338,24 +350,29 @@
     , PARROT_ASSERT_ARG(hsh) \
     , PARROT_ASSERT_ARG(name))
 #define ASSERT_ARGS__mk_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(hsh) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(hsh) \
     , PARROT_ASSERT_ARG(name))
 #define ASSERT_ARGS__store_symreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(hsh) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(hsh) \
     , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_add_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(unit))
 #define ASSERT_ARGS_add_pcc_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(r) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(r) \
     , PARROT_ASSERT_ARG(arg))
 #define ASSERT_ARGS_add_pcc_cc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(r) \
     , PARROT_ASSERT_ARG(arg))
 #define ASSERT_ARGS_add_pcc_multi __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(r))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_add_pcc_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(r) \
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(r) \
     , PARROT_ASSERT_ARG(arg))
 #define ASSERT_ARGS_add_pcc_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(r) \
@@ -366,11 +383,13 @@
 #define ASSERT_ARGS_clear_sym_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(hsh))
 #define ASSERT_ARGS_create_symhash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(hash))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(hash))
 #define ASSERT_ARGS_debug_dump_sym_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(hsh))
 #define ASSERT_ARGS_dup_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(r))
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(r))
 #define ASSERT_ARGS_find_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(name))


More information about the parrot-commits mailing list