[svn:parrot] r40665 - in branches/context_pmc2: compilers/imcc include/parrot lib/Parrot/OpTrans lib/Parrot/Ops2c lib/Parrot/Pmc2c src src/dynpmc src/gc src/jit/i386 src/pmc src/runcore t/native_pbc tools/build

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Aug 19 22:54:00 UTC 2009


Author: bacek
Date: Wed Aug 19 22:53:55 2009
New Revision: 40665
URL: https://trac.parrot.org/parrot/changeset/40665

Log:
THE BIG COMMIT.

Apparently git-svn dcommit chokes sometimes...

Modified:
   branches/context_pmc2/compilers/imcc/imcc.y
   branches/context_pmc2/compilers/imcc/imcparser.c
   branches/context_pmc2/compilers/imcc/imcparser.h
   branches/context_pmc2/compilers/imcc/main.c
   branches/context_pmc2/compilers/imcc/parser_util.c
   branches/context_pmc2/compilers/imcc/pbc.c
   branches/context_pmc2/include/parrot/gc_api.h
   branches/context_pmc2/include/parrot/register.h
   branches/context_pmc2/include/parrot/sub.h
   branches/context_pmc2/lib/Parrot/OpTrans/CGP.pm
   branches/context_pmc2/lib/Parrot/Ops2c/Utils.pm
   branches/context_pmc2/lib/Parrot/Pmc2c/PCCMETHOD.pm
   branches/context_pmc2/lib/Parrot/Pmc2c/PMCEmitter.pm
   branches/context_pmc2/src/dynpmc/subproxy.pmc
   branches/context_pmc2/src/embed.c
   branches/context_pmc2/src/extend.c
   branches/context_pmc2/src/gc/gc_ms.c
   branches/context_pmc2/src/global.c
   branches/context_pmc2/src/jit.c
   branches/context_pmc2/src/jit/i386/core.jit
   branches/context_pmc2/src/jit/i386/jit_defs.c
   branches/context_pmc2/src/multidispatch.c
   branches/context_pmc2/src/packdump.c
   branches/context_pmc2/src/packfile.c
   branches/context_pmc2/src/pbc_merge.c
   branches/context_pmc2/src/pic.c
   branches/context_pmc2/src/pic_jit.c
   branches/context_pmc2/src/pmc.c
   branches/context_pmc2/src/pmc/context.pmc
   branches/context_pmc2/src/pmc/continuation.pmc
   branches/context_pmc2/src/pmc/coroutine.pmc
   branches/context_pmc2/src/pmc/eval.pmc
   branches/context_pmc2/src/pmc/exception.pmc
   branches/context_pmc2/src/pmc/lexpad.pmc
   branches/context_pmc2/src/pmc/namespace.pmc
   branches/context_pmc2/src/pmc/parrotinterpreter.pmc
   branches/context_pmc2/src/pmc/retcontinuation.pmc
   branches/context_pmc2/src/pmc/sub.pmc
   branches/context_pmc2/src/runcore/cores.c
   branches/context_pmc2/src/runcore/main.c
   branches/context_pmc2/src/runcore/trace.c
   branches/context_pmc2/src/scheduler.c
   branches/context_pmc2/src/sub.c
   branches/context_pmc2/src/thread.c
   branches/context_pmc2/src/warnings.c
   branches/context_pmc2/t/native_pbc/annotations.pbc
   branches/context_pmc2/t/native_pbc/integer_1.pbc
   branches/context_pmc2/t/native_pbc/number_1.pbc
   branches/context_pmc2/t/native_pbc/string_1.pbc
   branches/context_pmc2/tools/build/jit2c.pl

Modified: branches/context_pmc2/compilers/imcc/imcc.y
==============================================================================
--- branches/context_pmc2/compilers/imcc/imcc.y	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/compilers/imcc/imcc.y	Wed Aug 19 22:53:55 2009	(r40665)
@@ -25,6 +25,10 @@
 #include "parser.h"
 #include "optimizer.h"
 
+// XXX We need Parrot_Context_attributes
+// Remove this comment if this include is ok.
+#include "../../src/pmc/pmc_context.h"
+
 /* prevent declarations of malloc() and free() in the generated parser. */
 #define YYMALLOC
 #define YYFREE

Modified: branches/context_pmc2/compilers/imcc/imcparser.c
==============================================================================
--- branches/context_pmc2/compilers/imcc/imcparser.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/compilers/imcc/imcparser.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -349,6 +349,10 @@
 #include "parser.h"
 #include "optimizer.h"
 
+// XXX We need Parrot_Context_attributes
+// Remove this comment if this include is ok.
+#include "../../src/pmc/pmc_context.h"
+
 /* prevent declarations of malloc() and free() in the generated parser. */
 #define YYMALLOC
 #define YYFREE
@@ -1390,7 +1394,7 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 1049 "compilers/imcc/imcc.y"
+#line 1053 "compilers/imcc/imcc.y"
 {
     IdList * idlist;
     int t;
@@ -1399,7 +1403,7 @@
     Instruction *i;
 }
 /* Line 187 of yacc.c.  */
-#line 1392 "compilers/imcc/imcparser.c"
+#line 1396 "compilers/imcc/imcparser.c"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -1412,7 +1416,7 @@
 
 
 /* Line 216 of yacc.c.  */
-#line 1405 "compilers/imcc/imcparser.c"
+#line 1409 "compilers/imcc/imcparser.c"
 
 #ifdef short
 # undef short
@@ -1833,40 +1837,40 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,  1144,  1144,  1148,  1149,  1153,  1154,  1155,  1161,  1167,
-    1168,  1169,  1170,  1174,  1175,  1184,  1190,  1198,  1210,  1223,
-    1223,  1232,  1232,  1239,  1239,  1248,  1249,  1253,  1254,  1258,
-    1259,  1260,  1261,  1262,  1263,  1264,  1267,  1267,  1276,  1275,
-    1288,  1292,  1305,  1309,  1313,  1313,  1325,  1327,  1331,  1346,
-    1350,  1355,  1359,  1363,  1354,  1375,  1376,  1377,  1390,  1390,
-    1394,  1408,  1412,  1418,  1427,  1433,  1442,  1448,  1457,  1463,
-    1472,  1480,  1485,  1496,  1499,  1504,  1512,  1513,  1514,  1515,
-    1516,  1527,  1538,  1541,  1543,  1548,  1547,  1580,  1581,  1585,
-    1586,  1590,  1591,  1595,  1596,  1600,  1601,  1602,  1603,  1604,
-    1605,  1606,  1607,  1608,  1609,  1610,  1611,  1612,  1613,  1617,
-    1622,  1626,  1631,  1635,  1639,  1644,  1653,  1654,  1658,  1663,
-    1664,  1672,  1673,  1673,  1688,  1689,  1693,  1694,  1695,  1696,
-    1697,  1698,  1699,  1704,  1704,  1707,  1715,  1715,  1721,  1722,
-    1727,  1735,  1736,  1741,  1749,  1753,  1758,  1757,  1770,  1771,
-    1775,  1776,  1786,  1791,  1801,  1810,  1811,  1823,  1827,  1829,
-    1830,  1831,  1832,  1833,  1837,  1838,  1842,  1843,  1847,  1858,
-    1859,  1870,  1877,  1886,  1896,  1897,  1902,  1903,  1904,  1904,
-    1920,  1930,  1936,  1936,  1943,  1944,  1944,  1950,  1956,  1960,
-    1972,  1973,  1974,  1975,  1976,  1977,  1981,  1982,  1983,  1984,
-    1988,  2001,  2003,  2005,  2007,  2009,  2014,  2017,  2024,  2023,
-    2032,  2033,  2034,  2035,  2043,  2044,  2045,  2049,  2050,  2051,
-    2052,  2053,  2054,  2055,  2056,  2057,  2058,  2059,  2060,  2061,
-    2062,  2063,  2064,  2065,  2066,  2067,  2068,  2069,  2070,  2071,
-    2077,  2076,  2088,  2095,  2096,  2097,  2098,  2099,  2100,  2101,
-    2102,  2103,  2104,  2105,  2106,  2107,  2112,  2123,  2124,  2125,
-    2126,  2132,  2146,  2152,  2158,  2164,  2163,  2172,  2173,  2183,
-    2193,  2200,  2205,  2215,  2219,  2220,  2224,  2225,  2228,  2229,
-    2233,  2237,  2247,  2253,  2263,  2268,  2272,  2273,  2277,  2281,
-    2285,  2292,  2296,  2300,  2307,  2308,  2312,  2313,  2314,  2315,
-    2316,  2317,  2321,  2322,  2326,  2327,  2331,  2332,  2336,  2337,
-    2344,  2351,  2352,  2353,  2357,  2358,  2362,  2363,  2367,  2368,
-    2372,  2373,  2377,  2377,  2389,  2389,  2401,  2402,  2410,  2417,
-    2418,  2419,  2420,  2421,  2425,  2426,  2427,  2428
+       0,  1148,  1148,  1152,  1153,  1157,  1158,  1159,  1165,  1171,
+    1172,  1173,  1174,  1178,  1179,  1188,  1194,  1202,  1214,  1227,
+    1227,  1236,  1236,  1243,  1243,  1252,  1253,  1257,  1258,  1262,
+    1263,  1264,  1265,  1266,  1267,  1268,  1271,  1271,  1280,  1279,
+    1292,  1296,  1309,  1313,  1317,  1317,  1329,  1331,  1335,  1350,
+    1354,  1359,  1363,  1367,  1358,  1379,  1380,  1381,  1394,  1394,
+    1398,  1412,  1416,  1422,  1431,  1437,  1446,  1452,  1461,  1467,
+    1476,  1484,  1489,  1500,  1503,  1508,  1516,  1517,  1518,  1519,
+    1520,  1531,  1542,  1545,  1547,  1552,  1551,  1584,  1585,  1589,
+    1590,  1594,  1595,  1599,  1600,  1604,  1605,  1606,  1607,  1608,
+    1609,  1610,  1611,  1612,  1613,  1614,  1615,  1616,  1617,  1621,
+    1626,  1630,  1635,  1639,  1643,  1648,  1657,  1658,  1662,  1667,
+    1668,  1676,  1677,  1677,  1692,  1693,  1697,  1698,  1699,  1700,
+    1701,  1702,  1703,  1708,  1708,  1711,  1719,  1719,  1725,  1726,
+    1731,  1739,  1740,  1745,  1753,  1757,  1762,  1761,  1774,  1775,
+    1779,  1780,  1790,  1795,  1805,  1814,  1815,  1827,  1831,  1833,
+    1834,  1835,  1836,  1837,  1841,  1842,  1846,  1847,  1851,  1862,
+    1863,  1874,  1881,  1890,  1900,  1901,  1906,  1907,  1908,  1908,
+    1924,  1934,  1940,  1940,  1947,  1948,  1948,  1954,  1960,  1964,
+    1976,  1977,  1978,  1979,  1980,  1981,  1985,  1986,  1987,  1988,
+    1992,  2005,  2007,  2009,  2011,  2013,  2018,  2021,  2028,  2027,
+    2036,  2037,  2038,  2039,  2047,  2048,  2049,  2053,  2054,  2055,
+    2056,  2057,  2058,  2059,  2060,  2061,  2062,  2063,  2064,  2065,
+    2066,  2067,  2068,  2069,  2070,  2071,  2072,  2073,  2074,  2075,
+    2081,  2080,  2092,  2099,  2100,  2101,  2102,  2103,  2104,  2105,
+    2106,  2107,  2108,  2109,  2110,  2111,  2116,  2127,  2128,  2129,
+    2130,  2136,  2150,  2156,  2162,  2168,  2167,  2176,  2177,  2187,
+    2197,  2204,  2209,  2219,  2223,  2224,  2228,  2229,  2232,  2233,
+    2237,  2241,  2251,  2257,  2267,  2272,  2276,  2277,  2281,  2285,
+    2289,  2296,  2300,  2304,  2311,  2312,  2316,  2317,  2318,  2319,
+    2320,  2321,  2325,  2326,  2330,  2331,  2335,  2336,  2340,  2341,
+    2348,  2355,  2356,  2357,  2361,  2362,  2366,  2367,  2371,  2372,
+    2376,  2377,  2381,  2381,  2393,  2393,  2405,  2406,  2414,  2421,
+    2422,  2423,  2424,  2425,  2429,  2430,  2431,  2432
 };
 #endif
 
@@ -3220,102 +3224,102 @@
   switch (yyn)
     {
         case 2:
-#line 1144 "compilers/imcc/imcc.y"
-    { if (yynerrs) YYABORT; (yyval.i) = 0; ;}
+#line 1148 "compilers/imcc/imcc.y"
+    { if (yynerrs) YYABORT; (yyval.i) = 0; }
     break;
 
   case 5:
-#line 1153 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
+#line 1157 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 6:
-#line 1154 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
+#line 1158 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 7:
-#line 1156 "compilers/imcc/imcc.y"
+#line 1160 "compilers/imcc/imcc.y"
     {
            (yyval.i) = (yyvsp[(1) - (1)].i);
            imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
            IMCC_INFO(interp)->cur_unit = 0;
-         ;}
+         }
     break;
 
   case 8:
-#line 1162 "compilers/imcc/imcc.y"
+#line 1166 "compilers/imcc/imcc.y"
     {
            (yyval.i) = (yyvsp[(1) - (1)].i);
            imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
            IMCC_INFO(interp)->cur_unit = 0;
-         ;}
+         }
     break;
 
   case 9:
-#line 1167 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1171 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 10:
-#line 1168 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1172 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 11:
-#line 1169 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1173 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 12:
-#line 1170 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1174 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 13:
-#line 1174 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1178 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 14:
-#line 1176 "compilers/imcc/imcc.y"
+#line 1180 "compilers/imcc/imcc.y"
     {
            (yyval.i) = 0;
            do_loadlib(interp, (yyvsp[(2) - (3)].s));
            mem_sys_free((yyvsp[(2) - (3)].s));
-         ;}
+         }
     break;
 
   case 15:
-#line 1185 "compilers/imcc/imcc.y"
+#line 1189 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
            /* set_filename() frees the STRINGC */
            set_filename(interp, (yyvsp[(4) - (5)].s));
-         ;}
+         }
     break;
 
   case 16:
-#line 1191 "compilers/imcc/imcc.y"
+#line 1195 "compilers/imcc/imcc.y"
     {
            /* set_filename() frees the STRINGC */
            set_filename(interp, (yyvsp[(2) - (3)].s));
-         ;}
+         }
     break;
 
   case 17:
-#line 1199 "compilers/imcc/imcc.y"
+#line 1203 "compilers/imcc/imcc.y"
     {
           /* We'll want to store an entry while emitting instructions, so just
            * store annotation like it's an instruction. */
           SymReg * const key = mk_const(interp, (yyvsp[(2) - (4)].s), 'S');
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, ".annotate", 2, key, (yyvsp[(4) - (4)].sr));
           mem_sys_free((yyvsp[(2) - (4)].s));
-        ;}
+        }
     break;
 
   case 18:
-#line 1211 "compilers/imcc/imcc.y"
+#line 1215 "compilers/imcc/imcc.y"
     {
             STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
             CONTEXT(interp)->current_HLL =
@@ -3324,120 +3328,120 @@
             IMCC_INFO(interp)->cur_namespace = NULL;
             mem_sys_free((yyvsp[(2) - (2)].s));
             (yyval.t) = 0;
-         ;}
+         }
     break;
 
   case 19:
-#line 1223 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1227 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 20:
-#line 1224 "compilers/imcc/imcc.y"
+#line 1228 "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));
              IMCC_INFO(interp)->is_def = 0;
-         ;}
+         }
     break;
 
   case 21:
-#line 1232 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1236 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 22:
-#line 1233 "compilers/imcc/imcc.y"
+#line 1237 "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));
            IMCC_INFO(interp)->is_def = 0;
-         ;}
+         }
     break;
 
   case 23:
-#line 1239 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1243 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 24:
-#line 1240 "compilers/imcc/imcc.y"
+#line 1244 "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));
            mem_sys_free((yyvsp[(6) - (6)].s));
            IMCC_INFO(interp)->is_def = 0;
-         ;}
+         }
     break;
 
   case 29:
-#line 1258 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0;  ;}
+#line 1262 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0;  }
     break;
 
   case 30:
-#line 1259 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0;  ;}
+#line 1263 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0;  }
     break;
 
   case 31:
-#line 1260 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0;  ;}
+#line 1264 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0;  }
     break;
 
   case 32:
-#line 1261 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0;  ;}
+#line 1265 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0;  }
     break;
 
   case 33:
-#line 1262 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
+#line 1266 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 36:
-#line 1267 "compilers/imcc/imcc.y"
-    { clear_state(interp); ;}
+#line 1271 "compilers/imcc/imcc.y"
+    { clear_state(interp); }
     break;
 
   case 37:
-#line 1269 "compilers/imcc/imcc.y"
+#line 1273 "compilers/imcc/imcc.y"
     {
            (yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
                     (yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
                     IMCC_INFO(interp)->nargs, IMCC_INFO(interp) -> keyvec, 1);
             mem_sys_free((yyvsp[(2) - (3)].s));
-         ;}
+         }
     break;
 
   case 38:
-#line 1276 "compilers/imcc/imcc.y"
+#line 1280 "compilers/imcc/imcc.y"
     {
            imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
            IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
-         ;}
+         }
     break;
 
   case 39:
-#line 1281 "compilers/imcc/imcc.y"
+#line 1285 "compilers/imcc/imcc.y"
     {
            (yyval.i) = iSUBROUTINE(interp,
                     IMCC_INFO(interp)->cur_unit,
                     mk_sub_label(interp, (yyvsp[(4) - (4)].s)));
            IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(3) - (4)].t);
            mem_sys_free((yyvsp[(4) - (4)].s));
-         ;}
+         }
     break;
 
   case 40:
-#line 1289 "compilers/imcc/imcc.y"
+#line 1293 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
-         ;}
+         }
     break;
 
   case 41:
-#line 1293 "compilers/imcc/imcc.y"
+#line 1297 "compilers/imcc/imcc.y"
     {
            char   *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
            SymReg *r    = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
@@ -3449,32 +3453,32 @@
            mem_sys_free(name);
            mem_sys_free((yyvsp[(2) - (4)].s));
            mem_sys_free((yyvsp[(4) - (4)].s));
-         ;}
+         }
     break;
 
   case 42:
-#line 1305 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0;;}
+#line 1309 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0;}
     break;
 
   case 44:
-#line 1313 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); ;}
+#line 1317 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
     break;
 
   case 45:
-#line 1316 "compilers/imcc/imcc.y"
+#line 1320 "compilers/imcc/imcc.y"
     {
            /* if (optimizer_level & OPT_PASM)
                          imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
                          emit_flush(interp);
            */
            (yyval.i) = 0;
-         ;}
+         }
     break;
 
   case 48:
-#line 1332 "compilers/imcc/imcc.y"
+#line 1336 "compilers/imcc/imcc.y"
     {
            int re_open = 0;
            (yyval.i) = 0;
@@ -3485,63 +3489,63 @@
            IMCC_INFO(interp)->cur_namespace = (yyvsp[(2) - (3)].sr);
            if (re_open)
                IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
-         ;}
+         }
     break;
 
   case 49:
