[svn:parrot] r40695 - in branches/context_pmc2: compilers/imcc src src/call src/runcore
bacek at svn.parrot.org
bacek at svn.parrot.org
Sat Aug 22 01:25:21 UTC 2009
Author: bacek
Date: Sat Aug 22 01:25:19 2009
New Revision: 40695
URL: https://trac.parrot.org/parrot/changeset/40695
Log:
Use PMC_get_context instead of PARROT_CONTEXT macro
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/optimizer.c
branches/context_pmc2/src/call/ops.c
branches/context_pmc2/src/call/pcc.c
branches/context_pmc2/src/debug.c
branches/context_pmc2/src/jit_debug.c
branches/context_pmc2/src/key.c
branches/context_pmc2/src/pic.c
branches/context_pmc2/src/runcore/trace.c
branches/context_pmc2/src/scheduler.c
branches/context_pmc2/src/sub.c
Modified: branches/context_pmc2/compilers/imcc/imcc.y
==============================================================================
--- branches/context_pmc2/compilers/imcc/imcc.y Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/compilers/imcc/imcc.y Sat Aug 22 01:25:19 2009 (r40695)
@@ -25,8 +25,6 @@
#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. */
Modified: branches/context_pmc2/compilers/imcc/imcparser.c
==============================================================================
--- branches/context_pmc2/compilers/imcc/imcparser.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/compilers/imcc/imcparser.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -349,8 +349,6 @@
#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. */
@@ -1394,7 +1392,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 1053 "compilers/imcc/imcc.y"
+#line 1051 "compilers/imcc/imcc.y"
{
IdList * idlist;
int t;
@@ -1403,7 +1401,7 @@
Instruction *i;
}
/* Line 187 of yacc.c. */
-#line 1396 "compilers/imcc/imcparser.c"
+#line 1394 "compilers/imcc/imcparser.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -1416,7 +1414,7 @@
/* Line 216 of yacc.c. */
-#line 1409 "compilers/imcc/imcparser.c"
+#line 1407 "compilers/imcc/imcparser.c"
#ifdef short
# undef short
@@ -1837,40 +1835,40 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 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
+ 0, 1146, 1146, 1150, 1151, 1155, 1156, 1157, 1163, 1169,
+ 1170, 1171, 1172, 1176, 1177, 1186, 1192, 1200, 1212, 1225,
+ 1225, 1234, 1234, 1241, 1241, 1250, 1251, 1255, 1256, 1260,
+ 1261, 1262, 1263, 1264, 1265, 1266, 1269, 1269, 1278, 1277,
+ 1290, 1294, 1307, 1311, 1315, 1315, 1327, 1329, 1333, 1348,
+ 1352, 1357, 1361, 1365, 1356, 1377, 1378, 1379, 1392, 1392,
+ 1396, 1410, 1414, 1420, 1429, 1435, 1444, 1450, 1459, 1465,
+ 1474, 1482, 1487, 1498, 1501, 1506, 1514, 1515, 1516, 1517,
+ 1518, 1529, 1540, 1543, 1545, 1550, 1549, 1582, 1583, 1587,
+ 1588, 1592, 1593, 1597, 1598, 1602, 1603, 1604, 1605, 1606,
+ 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1619,
+ 1624, 1628, 1633, 1637, 1641, 1646, 1655, 1656, 1660, 1665,
+ 1666, 1674, 1675, 1675, 1690, 1691, 1695, 1696, 1697, 1698,
+ 1699, 1700, 1701, 1706, 1706, 1709, 1717, 1717, 1723, 1724,
+ 1729, 1737, 1738, 1743, 1751, 1755, 1760, 1759, 1772, 1773,
+ 1777, 1778, 1788, 1793, 1803, 1812, 1813, 1825, 1829, 1831,
+ 1832, 1833, 1834, 1835, 1839, 1840, 1844, 1845, 1849, 1860,
+ 1861, 1872, 1879, 1888, 1898, 1899, 1904, 1905, 1906, 1906,
+ 1922, 1932, 1938, 1938, 1945, 1946, 1946, 1952, 1958, 1962,
+ 1974, 1975, 1976, 1977, 1978, 1979, 1983, 1984, 1985, 1986,
+ 1990, 2003, 2005, 2007, 2009, 2011, 2016, 2019, 2026, 2025,
+ 2034, 2035, 2036, 2037, 2045, 2046, 2047, 2051, 2052, 2053,
+ 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063,
+ 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073,
+ 2079, 2078, 2090, 2097, 2098, 2099, 2100, 2101, 2102, 2103,
+ 2104, 2105, 2106, 2107, 2108, 2109, 2114, 2125, 2126, 2127,
+ 2128, 2134, 2148, 2154, 2160, 2166, 2165, 2174, 2175, 2185,
+ 2195, 2202, 2207, 2217, 2221, 2222, 2226, 2227, 2230, 2231,
+ 2235, 2239, 2249, 2255, 2265, 2270, 2274, 2275, 2279, 2283,
+ 2287, 2294, 2298, 2302, 2309, 2310, 2314, 2315, 2316, 2317,
+ 2318, 2319, 2323, 2324, 2328, 2329, 2333, 2334, 2338, 2339,
+ 2346, 2353, 2354, 2355, 2359, 2360, 2364, 2365, 2369, 2370,
+ 2374, 2375, 2379, 2379, 2391, 2391, 2403, 2404, 2412, 2419,
+ 2420, 2421, 2422, 2423, 2427, 2428, 2429, 2430
};
#endif
@@ -3224,22 +3222,22 @@
switch (yyn)
{
case 2:
-#line 1148 "compilers/imcc/imcc.y"
+#line 1146 "compilers/imcc/imcc.y"
{ if (yynerrs) YYABORT; (yyval.i) = 0; }
break;
case 5:
-#line 1157 "compilers/imcc/imcc.y"
+#line 1155 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 6:
-#line 1158 "compilers/imcc/imcc.y"
+#line 1156 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 7:
-#line 1160 "compilers/imcc/imcc.y"
+#line 1158 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3248,7 +3246,7 @@
break;
case 8:
-#line 1166 "compilers/imcc/imcc.y"
+#line 1164 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3257,32 +3255,32 @@
break;
case 9:
-#line 1171 "compilers/imcc/imcc.y"
+#line 1169 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 10:
-#line 1172 "compilers/imcc/imcc.y"
+#line 1170 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 11:
-#line 1173 "compilers/imcc/imcc.y"
+#line 1171 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 12:
-#line 1174 "compilers/imcc/imcc.y"
+#line 1172 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 13:
-#line 1178 "compilers/imcc/imcc.y"
+#line 1176 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 14:
-#line 1180 "compilers/imcc/imcc.y"
+#line 1178 "compilers/imcc/imcc.y"
{
(yyval.i) = 0;
do_loadlib(interp, (yyvsp[(2) - (3)].s));
@@ -3291,7 +3289,7 @@
break;
case 15:
-#line 1189 "compilers/imcc/imcc.y"
+#line 1187 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
/* set_filename() frees the STRINGC */
@@ -3300,7 +3298,7 @@
break;
case 16:
-#line 1195 "compilers/imcc/imcc.y"
+#line 1193 "compilers/imcc/imcc.y"
{
/* set_filename() frees the STRINGC */
set_filename(interp, (yyvsp[(2) - (3)].s));
@@ -3308,7 +3306,7 @@
break;
case 17:
-#line 1203 "compilers/imcc/imcc.y"
+#line 1201 "compilers/imcc/imcc.y"
{
/* We'll want to store an entry while emitting instructions, so just
* store annotation like it's an instruction. */
@@ -3319,7 +3317,7 @@
break;
case 18:
-#line 1215 "compilers/imcc/imcc.y"
+#line 1213 "compilers/imcc/imcc.y"
{
STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
CONTEXT(interp)->current_HLL =
@@ -3332,12 +3330,12 @@
break;
case 19:
-#line 1227 "compilers/imcc/imcc.y"
+#line 1225 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 20:
-#line 1228 "compilers/imcc/imcc.y"
+#line 1226 "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));
@@ -3346,12 +3344,12 @@
break;
case 21:
-#line 1236 "compilers/imcc/imcc.y"
+#line 1234 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 22:
-#line 1237 "compilers/imcc/imcc.y"
+#line 1235 "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));
@@ -3360,12 +3358,12 @@
break;
case 23:
-#line 1243 "compilers/imcc/imcc.y"
+#line 1241 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 24:
-#line 1244 "compilers/imcc/imcc.y"
+#line 1242 "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));
@@ -3375,37 +3373,37 @@
break;
case 29:
-#line 1262 "compilers/imcc/imcc.y"
+#line 1260 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 30:
-#line 1263 "compilers/imcc/imcc.y"
+#line 1261 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 31:
-#line 1264 "compilers/imcc/imcc.y"
+#line 1262 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 32:
-#line 1265 "compilers/imcc/imcc.y"
+#line 1263 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 33:
-#line 1266 "compilers/imcc/imcc.y"
+#line 1264 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 36:
-#line 1271 "compilers/imcc/imcc.y"
+#line 1269 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 37:
-#line 1273 "compilers/imcc/imcc.y"
+#line 1271 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
(yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
@@ -3415,7 +3413,7 @@
break;
case 38:
-#line 1280 "compilers/imcc/imcc.y"
+#line 1278 "compilers/imcc/imcc.y"
{
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
@@ -3423,7 +3421,7 @@
break;
case 39:
-#line 1285 "compilers/imcc/imcc.y"
+#line 1283 "compilers/imcc/imcc.y"
{
(yyval.i) = iSUBROUTINE(interp,
IMCC_INFO(interp)->cur_unit,
@@ -3434,14 +3432,14 @@
break;
case 40:
-#line 1293 "compilers/imcc/imcc.y"
+#line 1291 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
}
break;
case 41:
-#line 1297 "compilers/imcc/imcc.y"
+#line 1295 "compilers/imcc/imcc.y"
{
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
SymReg *r = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
@@ -3457,17 +3455,17 @@
break;
case 42:
-#line 1309 "compilers/imcc/imcc.y"
+#line 1307 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 44:
-#line 1317 "compilers/imcc/imcc.y"
+#line 1315 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
break;
case 45:
-#line 1320 "compilers/imcc/imcc.y"
+#line 1318 "compilers/imcc/imcc.y"
{
/* if (optimizer_level & OPT_PASM)
imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3478,7 +3476,7 @@
break;
case 48:
-#line 1336 "compilers/imcc/imcc.y"
+#line 1334 "compilers/imcc/imcc.y"
{
int re_open = 0;
(yyval.i) = 0;
@@ -3493,33 +3491,33 @@
break;
case 49:
-#line 1351 "compilers/imcc/imcc.y"
+#line 1349 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(2) - (3)].sr);
}
break;
case 50:
-#line 1354 "compilers/imcc/imcc.y"
+#line 1352 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 51:
-#line 1359 "compilers/imcc/imcc.y"
+#line 1357 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
}
break;
case 52:
-#line 1363 "compilers/imcc/imcc.y"
+#line 1361 "compilers/imcc/imcc.y"
{
iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
}
break;
case 53:
-#line 1367 "compilers/imcc/imcc.y"
+#line 1365 "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) {
@@ -3530,22 +3528,22 @@
break;
case 54:
-#line 1375 "compilers/imcc/imcc.y"
+#line 1373 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 55:
-#line 1379 "compilers/imcc/imcc.y"
+#line 1377 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 56:
-#line 1380 "compilers/imcc/imcc.y"
+#line 1378 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 57:
-#line 1382 "compilers/imcc/imcc.y"
+#line 1380 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_param(IMCC_INFO(interp)->cur_call,
@@ -3558,17 +3556,17 @@
break;
case 58:
-#line 1394 "compilers/imcc/imcc.y"
+#line 1392 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 59:
-#line 1394 "compilers/imcc/imcc.y"
+#line 1392 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
break;
case 60:
-#line 1399 "compilers/imcc/imcc.y"
+#line 1397 "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));
@@ -3580,12 +3578,12 @@
break;
case 61:
-#line 1412 "compilers/imcc/imcc.y"
+#line 1410 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 62:
-#line 1417 "compilers/imcc/imcc.y"
+#line 1415 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
@@ -3594,7 +3592,7 @@
break;
case 63:
-#line 1423 "compilers/imcc/imcc.y"
+#line 1421 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3603,7 +3601,7 @@
break;
case 64:
-#line 1432 "compilers/imcc/imcc.y"
+#line 1430 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = NULL;
@@ -3612,7 +3610,7 @@
break;
case 65:
-#line 1438 "compilers/imcc/imcc.y"
+#line 1436 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s);
@@ -3621,7 +3619,7 @@
break;
case 66:
-#line 1447 "compilers/imcc/imcc.y"
+#line 1445 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = NULL;
@@ -3630,7 +3628,7 @@
break;
case 67:
-#line 1453 "compilers/imcc/imcc.y"
+#line 1451 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
@@ -3639,7 +3637,7 @@
break;
case 68:
-#line 1462 "compilers/imcc/imcc.y"
+#line 1460 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->ns_entry_name = NULL;
@@ -3648,7 +3646,7 @@
break;
case 69:
-#line 1468 "compilers/imcc/imcc.y"
+#line 1466 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
@@ -3657,7 +3655,7 @@
break;
case 70:
-#line 1477 "compilers/imcc/imcc.y"
+#line 1475 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
@@ -3665,7 +3663,7 @@
break;
case 71:
-#line 1485 "compilers/imcc/imcc.y"
+#line 1483 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = NULL;
@@ -3673,7 +3671,7 @@
break;
case 72:
-#line 1490 "compilers/imcc/imcc.y"
+#line 1488 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3683,14 +3681,14 @@
break;
case 73:
-#line 1500 "compilers/imcc/imcc.y"
+#line 1498 "compilers/imcc/imcc.y"
{
add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
}
break;
case 74:
-#line 1504 "compilers/imcc/imcc.y"
+#line 1502 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
@@ -3698,7 +3696,7 @@
break;
case 75:
-#line 1509 "compilers/imcc/imcc.y"
+#line 1507 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
@@ -3706,27 +3704,27 @@
break;
case 76:
-#line 1516 "compilers/imcc/imcc.y"
+#line 1514 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "INTVAL", 'S'); }
break;
case 77:
-#line 1517 "compilers/imcc/imcc.y"
+#line 1515 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
break;
case 78:
-#line 1518 "compilers/imcc/imcc.y"
+#line 1516 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "PMC", 'S'); }
break;
case 79:
-#line 1519 "compilers/imcc/imcc.y"
+#line 1517 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "STRING", 'S'); }
break;
case 80:
-#line 1521 "compilers/imcc/imcc.y"
+#line 1519 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3740,7 +3738,7 @@
break;
case 81:
-#line 1532 "compilers/imcc/imcc.y"
+#line 1530 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3754,12 +3752,12 @@
break;
case 82:
-#line 1542 "compilers/imcc/imcc.y"
+#line 1540 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
case 85:
-#line 1552 "compilers/imcc/imcc.y"
+#line 1550 "compilers/imcc/imcc.y"
{
char name[128];
SymReg *r, *r1;
@@ -3786,82 +3784,82 @@
break;
case 86:
-#line 1580 "compilers/imcc/imcc.y"
+#line 1578 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 87:
-#line 1584 "compilers/imcc/imcc.y"
+#line 1582 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
break;
case 88:
-#line 1585 "compilers/imcc/imcc.y"
+#line 1583 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
break;
case 89:
-#line 1589 "compilers/imcc/imcc.y"
+#line 1587 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 90:
-#line 1590 "compilers/imcc/imcc.y"
+#line 1588 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
break;
case 91:
-#line 1594 "compilers/imcc/imcc.y"
+#line 1592 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 93:
-#line 1599 "compilers/imcc/imcc.y"
+#line 1597 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
case 94:
-#line 1600 "compilers/imcc/imcc.y"
+#line 1598 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 95:
-#line 1604 "compilers/imcc/imcc.y"
+#line 1602 "compilers/imcc/imcc.y"
{ (yyval.t) = P_LOAD; }
break;
case 96:
-#line 1605 "compilers/imcc/imcc.y"
+#line 1603 "compilers/imcc/imcc.y"
{ (yyval.t) = P_INIT; }
break;
case 97:
-#line 1606 "compilers/imcc/imcc.y"
+#line 1604 "compilers/imcc/imcc.y"
{ (yyval.t) = P_MAIN; }
break;
case 98:
-#line 1607 "compilers/imcc/imcc.y"
+#line 1605 "compilers/imcc/imcc.y"
{ (yyval.t) = P_IMMEDIATE; }
break;
case 99:
-#line 1608 "compilers/imcc/imcc.y"
+#line 1606 "compilers/imcc/imcc.y"
{ (yyval.t) = P_POSTCOMP; }
break;
case 100:
-#line 1609 "compilers/imcc/imcc.y"
+#line 1607 "compilers/imcc/imcc.y"
{ (yyval.t) = P_ANON; }
break;
case 101:
-#line 1610 "compilers/imcc/imcc.y"
+#line 1608 "compilers/imcc/imcc.y"
{ (yyval.t) = P_NEED_LEX; }
break;
case 109:
-#line 1622 "compilers/imcc/imcc.y"
+#line 1620 "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));
@@ -3869,14 +3867,14 @@
break;
case 110:
-#line 1627 "compilers/imcc/imcc.y"
+#line 1625 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
case 111:
-#line 1631 "compilers/imcc/imcc.y"
+#line 1629 "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;
@@ -3884,21 +3882,21 @@
break;
case 112:
-#line 1636 "compilers/imcc/imcc.y"
+#line 1634 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
case 113:
-#line 1640 "compilers/imcc/imcc.y"
+#line 1638 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
}
break;
case 114:
-#line 1644 "compilers/imcc/imcc.y"
+#line 1642 "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));
@@ -3906,7 +3904,7 @@
break;
case 115:
-#line 1649 "compilers/imcc/imcc.y"
+#line 1647 "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));
@@ -3914,27 +3912,27 @@
break;
case 116:
-#line 1657 "compilers/imcc/imcc.y"
+#line 1655 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 117:
-#line 1658 "compilers/imcc/imcc.y"
+#line 1656 "compilers/imcc/imcc.y"
{ add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
break;
case 118:
-#line 1662 "compilers/imcc/imcc.y"
+#line 1660 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (2)].sr); }
break;
case 119:
-#line 1667 "compilers/imcc/imcc.y"
+#line 1665 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 120:
-#line 1669 "compilers/imcc/imcc.y"
+#line 1667 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
@@ -3942,17 +3940,17 @@
break;
case 121:
-#line 1676 "compilers/imcc/imcc.y"
+#line 1674 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 122:
-#line 1677 "compilers/imcc/imcc.y"
+#line 1675 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 123:
-#line 1678 "compilers/imcc/imcc.y"
+#line 1676 "compilers/imcc/imcc.y"
{
IdList * const l = (yyvsp[(4) - (4)].idlist);
SymReg *ignored;
@@ -3967,62 +3965,62 @@
break;
case 124:
-#line 1692 "compilers/imcc/imcc.y"
+#line 1690 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 125:
-#line 1693 "compilers/imcc/imcc.y"
+#line 1691 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 126:
-#line 1697 "compilers/imcc/imcc.y"
+#line 1695 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 127:
-#line 1698 "compilers/imcc/imcc.y"
+#line 1696 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPTIONAL; }
break;
case 128:
-#line 1699 "compilers/imcc/imcc.y"
+#line 1697 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPT_FLAG; }
break;
case 129:
-#line 1700 "compilers/imcc/imcc.y"
+#line 1698 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 130:
-#line 1701 "compilers/imcc/imcc.y"
+#line 1699 "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 1702 "compilers/imcc/imcc.y"
+#line 1700 "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 1703 "compilers/imcc/imcc.y"
+#line 1701 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_UNIQUE_REG; }
break;
case 133:
-#line 1708 "compilers/imcc/imcc.y"
+#line 1706 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 0); }
break;
case 134:
-#line 1710 "compilers/imcc/imcc.y"
+#line 1708 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 135:
-#line 1712 "compilers/imcc/imcc.y"
+#line 1710 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.i) = 0;
@@ -4030,22 +4028,22 @@
break;
case 136:
-#line 1719 "compilers/imcc/imcc.y"
+#line 1717 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 1); }
break;
case 137:
-#line 1721 "compilers/imcc/imcc.y"
+#line 1719 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 138:
-#line 1725 "compilers/imcc/imcc.y"
+#line 1723 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 139:
-#line 1727 "compilers/imcc/imcc.y"
+#line 1725 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
@@ -4053,7 +4051,7 @@
break;
case 140:
-#line 1732 "compilers/imcc/imcc.y"
+#line 1730 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
@@ -4061,12 +4059,12 @@
break;
case 141:
-#line 1739 "compilers/imcc/imcc.y"
+#line 1737 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 142:
-#line 1741 "compilers/imcc/imcc.y"
+#line 1739 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
@@ -4074,7 +4072,7 @@
break;
case 143:
-#line 1746 "compilers/imcc/imcc.y"
+#line 1744 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
@@ -4082,17 +4080,17 @@
break;
case 144:
-#line 1753 "compilers/imcc/imcc.y"
+#line 1751 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 145:
-#line 1757 "compilers/imcc/imcc.y"
+#line 1755 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 146:
-#line 1762 "compilers/imcc/imcc.y"
+#line 1760 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->asm_state == AsmDefault)
begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
@@ -4100,7 +4098,7 @@
break;
case 147:
-#line 1767 "compilers/imcc/imcc.y"
+#line 1765 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.t) = 0;
@@ -4108,22 +4106,22 @@
break;
case 148:
-#line 1774 "compilers/imcc/imcc.y"
+#line 1772 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 149:
-#line 1775 "compilers/imcc/imcc.y"
+#line 1773 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
case 150:
-#line 1779 "compilers/imcc/imcc.y"
+#line 1777 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 151:
-#line 1781 "compilers/imcc/imcc.y"
+#line 1779 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(IMCC_INFO(interp)->sr_return,
@@ -4136,7 +4134,7 @@
break;
case 152:
-#line 1791 "compilers/imcc/imcc.y"
+#line 1789 "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));
@@ -4144,7 +4142,7 @@
break;
case 153:
-#line 1796 "compilers/imcc/imcc.y"
+#line 1794 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(IMCC_INFO(interp)->sr_return,
@@ -4157,7 +4155,7 @@
break;
case 154:
-#line 1806 "compilers/imcc/imcc.y"
+#line 1804 "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));
@@ -4165,47 +4163,47 @@
break;
case 157:
-#line 1827 "compilers/imcc/imcc.y"
+#line 1825 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 158:
-#line 1832 "compilers/imcc/imcc.y"
+#line 1830 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (2)].i); }
break;
case 159:
-#line 1833 "compilers/imcc/imcc.y"
+#line 1831 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 160:
-#line 1834 "compilers/imcc/imcc.y"
+#line 1832 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 161:
-#line 1835 "compilers/imcc/imcc.y"
+#line 1833 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 162:
-#line 1836 "compilers/imcc/imcc.y"
+#line 1834 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 163:
-#line 1837 "compilers/imcc/imcc.y"
+#line 1835 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 164:
-#line 1841 "compilers/imcc/imcc.y"
+#line 1839 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 168:
-#line 1852 "compilers/imcc/imcc.y"
+#line 1850 "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));
@@ -4214,12 +4212,12 @@
break;
case 169:
-#line 1862 "compilers/imcc/imcc.y"
+#line 1860 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
case 170:
-#line 1864 "compilers/imcc/imcc.y"
+#line 1862 "compilers/imcc/imcc.y"
{
if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
IMCC_warning(interp, "Too many errors. Correct some first.\n");
@@ -4230,7 +4228,7 @@
break;
case 171:
-#line 1875 "compilers/imcc/imcc.y"
+#line 1873 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(1) - (1)].idlist);
l->next = NULL;
@@ -4239,7 +4237,7 @@
break;
case 172:
-#line 1882 "compilers/imcc/imcc.y"
+#line 1880 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(3) - (3)].idlist);
l->next = (yyvsp[(1) - (3)].idlist);
@@ -4248,7 +4246,7 @@
break;
case 173:
-#line 1891 "compilers/imcc/imcc.y"
+#line 1889 "compilers/imcc/imcc.y"
{
IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
l->id = (yyvsp[(1) - (2)].s);
@@ -4258,22 +4256,22 @@
break;
case 174:
-#line 1900 "compilers/imcc/imcc.y"
+#line 1898 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 175:
-#line 1901 "compilers/imcc/imcc.y"
+#line 1899 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
case 178:
-#line 1908 "compilers/imcc/imcc.y"
+#line 1906 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 179:
-#line 1909 "compilers/imcc/imcc.y"
+#line 1907 "compilers/imcc/imcc.y"
{
IdList *l = (yyvsp[(4) - (4)].idlist);
while (l) {
@@ -4292,7 +4290,7 @@
break;
case 180:
-#line 1925 "compilers/imcc/imcc.y"
+#line 1923 "compilers/imcc/imcc.y"
{
SymReg *n;
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
@@ -4305,7 +4303,7 @@
break;
case 181:
-#line 1935 "compilers/imcc/imcc.y"
+#line 1933 "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;
@@ -4314,12 +4312,12 @@
break;
case 182:
-#line 1940 "compilers/imcc/imcc.y"
+#line 1938 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 183:
-#line 1941 "compilers/imcc/imcc.y"
+#line 1939 "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;
@@ -4328,12 +4326,12 @@
break;
case 185:
-#line 1948 "compilers/imcc/imcc.y"
+#line 1946 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 186:
-#line 1949 "compilers/imcc/imcc.y"
+#line 1947 "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;
@@ -4342,7 +4340,7 @@
break;
case 187:
-#line 1955 "compilers/imcc/imcc.y"
+#line 1953 "compilers/imcc/imcc.y"
{
(yyval.i) = NULL;
IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
@@ -4351,14 +4349,14 @@
break;
case 188:
-#line 1961 "compilers/imcc/imcc.y"
+#line 1959 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
}
break;
case 189:
-#line 1965 "compilers/imcc/imcc.y"
+#line 1963 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp,
IMCC_INFO(interp)->cur_unit,
@@ -4373,47 +4371,47 @@
break;
case 190:
-#line 1976 "compilers/imcc/imcc.y"
+#line 1974 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
break;
case 191:
-#line 1977 "compilers/imcc/imcc.y"
+#line 1975 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 192:
-#line 1978 "compilers/imcc/imcc.y"
+#line 1976 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 195:
-#line 1981 "compilers/imcc/imcc.y"
+#line 1979 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 196:
-#line 1985 "compilers/imcc/imcc.y"
+#line 1983 "compilers/imcc/imcc.y"
{ (yyval.t) = 'I'; }
break;
case 197:
-#line 1986 "compilers/imcc/imcc.y"
+#line 1984 "compilers/imcc/imcc.y"
{ (yyval.t) = 'N'; }
break;
case 198:
-#line 1987 "compilers/imcc/imcc.y"
+#line 1985 "compilers/imcc/imcc.y"
{ (yyval.t) = 'S'; }
break;
case 199:
-#line 1988 "compilers/imcc/imcc.y"
+#line 1986 "compilers/imcc/imcc.y"
{ (yyval.t) = 'P'; }
break;
case 200:
-#line 1993 "compilers/imcc/imcc.y"
+#line 1991 "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 */
@@ -4426,37 +4424,37 @@
break;
case 201:
-#line 2006 "compilers/imcc/imcc.y"
+#line 2004 "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 2008 "compilers/imcc/imcc.y"
+#line 2006 "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 2010 "compilers/imcc/imcc.y"
+#line 2008 "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 2012 "compilers/imcc/imcc.y"
+#line 2010 "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 2014 "compilers/imcc/imcc.y"
+#line 2012 "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 2019 "compilers/imcc/imcc.y"
+#line 2017 "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 2022 "compilers/imcc/imcc.y"
+#line 2020 "compilers/imcc/imcc.y"
{
add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
IMCC_INFO(interp)->cur_call = NULL;
@@ -4465,14 +4463,14 @@
break;
case 208:
-#line 2028 "compilers/imcc/imcc.y"
+#line 2026 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
}
break;
case 209:
-#line 2032 "compilers/imcc/imcc.y"
+#line 2030 "compilers/imcc/imcc.y"
{
IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
IMCC_INFO(interp)->cur_call = NULL;
@@ -4480,144 +4478,144 @@
break;
case 213:
-#line 2040 "compilers/imcc/imcc.y"
+#line 2038 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
}
break;
case 214:
-#line 2047 "compilers/imcc/imcc.y"
+#line 2045 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"not"; }
break;
case 215:
-#line 2048 "compilers/imcc/imcc.y"
+#line 2046 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bnot"; }
break;
case 216:
-#line 2049 "compilers/imcc/imcc.y"
+#line 2047 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"neg"; }
break;
case 217:
-#line 2053 "compilers/imcc/imcc.y"
+#line 2051 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
case 218:
-#line 2054 "compilers/imcc/imcc.y"
+#line 2052 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
case 219:
-#line 2055 "compilers/imcc/imcc.y"
+#line 2053 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
case 220:
-#line 2056 "compilers/imcc/imcc.y"
+#line 2054 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
case 221:
-#line 2057 "compilers/imcc/imcc.y"
+#line 2055 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
case 222:
-#line 2058 "compilers/imcc/imcc.y"
+#line 2056 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
case 223:
-#line 2059 "compilers/imcc/imcc.y"
+#line 2057 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"pow"; }
break;
case 224:
-#line 2060 "compilers/imcc/imcc.y"
+#line 2058 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
case 225:
-#line 2061 "compilers/imcc/imcc.y"
+#line 2059 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"iseq"; }
break;
case 226:
-#line 2062 "compilers/imcc/imcc.y"
+#line 2060 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isne"; }
break;
case 227:
-#line 2063 "compilers/imcc/imcc.y"
+#line 2061 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isgt"; }
break;
case 228:
-#line 2064 "compilers/imcc/imcc.y"
+#line 2062 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isge"; }
break;
case 229:
-#line 2065 "compilers/imcc/imcc.y"
+#line 2063 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"islt"; }
break;
case 230:
-#line 2066 "compilers/imcc/imcc.y"
+#line 2064 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isle"; }
break;
case 231:
-#line 2067 "compilers/imcc/imcc.y"
+#line 2065 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
case 232:
-#line 2068 "compilers/imcc/imcc.y"
+#line 2066 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
case 233:
-#line 2069 "compilers/imcc/imcc.y"
+#line 2067 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
case 234:
-#line 2070 "compilers/imcc/imcc.y"
+#line 2068 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"and"; }
break;
case 235:
-#line 2071 "compilers/imcc/imcc.y"
+#line 2069 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"or"; }
break;
case 236:
-#line 2072 "compilers/imcc/imcc.y"
+#line 2070 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"xor"; }
break;
case 237:
-#line 2073 "compilers/imcc/imcc.y"
+#line 2071 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
case 238:
-#line 2074 "compilers/imcc/imcc.y"
+#line 2072 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
case 239:
-#line 2075 "compilers/imcc/imcc.y"
+#line 2073 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
case 240:
-#line 2081 "compilers/imcc/imcc.y"
+#line 2079 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
(yyval.i)->type &= ~ITCALL;
@@ -4626,84 +4624,84 @@
break;
case 241:
-#line 2086 "compilers/imcc/imcc.y"
+#line 2084 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 242:
-#line 2093 "compilers/imcc/imcc.y"
+#line 2091 "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 2099 "compilers/imcc/imcc.y"
+#line 2097 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
case 244:
-#line 2100 "compilers/imcc/imcc.y"
+#line 2098 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
case 245:
-#line 2101 "compilers/imcc/imcc.y"
+#line 2099 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
case 246:
-#line 2102 "compilers/imcc/imcc.y"
+#line 2100 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
case 247:
-#line 2103 "compilers/imcc/imcc.y"
+#line 2101 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
case 248:
-#line 2104 "compilers/imcc/imcc.y"
+#line 2102 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
case 249:
-#line 2105 "compilers/imcc/imcc.y"
+#line 2103 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
case 250:
-#line 2106 "compilers/imcc/imcc.y"
+#line 2104 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
case 251:
-#line 2107 "compilers/imcc/imcc.y"
+#line 2105 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
case 252:
-#line 2108 "compilers/imcc/imcc.y"
+#line 2106 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
case 253:
-#line 2109 "compilers/imcc/imcc.y"
+#line 2107 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
case 254:
-#line 2110 "compilers/imcc/imcc.y"
+#line 2108 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
case 255:
-#line 2111 "compilers/imcc/imcc.y"
+#line 2109 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
case 256:
-#line 2117 "compilers/imcc/imcc.y"
+#line 2115 "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,
@@ -4714,22 +4712,22 @@
break;
case 257:
-#line 2127 "compilers/imcc/imcc.y"
+#line 2125 "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 2128 "compilers/imcc/imcc.y"
+#line 2126 "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 2129 "compilers/imcc/imcc.y"
+#line 2127 "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 2131 "compilers/imcc/imcc.y"
+#line 2129 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -4738,7 +4736,7 @@
break;
case 261:
-#line 2137 "compilers/imcc/imcc.y"
+#line 2135 "compilers/imcc/imcc.y"
{
/* disallow bareword method names; SREG name constants are fine */
const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -4755,7 +4753,7 @@
break;
case 262:
-#line 2151 "compilers/imcc/imcc.y"
+#line 2149 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -4764,7 +4762,7 @@
break;
case 263:
-#line 2157 "compilers/imcc/imcc.y"
+#line 2155 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -4773,12 +4771,12 @@
break;
case 264:
-#line 2162 "compilers/imcc/imcc.y"
+#line 2160 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
break;
case 265:
-#line 2168 "compilers/imcc/imcc.y"
+#line 2166 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
@@ -4786,17 +4784,17 @@
break;
case 266:
-#line 2172 "compilers/imcc/imcc.y"
+#line 2170 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (5)].i); }
break;
case 267:
-#line 2176 "compilers/imcc/imcc.y"
+#line 2174 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 268:
-#line 2178 "compilers/imcc/imcc.y"
+#line 2176 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -4809,7 +4807,7 @@
break;
case 269:
-#line 2188 "compilers/imcc/imcc.y"
+#line 2186 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -4822,7 +4820,7 @@
break;
case 270:
-#line 2198 "compilers/imcc/imcc.y"
+#line 2196 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
@@ -4832,7 +4830,7 @@
break;
case 271:
-#line 2205 "compilers/imcc/imcc.y"
+#line 2203 "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));
@@ -4840,7 +4838,7 @@
break;
case 272:
-#line 2210 "compilers/imcc/imcc.y"
+#line 2208 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
@@ -4850,47 +4848,47 @@
break;
case 273:
-#line 2219 "compilers/imcc/imcc.y"
+#line 2217 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
case 274:
-#line 2223 "compilers/imcc/imcc.y"
+#line 2221 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 275:
-#line 2224 "compilers/imcc/imcc.y"
+#line 2222 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 276:
-#line 2228 "compilers/imcc/imcc.y"
+#line 2226 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 277:
-#line 2229 "compilers/imcc/imcc.y"
+#line 2227 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 278:
-#line 2232 "compilers/imcc/imcc.y"
+#line 2230 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
case 279:
-#line 2233 "compilers/imcc/imcc.y"
+#line 2231 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
case 280:
-#line 2237 "compilers/imcc/imcc.y"
+#line 2235 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
case 281:
-#line 2242 "compilers/imcc/imcc.y"
+#line 2240 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -4903,7 +4901,7 @@
break;
case 282:
-#line 2252 "compilers/imcc/imcc.y"
+#line 2250 "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));
@@ -4912,7 +4910,7 @@
break;
case 283:
-#line 2258 "compilers/imcc/imcc.y"
+#line 2256 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -4925,7 +4923,7 @@
break;
case 284:
-#line 2268 "compilers/imcc/imcc.y"
+#line 2266 "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));
@@ -4933,124 +4931,124 @@
break;
case 285:
-#line 2272 "compilers/imcc/imcc.y"
+#line 2270 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 286:
-#line 2276 "compilers/imcc/imcc.y"
+#line 2274 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 287:
-#line 2277 "compilers/imcc/imcc.y"
+#line 2275 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 288:
-#line 2282 "compilers/imcc/imcc.y"
+#line 2280 "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 2286 "compilers/imcc/imcc.y"
+#line 2284 "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 2290 "compilers/imcc/imcc.y"
+#line 2288 "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 2297 "compilers/imcc/imcc.y"
+#line 2295 "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 2301 "compilers/imcc/imcc.y"
+#line 2299 "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 2305 "compilers/imcc/imcc.y"
+#line 2303 "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 2311 "compilers/imcc/imcc.y"
+#line 2309 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 295:
-#line 2312 "compilers/imcc/imcc.y"
+#line 2310 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 296:
-#line 2316 "compilers/imcc/imcc.y"
+#line 2314 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"eq"; }
break;
case 297:
-#line 2317 "compilers/imcc/imcc.y"
+#line 2315 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ne"; }
break;
case 298:
-#line 2318 "compilers/imcc/imcc.y"
+#line 2316 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"gt"; }
break;
case 299:
-#line 2319 "compilers/imcc/imcc.y"
+#line 2317 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ge"; }
break;
case 300:
-#line 2320 "compilers/imcc/imcc.y"
+#line 2318 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lt"; }
break;
case 301:
-#line 2321 "compilers/imcc/imcc.y"
+#line 2319 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"le"; }
break;
case 304:
-#line 2330 "compilers/imcc/imcc.y"
+#line 2328 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 305:
-#line 2331 "compilers/imcc/imcc.y"
+#line 2329 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
case 306:
-#line 2335 "compilers/imcc/imcc.y"
+#line 2333 "compilers/imcc/imcc.y"
{ (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
break;
case 308:
-#line 2340 "compilers/imcc/imcc.y"
+#line 2338 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
break;
case 309:
-#line 2342 "compilers/imcc/imcc.y"
+#line 2340 "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);
@@ -5060,7 +5058,7 @@
break;
case 310:
-#line 2349 "compilers/imcc/imcc.y"
+#line 2347 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
(yyval.sr) = (yyvsp[(2) - (3)].sr);
@@ -5068,44 +5066,44 @@
break;
case 312:
-#line 2356 "compilers/imcc/imcc.y"
+#line 2354 "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 2357 "compilers/imcc/imcc.y"
+#line 2355 "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 2361 "compilers/imcc/imcc.y"
+#line 2359 "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 2362 "compilers/imcc/imcc.y"
+#line 2360 "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 2366 "compilers/imcc/imcc.y"
+#line 2364 "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 2367 "compilers/imcc/imcc.y"
+#line 2365 "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 2381 "compilers/imcc/imcc.y"
+#line 2379 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
case 323:
-#line 2385 "compilers/imcc/imcc.y"
+#line 2383 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5114,14 +5112,14 @@
break;
case 324:
-#line 2393 "compilers/imcc/imcc.y"
+#line 2391 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
case 325:
-#line 2397 "compilers/imcc/imcc.y"
+#line 2395 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5130,12 +5128,12 @@
break;
case 326:
-#line 2405 "compilers/imcc/imcc.y"
+#line 2403 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
case 327:
-#line 2407 "compilers/imcc/imcc.y"
+#line 2405 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
(yyval.sr) = IMCC_INFO(interp)->keys[0];
@@ -5143,60 +5141,60 @@
break;
case 328:
-#line 2415 "compilers/imcc/imcc.y"
+#line 2413 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
}
break;
case 329:
-#line 2421 "compilers/imcc/imcc.y"
+#line 2419 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
break;
case 330:
-#line 2422 "compilers/imcc/imcc.y"
+#line 2420 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
break;
case 331:
-#line 2423 "compilers/imcc/imcc.y"
+#line 2421 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
break;
case 332:
-#line 2424 "compilers/imcc/imcc.y"
+#line 2422 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
break;
case 333:
-#line 2425 "compilers/imcc/imcc.y"
+#line 2423 "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 2429 "compilers/imcc/imcc.y"
+#line 2427 "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 2430 "compilers/imcc/imcc.y"
+#line 2428 "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 2431 "compilers/imcc/imcc.y"
+#line 2429 "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 2432 "compilers/imcc/imcc.y"
+#line 2430 "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 5189 "compilers/imcc/imcparser.c"
+#line 5187 "compilers/imcc/imcparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5410,7 +5408,7 @@
}
-#line 2438 "compilers/imcc/imcc.y"
+#line 2436 "compilers/imcc/imcc.y"
/* I need this prototype somewhere... */
Modified: branches/context_pmc2/compilers/imcc/imcparser.h
==============================================================================
--- branches/context_pmc2/compilers/imcc/imcparser.h Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/compilers/imcc/imcparser.h Sat Aug 22 01:25:19 2009 (r40695)
@@ -295,7 +295,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 1053 "compilers/imcc/imcc.y"
+#line 1051 "compilers/imcc/imcc.y"
{
IdList * idlist;
int t;
Modified: branches/context_pmc2/compilers/imcc/optimizer.c
==============================================================================
--- branches/context_pmc2/compilers/imcc/optimizer.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/compilers/imcc/optimizer.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -73,6 +73,7 @@
#include "imc.h"
#include "pbc.h"
#include "optimizer.h"
+#include "../../src/pmc/pmc_context.h"
/* HEADERIZER HFILE: compilers/imcc/optimizer.h */
Modified: branches/context_pmc2/src/call/ops.c
==============================================================================
--- branches/context_pmc2/src/call/ops.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/call/ops.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -264,6 +264,7 @@
"no get_params in sub");
*/
+ ctx = interp->ctx;
offset = dest - interp->code->base.data;
runops(interp, offset);
return ctx;
Modified: branches/context_pmc2/src/call/pcc.c
==============================================================================
--- branches/context_pmc2/src/call/pcc.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/call/pcc.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -514,7 +514,7 @@
{
ASSERT_ARGS(Parrot_init_ret_nci)
PMC *ctx = interp->ctx;
- PMC* const current_cont = PARROT_CONTEXT(ctx)->current_cont;
+ PMC* const current_cont = PMC_get_context(ctx)->current_cont;
/* if this NCI call was a taicall, return results to caller's get_results
* this also means that we pass the caller's register base pointer */
@@ -526,12 +526,12 @@
/* Non-constant signatures are stored in ctx->results_signature instead of
* in the constants table. */
- if (PARROT_CONTEXT(ctx)->results_signature)
+ if (PMC_get_context(ctx)->results_signature)
Parrot_init_arg_indexes_and_sig_pmc(interp, ctx,
- PARROT_CONTEXT(ctx)->current_results,
- PARROT_CONTEXT(ctx)->results_signature, &st->dest);
+ PMC_get_context(ctx)->current_results,
+ PMC_get_context(ctx)->results_signature, &st->dest);
else
- Parrot_init_arg_op(interp, ctx, PARROT_CONTEXT(ctx)->current_results, &st->dest);
+ Parrot_init_arg_op(interp, ctx, PMC_get_context(ctx)->current_results, &st->dest);
}
@@ -560,7 +560,7 @@
ARGMOD(call_state_item *sti))
{
ASSERT_ARGS(Parrot_init_arg_indexes_and_sig_pmc)
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
if (!sig_pmc && indexes) {
++indexes;
sig_pmc = ctx->constants[*indexes]->u.key;
@@ -609,7 +609,7 @@
ARGIN_NULLOK(opcode_t *pc), ARGIN(call_state_item *sti))
{
ASSERT_ARGS(Parrot_init_arg_op)
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
PMC *sig_pmc = PMCNULL;
if (pc) {
@@ -642,7 +642,7 @@
ARGMOD(call_state_item *sti))
{
ASSERT_ARGS(Parrot_init_arg_sig)
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
sti->used = 1;
sti->i = 0;
sti->n = 0;
@@ -827,11 +827,11 @@
ASSERT_ARGS(fetch_arg_op)
const int constant = PARROT_ARG_CONSTANT_ISSET(st->src.sig);
const INTVAL idx = st->src.u.op.pc[st->src.i];
- const Parrot_Context_attributes *srcctx = PARROT_CONTEXT(st->src.ctx);
+ const Parrot_Context_attributes *srcctx = PMC_get_context(st->src.ctx);
switch (PARROT_ARG_TYPE_MASK_MASK(st->src.sig)) {
case PARROT_ARG_INTVAL:
- UVal_int(st->val) = constant ? idx : CTX_REG_NUM(srcctx, idx);
+ UVal_int(st->val) = constant ? idx : CTX_REG_INT(srcctx, idx);
break;
case PARROT_ARG_STRING:
{
@@ -1175,7 +1175,7 @@
--st->params;
PARROT_ASSERT(idx >= 0);
- CTX_REG_INT(PARROT_CONTEXT(st->dest.ctx), idx) = has_arg;
+ CTX_REG_INT(PMC_get_context(st->dest.ctx), idx) = has_arg;
}
@@ -1209,7 +1209,7 @@
Parrot_Context_attributes temp_ctx;
/* clone sets key values according to refered register items */
- SAVE_OFF_REGS(CONTEXT(interp), PARROT_CONTEXT(st->src.ctx), &temp_ctx)
+ SAVE_OFF_REGS(CONTEXT(interp), PMC_get_context(st->src.ctx), &temp_ctx)
UVal_pmc(st->val) = VTABLE_clone(interp, key);
RESTORE_REGS(CONTEXT(interp), &temp_ctx)
return;
@@ -1266,7 +1266,7 @@
/* pass the slurpy hash */
idx = st->dest.u.op.pc[i];
- CTX_REG_PMC(PARROT_CONTEXT(st->dest.ctx), idx) = st->dest.slurp;
+ CTX_REG_PMC(PMC_get_context(st->dest.ctx), idx) = st->dest.slurp;
}
/* must be the actual arg of a named arg, count it */
else
@@ -1315,7 +1315,7 @@
n_named++;
idx = st->dest.u.op.pc[i];
param = PARROT_ARG_CONSTANT_ISSET(st->dest.sig)
- ? PARROT_CONTEXT(st->dest.ctx)->constants[idx]->u.string
+ ? PMC_get_context(st->dest.ctx)->constants[idx]->u.string
: PMCCTX_REG_STR(st->dest.ctx, idx);
if (st->name == param || Parrot_str_equal(interp, st->name, param)) {
@@ -1568,7 +1568,7 @@
else {
const INTVAL idx = st->dest.u.op.pc[last_name_pos];
STRING * const param = PARROT_ARG_CONSTANT_ISSET(sig)
- ? PARROT_CONTEXT(st->dest.ctx)->constants[idx]->u.string
+ ? PMC_get_context(st->dest.ctx)->constants[idx]->u.string
: PMCCTX_REG_STR(st->dest.ctx, idx);
Parrot_ex_throw_from_c_args(interp, NULL,
@@ -1887,9 +1887,9 @@
}
else /* (param_or_result == PARROT_PASS_RESULTS) */ {
src_signature = interp->returns_signature;
- dest_signature = PARROT_CONTEXT(dest_pmcctx)->results_signature;
+ dest_signature = PMC_get_context(dest_pmcctx)->results_signature;
interp->returns_signature = NULL;
- PARROT_CONTEXT(dest_pmcctx)->results_signature = NULL;
+ PMC_get_context(dest_pmcctx)->results_signature = NULL;
}
Parrot_init_arg_indexes_and_sig_pmc(interp, src_pmcctx, src_indexes,
@@ -2141,7 +2141,7 @@
ARGIN_NULLOK(PMC *pmc), ARGIN(va_list *list))
{
ASSERT_ARGS(commit_last_arg)
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
int reg_offset = 0;
/* invocant already commited, just return */
@@ -2623,10 +2623,10 @@
commit_last_arg_sig_object(interp, index, cur, n_regs_used, seen_arrow, sigs,
indexes, ctx, sig_obj);
- interp->current_args = indexes[0];
- interp->args_signature = sigs[0];
- PARROT_CONTEXT(ctx)->current_results = indexes[1];
- PARROT_CONTEXT(ctx)->results_signature = sigs[1];
+ interp->current_args = indexes[0];
+ interp->args_signature = sigs[0];
+ PMC_get_context(ctx)->current_results = indexes[1];
+ PMC_get_context(ctx)->results_signature = sigs[1];
return ret_x;
}
@@ -2860,14 +2860,14 @@
interp->current_args = arg_indexes;
interp->args_signature = args_sig;
- PARROT_CONTEXT(ctx)->current_results = result_indexes;
- PARROT_CONTEXT(ctx)->results_signature = results_sig;
+ PMC_get_context(ctx)->current_results = result_indexes;
+ PMC_get_context(ctx)->results_signature = results_sig;
/* arg_accessors assigned in loop above */
interp->current_object = pmc;
interp->current_cont = NEED_CONTINUATION;
- PARROT_CONTEXT(ctx)->current_cont = ret_cont;
+ PMC_get_context(ctx)->current_cont = ret_cont;
PMC_cont(ret_cont)->from_ctx = ctx;
pccinvoke_meth = VTABLE_find_method(interp, pmc, method_name);
@@ -3011,7 +3011,7 @@
}
interp->current_cont = NEED_CONTINUATION;
- PARROT_CONTEXT(ctx)->current_cont = ret_cont;
+ PMC_get_context(ctx)->current_cont = ret_cont;
PMC_cont(ret_cont)->from_ctx = ctx;
/* Invoke the function */
Modified: branches/context_pmc2/src/debug.c
==============================================================================
--- branches/context_pmc2/src/debug.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/debug.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -3558,10 +3558,10 @@
/* recursion detection */
if (!PMC_IS_NULL(old) && PMC_cont(old) &&
- PARROT_CONTEXT(PMC_cont(old)->to_ctx)->current_pc ==
- PARROT_CONTEXT(PMC_cont(sub)->to_ctx)->current_pc &&
- PARROT_CONTEXT(PMC_cont(old)->to_ctx)->current_sub ==
- PARROT_CONTEXT(PMC_cont(sub)->to_ctx)->current_sub) {
+ PMC_get_context(PMC_cont(old)->to_ctx)->current_pc ==
+ PMC_get_context(PMC_cont(sub)->to_ctx)->current_pc &&
+ PMC_get_context(PMC_cont(old)->to_ctx)->current_sub ==
+ PMC_get_context(PMC_cont(sub)->to_ctx)->current_sub) {
++rec_level;
}
else if (rec_level != 0) {
@@ -3574,7 +3574,7 @@
Parrot_io_eprintf(interp, "%Ss", str);
if (interp->code->annotations) {
PMC *annot = PackFile_Annotations_lookup(interp, interp->code->annotations,
- PARROT_CONTEXT(sub_cont->to_ctx)->current_pc - interp->code->base.data + 1, NULL);
+ PMC_get_context(sub_cont->to_ctx)->current_pc - interp->code->base.data + 1, NULL);
if (!PMC_IS_NULL(annot)) {
PMC *pfile = VTABLE_get_pmc_keyed_str(interp, annot,
Parrot_str_new_constant(interp, "file"));
@@ -3591,7 +3591,7 @@
}
/* get the next Continuation */
- ctx = PARROT_CONTEXT(PMC_cont(sub)->to_ctx);
+ ctx = PMC_get_context(PMC_cont(sub)->to_ctx);
old = sub;
if (!ctx)
Modified: branches/context_pmc2/src/jit_debug.c
==============================================================================
--- branches/context_pmc2/src/jit_debug.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/jit_debug.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -33,6 +33,7 @@
#include <parrot/parrot.h>
#include "parrot/exec.h"
+#include "pmc/pmc_context.h"
#include "jit.h"
#define N_GSYM "32" /* global variable */
Modified: branches/context_pmc2/src/key.c
==============================================================================
--- branches/context_pmc2/src/key.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/key.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -22,6 +22,7 @@
#include "parrot/key.h"
#include "key.str"
#include "pmc/pmc_key.h"
+#include "pmc/pmc_context.h"
/* HEADERIZER HFILE: include/parrot/key.h */
Modified: branches/context_pmc2/src/pic.c
==============================================================================
--- branches/context_pmc2/src/pic.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/pic.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -705,14 +705,14 @@
/* check params */
if (op == PARROT_OP_set_returns_pc) {
- PMC * const ccont = PARROT_CONTEXT(ctx)->current_cont;
+ PMC * const ccont = PMC_get_context(ctx)->current_cont;
if (!PMC_cont(ccont)->address)
return 0;
caller_ctx = PMC_cont(ccont)->to_ctx;
- args = PARROT_CONTEXT(caller_ctx)->current_results;
+ args = PMC_get_context(caller_ctx)->current_results;
}
else {
- caller_ctx = PARROT_CONTEXT(ctx)->caller_ctx;
+ caller_ctx = PMC_get_context(ctx)->caller_ctx;
args = interp->current_args;
}
@@ -721,7 +721,7 @@
int n;
/* check current_args signature */
- sig2 = PARROT_CONTEXT(caller_ctx)->constants[const_nr]->u.key;
+ sig2 = PMC_get_context(caller_ctx)->constants[const_nr]->u.key;
n = parrot_pic_check_sig(interp, sig1, sig2, &type);
if (n == -1)
Modified: branches/context_pmc2/src/runcore/trace.c
==============================================================================
--- branches/context_pmc2/src/runcore/trace.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/runcore/trace.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -26,6 +26,7 @@
#include "parrot/runcore_trace.h"
#include "parrot/oplib/ops.h"
#include "../pmc/pmc_sub.h"
+#include "../pmc/pmc_context.h"
/* HEADERIZER HFILE: include/parrot/runcore_trace.h */
Modified: branches/context_pmc2/src/scheduler.c
==============================================================================
--- branches/context_pmc2/src/scheduler.c Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/scheduler.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -866,7 +866,7 @@
* Note that we are now trying to handle the new exception,
* not the initial task argument (exception or whatever).
*/
- context = PARROT_CONTEXT(keep_context->caller_ctx);
+ context = PMC_get_context(keep_context->caller_ctx);
keep_context = NULL;
if (context && !PMC_IS_NULL(context->handlers))
iter = VTABLE_get_iter(interp, context->handlers);
@@ -882,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((PMC*)VTABLE_get_pointer(interp, task));
+ context = PMC_get_context((PMC*)VTABLE_get_pointer(interp, task));
}
else {
context = CONTEXT(interp);
@@ -917,7 +917,7 @@
}
/* Continue the search in the next context up the chain. */
- context = context->caller_ctx ? PARROT_CONTEXT(context->caller_ctx) : NULL;
+ context = PMC_get_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 Sat Aug 22 01:24:38 2009 (r40694)
+++ branches/context_pmc2/src/sub.c Sat Aug 22 01:25:19 2009 (r40695)
@@ -59,7 +59,7 @@
cc->address = NULL;
}
- cc->current_results = PARROT_CONTEXT(to_ctx)->current_results;
+ cc->current_results = PMC_get_context(to_ctx)->current_results;
return cc;
}
@@ -127,10 +127,11 @@
invalidate_retc_context(PARROT_INTERP, ARGMOD(PMC *cont))
{
ASSERT_ARGS(invalidate_retc_context)
- PMC *ctx = PMC_cont(cont)->from_ctx;
- cont = PARROT_CONTEXT(ctx)->current_cont;
+ PMC *pmcctx = PMC_cont(cont)->from_ctx;
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
while (1) {
+ cont = ctx ? ctx->current_cont : NULL;
/*
* We stop if we encounter a true continuation, because
* if one were created, everything up the chain would have been
@@ -139,8 +140,7 @@
if (!cont || cont->vtable != interp->vtables[enum_class_RetContinuation])
break;
cont->vtable = interp->vtables[enum_class_Continuation];
- ctx = PARROT_CONTEXT(ctx)->caller_ctx;
- cont = PARROT_CONTEXT(ctx)->current_cont;
+ pmcctx = ctx->caller_ctx;
}
}
@@ -232,7 +232,7 @@
ARGOUT(Parrot_Context_info *info))
{
ASSERT_ARGS(Parrot_Context_get_info)
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
Parrot_Sub_attributes *sub;
/* set file/line/pc defaults */
@@ -324,7 +324,7 @@
Parrot_Context_infostr(PARROT_INTERP, ARGIN(const PMC *pmcctx))
{
ASSERT_ARGS(Parrot_Context_infostr)
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
Parrot_Context_info info;
STRING *res = NULL;
const char * const msg = (CONTEXT(interp) == ctx)
@@ -362,7 +362,7 @@
{
ASSERT_ARGS(Parrot_find_pad)
while (1) {
- Parrot_Context_attributes *ctx = PARROT_CONTEXT(pmcctx);
+ Parrot_Context_attributes *ctx = PMC_get_context(pmcctx);
PMC * const lex_pad = ctx->lex_pad;
PMC * const outer = ctx->outer_ctx;
@@ -407,7 +407,7 @@
Parrot_Sub_attributes *current_sub;
Parrot_Sub_attributes *sub;
- PMC_get_sub(interp, PARROT_CONTEXT(ctx)->current_sub, current_sub);
+ PMC_get_sub(interp, PMC_get_context(ctx)->current_sub, current_sub);
/* MultiSub gets special treatment */
if (VTABLE_isa(interp, sub_pmc, CONST_STRING(interp, "MultiSub"))) {
@@ -533,7 +533,7 @@
/* debug print before context is switched */
if (Interp_trace_TEST(interp, PARROT_TRACE_SUB_CALL_FLAG)) {
- PMC * const sub = PARROT_CONTEXT(to_ctx)->current_sub;
+ PMC * const sub = PMC_get_context(to_ctx)->current_sub;
Parrot_io_eprintf(interp, "# Back in sub '%Ss', env %p\n",
Parrot_full_sub_name(interp, sub),
More information about the parrot-commits
mailing list