-#line 1347 "compilers/imcc/imcc.y"
+#line 1351 "compilers/imcc/imcc.y"
     {
             (yyval.sr) = (yyvsp[(2) - (3)].sr);
-        ;}
+        }
     break;
 
   case 50:
-#line 1350 "compilers/imcc/imcc.y"
-    { (yyval.sr) = NULL; ;}
+#line 1354 "compilers/imcc/imcc.y"
+    { (yyval.sr) = NULL; }
     break;
 
   case 51:
-#line 1355 "compilers/imcc/imcc.y"
+#line 1359 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
-         ;}
+         }
     break;
 
   case 52:
-#line 1359 "compilers/imcc/imcc.y"
+#line 1363 "compilers/imcc/imcc.y"
     {
            iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
-         ;}
+         }
     break;
 
   case 53:
-#line 1363 "compilers/imcc/imcc.y"
+#line 1367 "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) {
             IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid = mem_sys_strdup(
             IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->name);
           }
-        ;}
+        }
     break;
 
   case 54:
-#line 1371 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; ;}
+#line 1375 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 55:
-#line 1375 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 1379 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 56:
-#line 1376 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 1380 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 57:
-#line 1378 "compilers/imcc/imcc.y"
+#line 1382 "compilers/imcc/imcc.y"
     {
            if (IMCC_INFO(interp)->adv_named_id) {
                  add_pcc_named_param(IMCC_INFO(interp)->cur_call,
@@ -3550,21 +3554,21 @@
            }
            else
                add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
-         ;}
+         }
     break;
 
   case 58:
-#line 1390 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1394 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 59:
-#line 1390 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; ;}
+#line 1394 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
     break;
 
   case 60:
-#line 1395 "compilers/imcc/imcc.y"
+#line 1399 "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));
@@ -3572,157 +3576,157 @@
                (yyval.sr) = mk_ident(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
            (yyval.sr)->type |= (yyvsp[(3) - (3)].t);
            mem_sys_free((yyvsp[(2) - (3)].s));
-          ;}
+          }
     break;
 
   case 61:
-#line 1408 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 1412 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 62:
-#line 1413 "compilers/imcc/imcc.y"
+#line 1417 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
            mem_sys_free((yyvsp[(3) - (4)].s));
-         ;}
+         }
     break;
 
   case 63:
-#line 1419 "compilers/imcc/imcc.y"
+#line 1423 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
            mem_sys_free((yyvsp[(3) - (4)].s));
-         ;}
+         }
     break;
 
   case 64:
-#line 1428 "compilers/imcc/imcc.y"
+#line 1432 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_VTABLE;
            IMCC_INFO(interp)->cur_unit->vtable_name      = NULL;
            IMCC_INFO(interp)->cur_unit->is_vtable_method = 1;
-         ;}
+         }
     break;
 
   case 65:
-#line 1434 "compilers/imcc/imcc.y"
+#line 1438 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_VTABLE;
            IMCC_INFO(interp)->cur_unit->vtable_name      = (yyvsp[(3) - (4)].s);
            IMCC_INFO(interp)->cur_unit->is_vtable_method = 1;
-         ;}
+         }
     break;
 
   case 66:
-#line 1443 "compilers/imcc/imcc.y"
+#line 1447 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_METHOD;
            IMCC_INFO(interp)->cur_unit->method_name = NULL;
            IMCC_INFO(interp)->cur_unit->is_method   = 1;
-         ;}
+         }
     break;
 
   case 67:
-#line 1449 "compilers/imcc/imcc.y"
+#line 1453 "compilers/imcc/imcc.y"
     {
            (yyval.t) = P_METHOD;
            IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
            IMCC_INFO(interp)->cur_unit->is_method   = 1;
-         ;}
+         }
     break;
 
   case 68:
-#line 1458 "compilers/imcc/imcc.y"
+#line 1462 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->ns_entry_name     = NULL;
            IMCC_INFO(interp)->cur_unit->has_ns_entry_name = 1;
-         ;}
+         }
     break;
 
   case 69:
-#line 1464 "compilers/imcc/imcc.y"
+#line 1468 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
            IMCC_INFO(interp)->cur_unit->has_ns_entry_name = 1;
-         ;}
+         }
     break;
 
   case 70:
-#line 1473 "compilers/imcc/imcc.y"
+#line 1477 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
-         ;}
+         }
     break;
 
   case 71:
-#line 1481 "compilers/imcc/imcc.y"
+#line 1485 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->subid = NULL;
-         ;}
+         }
     break;
 
   case 72:
-#line 1486 "compilers/imcc/imcc.y"
+#line 1490 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
            IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid = str_dup_remove_quotes((yyvsp[(3) - (4)].s));
            mem_sys_free((yyvsp[(3) - (4)].s));
-         ;}
+         }
     break;
 
   case 73:
-#line 1496 "compilers/imcc/imcc.y"
+#line 1500 "compilers/imcc/imcc.y"
     {
            add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
-         ;}
+         }
     break;
 
   case 74:
-#line 1500 "compilers/imcc/imcc.y"
+#line 1504 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
-         ;}
+         }
     break;
 
   case 75:
-#line 1505 "compilers/imcc/imcc.y"
+#line 1509 "compilers/imcc/imcc.y"
     {
            (yyval.t) = 0;
            add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
-         ;}
+         }
     break;
 
   case 76:
-#line 1512 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, "INTVAL",   'S'); ;}
+#line 1516 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, "INTVAL",   'S'); }
     break;
 
   case 77:
-#line 1513 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); ;}
+#line 1517 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
     break;
 
   case 78:
-#line 1514 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, "PMC",      'S'); ;}
+#line 1518 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, "PMC",      'S'); }
     break;
 
   case 79:
-#line 1515 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, "STRING",   'S'); ;}
+#line 1519 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, "STRING",   'S'); }
     break;
 
   case 80:
-#line 1517 "compilers/imcc/imcc.y"
+#line 1521 "compilers/imcc/imcc.y"
     {
            SymReg *r;
            if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3732,11 +3736,11 @@
            }
            mem_sys_free((yyvsp[(1) - (1)].s));
            (yyval.sr) = r;
-         ;}
+         }
     break;
 
   case 81:
-#line 1528 "compilers/imcc/imcc.y"
+#line 1532 "compilers/imcc/imcc.y"
     {
            SymReg *r;
            if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3746,16 +3750,16 @@
            }
            mem_sys_free((yyvsp[(1) - (1)].s));
            (yyval.sr) = r;
-         ;}
+         }
     break;
 
   case 82:
-#line 1538 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(2) - (3)].sr); ;}
+#line 1542 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(2) - (3)].sr); }
     break;
 
   case 85:
-#line 1548 "compilers/imcc/imcc.y"
+#line 1552 "compilers/imcc/imcc.y"
     {
            char name[128];
            SymReg *r, *r1;
@@ -3778,177 +3782,177 @@
            r1 = IMCC_INFO(interp)->cur_unit->instructions->symregs[0];
            if (r1 && r1->pcc_sub)
                r1->pcc_sub->calls_a_sub |= 1;
-         ;}
+         }
     break;
 
   case 86:
-#line 1576 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; ;}
+#line 1580 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 87:
-#line 1580 "compilers/imcc/imcc.y"
-    { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; ;}
+#line 1584 "compilers/imcc/imcc.y"
+    { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
     break;
 
   case 88:
-#line 1581 "compilers/imcc/imcc.y"
-    { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; ;}
+#line 1585 "compilers/imcc/imcc.y"
+    { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
     break;
 
   case 89:
-#line 1585 "compilers/imcc/imcc.y"
-    { (yyval.i) = NULL; ;}
+#line 1589 "compilers/imcc/imcc.y"
+    { (yyval.i) = NULL; }
     break;
 
   case 90:
-#line 1586 "compilers/imcc/imcc.y"
-    { (yyval.i) = NULL;  IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); ;}
+#line 1590 "compilers/imcc/imcc.y"
+    { (yyval.i) = NULL;  IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
     break;
 
   case 91:
-#line 1590 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 1594 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 93:
-#line 1595 "compilers/imcc/imcc.y"
-    { (yyval.t) = (yyvsp[(1) - (1)].t); ;}
+#line 1599 "compilers/imcc/imcc.y"
+    { (yyval.t) = (yyvsp[(1) - (1)].t); }
     break;
 
   case 94:
-#line 1596 "compilers/imcc/imcc.y"
-    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); ;}
+#line 1600 "compilers/imcc/imcc.y"
+    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 95:
-#line 1600 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_LOAD; ;}
+#line 1604 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_LOAD; }
     break;
 
   case 96:
-#line 1601 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_INIT; ;}
+#line 1605 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_INIT; }
     break;
 
   case 97:
-#line 1602 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_MAIN; ;}
+#line 1606 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_MAIN; }
     break;
 
   case 98:
-#line 1603 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_IMMEDIATE; ;}
+#line 1607 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_IMMEDIATE; }
     break;
 
   case 99:
-#line 1604 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_POSTCOMP; ;}
+#line 1608 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_POSTCOMP; }
     break;
 
   case 100:
-#line 1605 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_ANON; ;}
+#line 1609 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_ANON; }
     break;
 
   case 101:
-#line 1606 "compilers/imcc/imcc.y"
-    { (yyval.t) = P_NEED_LEX; ;}
+#line 1610 "compilers/imcc/imcc.y"
+    { (yyval.t) = P_NEED_LEX; }
     break;
 
   case 109:
-#line 1618 "compilers/imcc/imcc.y"
+#line 1622 "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));
-         ;}
+         }
     break;
 
   case 110:
-#line 1623 "compilers/imcc/imcc.y"
+#line 1627 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
-         ;}
+         }
     break;
 
   case 111:
-#line 1627 "compilers/imcc/imcc.y"
+#line 1631 "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;
-         ;}
+         }
     break;
 
   case 112:
-#line 1632 "compilers/imcc/imcc.y"
+#line 1636 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
-         ;}
+         }
     break;
 
   case 113:
-#line 1636 "compilers/imcc/imcc.y"
+#line 1640 "compilers/imcc/imcc.y"
     {
            add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
-         ;}
+         }
     break;
 
   case 114:
-#line 1640 "compilers/imcc/imcc.y"
+#line 1644 "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));
-         ;}
+         }
     break;
 
   case 115:
-#line 1645 "compilers/imcc/imcc.y"
+#line 1649 "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));
-         ;}
+         }
     break;
 
   case 116:
-#line 1653 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 1657 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 117:
-#line 1654 "compilers/imcc/imcc.y"
-    { add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); ;}
+#line 1658 "compilers/imcc/imcc.y"
+    { add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
     break;
 
   case 118:
-#line 1658 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(2) - (2)].sr); ;}
+#line 1662 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(2) - (2)].sr); }
     break;
 
   case 119:
-#line 1663 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 1667 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 120:
-#line 1665 "compilers/imcc/imcc.y"
+#line 1669 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(2) - (3)].sr))
                add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
-         ;}
+         }
     break;
 
   case 121:
-#line 1672 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); ;}
+#line 1676 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
     break;
 
   case 122:
-#line 1673 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1677 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 123:
-#line 1674 "compilers/imcc/imcc.y"
+#line 1678 "compilers/imcc/imcc.y"
     {
            IdList * const l = (yyvsp[(4) - (4)].idlist);
            SymReg *ignored;
@@ -3959,167 +3963,167 @@
            UNUSED(ignored);
            IMCC_INFO(interp)->is_def = 0;
            (yyval.sr) = 0;
-         ;}
+         }
     break;
 
   case 124:
-#line 1688 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 1692 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 125:
-#line 1689 "compilers/imcc/imcc.y"
-    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); ;}
+#line 1693 "compilers/imcc/imcc.y"
+    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 126:
-#line 1693 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_FLAT;   ;}
+#line 1697 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_FLAT;   }
     break;
 
   case 127:
-#line 1694 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_OPTIONAL; ;}
+#line 1698 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_OPTIONAL; }
     break;
 
   case 128:
-#line 1695 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_OPT_FLAG; ;}
+#line 1699 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_OPT_FLAG; }
     break;
 
   case 129:
-#line 1696 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_NAMED; ;}
+#line 1700 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_NAMED; }
     break;
 
   case 130:
-#line 1697 "compilers/imcc/imcc.y"
-    { adv_named_set(interp, (yyvsp[(3) - (4)].s));   (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); ;}
+#line 1701 "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 1698 "compilers/imcc/imcc.y"
-    { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); ;}
+#line 1702 "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 1699 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_UNIQUE_REG; ;}
+#line 1703 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_UNIQUE_REG; }
     break;
 
   case 133:
-#line 1704 "compilers/imcc/imcc.y"
-    { begin_return_or_yield(interp, 0); ;}
+#line 1708 "compilers/imcc/imcc.y"
+    { begin_return_or_yield(interp, 0); }
     break;
 
   case 134:
-#line 1706 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; ;}
+#line 1710 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
     break;
 
   case 135:
-#line 1708 "compilers/imcc/imcc.y"
+#line 1712 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->asm_state = AsmDefault;
            (yyval.i) = 0;
-         ;}
+         }
     break;
 
   case 136:
-#line 1715 "compilers/imcc/imcc.y"
-    { begin_return_or_yield(interp, 1); ;}
+#line 1719 "compilers/imcc/imcc.y"
+    { begin_return_or_yield(interp, 1); }
     break;
 
   case 137:
-#line 1717 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; ;}
+#line 1721 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
     break;
 
   case 138:
-#line 1721 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 1725 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 139:
-#line 1723 "compilers/imcc/imcc.y"
+#line 1727 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(1) - (2)].sr))
                add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
-         ;}
+         }
     break;
 
   case 140:
-#line 1728 "compilers/imcc/imcc.y"
+#line 1732 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(2) - (3)].sr))
                add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
-         ;}
+         }
     break;
 
   case 141:
-#line 1735 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 1739 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 142:
-#line 1737 "compilers/imcc/imcc.y"
+#line 1741 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(1) - (2)].sr))
                add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
-         ;}
+         }
     break;
 
   case 143:
-#line 1742 "compilers/imcc/imcc.y"
+#line 1746 "compilers/imcc/imcc.y"
     {
            if ((yyvsp[(2) - (3)].sr))
                add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
-         ;}
+         }
     break;
 
   case 144:
-#line 1749 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); ;}
+#line 1753 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
     break;
 
   case 145:
-#line 1753 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); ;}
+#line 1757 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
     break;
 
   case 146:
-#line 1758 "compilers/imcc/imcc.y"
+#line 1762 "compilers/imcc/imcc.y"
     {
           if (IMCC_INFO(interp)->asm_state == AsmDefault)
               begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
-        ;}
+        }
     break;
 
   case 147:
-#line 1763 "compilers/imcc/imcc.y"
+#line 1767 "compilers/imcc/imcc.y"
     {
           IMCC_INFO(interp)->asm_state = AsmDefault;
           (yyval.t) = 0;
-        ;}
+        }
     break;
 
   case 148:
-#line 1770 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 1774 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 149:
-#line 1771 "compilers/imcc/imcc.y"
-    { (yyval.t) = 1; ;}
+#line 1775 "compilers/imcc/imcc.y"
+    { (yyval.t) = 1; }
     break;
 
   case 150:
-#line 1775 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1779 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 151:
-#line 1777 "compilers/imcc/imcc.y"
+#line 1781 "compilers/imcc/imcc.y"
     {
            if (IMCC_INFO(interp)->adv_named_id) {
                add_pcc_named_return(IMCC_INFO(interp)->sr_return,
@@ -4128,19 +4132,19 @@
            }
            else
                add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (1)].sr));
-         ;}
+         }
     break;
 
   case 152:
-#line 1787 "compilers/imcc/imcc.y"
+#line 1791 "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));
-         ;}
+         }
     break;
 
   case 153:
-#line 1792 "compilers/imcc/imcc.y"
+#line 1796 "compilers/imcc/imcc.y"
     {
            if (IMCC_INFO(interp)->adv_named_id) {
                add_pcc_named_return(IMCC_INFO(interp)->sr_return,
@@ -4149,127 +4153,127 @@
              }
              else
                  add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (3)].sr));
-         ;}
+         }
     break;
 
   case 154:
-#line 1802 "compilers/imcc/imcc.y"
+#line 1806 "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));
-         ;}
+         }
     break;
 
   case 157:
-#line 1823 "compilers/imcc/imcc.y"
-    { clear_state(interp); ;}
+#line 1827 "compilers/imcc/imcc.y"
+    { clear_state(interp); }
     break;
 
   case 158:
-#line 1828 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(2) - (2)].i); ;}
+#line 1832 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(2) - (2)].i); }
     break;
 
   case 159:
-#line 1829 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1833 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 160:
-#line 1830 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1834 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 161:
-#line 1831 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1835 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 162:
-#line 1832 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1836 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 163:
-#line 1833 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
+#line 1837 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 164:
-#line 1837 "compilers/imcc/imcc.y"
-    { (yyval.i) = NULL; ;}
+#line 1841 "compilers/imcc/imcc.y"
+    { (yyval.i) = NULL; }
     break;
 
   case 168:
-#line 1848 "compilers/imcc/imcc.y"
+#line 1852 "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));
              (yyval.i) = i;
-         ;}
+         }
     break;
 
   case 169:
-#line 1858 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(2) - (3)].i); ;}
+#line 1862 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(2) - (3)].i); }
     break;
 
   case 170:
-#line 1860 "compilers/imcc/imcc.y"
+#line 1864 "compilers/imcc/imcc.y"
     {
            if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
                IMCC_warning(interp, "Too many errors. Correct some first.\n");
                YYABORT;
            }
            yyerrok;
-         ;}
+         }
     break;
 
   case 171:
-#line 1871 "compilers/imcc/imcc.y"
+#line 1875 "compilers/imcc/imcc.y"
     {
            IdList* const l = (yyvsp[(1) - (1)].idlist);
            l->next = NULL;
            (yyval.idlist) = l;
-         ;}
+         }
     break;
 
   case 172:
-#line 1878 "compilers/imcc/imcc.y"
+#line 1882 "compilers/imcc/imcc.y"
     {
            IdList* const l = (yyvsp[(3) - (3)].idlist);
            l->next = (yyvsp[(1) - (3)].idlist);
            (yyval.idlist) = l;
-         ;}
+         }
     break;
 
   case 173:
-#line 1887 "compilers/imcc/imcc.y"
+#line 1891 "compilers/imcc/imcc.y"
     {
            IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
            l->id           = (yyvsp[(1) - (2)].s);
            l->unique_reg   = (yyvsp[(2) - (2)].t);
            (yyval.idlist) = l;
-         ;}
+         }
     break;
 
   case 174:
-#line 1896 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 1900 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 175:
-#line 1897 "compilers/imcc/imcc.y"
-    { (yyval.t) = 1; ;}
+#line 1901 "compilers/imcc/imcc.y"
+    { (yyval.t) = 1; }
     break;
 
   case 178:
-#line 1904 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1908 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 179:
-#line 1905 "compilers/imcc/imcc.y"
+#line 1909 "compilers/imcc/imcc.y"
     {
            IdList *l = (yyvsp[(4) - (4)].idlist);
            while (l) {
@@ -4284,11 +4288,11 @@
                mem_sys_free(l1);
            }
            IMCC_INFO(interp)->is_def = 0; (yyval.i) = 0;
-         ;}
+         }
     break;
 
   case 180:
-#line 1921 "compilers/imcc/imcc.y"
+#line 1925 "compilers/imcc/imcc.y"
     {
            SymReg *n;
            char   *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
@@ -4297,64 +4301,64 @@
            set_lexical(interp, (yyvsp[(4) - (4)].sr), n); (yyval.i) = 0;
            mem_sys_free((yyvsp[(2) - (4)].s));
            mem_sys_free(name);
-         ;}
+         }
     break;
 
   case 181:
-#line 1931 "compilers/imcc/imcc.y"
+#line 1935 "compilers/imcc/imcc.y"
     {
            SymReg *n = mk_const(interp, (yyvsp[(2) - (4)].s), 'U');
            set_lexical(interp, (yyvsp[(4) - (4)].sr), n); (yyval.i) = 0;
            mem_sys_free((yyvsp[(2) - (4)].s));
-         ;}
+         }
     break;
 
   case 182:
-#line 1936 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1940 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 183:
-#line 1937 "compilers/imcc/imcc.y"
+#line 1941 "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;
            mem_sys_free((yyvsp[(4) - (6)].s));
-         ;}
+         }
     break;
 
   case 185:
-#line 1944 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->is_def = 1; ;}
+#line 1948 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 186:
-#line 1945 "compilers/imcc/imcc.y"
+#line 1949 "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;
            mem_sys_free((yyvsp[(4) - (6)].s));
-         ;}
+         }
     break;
 
   case 187:
-#line 1951 "compilers/imcc/imcc.y"
+#line 1955 "compilers/imcc/imcc.y"
     {
            (yyval.i) = NULL;
            IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
            IMCC_INFO(interp)->cur_call = NULL;
-         ;}
+         }
     break;
 
   case 188:
-#line 1957 "compilers/imcc/imcc.y"
+#line 1961 "compilers/imcc/imcc.y"
     {
             (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
-         ;}
+         }
     break;
 
   case 189:
-#line 1961 "compilers/imcc/imcc.y"
+#line 1965 "compilers/imcc/imcc.y"
     {
            (yyval.i) = INS(interp,
                     IMCC_INFO(interp)->cur_unit,
@@ -4365,51 +4369,51 @@
                     IMCC_INFO(interp)->keyvec,
                     1);
            mem_sys_free((yyvsp[(1) - (2)].s));
-         ;}
+         }
     break;
 
   case 190:
-#line 1972 "compilers/imcc/imcc.y"
-    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); ;}
+#line 1976 "compilers/imcc/imcc.y"
+    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
     break;
 
   case 191:
-#line 1973 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; ;}
+#line 1977 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 192:
-#line 1974 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0; ;}
+#line 1978 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0; }
     break;
 
   case 195:
-#line 1977 "compilers/imcc/imcc.y"
-    { (yyval.i) = 0;;}
+#line 1981 "compilers/imcc/imcc.y"
+    { (yyval.i) = 0;}
     break;
 
   case 196:
-#line 1981 "compilers/imcc/imcc.y"
-    { (yyval.t) = 'I'; ;}
+#line 1985 "compilers/imcc/imcc.y"
+    { (yyval.t) = 'I'; }
     break;
 
   case 197:
-#line 1982 "compilers/imcc/imcc.y"
-    { (yyval.t) = 'N'; ;}
+#line 1986 "compilers/imcc/imcc.y"
+    { (yyval.t) = 'N'; }
     break;
 
   case 198:
-#line 1983 "compilers/imcc/imcc.y"
-    { (yyval.t) = 'S'; ;}
+#line 1987 "compilers/imcc/imcc.y"
+    { (yyval.t) = 'S'; }
     break;
 
   case 199:
-#line 1984 "compilers/imcc/imcc.y"
-    { (yyval.t) = 'P'; ;}
+#line 1988 "compilers/imcc/imcc.y"
+    { (yyval.t) = 'P'; }
     break;
 
   case 200:
-#line 1989 "compilers/imcc/imcc.y"
+#line 1993 "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 */
@@ -4418,323 +4422,323 @@
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "Unknown PMC type '%s'\n", (yyvsp[(1) - (1)].s));
            }
-         ;}
+         }
     break;
 
   case 201:
-#line 2002 "compilers/imcc/imcc.y"
-    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));  ;}
+#line 2006 "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 202:
-#line 2004 "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));  ;}
+#line 2008 "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 203:
-#line 2006 "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));  ;}
+#line 2010 "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 204:
-#line 2008 "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)); ;}
+#line 2012 "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 205:
-#line 2010 "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)); ;}
+#line 2014 "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 206:
-#line 2015 "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); ;}
+#line 2019 "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 207:
-#line 2018 "compilers/imcc/imcc.y"
+#line 2022 "compilers/imcc/imcc.y"
     {
            add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
            IMCC_INFO(interp)->cur_call = NULL;
            (yyval.i) = 0;
-         ;}
+         }
     break;
 
   case 208:
-#line 2024 "compilers/imcc/imcc.y"
+#line 2028 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
-         ;}
+         }
     break;
 
   case 209:
-#line 2028 "compilers/imcc/imcc.y"
+#line 2032 "compilers/imcc/imcc.y"
     {
            IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
            IMCC_INFO(interp)->cur_call = NULL;
-         ;}
+         }
     break;
 
   case 213:
-#line 2036 "compilers/imcc/imcc.y"
+#line 2040 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
-         ;}
+         }
     break;
 
   case 214:
-#line 2043 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"not"; ;}
+#line 2047 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"not"; }
     break;
 
   case 215:
-#line 2044 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"bnot"; ;}
+#line 2048 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"bnot"; }
     break;
 
   case 216:
-#line 2045 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"neg"; ;}
+#line 2049 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"neg"; }
     break;
 
   case 217:
-#line 2049 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"sub"; ;}
+#line 2053 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"sub"; }
     break;
 
   case 218:
-#line 2050 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"add"; ;}
+#line 2054 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"add"; }
     break;
 
   case 219:
-#line 2051 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"mul"; ;}
+#line 2055 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"mul"; }
     break;
 
   case 220:
-#line 2052 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"div"; ;}
+#line 2056 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"div"; }
     break;
 
   case 221:
-#line 2053 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"mod"; ;}
+#line 2057 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"mod"; }
     break;
 
   case 222:
-#line 2054 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"fdiv"; ;}
+#line 2058 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"fdiv"; }
     break;
 
   case 223:
-#line 2055 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"pow"; ;}
+#line 2059 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"pow"; }
     break;
 
   case 224:
-#line 2056 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"concat"; ;}
+#line 2060 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"concat"; }
     break;
 
   case 225:
-#line 2057 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"iseq"; ;}
+#line 2061 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"iseq"; }
     break;
 
   case 226:
-#line 2058 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"isne"; ;}
+#line 2062 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"isne"; }
     break;
 
   case 227:
-#line 2059 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"isgt"; ;}
+#line 2063 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"isgt"; }
     break;
 
   case 228:
-#line 2060 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"isge"; ;}
+#line 2064 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"isge"; }
     break;
 
   case 229:
-#line 2061 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"islt"; ;}
+#line 2065 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"islt"; }
     break;
 
   case 230:
-#line 2062 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"isle"; ;}
+#line 2066 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"isle"; }
     break;
 
   case 231:
-#line 2063 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"shl"; ;}
+#line 2067 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"shl"; }
     break;
 
   case 232:
-#line 2064 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"shr"; ;}
+#line 2068 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"shr"; }
     break;
 
   case 233:
-#line 2065 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"lsr"; ;}
+#line 2069 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"lsr"; }
     break;
 
   case 234:
-#line 2066 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"and"; ;}
+#line 2070 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"and"; }
     break;
 
   case 235:
-#line 2067 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"or"; ;}
+#line 2071 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"or"; }
     break;
 
   case 236:
-#line 2068 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"xor"; ;}
+#line 2072 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"xor"; }
     break;
 
   case 237:
-#line 2069 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"band"; ;}
+#line 2073 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"band"; }
     break;
 
   case 238:
-#line 2070 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"bor"; ;}
+#line 2074 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"bor"; }
     break;
 
   case 239:
-#line 2071 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"bxor"; ;}
+#line 2075 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"bxor"; }
     break;
 
   case 240:
-#line 2077 "compilers/imcc/imcc.y"
+#line 2081 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
            (yyval.i)->type &= ~ITCALL;
            (yyval.i)->type |= ITRESULT;
-         ;}
+         }
     break;
 
   case 241:
-#line 2082 "compilers/imcc/imcc.y"
-    {  (yyval.i) = 0; ;}
+#line 2086 "compilers/imcc/imcc.y"
+    {  (yyval.i) = 0; }
     break;
 
   case 242:
-#line 2089 "compilers/imcc/imcc.y"
+#line 2093 "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 243:
-#line 2095 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"add"; ;}
+#line 2099 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"add"; }
     break;
 
   case 244:
-#line 2096 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"sub"; ;}
+#line 2100 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"sub"; }
     break;
 
   case 245:
-#line 2097 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"mul"; ;}
+#line 2101 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"mul"; }
     break;
 
   case 246:
-#line 2098 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"div"; ;}
+#line 2102 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"div"; }
     break;
 
   case 247:
-#line 2099 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"mod"; ;}
+#line 2103 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"mod"; }
     break;
 
   case 248:
-#line 2100 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"fdiv"; ;}
+#line 2104 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"fdiv"; }
     break;
 
   case 249:
-#line 2101 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"concat"; ;}
+#line 2105 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"concat"; }
     break;
 
   case 250:
-#line 2102 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"band"; ;}
+#line 2106 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"band"; }
     break;
 
   case 251:
-#line 2103 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"bor"; ;}
+#line 2107 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"bor"; }
     break;
 
   case 252:
-#line 2104 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"bxor"; ;}
+#line 2108 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"bxor"; }
     break;
 
   case 253:
-#line 2105 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"shr"; ;}
+#line 2109 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"shr"; }
     break;
 
   case 254:
-#line 2106 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"shl"; ;}
+#line 2110 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"shl"; }
     break;
 
   case 255:
-#line 2107 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"lsr"; ;}
+#line 2111 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"lsr"; }
     break;
 
   case 256:
-#line 2113 "compilers/imcc/imcc.y"
+#line 2117 "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,
                       IMCC_INFO(interp) -> nargs,
                       IMCC_INFO(interp) -> keyvec, 1);
          mem_sys_free((yyvsp[(3) - (4)].s));
-       ;}
+       }
     break;
 
   case 257:
-#line 2123 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s));       mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2127 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s));       mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 258:
-#line 2124 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2128 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 259:
-#line 2125 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));     mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2129 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));     mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 260:
-#line 2127 "compilers/imcc/imcc.y"
+#line 2131 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = (yyvsp[(1) - (1)].sr);
            if ((yyvsp[(1) - (1)].sr)->set != 'P')
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "Sub isn't a PMC");
-         ;}
+         }
     break;
 
   case 261:
-#line 2133 "compilers/imcc/imcc.y"
+#line 2137 "compilers/imcc/imcc.y"
     {
             /* disallow bareword method names; SREG name constants are fine */
             const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -4747,52 +4751,52 @@
 
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = (yyvsp[(3) - (3)].sr);
-        ;}
+        }
     break;
 
   case 262:
-#line 2147 "compilers/imcc/imcc.y"
+#line 2151 "compilers/imcc/imcc.y"
     {
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
             mem_sys_free((yyvsp[(3) - (3)].s));
-         ;}
+         }
     break;
 
   case 263:
-#line 2153 "compilers/imcc/imcc.y"
+#line 2157 "compilers/imcc/imcc.y"
     {
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
             mem_sys_free((yyvsp[(3) - (3)].s));
-         ;}
+         }
     break;
 
   case 264:
-#line 2158 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); ;}
+#line 2162 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
     break;
 
   case 265:
-#line 2164 "compilers/imcc/imcc.y"
+#line 2168 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
            IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
-         ;}
+         }
     break;
 
   case 266:
-#line 2168 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(2) - (5)].i); ;}
+#line 2172 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(2) - (5)].i); }
     break;
 
   case 267:
-#line 2172 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 2176 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 268:
-#line 2174 "compilers/imcc/imcc.y"
+#line 2178 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -4801,11 +4805,11 @@
            }
            else
                add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
-         ;}
+         }
     break;
 
   case 269:
-#line 2184 "compilers/imcc/imcc.y"
+#line 2188 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -4814,79 +4818,79 @@
            }
            else
                add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
-         ;}
+         }
     break;
 
   case 270:
-#line 2194 "compilers/imcc/imcc.y"
+#line 2198 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            add_pcc_named_arg(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 271:
-#line 2201 "compilers/imcc/imcc.y"
+#line 2205 "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));
-         ;}
+         }
     break;
 
   case 272:
-#line 2206 "compilers/imcc/imcc.y"
+#line 2210 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            add_pcc_named_arg(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 273:
-#line 2215 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); ;}
+#line 2219 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
     break;
 
   case 274:
-#line 2219 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 2223 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 275:
-#line 2220 "compilers/imcc/imcc.y"
-    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); ;}
+#line 2224 "compilers/imcc/imcc.y"
+    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 276:
-#line 2224 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_FLAT; ;}
+#line 2228 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_FLAT; }
     break;
 
   case 277:
-#line 2225 "compilers/imcc/imcc.y"
-    { (yyval.t) = VT_NAMED; ;}
+#line 2229 "compilers/imcc/imcc.y"
+    { (yyval.t) = VT_NAMED; }
     break;
 
   case 278:
-#line 2228 "compilers/imcc/imcc.y"
-    { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; ;}
+#line 2232 "compilers/imcc/imcc.y"
+    { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
     break;
 
   case 279:
-#line 2229 "compilers/imcc/imcc.y"
-    { adv_named_set(interp, (yyvsp[(3) - (4)].s));   (yyval.t) = 0; ;}
+#line 2233 "compilers/imcc/imcc.y"
+    { adv_named_set(interp, (yyvsp[(3) - (4)].s));   (yyval.t) = 0; }
     break;
 
   case 280:
-#line 2233 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); ;}
+#line 2237 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
     break;
 
   case 281:
-#line 2238 "compilers/imcc/imcc.y"
+#line 2242 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -4895,20 +4899,20 @@
            }
            else
                add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
-         ;}
+         }
     break;
 
   case 282:
-#line 2248 "compilers/imcc/imcc.y"
+#line 2252 "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));
             mem_sys_free((yyvsp[(3) - (5)].s));
-         ;}
+         }
     break;
 
   case 283:
-#line 2254 "compilers/imcc/imcc.y"
+#line 2258 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -4917,282 +4921,282 @@
            }
            else
                add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
-         ;}
+         }
     break;
 
   case 284:
-#line 2264 "compilers/imcc/imcc.y"
+#line 2268 "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));
            mem_sys_free((yyvsp[(1) - (3)].s));
-         ;}
+         }
     break;
 
   case 285:
-#line 2268 "compilers/imcc/imcc.y"
-    { (yyval.sr) = 0; ;}
+#line 2272 "compilers/imcc/imcc.y"
+    { (yyval.sr) = 0; }
     break;
 
   case 286:
-#line 2272 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
+#line 2276 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 287:
-#line 2273 "compilers/imcc/imcc.y"
-    { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
+#line 2277 "compilers/imcc/imcc.y"
+    { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 288:
-#line 2278 "compilers/imcc/imcc.y"
+#line 2282 "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 289:
-#line 2282 "compilers/imcc/imcc.y"
+#line 2286 "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 290:
-#line 2286 "compilers/imcc/imcc.y"
+#line 2290 "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 291:
-#line 2293 "compilers/imcc/imcc.y"
+#line 2297 "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 292:
-#line 2297 "compilers/imcc/imcc.y"
+#line 2301 "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 293:
-#line 2301 "compilers/imcc/imcc.y"
+#line 2305 "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 294:
-#line 2307 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 2311 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 295:
-#line 2308 "compilers/imcc/imcc.y"
-    { (yyval.t) = 0; ;}
+#line 2312 "compilers/imcc/imcc.y"
+    { (yyval.t) = 0; }
     break;
 
   case 296:
-#line 2312 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"eq"; ;}
+#line 2316 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"eq"; }
     break;
 
   case 297:
-#line 2313 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"ne"; ;}
+#line 2317 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"ne"; }
     break;
 
   case 298:
-#line 2314 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"gt"; ;}
+#line 2318 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"gt"; }
     break;
 
   case 299:
-#line 2315 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"ge"; ;}
+#line 2319 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"ge"; }
     break;
 
   case 300:
-#line 2316 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"lt"; ;}
+#line 2320 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"lt"; }
     break;
 
   case 301:
-#line 2317 "compilers/imcc/imcc.y"
-    { (yyval.s) = (char *)"le"; ;}
+#line 2321 "compilers/imcc/imcc.y"
+    { (yyval.s) = (char *)"le"; }
     break;
 
   case 304:
-#line 2326 "compilers/imcc/imcc.y"
-    { (yyval.sr) = NULL; ;}
+#line 2330 "compilers/imcc/imcc.y"
+    { (yyval.sr) = NULL; }
     break;
 
   case 305:
-#line 2327 "compilers/imcc/imcc.y"
-    { (yyval.sr) = (yyvsp[(1) - (1)].sr); ;}
+#line 2331 "compilers/imcc/imcc.y"
+    { (yyval.sr) = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 306:
-#line 2331 "compilers/imcc/imcc.y"
-    { (yyval.sr) = IMCC_INFO(interp)->regs[0]; ;}
+#line 2335 "compilers/imcc/imcc.y"
+    { (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
     break;
 
   case 308:
-#line 2336 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); ;}
+#line 2340 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 309:
-#line 2338 "compilers/imcc/imcc.y"
+#line 2342 "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);
            IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(3) - (4)].sr);
            (yyval.sr) = (yyvsp[(1) - (4)].sr);
-         ;}
+         }
     break;
 
   case 310:
-#line 2345 "compilers/imcc/imcc.y"
+#line 2349 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
            (yyval.sr) = (yyvsp[(2) - (3)].sr);
-         ;}
+         }
     break;
 
   case 312:
-#line 2352 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2356 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 313:
-#line 2353 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));  mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2357 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));  mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 314:
-#line 2357 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2361 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 315:
-#line 2358 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2362 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 316:
-#line 2362 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2366 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 317:
-#line 2363 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2367 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 322:
-#line 2377 "compilers/imcc/imcc.y"
+#line 2381 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->nkeys    = 0;
-         ;}
+         }
     break;
 
   case 323:
-#line 2381 "compilers/imcc/imcc.y"
+#line 2385 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = link_keys(interp,
                           IMCC_INFO(interp)->nkeys,
                           IMCC_INFO(interp)->keys, 0);
-         ;}
+         }
     break;
 
   case 324:
-#line 2389 "compilers/imcc/imcc.y"
+#line 2393 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->nkeys = 0;
-         ;}
+         }
     break;
 
   case 325:
-#line 2393 "compilers/imcc/imcc.y"
+#line 2397 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = link_keys(interp,
                           IMCC_INFO(interp)->nkeys,
                           IMCC_INFO(interp)->keys, 1);
-         ;}
+         }
     break;
 
   case 326:
-#line 2401 "compilers/imcc/imcc.y"
-    { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); ;}
+#line 2405 "compilers/imcc/imcc.y"
+    { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 327:
-#line 2403 "compilers/imcc/imcc.y"
+#line 2407 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
            (yyval.sr) = IMCC_INFO(interp)->keys[0];
-         ;}
+         }
     break;
 
   case 328:
-#line 2411 "compilers/imcc/imcc.y"
+#line 2415 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = (yyvsp[(1) - (1)].sr);
-         ;}
+         }
     break;
 
   case 329:
-#line 2417 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); ;}
+#line 2421 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
     break;
 
   case 330:
-#line 2418 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); ;}
+#line 2422 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
     break;
 
   case 331:
-#line 2419 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); ;}
+#line 2423 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
     break;
 
   case 332:
-#line 2420 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); ;}
+#line 2424 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
     break;
 
   case 333:
-#line 2421 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2425 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 334:
-#line 2425 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2429 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 335:
-#line 2426 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2430 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 336:
-#line 2427 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2431 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 337:
-#line 2428 "compilers/imcc/imcc.y"
-    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); ;}
+#line 2432 "compilers/imcc/imcc.y"
+    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 5185 "compilers/imcc/imcparser.c"
+#line 5189 "compilers/imcc/imcparser.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5406,7 +5410,7 @@
 }
 
 
-#line 2434 "compilers/imcc/imcc.y"
+#line 2438 "compilers/imcc/imcc.y"
 
 
 /* I need this prototype somewhere... */

Modified: branches/context_pmc2/compilers/imcc/imcparser.h
==============================================================================
--- branches/context_pmc2/compilers/imcc/imcparser.h	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/compilers/imcc/imcparser.h	Wed Aug 19 22:53:55 2009	(r40665)
@@ -295,7 +295,7 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 1049 "compilers/imcc/imcc.y"
+#line 1053 "compilers/imcc/imcc.y"
 {
     IdList * idlist;
     int t;

Modified: branches/context_pmc2/compilers/imcc/main.c
==============================================================================
--- branches/context_pmc2/compilers/imcc/main.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/compilers/imcc/main.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -35,6 +35,7 @@
 #include "parrot/imcc.h"
 #include "pbc.h"
 #include "parser.h"
+#include "../../src/pmc/pmc_context.h"
 
 extern int yydebug;
 

Modified: branches/context_pmc2/compilers/imcc/parser_util.c
==============================================================================
--- branches/context_pmc2/compilers/imcc/parser_util.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/compilers/imcc/parser_util.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -22,6 +22,7 @@
 #include "parrot/dynext.h"
 #include "parrot/embed.h"
 #include "../../src/pmc/pmc_sub.h"
+#include "../../src/pmc/pmc_context.h"
 #include "pbc.h"
 #include "parser.h"
 #include "optimizer.h"
@@ -626,7 +627,7 @@
     struct _imc_info_t    *imc_info = NULL;
     struct parser_state_t *next;
     void                  *yyscanner;
-    Parrot_Context        *ignored;
+    PMC                   *ignored;
     INTVAL regs_used[4] = {3, 3, 3, 3};
     INTVAL eval_number;
 
@@ -693,7 +694,7 @@
     IMCC_pop_parser_state(interp, yyscanner);
 
     if (!IMCC_INFO(interp)->error_code) {
-        Parrot_sub *sub_data;
+        Parrot_Sub_attributes *sub_data;
 
         /*
          * create sub PMC
@@ -904,7 +905,7 @@
     const char                *ext;
     FILE                      *fp;
     STRING                    *fs;
-    Parrot_Context            *ignored;
+    PMC                       *ignored;
 
     /* need at least 3 regs for compilation of constant math e.g.
      * add_i_ic_ic - see also IMCC_subst_constants() */

Modified: branches/context_pmc2/compilers/imcc/pbc.c
==============================================================================
--- branches/context_pmc2/compilers/imcc/pbc.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/compilers/imcc/pbc.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -7,6 +7,7 @@
 #include "pbc.h"
 #include "parrot/packfile.h"
 #include "../src/pmc/pmc_sub.h"
+#include "../../src/pmc/pmc_context.h"
 
 /* HEADERIZER HFILE: compilers/imcc/pbc.h */
 
@@ -1205,7 +1206,7 @@
                 while (n) {
                     STRING     *lex_name;
                     const int   k = n->color;
-                    Parrot_sub *sub;
+                    Parrot_Sub_attributes *sub;
                     PARROT_ASSERT(k >= 0);
 
                     lex_name = constants[k]->u.string;
@@ -1255,7 +1256,7 @@
     subs_t      *s;
     PMC         *current;
     STRING      *cur_name;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
     size_t      len;
 
     if (!unit->outer)
@@ -1320,9 +1321,9 @@
 add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
 {
     ASSERT_ARGS(add_const_pmc_sub)
-    PMC                 *ns_pmc;
-    PMC                 *sub_pmc;
-    Parrot_sub          *sub, *outer_sub;
+    PMC                   *ns_pmc;
+    PMC                   *sub_pmc;
+    Parrot_Sub_attributes *sub, *outer_sub;
 
     const int            k            = add_const_table(interp);
     PackFile_ConstTable * const ct    = interp->code->const_table;

Modified: branches/context_pmc2/include/parrot/gc_api.h
==============================================================================
--- branches/context_pmc2/include/parrot/gc_api.h	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/include/parrot/gc_api.h	Wed Aug 19 22:53:55 2009	(r40665)
@@ -17,6 +17,10 @@
 
 #include "parrot/parrot.h"
 
+/* Set to 1 if we want to use the fixed-size allocator. Set to 0 if we want
+   to allocate these things using mem_sys_allocate instead */
+#define GC_USE_FIXED_SIZE_ALLOCATOR 1
+
 /*
  * we need an alignment that is the same as malloc(3) have for
  * allocating Buffer items like FLOATVAL (double)

Modified: branches/context_pmc2/include/parrot/register.h
==============================================================================
--- branches/context_pmc2/include/parrot/register.h	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/include/parrot/register.h	Wed Aug 19 22:53:55 2009	(r40665)
@@ -51,7 +51,7 @@
 #define REGNO_STR 2
 #define REGNO_PMC 3
 
-#define __CTX interp->ctx.state
+#define __CTX PARROT_CONTEXT(interp->ctx)
 #define _SIZEOF_INTS    (sizeof (INTVAL) * __CTX->n_regs_used[REGNO_INT])
 #define _SIZEOF_NUMS    (sizeof (FLOATVAL) * __CTX->n_regs_used[REGNO_NUM])
 #define _SIZEOF_PMCS    (sizeof (PMC*) * __CTX->n_regs_used[REGNO_PMC])

Modified: branches/context_pmc2/include/parrot/sub.h
==============================================================================
--- branches/context_pmc2/include/parrot/sub.h	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/include/parrot/sub.h	Wed Aug 19 22:53:55 2009	(r40665)
@@ -136,37 +136,6 @@
     Parrot_UInt1 named_slurpy;
 } Parrot_sub_arginfo;
 
-
-typedef struct Parrot_sub {
-    PackFile_ByteCode *seg;     /* bytecode segment */
-    size_t   start_offs;        /* sub entry in ops from seg->base.data */
-    size_t   end_offs;
-
-    INTVAL   HLL_id;             /* see src/hll.c XXX or per segment? */
-    PMC      *namespace_name;    /* where this Sub is in - this is either
-                                  * a String or a [Key] and describes
-                                  * the relative path in the NameSpace
-                                  */
-    PMC      *namespace_stash;   /* the actual hash, HLL::namespace */
-    STRING   *name;              /* name of the sub */
-    STRING   *method_name;       /* method name of the sub */
-    STRING   *ns_entry_name;     /* ns entry name of the sub */
-    STRING   *subid;             /* The ID of the sub. */
-    INTVAL   vtable_index;       /* index in Parrot_vtable_slot_names */
-    PMC      *multi_signature;   /* list of types for MMD */
-    INTVAL   n_regs_used[4];     /* INSP in PBC */
-
-    PMC      *lex_info;          /* LexInfo PMC */
-    PMC      *outer_sub;         /* :outer for closures */
-    PMC      *eval_pmc;          /* eval container / NULL */
-    PMC      *ctx;         /* the context this sub is in */
-    UINTVAL  comp_flags;         /* compile time and additional flags */
-    Parrot_sub_arginfo *arg_info;/* Argument counts and flags. */
-
-    /* - end common */
-    PMC      *outer_ctx;   /* outer context, if a closure */
-} Parrot_sub;
-
 #define PMC_get_sub(interp, pmc, sub) \
     do { \
         const INTVAL type = (pmc)->vtable->base_type; \
@@ -174,48 +143,13 @@
             type == enum_class_Coroutine || \
             type == enum_class_Eval)  \
         {\
-            GETATTR_Sub_sub((interp), (pmc), (sub)); \
+            (sub) = PARROT_SUB((pmc)); \
         } \
         else { \
-            (sub) = Parrot_get_sub_pmc_from_subclass((interp), (pmc)); \
+            (sub) = (Parrot_Sub_attributes*)Parrot_get_sub_pmc_from_subclass((interp), (pmc)); \
         } \
     } while (0)
 
-/* the first entries must match Parrot_sub, so we can cast
- * these two to the other type
- */
-typedef struct Parrot_coro {
-    PackFile_ByteCode *seg;      /* bytecode segment */
-    size_t   start_offs;         /* sub entry in ops from seg->base.data */
-    size_t   end_offs;
-
-    INTVAL   HLL_id;             /* see src/hll.c XXX or per segment? */
-    PMC      *_namespace;        /* where this Sub is in - this is either
-                                  * a String or a [Key] and describes
-                                  * the relative path in the NameSpace
-                                  */
-    PMC      *namespace_stash;   /* the actual hash, HLL::namespace */
-    STRING   *name;              /* name of the sub */
-    STRING   *method_name;       /* method name of the sub */
-    STRING   *ns_entry_name;     /* ns entry name of the sub */
-    STRING   *subid;             /* The ID of the sub. */
-    INTVAL   vtable_index;       /* index in Parrot_vtable_slot_names */
-    PMC      *multi_signature;   /* list of types for MMD */
-    INTVAL   n_regs_used[4];     /* INSP in PBC */
-
-    PMC      *lex_info;          /* LexInfo PMC */
-    PMC      *outer_sub;         /* :outer for closures */
-    PMC      *eval_pmc;          /* eval container / NULL */
-    PMC      *ctx; /* coroutine context */
-    UINTVAL  comp_flags;         /* compile time and additional flags */
-    Parrot_sub_arginfo arg_info; /* Argument counts and flags. */
-
-    /* - end common */
-
-    PackFile_ByteCode *caller_seg;  /* bytecode segment */
-    opcode_t *address;           /* next address to run - toggled each time */
-} Parrot_coro;
-
 typedef struct Parrot_cont {
     /* continuation destination */
     PackFile_ByteCode *seg;          /* bytecode segment */
@@ -275,8 +209,7 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-Parrot_sub * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP,
-    ARGIN(PMC *subclass))
+void * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, ARGIN(PMC *subclass))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -300,19 +233,9 @@
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-Parrot_coro * new_coroutine(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
 Parrot_cont * new_ret_continuation(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-Parrot_sub * new_sub(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
 void Parrot_capture_lex(PARROT_INTERP, ARGMOD(PMC *sub_pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
@@ -363,12 +286,8 @@
     || PARROT_ASSERT_ARG(cont)
 #define ASSERT_ARGS_new_continuation __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_new_coroutine __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_new_ret_continuation __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_new_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_capture_lex __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(sub_pmc)

Modified: branches/context_pmc2/lib/Parrot/OpTrans/CGP.pm
==============================================================================
--- branches/context_pmc2/lib/Parrot/OpTrans/CGP.pm	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/lib/Parrot/OpTrans/CGP.pm	Wed Aug 19 22:53:55 2009	(r40665)
@@ -91,7 +91,7 @@
         return "if ($addr == 0)
           return 0;
    Parrot_cx_handle_tasks(interp, interp->scheduler);
-   _reg_base = (char*)interp->ctx.bp.regs_i;
+   _reg_base = (char*)PARROT_CONTEXT(interp->ctx)->bp.regs_i;
    goto **(void **)(cur_opcode = opcode_to_prederef(interp, $addr))";
     }
 }

Modified: branches/context_pmc2/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- branches/context_pmc2/lib/Parrot/Ops2c/Utils.pm	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/lib/Parrot/Ops2c/Utils.pm	Wed Aug 19 22:53:55 2009	(r40665)
@@ -686,7 +686,7 @@
     __asm__ ("jmp *4(%ebp)");  /* jump to ret addr, used by JIT */
 # endif
 #endif
-    _reg_base = (char*)interp->ctx.bp.regs_i;
+    _reg_base = (char*)PARROT_CONTEXT(interp->ctx)->bp.regs_i;
     goto **(void **)cur_opcode;
 
 END_C

Modified: branches/context_pmc2/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- branches/context_pmc2/lib/Parrot/Pmc2c/PCCMETHOD.pm	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/lib/Parrot/Pmc2c/PCCMETHOD.pm	Wed Aug 19 22:53:55 2009	(r40665)
@@ -162,16 +162,16 @@
     my $tiss = $reg_type_info->{$reg_type}{ss};    #reg_type_info short string
 
     if ( 'arg' eq $arg_type ) {
-        return "    $tis $name = CTX_REG_$tiss(_ctx, $index);\n";
+        return "    $tis $name = PMCCTX_REG_$tiss(_ctx, $index);\n";
     }
     elsif ( 'result' eq $arg_type ) {
-        return "    $name = CTX_REG_$tiss(_ctx, $index);\n";
+        return "    $name = PMCCTX_REG_$tiss(_ctx, $index);\n";
     }
     elsif ( 'name' eq $arg_type ) {
-        return "    CTX_REG_$tiss(_ctx, $index) = CONST_STRING_GEN(interp, $name);\n";
+        return "    PMCCTX_REG_$tiss(_ctx, $index) = CONST_STRING_GEN(interp, $name);\n";
     }
     else {  #$arg_type eq 'param' or $arg_type eq 'return'
-        return "    CTX_REG_$tiss(_ctx, $index) = $name;\n";
+        return "    PMCCTX_REG_$tiss(_ctx, $index) = $name;\n";
     }
 }
 
@@ -248,7 +248,9 @@
     }
 
     _return_sig = pmc_new(interp, enum_class_FixedIntegerArray);
+    // RETURN SIG
 $returns_sig
+    // GOTO SIG
     $goto_string
     /*END RETURN $returns */
     }
@@ -394,16 +396,16 @@
     PMC      * const _param_sig   = pmc_new(interp, enum_class_FixedIntegerArray);
     PMC      *_return_sig         = PMCNULL;
 
-    Parrot_Context *_caller_ctx   = CONTEXT(interp);
-    PMC * const _ret_cont         = new_ret_continuation_pmc(interp, NULL);
-    Parrot_Context *_ctx          = Parrot_push_context(interp, _n_regs_used);
-    PMC *_ccont                   = PMCNULL;
+    PMC *_caller_ctx        = interp->ctx;
+    PMC * const _ret_cont   = new_ret_continuation_pmc(interp, NULL);
+    PMC *_ctx               = Parrot_push_context(interp, _n_regs_used);
+    PMC *_ccont             = PMCNULL;
 
 $set_params
     UNUSED(_return_indexes);
 
-    if (_caller_ctx) {
-        _ccont = _caller_ctx->current_cont;
+    if (!PMC_IS_NULL(_caller_ctx)) {
+        _ccont = PARROT_CONTEXT(_caller_ctx)->current_cont;
     }
     else {
         /* there is no point calling Parrot_ex_throw_from_c_args here, because
@@ -411,8 +413,8 @@
         exit_fatal(1, "No caller_ctx for continuation \%p.", _ccont);
     }
 
-    _ctx->current_cont            = _ret_cont;
-    PMC_cont(_ret_cont)->from_ctx = _ctx;
+    PARROT_CONTEXT(_ctx)->current_cont  = _ret_cont;
+    PMC_cont(_ret_cont)->from_ctx       = _ctx;
 
     _current_args                 = interp->current_args;
     interp->current_args         = NULL;
@@ -429,9 +431,7 @@
 
     if (PObj_get_FLAGS(_ccont) & SUB_FLAG_TAILCALL) {
         PObj_get_FLAGS(_ccont) &= ~SUB_FLAG_TAILCALL;
-        --_ctx->recursion_depth;
-        _ctx->caller_ctx      = _caller_ctx->caller_ctx;
-        Parrot_free_context(interp, _caller_ctx, 1);
+        PARROT_CONTEXT(_ctx)->caller_ctx      = PARROT_CONTEXT(_caller_ctx)->caller_ctx;
         interp->current_args = NULL;
     }
     /* BEGIN PARMS SCOPE */
@@ -466,7 +466,7 @@
 
     interp->returns_signature = _return_sig;
     parrot_pass_args(interp, _ctx, _caller_ctx, _return_indexes,
-        _caller_ctx->current_results, PARROT_PASS_RESULTS);
+        PARROT_CONTEXT(_caller_ctx)->current_results, PARROT_PASS_RESULTS);
 END
     }
     $e_post->emit( <<"END", __FILE__, __LINE__ + 1 );

Modified: branches/context_pmc2/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/context_pmc2/lib/Parrot/Pmc2c/PMCEmitter.pm	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/lib/Parrot/Pmc2c/PMCEmitter.pm	Wed Aug 19 22:53:55 2009	(r40665)
@@ -77,6 +77,8 @@
 
     # The PCC code needs Continuation-related macros from these headers.
     $c->emit("#include \"pmc_continuation.h\"\n");
+    # The Context PMC attributes
+    $c->emit("#include \"pmc_context.h\"\n");
 
     $c->emit( $self->preamble );
 

Modified: branches/context_pmc2/src/dynpmc/subproxy.pmc
==============================================================================
--- branches/context_pmc2/src/dynpmc/subproxy.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/dynpmc/subproxy.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -31,7 +31,7 @@
             PMC         *key = PMC_data_typed(SELF, PMC *);
             STRING      *file;
             PMC         *rsub_pmc, *sub_pmc;
-            Parrot_sub  *rsub,     *my_sub;
+            Parrot_Sub_attributes  *rsub,     *my_sub;
 
             if (!key)
                 Parrot_ex_throw_from_c_args(interp, NULL, 1, "SubProxy: no key");

Modified: branches/context_pmc2/src/embed.c
==============================================================================
--- branches/context_pmc2/src/embed.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/embed.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -886,7 +886,7 @@
 set_current_sub(PARROT_INTERP)
 {
     ASSERT_ARGS(set_current_sub)
-    Parrot_sub *sub_pmc_sub;
+    Parrot_Sub_attributes *sub_pmc_sub;
     PMC        *sub_pmc;
 
     PackFile_ByteCode   * const cur_cs = interp->code;
@@ -904,7 +904,7 @@
         if (ft->fixups[i]->type == enum_fixup_sub) {
             const opcode_t ci      = ft->fixups[i]->offset;
             PMC           *sub_pmc = ct->constants[ci]->u.key;
-            Parrot_sub    *sub;
+            Parrot_Sub_attributes *sub;
 
             PMC_get_sub(interp, sub_pmc, sub);
             if (sub->seg == cur_cs) {

Modified: branches/context_pmc2/src/extend.c
==============================================================================
--- branches/context_pmc2/src/extend.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/extend.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -1041,7 +1041,7 @@
     ASSERT_ARGS(Parrot_call_sub)
     va_list     ap;
     void       *result;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
 
     PARROT_CALLIN_START(interp);
 
@@ -1074,7 +1074,7 @@
     ASSERT_ARGS(Parrot_call_sub_ret_int)
     va_list     ap;
     Parrot_Int  result;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
 
     PARROT_CALLIN_START(interp);
 
@@ -1107,7 +1107,7 @@
     ASSERT_ARGS(Parrot_call_sub_ret_float)
     va_list       ap;
     Parrot_Float  result;
-    Parrot_sub   *sub;
+    Parrot_Sub_attributes   *sub;
 
     PARROT_CALLIN_START(interp);
 

Modified: branches/context_pmc2/src/gc/gc_ms.c
==============================================================================
--- branches/context_pmc2/src/gc/gc_ms.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/gc/gc_ms.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -424,18 +424,21 @@
         (*pool->more_objects)(interp, pool);
         free_list = (PObj *)pool->free_list;
     }
+
     if (!free_list) {
         Small_Object_Arena * const arena = pool->last_Arena;
-        ptr = (PObj *)pool->newfree;
+        ptr           = (PObj *)pool->newfree;
         pool->newfree = (void *)((char *)pool->newfree + pool->object_size);
         arena->used++;
+
         if (pool->newfree >= pool->newlast)
             pool->newfree = NULL;
-        PARROT_ASSERT(ptr < pool->newlast);
+
+        PARROT_ASSERT(ptr < (PObj *)pool->newlast);
     }
     else {
-        ptr = free_list;
-        pool->free_list = ((GC_MS_PObj_Wrapper*)ptr)->next_ptr;
+        ptr             = free_list;
+        pool->free_list = ((GC_MS_PObj_Wrapper *)ptr)->next_ptr;
     }
 #else
     /* if we don't have any objects */
@@ -455,6 +458,7 @@
     return ptr;
 }
 
+
 /*
 
 =item C<static void gc_ms_alloc_objects(PARROT_INTERP, Small_Object_Pool *pool)>
@@ -581,20 +585,23 @@
 #if GC_USE_LAZY_ALLOCATOR
     if (!free_list && !pool->newfree) {
         (*pool->more_objects)(interp, pool);
-        free_list = (PObj *)pool->free_list;
+        free_list = (PMC_EXT *)pool->free_list;
     }
+
     if (!free_list) {
         Small_Object_Arena * const arena = pool->last_Arena;
-        ptr = (PMC_EXT *)pool->newfree;
+
+        ptr           = (PMC_EXT *)pool->newfree;
         pool->newfree = (void *)((char *)pool->newfree + pool->object_size);
+
         if (pool->newfree >= pool->newlast)
             pool->newfree = NULL;
         arena->used++;
-        PARROT_ASSERT(ptr < pool->newlast);
+        PARROT_ASSERT(ptr < (PMC_EXT *)pool->newlast);
     }
     else {
-        ptr = free_list;
-        pool->free_list = ptr->_next_for_GC;
+        ptr               = free_list;
+        pool->free_list   = ptr->_next_for_GC;
         ptr->_next_for_GC = NULL;
     }
 #else
@@ -603,6 +610,7 @@
         (*pool->more_objects)(interp, pool);
         free_list = (PMC_EXT *)pool->free_list;
     }
+
     ptr               = free_list;
     pool->free_list   = ptr->_next_for_GC;
     ptr->_next_for_GC = NULL;
@@ -613,6 +621,7 @@
     return ptr;
 }
 
+
 /*
 
 =back

Modified: branches/context_pmc2/src/global.c
==============================================================================
--- branches/context_pmc2/src/global.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/global.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -718,7 +718,7 @@
 get_namespace_pmc(PARROT_INTERP, ARGIN(PMC *sub_pmc))
 {
     ASSERT_ARGS(get_namespace_pmc)
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
     PMC        *nsname, *nsroot;
 
     PMC_get_sub(interp, sub_pmc, sub);
@@ -752,7 +752,7 @@
 store_sub_in_multi(PARROT_INTERP, ARGIN(PMC *sub_pmc), ARGIN(PMC *ns))
 {
     ASSERT_ARGS(store_sub_in_multi)
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
     STRING     *ns_entry_name;
     PMC        *multisub;
 
@@ -791,7 +791,7 @@
     const INTVAL cur_id = CONTEXT(interp)->current_HLL;
 
     PMC        *ns;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
 
     /* PF structures aren't fully constructed yet */
     Parrot_block_GC_mark(interp);

Modified: branches/context_pmc2/src/jit.c
==============================================================================
--- branches/context_pmc2/src/jit.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/jit.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -36,6 +36,7 @@
 #include "parrot/oplib/ops.h"
 #include "pmc/pmc_sub.h"
 #include "pmc/pmc_managedstruct.h"
+#include "pmc/pmc_context.h"
 
 #define JIT_SEGS 0
 
@@ -1294,10 +1295,10 @@
     for (i = 0; i < ft->fixup_count; i++) {
         if (ft->fixups[i]->type == enum_fixup_sub) {
             const int ci               = ft->fixups[i]->offset;
-            PMC        * const sub_pmc = ct->constants[ci]->u.key;
-            Parrot_sub        *sub;
-            size_t             offs;
-            int                i;
+            PMC           * const sub_pmc = ct->constants[ci]->u.key;
+            Parrot_Sub_attributes *sub;
+            size_t                 offs;
+            int                    i;
 
             PMC_get_sub(interp, sub_pmc, sub);
             offs = pc - sub->seg->base.data;

Modified: branches/context_pmc2/src/jit/i386/core.jit
==============================================================================
--- branches/context_pmc2/src/jit/i386/core.jit	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/jit/i386/core.jit	Wed Aug 19 22:53:55 2009	(r40665)
@@ -4,6 +4,7 @@
 ; $Id$
 ;
 
+#include "pmc/pmc_context.h"
 # TODO complete this
 #define P_ARITH ((PREV_OP == dec_i) || (PREV_OP == inc_i) || (PREV_OP == sub_i_i_i) || (PREV_OP == sub_i_i))
 
@@ -1491,10 +1492,10 @@
 Parrot_get_results_pc {
     if (jit_info->code_type == JIT_CODE_FILE) {
         Parrot_jit_emit_get_INTERP(interp, jit_info->native_ptr, emit_EAX);
-        emitm_movl_m_r(interp, NATIVECODE, emit_EAX, emit_EAX, emit_None, 1,
-                offsetof(Interp, ctx.state));
-        emitm_movl_i_m(NATIVECODE, jit_info->cur_op, emit_EAX, emit_None, 1,
-                offsetof(Parrot_Context, current_results));
+        //emitm_movl_m_r(interp, NATIVECODE, emit_EAX, emit_EAX, emit_None, 1,
+        //        offsetof(Interp, ctx.state));
+        //emitm_movl_i_m(NATIVECODE, jit_info->cur_op, emit_EAX, emit_None, 1,
+        //        offsetof(Parrot_Context, current_results));
     }
     else {
         PackFile_Constant ** constants;

Modified: branches/context_pmc2/src/jit/i386/jit_defs.c
==============================================================================
--- branches/context_pmc2/src/jit/i386/jit_defs.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/jit/i386/jit_defs.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -13,6 +13,7 @@
 #include "pmc/pmc_fixedintegerarray.h"
 #include "pmc/pmc_unmanagedstruct.h"
 #include "pmc/pmc_pointer.h"
+#include "pmc/pmc_context.h"
 #include "jit.h"
 #include "jit_emit.h"
 
@@ -871,8 +872,9 @@
     }
 #endif
     /* get base pointer */
-    emitm_movl_m_r(interp, jit_info->native_ptr, emit_EBX, emit_EBX, 0, 1,
-            offsetof(Interp, ctx.bp));
+    // BROKEN!!!
+    //emitm_movl_m_r(interp, jit_info->native_ptr, emit_EBX, emit_EBX, 0, 1,
+    //        offsetof(Interp, ctx.bp));
 
     /* This jumps to the address in op_map[EDX + sizeof (void *) * INDEX] */
     emitm_jumpm(jit_info->native_ptr, emit_EDX, emit_EAX,

Modified: branches/context_pmc2/src/multidispatch.c
==============================================================================
--- branches/context_pmc2/src/multidispatch.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/multidispatch.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -817,8 +817,8 @@
 {
     ASSERT_ARGS(Parrot_mmd_get_cached_multi_sig)
     if (VTABLE_isa(interp, sub_pmc, CONST_STRING(interp, "Sub"))) {
-        Parrot_sub *sub;
-        PMC        *multi_sig;
+        Parrot_Sub_attributes *sub;
+        PMC                   *multi_sig;
 
         PMC_get_sub(interp, sub_pmc, sub);
         multi_sig = sub->multi_signature;
@@ -857,7 +857,7 @@
 {
     ASSERT_ARGS(mmd_distance)
     PMC        *multi_sig, *mro;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
     INTVAL      args, dist, i, j, n, m;
 
     /* has to be a builtin multi method */
@@ -1262,7 +1262,7 @@
         ARGIN(STRING *sub_name), ARGIN(STRING *long_sig), ARGIN(PMC *sub_obj))
 {
     ASSERT_ARGS(Parrot_mmd_add_multi_from_long_sig)
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
     STRING     *sub_str     = CONST_STRING(interp, "Sub");
     STRING     *closure_str = CONST_STRING(interp, "Closure");
     PMC        *type_list   = Parrot_str_split(interp, CONST_STRING(interp, ","), long_sig);

Modified: branches/context_pmc2/src/packdump.c
==============================================================================
--- branches/context_pmc2/src/packdump.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/packdump.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -269,7 +269,7 @@
         Parrot_io_printf(interp, "    [ 'PFC_PMC', {\n");
         {
             PMC * const pmc = self->u.key;
-            Parrot_sub *sub;
+            Parrot_Sub_attributes *sub;
             STRING * const null = Parrot_str_new_constant(interp, "(null)");
             STRING *namespace_description;
 

Modified: branches/context_pmc2/src/packfile.c
==============================================================================
--- branches/context_pmc2/src/packfile.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/packfile.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -1006,8 +1006,9 @@
     /* Ensure the bytecode version is one we can read. Currently, we only
      * support bytecode versions matching the current one.
      *
-     * tools/dev/pbc_header.pl --upd t/native_pbc/ *.pbc
-     * stamps version and fingerprint in the native tests. */
+     * tools/dev/pbc_header.pl --upd t/native_pbc/(ASTERISK).pbc
+     * stamps version and fingerprint in the native tests.
+     * NOTE: (ASTERISK) is *, we don't want to fool the C preprocessor. */
     if (header->bc_major != PARROT_PBC_MAJOR
     ||  header->bc_minor != PARROT_PBC_MINOR) {
         Parrot_io_eprintf(NULL, "PackFile_unpack: This Parrot cannot read "

Modified: branches/context_pmc2/src/pbc_merge.c
==============================================================================
--- branches/context_pmc2/src/pbc_merge.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pbc_merge.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -457,7 +457,7 @@
                     case enum_class_Sub:
                     case enum_class_Coroutine:
                         {
-                        Parrot_sub *sub;
+                        Parrot_Sub_attributes *sub;
                         PMC_get_sub(interp, copy->u.key, sub);
                         sub->start_offs += inputs[i]->code_start;
                         sub->end_offs += inputs[i]->code_start;

Modified: branches/context_pmc2/src/pic.c
==============================================================================
--- branches/context_pmc2/src/pic.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pic.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -80,6 +80,7 @@
 #include "parrot/oplib/ops.h"
 #include "pmc/pmc_fixedintegerarray.h"
 #include "pmc/pmc_continuation.h"
+#include "pmc/pmc_context.h"
 #ifdef HAVE_COMPUTED_GOTO
 #  include "parrot/oplib/core_ops_cgp.h"
 #endif
@@ -694,24 +695,24 @@
 is_pic_param(PARROT_INTERP, ARGIN(void **pc), ARGOUT(Parrot_MIC *mic), opcode_t op)
 {
     ASSERT_ARGS(is_pic_param)
-    PMC                           *sig2;
-    Parrot_Context                *caller_ctx;
-    opcode_t                      *args;
-    PMC                    * const sig1 = (PMC *)(pc[1]);
-    const Parrot_Context   * const ctx  = CONTEXT(interp);
-    int                            type = 0;
+    PMC              *sig2;
+    PMC              *caller_ctx;
+    opcode_t         *args;
+    PMC       * const sig1 = (PMC *)(pc[1]);
+    const PMC * const ctx  = interp->ctx;
+    int               type = 0;
 
     /* check params */
 
     if (op == PARROT_OP_set_returns_pc) {
-        PMC * const ccont = ctx->current_cont;
+        PMC * const ccont = PARROT_CONTEXT(ctx)->current_cont;
         if (!PMC_cont(ccont)->address)
             return 0;
         caller_ctx = PMC_cont(ccont)->to_ctx;
-        args       = caller_ctx->current_results;
+        args       = PARROT_CONTEXT(caller_ctx)->current_results;
     }
     else {
-        caller_ctx = ctx->caller_ctx;
+        caller_ctx = PARROT_CONTEXT(ctx)->caller_ctx;
         args       = interp->current_args;
     }
 
@@ -720,7 +721,7 @@
         int          n;
 
         /* check current_args signature */
-        sig2 = caller_ctx->constants[const_nr]->u.key;
+        sig2 = PARROT_CONTEXT(caller_ctx)->constants[const_nr]->u.key;
         n    = parrot_pic_check_sig(interp, sig1, sig2, &type);
 
         if (n == -1)
@@ -799,8 +800,8 @@
     opcode_t *op, n;
     int flags;
 
-    Parrot_Context * const ctx      = CONTEXT(interp);
-    PMC            * const sig_args = (PMC *)(pc[1]);
+    Parrot_Context_attributes * const ctx      = CONTEXT(interp);
+    PMC                       * const sig_args = (PMC *)(pc[1]);
 
     ASSERT_SIG_PMC(sig_args);
     n                    = VTABLE_elements(interp, sig_args);

Modified: branches/context_pmc2/src/pic_jit.c
==============================================================================
--- branches/context_pmc2/src/pic_jit.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pic_jit.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -212,7 +212,7 @@
     const jit_arch_info * const info = Parrot_jit_init(interp);
     const jit_arch_regs * const regs = info->regs + JIT_CODE_SUB_REGS_ONLY;
     INTVAL                     *n_regs_used;
-    Parrot_sub                 *sub;
+    Parrot_Sub_attributes      *sub;
 
     PMC_get_sub(interp, sub_pmc, sub);
     n_regs_used = sub->n_regs_used;
@@ -349,7 +349,7 @@
 {
     ASSERT_ARGS(call_is_safe)
     PMC        *called, *sig_results;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
     PMC        *sig_args;
     opcode_t   *pc  = *set_args;
 
@@ -480,7 +480,7 @@
     ASSERT_ARGS(parrot_pic_is_safe_to_jit)
 #ifdef HAS_JIT
     opcode_t   *base, *start, *end;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
 
     *flags = 0;
 
@@ -549,11 +549,11 @@
     /*
      * create JIT code - just a test
      */
-    Parrot_sub        *sub;
-    opcode_t          *base;
-    opcode_t          *start;
-    opcode_t          *end;
-    Parrot_jit_info_t *jit_info;
+    Parrot_Sub_attributes *sub;
+    opcode_t              *base;
+    opcode_t              *start;
+    opcode_t              *end;
+    Parrot_jit_info_t     *jit_info;
 
     PMC_get_sub(interp, sub_pmc, sub);
     base  = sub->seg->base.data;

Modified: branches/context_pmc2/src/pmc.c
==============================================================================
--- branches/context_pmc2/src/pmc.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -19,6 +19,7 @@
 #include "parrot/parrot.h"
 #include "pmc.str"
 #include "pmc/pmc_class.h"
+#include "pmc/pmc_context.h"
 
 /* HEADERIZER HFILE: include/parrot/pmc.h */
 
@@ -242,18 +243,18 @@
     pmc->vtable = new_vtable;
 
     if (PMC_data(pmc) && pmc->vtable->attr_size) {
-#if 0
-        mem_sys_free(PMC_data(pmc));
-#else
+#if GC_USE_FIXED_SIZE_ALLOCATOR
         Parrot_gc_free_pmc_attributes(interp, pmc, pmc->vtable->attr_size);
+#else
+        mem_sys_free(PMC_data(pmc));
 #endif
     }
 
     if (new_vtable->attr_size) {
-#if 0
-        PMC_data(pmc) = mem_sys_allocate_zeroed(new_vtable->attr_size);
-#else
+#if GC_USE_FIXED_SIZE_ALLOCATOR
         Parrot_gc_allocate_pmc_attributes(interp, pmc, pmc->vtable->attr_size);
+#else
+        PMC_data(pmc) = mem_sys_allocate_zeroed(new_vtable->attr_size);
 #endif
 }
     else
@@ -380,10 +381,10 @@
     INTVAL const has_ext = (PObj_is_PMC_EXT_TEST(pmc) && pmc->pmc_ext);
 
     if (PMC_data(pmc) && pmc->vtable->attr_size) {
-#if 0
-        mem_sys_free(PMC_data(pmc));
-#else
+#if GC_USE_FIXED_SIZE_ALLOCATOR
         Parrot_gc_free_pmc_attributes(interp, pmc, pmc->vtable->attr_size);
+#else
+        mem_sys_free(PMC_data(pmc));
 #endif
     }
 
@@ -492,10 +493,10 @@
     pmc->vtable    = vtable;
 
     if (vtable->attr_size) {
-#if 0
-        PMC_data(pmc) = mem_sys_allocate_zeroed(vtable->attr_size);
-#else
+#if GC_USE_FIXED_SIZE_ALLOCATOR
         Parrot_gc_allocate_pmc_attributes(interp, pmc, pmc->vtable->attr_size);
+#else
+        PMC_data(pmc) = mem_sys_allocate_zeroed(vtable->attr_size);
 #endif
     }
 

Modified: branches/context_pmc2/src/pmc/context.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/context.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/context.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -1,6 +1,7 @@
 
 #include "parrot/packfile.h"
 
+#if 0
 /*
 
 =item C<static void clear_regs(PARROT_INTERP, Parrot_Context *ctx)>
@@ -42,6 +43,7 @@
         }
     }
 }
+#endif
 
 pmclass Context {
     ATTR PMC        *caller_ctx;      /* caller context */
@@ -71,13 +73,15 @@
 
     VTABLE void init()
     {
-        Parrot_Context_attributes * const attrs = mem_sys_allocate_typed(Parrot_Context_attributes);
-        PMC_DATA(SELF) = attrs;
+        Parrot_Context_attributes * const attrs =
+                mem_allocate_zeroed_typed(Parrot_Context_attributes);
+        PMC_data(SELF) = attrs;
     }
 
+    // XXX Probably I missed some fields.
     VTABLE void mark()
     {
-        Parrot_Context * const ctx = PARROT_CONTEXT(SELF)->ctx;
+        Parrot_Context_attributes * const ctx = PARROT_CONTEXT(SELF)->ctx;
         PObj *obj;
         int   i;
 
@@ -132,9 +136,6 @@
     VTABLE void destroy()
     {
         Parrot_Context_attributes * const attrs = PARROT_CONTEXT(SELF);
-        Parrot_Context * const ctx = attrs->ctx;
-        Parrot_free_context(INTERP, ctx);
-        mem_sys_free(ctx);
         mem_sys_free(attrs);
     }
 }

Modified: branches/context_pmc2/src/pmc/continuation.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/continuation.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/continuation.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -114,9 +114,6 @@
             }
 
 #endif
-            if (cc->from_ctx)
-                Parrot_free_context(interp, cc->from_ctx, 1);
-
             mem_sys_free(cc);
         }
     }
@@ -128,6 +125,8 @@
 
 =cut
 
+XXX Looks suspicious...
+
 */
 
     VTABLE PMC *clone() {
@@ -138,8 +137,6 @@
 
         PObj_custom_mark_destroy_SETALL(ret);
 
-        /* free ret's PMC_cont */
-        Parrot_free_context(interp, ret_cont->from_ctx, 1);
         mem_sys_free(ret_cont);
 
         cc->runloop_id = cc_self->runloop_id;
@@ -233,8 +230,8 @@
 
     VTABLE opcode_t *invoke(void *next) {
         Parrot_cont      *cc           = PMC_cont(SELF);
-        Parrot_Context   *from_ctx     = CONTEXT(interp);
-        Parrot_Context   *to_ctx       = cc->to_ctx;
+        PMC              *from_ctx     = interp->ctx;
+        PMC              *to_ctx       = cc->to_ctx;
         opcode_t         *pc           = cc->address;
         UNUSED(next)
 
@@ -243,9 +240,9 @@
 
         /* pass args to where caller wants result */
         if (cc->current_results)
-            to_ctx->current_results = cc->current_results;
+            PARROT_CONTEXT(to_ctx)->current_results = cc->current_results;
 
-        if (to_ctx->current_results && INTERP->current_args) {
+        if (PARROT_CONTEXT(to_ctx)->current_results && INTERP->current_args) {
             /*
              * the register pointer is already switched back
              * to the caller, therefore the registers of the
@@ -254,7 +251,7 @@
              * therefore we have to block GC
              */
             opcode_t *src_indexes  = interp->current_args;
-            opcode_t *dest_indexes = to_ctx->current_results;
+            opcode_t *dest_indexes = PARROT_CONTEXT(to_ctx)->current_results;
             interp->current_args   = NULL;
 
             Parrot_block_GC_mark(INTERP);
@@ -298,8 +295,8 @@
 
     METHOD caller() {
         Parrot_cont *cc     = PMC_cont(SELF);
-        PMC         *caller = cc->to_ctx->current_sub;
-        Parrot_sub  *sub;
+        PMC         *caller = PARROT_CONTEXT(cc->to_ctx)->current_sub;
+        Parrot_Sub_attributes  *sub;
 
         if (!caller)
             caller = PMCNULL;
@@ -324,7 +321,7 @@
 
     METHOD continuation() {
         Parrot_cont *cc   = PMC_cont(SELF);
-        PMC         *cont = cc->to_ctx->current_cont;
+        PMC         *cont = PARROT_CONTEXT(cc->to_ctx)->current_cont;
 
         if (cont)
             RETURN(PMC *cont);

Modified: branches/context_pmc2/src/pmc/coroutine.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/coroutine.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/coroutine.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -36,13 +36,11 @@
 print_sub_name(PARROT_INTERP, PMC *sub_pmc)
 {
     /* It's actually a Parrot_coro, but this avoids casting warnings. */
-    Parrot_sub          *co;
+    Parrot_Sub_attributes *co = PARROT_SUB(sub_pmc);
     Interp      * const tracer = (interp->pdb && interp->pdb->debugger) ?
         interp->pdb->debugger :
         interp;
 
-    GETATTR_Coroutine_sub(interp, sub_pmc, co);
-
     Parrot_io_eprintf(tracer, "# %s coro '%Ss'",
         !(PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF) ?
         "Calling" : "yielding from",
@@ -51,7 +49,7 @@
     if (co->ctx && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
         Parrot_io_eprintf(tracer, " to '%Ss'",
                 Parrot_full_sub_name(interp,
-                    co->ctx->caller_ctx->current_sub));
+                    PARROT_CONTEXT(PARROT_CONTEXT(co->ctx)->caller_ctx)->current_sub));
     }
 
     Parrot_io_eprintf(tracer, "\n# ");
@@ -59,6 +57,8 @@
 }
 
 pmclass Coroutine extends Sub need_ext {
+    ATTR PackFile_ByteCode *caller_seg;  /* bytecode segment */
+    ATTR opcode_t *address;           /* next address to run - toggled each time */
 
 /*
 
@@ -76,9 +76,10 @@
 
     VTABLE void init() {
         Parrot_Coroutine_attributes *attrs =
-            mem_allocate_typed(Parrot_Coroutine_attributes);
+            mem_allocate_zeroed_typed(Parrot_Coroutine_attributes);
 
-        attrs->sub     = (Parrot_sub *)new_coroutine(INTERP);
+        attrs->seg = INTERP->code;
+        attrs->ctx = NULL;
         PMC_data(SELF) = attrs;
 
         PObj_custom_mark_destroy_SETALL(SELF);
@@ -97,14 +98,12 @@
 
     VTABLE PMC *clone() {
         PMC         * const ret      = pmc_new(INTERP, SELF->vtable->base_type);
-        Parrot_sub         *sub;
-        Parrot_sub         *coro_sub;
+        Parrot_Coroutine_attributes *sub = PARROT_COROUTINE(SELF);
+        Parrot_Coroutine_attributes *coro_sub = PARROT_COROUTINE(ret);
 
         PObj_custom_mark_destroy_SETALL(ret);
 
-        PMC_get_sub(INTERP, ret,  coro_sub);
-        PMC_get_sub(INTERP, SELF, sub);
-        memcpy(coro_sub, sub, sizeof (Parrot_coro));
+        memcpy(coro_sub, sub, sizeof (Parrot_Coroutine_attributes));
 
         coro_sub->name      = Parrot_str_copy(INTERP, coro_sub->name);
 
@@ -123,16 +122,16 @@
 
     VTABLE opcode_t *invoke(void *next) {
         PackFile_ByteCode  *wanted_seg;
-        Parrot_Coroutine_attributes *attrs = PARROT_COROUTINE(SELF);
-        Parrot_coro * const co = (Parrot_coro *)attrs->sub;
+        Parrot_Coroutine_attributes *co = PARROT_COROUTINE(SELF);
         opcode_t    * dest     = co->address;
 
         if (Interp_trace_TEST(INTERP, PARROT_TRACE_SUB_CALL_FLAG))
             print_sub_name(INTERP, SELF);
 
         if (!co->ctx) {
-            Parrot_Context *caller_ctx;
-            Parrot_Context *ctx;
+            PMC *caller_ctx;
+            PMC *pmcctx;
+            Parrot_Context_attributes *ctx;
             PMC *ccont;
 
             ccont = INTERP->current_cont;
@@ -146,13 +145,12 @@
                         "tail call to coro not allowed");
 
             /* first time set current sub, cont, object */
-            caller_ctx = CONTEXT(interp);
-            ctx        = Parrot_set_new_context(INTERP, co->n_regs_used);
-
-            co->ctx                   = Parrot_context_ref(interp, ctx);
+            caller_ctx = interp->ctx;
+            pmcctx     = Parrot_set_new_context(INTERP, co->n_regs_used);
+            ctx        = PARROT_CONTEXT(pmcctx);
 
             ctx->caller_ctx           = caller_ctx;
-            PMC_cont(ccont)->from_ctx = ctx;
+            PMC_cont(ccont)->from_ctx = pmcctx;
             ctx->current_sub          = SELF;
             ctx->current_HLL          = co->HLL_id;
             ctx->current_namespace    = co->namespace_stash;
@@ -178,37 +176,37 @@
         /* if calling the Coro we need the segment of the Coro */
         else if (!(PObj_get_FLAGS(SELF) & SUB_FLAG_CORO_FF)) {
             PMC *ccont;
-            Parrot_Context   *ctx;
+            PMC *pmcctx;
+            Parrot_Context_attributes *ctx;
 
             PObj_get_FLAGS(SELF) |= SUB_FLAG_CORO_FF;
             wanted_seg            = co->seg;
 
             /* remember segment of caller */
             co->caller_seg        = INTERP->code;
-            ctx                   = co->ctx;
+            pmcctx                = co->ctx;
+            ctx                   = PARROT_CONTEXT(pmcctx);
 
             /* and the recent call context */
             ccont                 = ctx->current_cont;
             ctx->caller_ctx       = PMC_cont(ccont)->to_ctx
-                                  = CONTEXT(interp);
+                                  = interp->ctx;
 
             /* set context to coro context */
-            CONTEXT(interp)       = ctx;
-            INTERP->ctx.bp        = ctx->bp;
-            INTERP->ctx.bp_ps     = ctx->bp_ps;
+            interp->ctx           = pmcctx;
         }
         else {
             PMC *ccont;
-            Parrot_Context   *ctx;
+            PMC *ctx;
 
             PObj_get_FLAGS(SELF) &= ~SUB_FLAG_CORO_FF;
             /* switch back to last remembered code seg and context */
 
             wanted_seg            = co->caller_seg;
-            ccont                 = co->ctx->current_cont;
+            ccont                 = PARROT_CONTEXT(co->ctx)->current_cont;
             ctx                   = PMC_cont(ccont)->to_ctx;
 
-            if (! ctx) {
+            if (PMC_IS_NULL(ctx)) {
                 /* This still isn't quite right, but it beats segfaulting.  See
                    the "Call an exited coroutine" case in t/pmc/coroutine.t; the
                    problem is that the defunct coroutine yields up one more
@@ -218,9 +216,7 @@
                                "Cannot resume dead coroutine.");
             }
 
-            CONTEXT(interp)      = ctx;
-            INTERP->ctx.bp       = ctx->bp;
-            INTERP->ctx.bp_ps    = ctx->bp_ps;
+            interp->ctx = ctx;
         }
 
         /* toggle address */
@@ -244,8 +240,7 @@
 */
 
     VTABLE void mark() {
-        Parrot_Coroutine_attributes *attrs = PARROT_COROUTINE(SELF);
-        Parrot_coro * const          co    = (Parrot_coro *)attrs->sub;
+        Parrot_Coroutine_attributes *co = PARROT_COROUTINE(SELF);
 
         /* co->ctx marked in SUPER(), so do not mark here */
         if (co) {

Modified: branches/context_pmc2/src/pmc/eval.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/eval.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/eval.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -22,7 +22,7 @@
 #include "pmc_sub.h"
 
 static void
-clear_fixups(PARROT_INTERP, Parrot_sub *sub_data)
+clear_fixups(PARROT_INTERP, Parrot_Sub_attributes *sub_data)
 {
     INTVAL               i;
     PackFile_ByteCode   *seg = sub_data->seg;
@@ -55,11 +55,11 @@
 static PMC*
 get_sub(PARROT_INTERP, PMC *self, int idx)
 {
-    INTVAL               i, n;
-    Parrot_sub          *sub;
-    PackFile_ByteCode   *seg;
-    PackFile_FixupTable *ft;
-    PackFile_ConstTable *ct;
+    INTVAL                 i, n;
+    Parrot_Sub_attributes *sub;
+    PackFile_ByteCode     *seg;
+    PackFile_FixupTable   *ft;
+    PackFile_ConstTable   *ct;
 
     PMC_get_sub(interp, self, sub);
     seg = sub->seg;
@@ -92,7 +92,7 @@
 static void
 mark_subs(PARROT_INTERP, PMC *self)
 {
-    Parrot_sub          *sub;
+    Parrot_Sub_attributes *sub;
     PackFile_ByteCode   *seg;
     PackFile_FixupTable *ft;
     PackFile_ConstTable *ct;
@@ -128,7 +128,7 @@
 pmclass Eval extends Sub need_ext {
 
     VTABLE void init() {
-        Parrot_sub *sub_data;
+        Parrot_Sub_attributes *sub_data;
         SUPER();
 
         PMC_get_sub(INTERP, SELF, sub_data);
@@ -168,7 +168,7 @@
          */
         PackFile_Segment  *seg;
         PackFile_ByteCode *cur_cs;
-        Parrot_sub        *sub_data;
+        Parrot_Sub_attributes *sub_data;
 
         PMC_get_sub(INTERP, SELF, sub_data);
 
@@ -229,7 +229,7 @@
 */
 
     VTABLE STRING *get_string() {
-        Parrot_sub        *sub;
+        Parrot_Sub_attributes *sub;
         PackFile          *pf  = PackFile_new(INTERP, 0);
         PackFile_ByteCode *seg;
         STRING            *res;
@@ -336,7 +336,7 @@
         STRING           *packed = VTABLE_shift_string(INTERP, io);
         PackFile         *pf;
         PackFile_Segment *seg;
-        Parrot_sub       *sub;
+        Parrot_Sub_attributes *sub;
         size_t            i;
 
         SUPER(info);
@@ -371,7 +371,7 @@
 
     VTABLE INTVAL elements() {
         INTVAL               i, n;
-        Parrot_sub          *sub;
+        Parrot_Sub_attributes *sub;
         PackFile_ByteCode   *seg;
         PackFile_FixupTable *ft;
 

Modified: branches/context_pmc2/src/pmc/exception.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/exception.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/exception.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -65,8 +65,8 @@
     ATTR PMC            *backtrace;    /* The backtrace of an exception. */
     ATTR INTVAL          handled;      /* Whether the exception has been handled. */
     ATTR PMC            *handler_iter; /* An iterator of handlers (for rethrow). */
-    ATTR Parrot_Context *handler_ctx;  /* A stored context for handler iterator. */
-    ATTR Parrot_Context *thrower;      /* The position we were at when thrown. */
+    ATTR PMC            *handler_ctx;  /* A stored context for handler iterator. */
+    ATTR PMC            *thrower;      /* The position we were at when thrown. */
 
 /*
 
@@ -165,22 +165,6 @@
 
 /*
 
-=item C<void destroy()>
-
-Destroys the exception.
-
-=cut
-
-*/
-
-    VTABLE void destroy() {
-        Parrot_Exception_attributes * const core_struct = PARROT_EXCEPTION(SELF);
-        if (core_struct && core_struct->thrower)
-            Parrot_free_context(interp, core_struct->thrower, 1);
-    }
-
-/*
-
 =item C<INTVAL get_bool()>
 
 Return true.
@@ -496,10 +480,7 @@
         Parrot_Exception_attributes * const core_struct = PARROT_EXCEPTION(SELF);
 
         /* contexts are refcounted; increment and decrement appropriately */
-        if (core_struct->handler_ctx)
-            Parrot_free_context(interp, core_struct->handler_ctx, 1);
-        core_struct->handler_ctx = Parrot_context_ref(interp,
-                                       (Parrot_Context *)context);
+        core_struct->handler_ctx = (PMC *)context;
     }
 
 /*
@@ -660,11 +641,9 @@
             /* Ensure it's a ret cont, and extract the from_ctx.
              * XXX TT#596 - when we have Context PMCs, just take and set that. */
             if (VTABLE_isa(interp, value, CONST_STRING(interp, "Continuation"))) {
-                Parrot_Context *ctx = PMC_cont(value)->from_ctx;
-                if (ctx) {
-                    Parrot_context_ref(interp, ctx);
+                PMC *ctx = PMC_cont(value)->from_ctx;
+                if (!PMC_IS_NULL(ctx))
                     SET_ATTR_thrower(interp, SELF, ctx);
-                }
             }
         }
         else {
@@ -760,7 +739,7 @@
     METHOD backtrace() {
         PMC *result = pmc_new(interp, enum_class_ResizablePMCArray);
         PMC *resume;
-        Parrot_Context *cur_ctx;
+        PMC *cur_ctx;
         Parrot_cont    *cont;
 
         /* Get starting context, then loop over them. */
@@ -778,13 +757,13 @@
         }
 
         {
-            while (cur_ctx) {
+            while (!PMC_IS_NULL(cur_ctx)) {
                 PMC        *frame       = pmc_new(interp, enum_class_Hash);
                 PMC        *annotations = NULL;
-                Parrot_sub *sub;
+                Parrot_Sub_attributes *sub;
 
                 /* Get sub and put it in the hash. */
-                PMC *sub_pmc = cur_ctx->current_sub;
+                PMC *sub_pmc = PARROT_CONTEXT(cur_ctx)->current_sub;
 
                 if (!sub_pmc)
                     sub_pmc = PMCNULL;
@@ -799,7 +778,7 @@
                         PackFile_ByteCode *seg = sub->seg;
                         opcode_t          *pc  = cont && cur_ctx == cont->to_ctx
                                                ? cont->address
-                                               : cur_ctx->current_pc;
+                                               : PARROT_CONTEXT(cur_ctx)->current_pc;
 
                         annotations = PackFile_Annotations_lookup(interp,
                                         seg->annotations, pc - seg->base.data,
@@ -814,7 +793,7 @@
 
                 /* Push frame and go to next caller. */
                 VTABLE_push_pmc(interp, result, frame);
-                cur_ctx = cur_ctx->caller_ctx;
+                cur_ctx = PARROT_CONTEXT(cur_ctx)->caller_ctx;
             }
         }
 

Modified: branches/context_pmc2/src/pmc/lexpad.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/lexpad.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/lexpad.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -27,8 +27,8 @@
  */
 
 pmclass LexPad provides hash no_ro auto_attrs {
-    ATTR PMC                   *lexinfo;
-    ATTR struct Parrot_Context *ctx;
+    ATTR PMC *lexinfo;
+    ATTR PMC *ctx;
 
     VTABLE void init() {
         Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
@@ -82,7 +82,7 @@
     }
 
     VTABLE void set_pointer(void *ctx) {
-        SET_ATTR_ctx(INTERP, SELF, (struct Parrot_Context *)ctx);
+        SET_ATTR_ctx(INTERP, SELF, (struct PMC *)ctx);
     }
 
     VTABLE INTVAL elements() {
@@ -107,7 +107,7 @@
     VTABLE PMC *get_pmc_keyed_str(STRING *name) {
         PMC              * info;
         Hash             * hash;
-        Parrot_Context   * ctx;
+        PMC              * ctx;
         HashBucket       * b;
         INTVAL            regno;
 
@@ -121,7 +121,7 @@
 
         regno = (INTVAL) b->value;
 
-        return CTX_REG_PMC(ctx, regno);
+        return PMCCTX_REG_PMC(ctx, regno);
     }
 
     VTABLE PMC *get_pmc_keyed(PMC *name) {
@@ -132,7 +132,7 @@
     VTABLE void set_pmc_keyed_str(STRING *name, PMC *value) {
         PMC              * info;
         Hash             * hash;
-        Parrot_Context   * ctx;
+        PMC              * ctx;
         HashBucket       * b;
         INTVAL             regno;
 
@@ -145,8 +145,8 @@
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LEX_NOT_FOUND,
                 "Lexical '%Ss' not found", name);
 
-        regno                   = (INTVAL) b->value;
-        CTX_REG_PMC(ctx, regno) = value;
+        regno                      = (INTVAL) b->value;
+        PMCCTX_REG_PMC(ctx, regno) = value;
     }
 
     VTABLE void set_pmc_keyed(PMC *name, PMC *value) {

Modified: branches/context_pmc2/src/pmc/namespace.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/namespace.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/namespace.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -50,7 +50,7 @@
     PMC              *       vtable   = nsinfo->vtable;
     PMC              * const classobj = VTABLE_get_class(interp, self);
     STRING           * vtable_key     = NULL;
-    Parrot_sub              *sub;
+    Parrot_Sub_attributes *sub;
 
     PMC_get_sub(interp, value, sub);
 
@@ -276,7 +276,7 @@
 
                 /* Extract the first alternate and check if it is a method */
                 PMC *pmc_sub = VTABLE_get_pmc_keyed_int(interp, value, 0);
-                Parrot_sub *sub;
+                Parrot_Sub_attributes *sub;
                 PMC_get_sub(INTERP, pmc_sub, sub);
 
                 if (sub->comp_flags & SUB_COMP_FLAG_METHOD) {

Modified: branches/context_pmc2/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/parrotinterpreter.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/parrotinterpreter.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -450,7 +450,7 @@
         STRING *s     = CONST_STRING(interp, "globals");
         int     level = 0;
 
-        Parrot_Context *ctx;
+        Parrot_Context_attributes *ctx;
 
         if (Parrot_str_equal(interp, item, s))
             return interp->root_namespace;
@@ -482,7 +482,7 @@
 
         if (outer) {
             for (; level; --level) {
-                ctx = ctx->outer_ctx;
+                ctx = PARROT_CONTEXT(ctx->outer_ctx);
                 if (!ctx)
                     Parrot_ex_throw_from_c_args(interp, NULL,
                         CONTROL_ERROR, "No such outer depth");
@@ -496,7 +496,7 @@
                     Parrot_ex_throw_from_c_args(interp, NULL,
                         CONTROL_ERROR, "No such caller depth");
 
-                ctx = PMC_cont(cont)->to_ctx;
+                ctx = PARROT_CONTEXT(PMC_cont(cont)->to_ctx);
 
                 if (!ctx->current_sub)
                     Parrot_ex_throw_from_c_args(interp, NULL,
@@ -540,9 +540,9 @@
             }
             if (!PMC_IS_NULL(sub_pmc)
             &&   sub_pmc->vtable->base_type == enum_class_Sub) {
-                Parrot_sub        *sub;
-                PackFile_ByteCode *seg;
-                opcode_t          *pc  = ctx->current_pc;
+                Parrot_Sub_attributes *sub;
+                PackFile_ByteCode     *seg;
+                opcode_t              *pc  = ctx->current_pc;
 
                 PMC_get_sub(interp, sub_pmc, sub);
                 seg = sub->seg;

Modified: branches/context_pmc2/src/pmc/retcontinuation.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/retcontinuation.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/retcontinuation.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -82,14 +82,13 @@
 
     VTABLE opcode_t *invoke(void *in_next) {
         Parrot_cont       *cc         = PMC_cont(SELF);
-        Parrot_Context    *from_ctx   = cc->from_ctx;
+        PMC               *from_ctx   = cc->from_ctx;
         PackFile_ByteCode * const seg = cc->seg;
         opcode_t          *next       = cc->address;
         UNUSED(in_next)
 
         Parrot_continuation_check(interp, SELF, cc);
         Parrot_continuation_rewind_environment(interp, SELF, cc);
-        Parrot_free_context(INTERP, from_ctx, 1);
 
         /* the continuation is dead - delete and destroy it */
         /* This line causes a failure in t/pmc/packfiledirectory.t. No idea

Modified: branches/context_pmc2/src/pmc/sub.pmc
==============================================================================
--- branches/context_pmc2/src/pmc/sub.pmc	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/pmc/sub.pmc	Wed Aug 19 22:53:55 2009	(r40665)
@@ -40,7 +40,33 @@
  * effectively a container. Therefore need_ext has to be set
  */
 pmclass Sub need_ext {
-    ATTR struct Parrot_sub * sub; /* the Parrot sub structure */
+    ATTR PackFile_ByteCode *seg;     /* bytecode segment */
+    ATTR size_t   start_offs;        /* sub entry in ops from seg->base.data */
+    ATTR size_t   end_offs;
+
+    ATTR INTVAL   HLL_id;             /* see src/hll.c XXX or per segment? */
+    ATTR PMC      *namespace_name;    /* where this Sub is in - this is either
+                                  * a String or a [Key] and describes
+                                  * the relative path in the NameSpace
+                                  */
+    ATTR PMC      *namespace_stash;   /* the actual hash, HLL::namespace */
+    ATTR STRING   *name;              /* name of the sub */
+    ATTR STRING   *method_name;       /* method name of the sub */
+    ATTR STRING   *ns_entry_name;     /* ns entry name of the sub */
+    ATTR STRING   *subid;             /* The ID of the sub. */
+    ATTR INTVAL   vtable_index;       /* index in Parrot_vtable_slot_names */
+    ATTR PMC      *multi_signature;   /* list of types for MMD */
+    ATTR INTVAL   n_regs_used[4];     /* INSP in PBC */
+
+    ATTR PMC      *lex_info;          /* LexInfo PMC */
+    ATTR PMC      *outer_sub;         /* :outer for closures */
+    ATTR PMC      *eval_pmc;          /* eval container / NULL */
+    ATTR PMC      *ctx;               /* the context this sub is in */
+    ATTR UINTVAL  comp_flags;         /* compile time and additional flags */
+    ATTR Parrot_sub_arginfo *arg_info;/* Argument counts and flags. */
+
+    /* - end common */
+    ATTR PMC      *outer_ctx;         /* outer context, if a closure */
 
 /*
 
@@ -68,9 +94,10 @@
      */
     VTABLE void init() {
         Parrot_Sub_attributes * const attrs =
-            mem_allocate_typed(Parrot_Sub_attributes);
+            mem_allocate_zeroed_typed(Parrot_Sub_attributes);
+
+        attrs->seg = INTERP->code;
 
-        attrs->sub     = new_sub(INTERP);
         PMC_data(SELF) = attrs;
         PObj_custom_mark_destroy_SETALL(SELF);
     }
@@ -86,21 +113,15 @@
 */
 
     VTABLE void destroy() {
-        Parrot_sub *sub;
-        GET_ATTR_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
 
         if (sub) {
             if (sub->arg_info)
                 mem_sys_free(sub->arg_info);
-            if (sub->ctx)
-                Parrot_free_context(INTERP, sub->ctx, 1);
-            if (sub->outer_ctx)
-                Parrot_free_context(INTERP, sub->outer_ctx, 1);
 
             mem_sys_free(sub);
         }
 
-        mem_sys_free(PMC_data(SELF));
         PMC_data(SELF) = NULL;
     }
 
@@ -119,8 +140,7 @@
 */
 
     VTABLE STRING *get_string() {
-        Parrot_sub *sub;
-        PMC_get_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
 
         if (sub->name)
             return Parrot_str_copy(INTERP, sub->name);
@@ -129,8 +149,7 @@
     }
 
     VTABLE void set_string_native(STRING *subname) {
-        Parrot_sub *sub;
-        PMC_get_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         sub->name = Parrot_str_copy(INTERP, subname);
     }
 
@@ -163,8 +182,7 @@
 */
 
     VTABLE void *get_pointer() {
-        Parrot_sub *sub;
-        PMC_get_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         return sub->seg->base.data + sub->start_offs;
     }
 
@@ -181,10 +199,9 @@
 */
 
     VTABLE INTVAL get_integer_keyed(PMC *key) {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         UNUSED(key)
 
-        PMC_get_sub(INTERP, SELF, sub);
         return (INTVAL) (sub->seg->base.data);
     }
 
@@ -219,9 +236,9 @@
 */
 
     VTABLE opcode_t *invoke(void *next) {
-        Parrot_sub     *sub;
-        Parrot_Context *caller_ctx;
-        Parrot_Context *context;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
+        PMC            *caller_ctx;
+        PMC            *context;
         PMC            *ccont;
         opcode_t       *pc;
 
@@ -252,7 +269,7 @@
          *
          */
         pc                   = sub->seg->base.data + sub->start_offs;
-        caller_ctx           = CONTEXT(interp);
+        caller_ctx           = interp->ctx;
         ccont                = INTERP->current_cont;
         INTERP->current_cont = NULL;
 
@@ -263,14 +280,14 @@
 
         /* plain subroutine call
          * create new context, place it in interpreter */
-        context               = Parrot_set_new_context(INTERP, sub->n_regs_used);
-        context->current_sub  = SELF;
-        context->caller_ctx   = caller_ctx;
-        context->current_pc   = pc;
-        context->current_cont = ccont;
+        context                               = Parrot_set_new_context(INTERP, sub->n_regs_used);
+        PARROT_CONTEXT(context)->current_sub  = SELF;
+        PARROT_CONTEXT(context)->caller_ctx   = caller_ctx;
+        PARROT_CONTEXT(context)->current_pc   = pc;
+        PARROT_CONTEXT(context)->current_cont = ccont;
 
         /* check recursion/call depth */
-        if (++context->recursion_depth > INTERP->recursion_limit)
+        if (++PARROT_CONTEXT(context)->recursion_depth > INTERP->recursion_limit)
             Parrot_ex_throw_from_c_args(INTERP, next, CONTROL_ERROR,
                     "maximum recursion depth exceeded");
 
@@ -281,76 +298,69 @@
          * to the new context (refcounted) and convert the
          * retcontinuation to a normal continuation.  */
         if (PObj_get_FLAGS(SELF) & SUB_FLAG_IS_OUTER) {
-            /* release any previously held context */
-            if (sub->ctx)
-                Parrot_free_context(interp, sub->ctx, 1);
-            sub->ctx = Parrot_context_ref(interp, context);
+            sub->ctx = context;
             /* convert retcontinuation to a continuation */
             ccont->vtable = interp->vtables[enum_class_Continuation];
         }
 
-        /* reference counting should work */
-        Parrot_context_ref(interp, context);
-
         if (!PMC_IS_NULL(INTERP->current_object)) {
-            context->current_object = INTERP->current_object;
+            PARROT_CONTEXT(context)->current_object = INTERP->current_object;
             INTERP->current_object  = NULL;
         }
 
-        context->current_HLL       = sub->HLL_id;
-        context->current_namespace = sub->namespace_stash;
+        PARROT_CONTEXT(context)->current_HLL       = sub->HLL_id;
+        PARROT_CONTEXT(context)->current_namespace = sub->namespace_stash;
 
         /* create pad if needed
          * TODO move this up in front of argument passing
          *      and factor out common code with coroutine pmc
          */
         if (!PMC_IS_NULL(sub->lex_info)) {
-            context->lex_pad = pmc_new_init(INTERP,
+            PARROT_CONTEXT(context)->lex_pad = pmc_new_init(INTERP,
                     Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
                     sub->lex_info);
-            VTABLE_set_pointer(INTERP, context->lex_pad, context);
+            VTABLE_set_pointer(INTERP, PARROT_CONTEXT(context)->lex_pad, context);
         }
 
         if (sub->outer_ctx) {
             /* set outer context */
-            context->outer_ctx = Parrot_context_ref(interp, sub->outer_ctx);
+            PARROT_CONTEXT(context)->outer_ctx = sub->outer_ctx;
         }
         else {
             /* autoclose */
-            Parrot_Context *c;
-            for (c = context; !c->outer_ctx; c = c->outer_ctx) {
+            PMC *c;
+            for (c = context; !PARROT_CONTEXT(c)->outer_ctx; c = PARROT_CONTEXT(c)->outer_ctx) {
 
                 PMC         *outer_pmc;
-                Parrot_sub  *current_sub, *outer_sub;
+                Parrot_Sub_attributes *current_sub, *outer_sub;
 
-                PMC_get_sub(INTERP, c->current_sub, current_sub);
+                current_sub = PARROT_SUB(PARROT_CONTEXT(c)->current_sub);
                 outer_pmc   = current_sub->outer_sub;
 
                 if (PMC_IS_NULL(outer_pmc))
                     break;
 
-                PMC_get_sub(INTERP, outer_pmc, outer_sub);
+                outer_sub = PARROT_SUB(outer_pmc);
 
                 if (!outer_sub->ctx) {
-                    Parrot_Context * const dummy = Parrot_alloc_context(INTERP,
+                    PMC * const dummy = Parrot_alloc_context(INTERP,
                                                 outer_sub->n_regs_used, NULL);
-                    dummy->current_sub    = outer_pmc;
+                    PARROT_CONTEXT(dummy)->current_sub    = outer_pmc;
 
                     if (!PMC_IS_NULL(outer_sub->lex_info)) {
-                        dummy->lex_pad = pmc_new_init(INTERP,
+                        PARROT_CONTEXT(dummy)->lex_pad = pmc_new_init(INTERP,
                                Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
                                outer_sub->lex_info);
-                        VTABLE_set_pointer(INTERP, dummy->lex_pad, dummy);
+                        VTABLE_set_pointer(INTERP, PARROT_CONTEXT(dummy)->lex_pad, dummy);
                     }
 
                     if (outer_sub->outer_ctx) {
-                        dummy->outer_ctx = Parrot_context_ref(interp,
-                                               outer_sub->outer_ctx);
+                        PARROT_CONTEXT(dummy)->outer_ctx = outer_sub->outer_ctx;
                     }
-                    outer_sub->ctx = Parrot_context_ref(interp, dummy);
+                    outer_sub->ctx = dummy;
                 }
 
-                c->outer_ctx = Parrot_context_ref(interp, outer_sub->ctx);
+                PARROT_CONTEXT(c)->outer_ctx = outer_sub->ctx;
             }
         }
 
@@ -364,12 +374,11 @@
             &&     pc[2] == PARROT_OP_get_params_pc))) {
 
                 /* TODO keep it or resize it */
-                --context->recursion_depth;
+                --PARROT_CONTEXT(context)->recursion_depth;
 
                 PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
-                context->caller_ctx    = caller_ctx->caller_ctx;
-
-                Parrot_free_context(INTERP, caller_ctx, 1);
+                PARROT_CONTEXT(context)->caller_ctx =
+                        PARROT_CONTEXT(caller_ctx)->caller_ctx;
             }
         }
 
@@ -388,21 +397,14 @@
 
     VTABLE PMC *clone() {
         PMC        * const ret = pmc_new(INTERP, SELF->vtable->base_type);
-        Parrot_sub *dest_sub;
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *dest_sub = PARROT_SUB(SELF);
+        Parrot_Sub_attributes *sub;
 
+        /* XXX Why? */
         /* we have to mark it ourselves */
         PObj_custom_mark_destroy_SETALL(ret);
 
-        PMC_get_sub(INTERP, ret, sub);
-
-        /* release any previously held contexts */
-        if (sub->ctx)
-            Parrot_free_context(INTERP, sub->ctx, 1);
-        if (sub->outer_ctx)
-            Parrot_free_context(INTERP, sub->outer_ctx, 1);
-
-        PMC_get_sub(INTERP, SELF, dest_sub);
+        sub = PARROT_SUB(ret);
 
         /* first set the sub struct, Parrot_str_copy may cause GC */
         *sub = *dest_sub;
@@ -413,12 +415,6 @@
         /* Be sure not to share arg_info. */
         dest_sub->arg_info = NULL;
 
-        /* mark any newly held contexts */
-        if (sub->ctx)
-            Parrot_context_ref(INTERP, sub->ctx);
-        if (sub->outer_ctx)
-            Parrot_context_ref(INTERP, sub->outer_ctx);
-
         return ret;
     }
 
@@ -439,22 +435,11 @@
     VTABLE void assign_pmc(PMC *other) {
         /* only handle the case where the other PMC is the same type */
         if (other->vtable->base_type == SELF->vtable->base_type) {
-            Parrot_sub *my_sub;
-            Parrot_sub *other_sub;
-            PMC_get_sub(INTERP, SELF, my_sub);
-            PMC_get_sub(INTERP, other, other_sub);
-
-            /* Increase reference count of destination before
-             * freeing the one in self, to avoid problems in
-             * case of self assignment */
-            if (other_sub->ctx)
-                Parrot_context_ref(interp, other_sub->ctx);
-            /* get rid of this context, if attached */
-            if (my_sub->ctx)
-                Parrot_free_context(INTERP, my_sub->ctx, 1);
+            Parrot_Sub_attributes *my_sub = PARROT_SUB(SELF);
+            Parrot_Sub_attributes *other_sub = PARROT_SUB(other);
 
             /* copy the sub struct */
-            memmove(my_sub, other_sub, sizeof (Parrot_sub));
+            memmove(my_sub, other_sub, sizeof (Parrot_Sub_attributes));
 
             /* copy the name so it's a different string in memory */
             if (my_sub->name)
@@ -477,8 +462,7 @@
 */
 
     VTABLE void mark() {
-        Parrot_sub *sub;
-        PMC_get_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
 
         if (!sub)
             return;
@@ -520,10 +504,8 @@
 */
 
     MULTI INTVAL is_equal(PMC *value) {
-        Parrot_sub *my_sub, *value_sub;
-
-        PMC_get_sub(INTERP, SELF, my_sub);
-        PMC_get_sub(INTERP, value, value_sub);
+        Parrot_Sub_attributes *my_sub = PARROT_SUB(SELF);
+        Parrot_Sub_attributes *value_sub = PARROT_SUB(value);
 
         return SELF->vtable         == value->vtable
         &&     (my_sub)->start_offs == (value_sub)->start_offs
@@ -545,7 +527,7 @@
 */
 
     VTABLE void visit(visit_info *info) {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub;
 
         PMC_get_sub(INTERP, SELF, sub);
 
@@ -573,12 +555,10 @@
 
     VTABLE void freeze(visit_info *info) {
         IMAGE_IO   * const io  = info->image_io;
-        Parrot_sub        *sub;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         STRING            *hll_name;
         int i;
 
-        PMC_get_sub(INTERP, SELF, sub);
-
         SUPER(info);
         /*
          * we currently need to write these items:
@@ -644,7 +624,7 @@
         SUPER(info);
 
         if (info->extra_flags == EXTRA_IS_NULL) {
-            Parrot_sub *sub;
+            Parrot_Sub_attributes *sub;
             INTVAL flags;
             int    i;
 
@@ -756,11 +736,9 @@
 
     VTABLE PMC *inspect_str(STRING *what)
     {
-        Parrot_sub *sub;
-        PMC        *retval;
-        INTVAL      count_found = -1;
-
-        PMC_get_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
+        PMC                   *retval;
+        INTVAL                 count_found = -1;
 
         /* If the argument info hasn't been generated yet, generate it. */
         if (!sub->arg_info) {
@@ -882,11 +860,8 @@
 */
 
     METHOD get_namespace() {
-        Parrot_sub *sub;
-        PMC *_namespace;
-
-        PMC_get_sub(INTERP, SELF, sub);
-        _namespace = sub->namespace_stash;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
+        PMC *_namespace = sub->namespace_stash;
         RETURN(PMC *_namespace);
     }
 
@@ -896,11 +871,9 @@
          * see also imcc/reg_alloc.c */
         static const char types[] = "INSP";
         char *p;
-        Parrot_sub         *sub;
-        char       * const kind = Parrot_str_to_cstring(interp, reg);
-        INTVAL             regs_used;
-
-        PMC_get_sub(INTERP, SELF, sub);
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
+        char          * const kind = Parrot_str_to_cstring(interp, reg);
+        INTVAL                regs_used;
 
         PARROT_ASSERT(sub->n_regs_used);
 
@@ -922,37 +895,34 @@
     }
 
     METHOD get_lexinfo() {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         PMC        *lexinfo;
 
-        PMC_get_sub(INTERP, SELF, sub);
         lexinfo = sub->lex_info ? sub->lex_info : PMCNULL;
         RETURN(PMC *lexinfo);
     }
 
     METHOD get_subid() {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         STRING     *subid;
 
-        PMC_get_sub(INTERP, SELF, sub);
         subid = sub->subid ? sub->subid : CONST_STRING(interp, "");
         RETURN(STRING *subid);
     }
 
     METHOD get_outer() {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         PMC        *outersub;
 
-        PMC_get_sub(INTERP, SELF, sub);
         outersub = sub->outer_sub ? sub->outer_sub : PMCNULL;
         RETURN(PMC *outersub);
     }
 
     METHOD set_outer(PMC *outer) {
         /* Set outer sub. */
-        Parrot_sub *sub;
+        Parrot_Sub_attributes     *sub = PARROT_SUB(SELF);
+        PMC                       *ctx;
 
-        PMC_get_sub(INTERP, SELF, sub);
         sub->outer_sub = outer;
 
         /* Make sure outer flag of that sub is set. */
@@ -967,17 +937,17 @@
 
         /* If we've got a context around for the outer sub, set it as the
          * outer context. */
-        if (CONTEXT(interp)->caller_ctx->caller_ctx->current_sub == outer)
-            sub->outer_ctx = Parrot_context_ref(interp, CONTEXT(interp)->caller_ctx->caller_ctx);
-        else if (CONTEXT(interp)->caller_ctx->current_sub == outer)
-            sub->outer_ctx = Parrot_context_ref(interp, CONTEXT(interp)->caller_ctx);
+        ctx = PARROT_CONTEXT(CONTEXT(interp)->caller_ctx)->caller_ctx;
+        if (PARROT_CONTEXT(ctx)->current_sub == outer)
+            sub->outer_ctx = ctx;
+        else if (PARROT_CONTEXT(CONTEXT(interp)->caller_ctx)->current_sub == outer)
+            sub->outer_ctx = CONTEXT(interp)->caller_ctx;
     }
 
     METHOD get_multisig() {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub = PARROT_SUB(SELF);
         PMC        *multisig;
 
-        PMC_get_sub(INTERP, SELF, sub);
         multisig = sub->multi_signature ? sub->multi_signature : PMCNULL;
         RETURN(PMC *multisig);
     }

Modified: branches/context_pmc2/src/runcore/cores.c
==============================================================================
--- branches/context_pmc2/src/runcore/cores.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/runcore/cores.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -241,6 +241,7 @@
 #include "parrot/runcore_api.h"
 #include "parrot/embed.h"
 #include "parrot/runcore_trace.h"
+#include "../pmc/pmc_context.h"
 
 #ifdef HAVE_COMPUTED_GOTO
 #  include "parrot/oplib/core_ops_cg.h"

Modified: branches/context_pmc2/src/runcore/main.c
==============================================================================
--- branches/context_pmc2/src/runcore/main.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/runcore/main.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -47,6 +47,7 @@
 #endif
 #include "parrot/dynext.h"
 #include "../pmc/pmc_parrotlibrary.h"
+#include "../pmc/pmc_context.h"
 
 
 /* HEADERIZER HFILE: include/parrot/runcore_api.h */

Modified: branches/context_pmc2/src/runcore/trace.c
==============================================================================
--- branches/context_pmc2/src/runcore/trace.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/runcore/trace.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -105,7 +105,7 @@
 {
     ASSERT_ARGS(trace_pmc_dump)
     Interp * const debugger = debugger_or_interp(interp);
-    Parrot_sub    *sub;
+    Parrot_Sub_attributes    *sub;
 
     if (!pmc) {
         Parrot_io_eprintf(debugger, "(null)");

Modified: branches/context_pmc2/src/scheduler.c
==============================================================================
--- branches/context_pmc2/src/scheduler.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/scheduler.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -22,6 +22,7 @@
 #include "pmc/pmc_scheduler.h"
 #include "pmc/pmc_task.h"
 #include "pmc/pmc_timer.h"
+#include "pmc/pmc_context.h"
 
 #include "scheduler.str"
 
@@ -849,9 +850,9 @@
      * for a handler
      */
     static int already_doing = 0;
-    static Parrot_Context * keep_context = NULL;
+    static Parrot_Context_attributes *keep_context = NULL;
+    Parrot_Context_attributes        *context;
 
-    Parrot_Context *context;
     PMC            *iter        = PMCNULL;
     STRING * const  handled_str = CONST_STRING(interp, "handled");
     STRING * const  iter_str    = CONST_STRING(interp, "handler_iter");
@@ -865,7 +866,7 @@
          * Note that we are now trying to handle the new exception,
          * not the initial task argument (exception or whatever).
          */
-        context = keep_context->caller_ctx;
+        context = PARROT_CONTEXT(keep_context->caller_ctx);
         keep_context = NULL;
         if (context && !PMC_IS_NULL(context->handlers))
             iter = VTABLE_get_iter(interp, context->handlers);
@@ -881,7 +882,7 @@
     if (task->vtable->base_type == enum_class_Exception
     && VTABLE_get_integer_keyed_str(interp, task, handled_str) == -1) {
         iter    = VTABLE_get_attr_str(interp, task, iter_str);
-        context = (Parrot_Context *)VTABLE_get_pointer(interp, task);
+        context = PARROT_CONTEXT((PMC*)VTABLE_get_pointer(interp, task));
     }
     else {
         context = CONTEXT(interp);
@@ -916,7 +917,7 @@
         }
 
         /* Continue the search in the next context up the chain. */
-        context = context->caller_ctx;
+        context = PARROT_CONTEXT(context->caller_ctx);
         if (context && !PMC_IS_NULL(context->handlers))
             iter = VTABLE_get_iter(interp, context->handlers);
         else

Modified: branches/context_pmc2/src/sub.c
==============================================================================
--- branches/context_pmc2/src/sub.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/sub.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -23,33 +23,12 @@
 #include "sub.str"
 #include "pmc/pmc_sub.h"
 #include "pmc/pmc_continuation.h"
+#include "pmc/pmc_context.h"
 
 /* HEADERIZER HFILE: include/parrot/sub.h */
 
 /*
 
-=item C<Parrot_sub * new_sub(PARROT_INTERP)>
-
-Returns a new C<Parrot_sub>.
-
-=cut
-
-*/
-
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-Parrot_sub *
-new_sub(PARROT_INTERP)
-{
-    ASSERT_ARGS(new_sub)
-    /* Using system memory until I figure out GC issues */
-    Parrot_sub * const newsub = mem_allocate_zeroed_typed(Parrot_sub);
-    newsub->seg               = interp->code;
-    return newsub;
-}
-
-/*
-
 =item C<Parrot_cont * new_continuation(PARROT_INTERP, const Parrot_cont *to)>
 
 Returns a new C<Parrot_cont> to the context of C<to> with its own copy of the
@@ -67,10 +46,9 @@
 {
     ASSERT_ARGS(new_continuation)
     Parrot_cont    * const cc     = mem_allocate_typed(Parrot_cont);
-    Parrot_Context * const to_ctx = to ? to->to_ctx : CONTEXT(interp);
+    PMC            * const to_ctx = to ? to->to_ctx : interp->ctx;
 
     cc->to_ctx        = to_ctx;
-    cc->from_ctx      = Parrot_context_ref(interp, CONTEXT(interp));
     cc->runloop_id    = 0;
     if (to) {
         cc->seg       = to->seg;
@@ -81,7 +59,7 @@
         cc->address   = NULL;
     }
 
-    cc->current_results = to_ctx->current_results;
+    cc->current_results = PARROT_CONTEXT(to_ctx)->current_results;
     return cc;
 }
 
@@ -103,8 +81,8 @@
     ASSERT_ARGS(new_ret_continuation)
     Parrot_cont * const cc = mem_allocate_typed(Parrot_cont);
 
-    cc->to_ctx          = CONTEXT(interp);
-    cc->from_ctx        = CONTEXT(interp);    /* filled in during a call */
+    cc->to_ctx          = interp->ctx;
+    cc->from_ctx        = interp->ctx;    /* filled in during a call */
     cc->runloop_id      = 0;
     cc->seg             = interp->code;
     cc->current_results = NULL;
@@ -114,32 +92,6 @@
 
 /*
 
-=item C<Parrot_coro * new_coroutine(PARROT_INTERP)>
-
-Returns a new C<Parrot_coro>.
-
-XXX: Need to document semantics in detail.
-
-=cut
-
-*/
-
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-Parrot_coro *
-new_coroutine(PARROT_INTERP)
-{
-    ASSERT_ARGS(new_coroutine)
-    Parrot_coro * const co = mem_allocate_zeroed_typed(Parrot_coro);
-
-    co->seg                = interp->code;
-    co->ctx                = NULL;
-
-    return co;
-}
-
-/*
-
 =item C<PMC * new_ret_continuation_pmc(PARROT_INTERP, opcode_t *address)>
 
 Returns a new C<RetContinuation> PMC. Uses one from the cache,
@@ -175,10 +127,9 @@
 invalidate_retc_context(PARROT_INTERP, ARGMOD(PMC *cont))
 {
     ASSERT_ARGS(invalidate_retc_context)
-    Parrot_Context *ctx = PMC_cont(cont)->from_ctx;
-    cont = ctx->current_cont;
+    PMC *ctx = PMC_cont(cont)->from_ctx;
+    cont = PARROT_CONTEXT(ctx)->current_cont;
 
-    Parrot_set_context_threshold(interp, ctx);
     while (1) {
         /*
          * We  stop if we encounter a true continuation, because
@@ -188,9 +139,8 @@
         if (!cont || cont->vtable != interp->vtables[enum_class_RetContinuation])
             break;
         cont->vtable = interp->vtables[enum_class_Continuation];
-        Parrot_context_ref(interp, ctx);
-        ctx  = ctx->caller_ctx;
-        cont = ctx->current_cont;
+        ctx  = PARROT_CONTEXT(ctx)->caller_ctx;
+        cont = PARROT_CONTEXT(ctx)->current_cont;
     }
 
 }
@@ -213,7 +163,7 @@
 {
     ASSERT_ARGS(Parrot_full_sub_name)
     if (sub_pmc && VTABLE_defined(interp, sub_pmc)) {
-        Parrot_sub *sub;
+        Parrot_Sub_attributes *sub;
 
         PMC_get_sub(interp, sub_pmc, sub);
 
@@ -282,8 +232,8 @@
                     ARGOUT(Parrot_Context_info *info))
 {
     ASSERT_ARGS(Parrot_Context_get_info)
-    Parrot_sub *sub;
     Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+    Parrot_Sub_attributes     *sub;
 
     /* set file/line/pc defaults */
     info->file     = CONST_STRING(interp, "(unknown file)");
@@ -383,7 +333,7 @@
 
     /* XXX Why block GC here? */
     Parrot_block_GC_mark(interp);
-    if (Parrot_Context_get_info(interp, ctx, &info)) {
+    if (Parrot_Context_get_info(interp, pmcctx, &info)) {
 
         res = Parrot_sprintf_c(interp,
             "%s '%Ss' pc %d (%Ss:%d)", msg,
@@ -424,7 +374,7 @@
                 return lex_pad;
 
 #if CTX_LEAK_DEBUG
-        if (outer == ctx) {
+        if (outer == pmcctx) {
             /* This is a bug; a context can never be its own :outer context.
              * Detecting it avoids an unbounded loop, which is difficult to
              * debug, though we'd rather not pay the cost of detection in a
@@ -453,12 +403,11 @@
 Parrot_capture_lex(PARROT_INTERP, ARGMOD(PMC *sub_pmc))
 {
     ASSERT_ARGS(Parrot_capture_lex)
-    Parrot_Context * const ctx          = CONTEXT(interp);
-    Parrot_sub            *current_sub;
-    Parrot_sub            *sub;
-    Parrot_Context        *old;
+    PMC            * const ctx          = interp->ctx;
+    Parrot_Sub_attributes *current_sub;
+    Parrot_Sub_attributes *sub;
 
-    PMC_get_sub(interp, ctx->current_sub, current_sub);
+    PMC_get_sub(interp, PARROT_CONTEXT(ctx)->current_sub, current_sub);
 
     /* MultiSub gets special treatment */
     if (VTABLE_isa(interp, sub_pmc, CONST_STRING(interp, "MultiSub"))) {
@@ -468,7 +417,7 @@
         while (VTABLE_get_bool(interp, iter)) {
 
             PMC        * const child_pmc = VTABLE_shift_pmc(interp, iter);
-            Parrot_sub        *child_sub, *child_outer_sub;
+            Parrot_Sub_attributes *child_sub, *child_outer_sub;
 
             PMC_get_sub(interp, child_pmc, child_sub);
 
@@ -476,10 +425,7 @@
                 PMC_get_sub(interp, child_sub->outer_sub, child_outer_sub);
                 if (Parrot_str_equal(interp, current_sub->subid,
                                       child_outer_sub->subid)) {
-                    old = child_sub->outer_ctx;
-                    child_sub->outer_ctx = Parrot_context_ref(interp, ctx);
-                    if (old)
-                        Parrot_free_context(interp, old, 1);
+                    child_sub->outer_ctx = ctx;
                 }
             }
         }
@@ -504,10 +450,7 @@
 #endif
 
     /* set the sub's outer context to the current context */
-    old = sub->outer_ctx;
-    sub->outer_ctx = Parrot_context_ref(interp, ctx);
-    if (old)
-        Parrot_free_context(interp, old, 1);
+    sub->outer_ctx = ctx;
 }
 
 
@@ -555,16 +498,16 @@
     ARGIN(const Parrot_cont *cc))
 {
     ASSERT_ARGS(Parrot_continuation_check)
-    Parrot_Context *to_ctx       = cc->to_ctx;
-    Parrot_Context *from_ctx     = CONTEXT(interp);
+    PMC *to_ctx       = cc->to_ctx;
+    PMC *from_ctx     = interp->ctx;
 
 #if CTX_LEAK_DEBUG
     if (Interp_debug_TEST(interp, PARROT_CTX_DESTROY_DEBUG_FLAG))
         fprintf(stderr,
-                "[invoke cont    %p, to_ctx %p, from_ctx %p (refs %d)]\n",
-                (const void *)pmc, (void *)to_ctx, (void *)from_ctx, (int)from_ctx->ref_count);
+                "[invoke cont    %p, to_ctx %p, from_ctx %p]\n",
+                (const void *)pmc, (void *)to_ctx, (void *)from_ctx);
 #endif
-    if (!to_ctx)
+    if (PMC_IS_NULL(to_ctx))
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
                        "Continuation invoked after deactivation.");
 }
@@ -586,11 +529,11 @@
         ARGIN(Parrot_cont *cc))
 {
     ASSERT_ARGS(Parrot_continuation_rewind_environment)
-    Parrot_Context * const to_ctx = cc->to_ctx;
+    PMC * const to_ctx = cc->to_ctx;
 
     /* debug print before context is switched */
     if (Interp_trace_TEST(interp, PARROT_TRACE_SUB_CALL_FLAG)) {
-        PMC * const sub = to_ctx->current_sub;
+        PMC * const sub = PARROT_CONTEXT(to_ctx)->current_sub;
 
         Parrot_io_eprintf(interp, "# Back in sub '%Ss', env %p\n",
                     Parrot_full_sub_name(interp, sub),
@@ -598,16 +541,13 @@
     }
 
     /* set context */
-    CONTEXT(interp)      = to_ctx;
-    interp->ctx.bp       = to_ctx->bp;
-    interp->ctx.bp_ps    = to_ctx->bp_ps;
+    interp->ctx          = to_ctx;
 }
 
 
 /*
 
-=item C<Parrot_sub * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, PMC
-*subclass)>
+=item C<void * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, PMC *subclass)>
 
 Gets a Parrot_sub structure from something that isn't a Sub PMC, but rather a
 subclass.
@@ -618,19 +558,18 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-Parrot_sub *
+void *
 Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, ARGIN(PMC *subclass)) {
     ASSERT_ARGS(Parrot_get_sub_pmc_from_subclass)
     PMC        *key, *sub_pmc;
-    Parrot_sub *sub;
+    Parrot_Sub_attributes *sub;
 
     /* Ensure we really do have a subclass of sub. */
     if (VTABLE_isa(interp, subclass, CONST_STRING(interp, "Sub"))) {
         /* If it's actually a PMC still, probably does the same structure
          * underneath. */
         if (!PObj_is_object_TEST(subclass)) {
-            GETATTR_Sub_sub(interp, subclass, sub);
-            return sub;
+            return PARROT_SUB(subclass);
         }
 
         /* Get the Sub PMC itself. */
@@ -638,8 +577,7 @@
         VTABLE_set_string_native(interp, key, CONST_STRING(interp, "Sub"));
         sub_pmc = VTABLE_get_attr_keyed(interp, subclass, key, CONST_STRING(interp, "proxy"));
         if (sub_pmc->vtable->base_type == enum_class_Sub) {
-            GETATTR_Sub_sub(interp, sub_pmc, sub);
-            return sub;
+            return PARROT_SUB(sub_pmc);
         }
     }
     Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,

Modified: branches/context_pmc2/src/thread.c
==============================================================================
--- branches/context_pmc2/src/thread.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/thread.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -201,7 +201,7 @@
          * working as one might expect mainly because the segment is
          * not correctly copied
          */
-        Parrot_sub     *ret_val_sub, *arg_sub;
+        Parrot_Sub_attributes *ret_val_sub, *arg_sub;
 
         ret_val               = Parrot_clone(interp, arg);
         PMC_get_sub(interp, ret_val, ret_val_sub);
@@ -632,7 +632,7 @@
 
             if (PMC_IS_NULL(dval)) {
                 PMC * const copy = make_local_copy(d, s, val);
-                Parrot_sub *val_sub;
+                Parrot_Sub_attributes *val_sub;
 
                 if (val->vtable->base_type == enum_class_Sub)
                     PMC_get_sub(interp, val, val_sub);

Modified: branches/context_pmc2/src/warnings.c
==============================================================================
--- branches/context_pmc2/src/warnings.c	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/src/warnings.c	Wed Aug 19 22:53:55 2009	(r40665)
@@ -18,6 +18,7 @@
 */
 
 #include "parrot/parrot.h"
+#include "pmc/pmc_context.h"
 
 #include <stdarg.h>
 
@@ -52,9 +53,7 @@
     Interp * const tracer = (interp->pdb && interp->pdb->debugger) ?
         interp->pdb->debugger :
         interp;
-    Parrot_io_eprintf(tracer, "%Ss\n",
-            Parrot_Context_infostr(interp,
-                CONTEXT(interp)));
+    Parrot_io_eprintf(tracer, "%Ss\n", Parrot_Context_infostr(interp, interp->ctx));
 }
 
 /*

Modified: branches/context_pmc2/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/context_pmc2/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/context_pmc2/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/context_pmc2/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/context_pmc2/tools/build/jit2c.pl
==============================================================================
--- branches/context_pmc2/tools/build/jit2c.pl	Wed Aug 19 20:29:16 2009	(r40664)
+++ branches/context_pmc2/tools/build/jit2c.pl	Wed Aug 19 22:53:55 2009	(r40665)
@@ -285,6 +285,9 @@
 # define MAP(i) jit_info->optimizer->map_branch[jit_info->op_i + (i)]
 #endif
 
+/* Access to Context PMC attributes */
+#include "pmc/pmc_context.h"
+
 #define ROFFS_INT(x) REG_OFFS_INT(jit_info->cur_op[x])
 #define ROFFS_NUM(x) REG_OFFS_NUM(jit_info->cur_op[x])
 #define ROFFS_STR(x) REG_OFFS_STR(jit_info->cur_op[x])


More information about the parrot-commits mailing list