/* Copy the second part of user declarations. */
/* Line 273 of skeleton.m4 */
-#line 269 "parser.y"
+#line 270 "parser.y"
static int a3_error(char*s)
// not sure wether to look into superclasses here, too
minfo = (methodinfo_t*)registry_findmember(state->cls->info, ns.name, name, 1);
if(minfo) {
- if(minfo->kind!=INFOTYPE_SLOT)
+ if(minfo->kind!=INFOTYPE_VAR)
syntaxerror("class already contains a method called '%s'", name);
if(!(minfo->subtype & (SUBTYPE_GETSET)))
syntaxerror("class already contains a field called '%s'", name);
}*/
} else {
minfo = methodinfo_register_onclass(state->cls->info, ns.access, ns.name, name);
- minfo->kind = INFOTYPE_SLOT; //hack
+ minfo->kind = INFOTYPE_VAR; //hack
minfo->subtype = gs;
minfo->return_type = 0;
}
/* Unqualified %code blocks. */
/* Line 274 of skeleton.m4 */
-#line 1966 "parser.y"
+#line 1967 "parser.y"
char is_subtype_of(classinfo_t*type, classinfo_t*supertype)
{
/* Line 274 of skeleton.m4 */
-#line 2415 "parser.y"
+#line 2416 "parser.y"
static void state_has_imports()
{
/* Line 274 of skeleton.m4 */
-#line 2548 "parser.y"
+#line 2549 "parser.y"
static int slotstate_varconst = 0;
static modifiers_t*slotstate_flags = 0;
/* Line 274 of skeleton.m4 */
-#line 3399 "parser.y"
+#line 3431 "parser.y"
void add_active_url(const char*url)
{
45, 3, -1, 189, 25, 215, 3, 121, 212, 132,
226, -1, 45, -1, 31, -1, -1, 189, 205, 207,
208, -1, 209, -1, 208, 100, 209, -1, 3, 226,
- 148, -1, -1, 102, 211, -1, 8, -1, 9, -1,
+ 148, -1, -1, 102, 242, -1, 8, -1, 9, -1,
10, -1, 5, -1, 55, -1, 54, -1, 44, -1,
27, -1, 28, -1, -1, 213, -1, 93, 214, -1,
213, 100, 93, 214, -1, 213, 100, 214, -1, 214,
-1, 242, -1, 238, -1, 242, -1, 238, 100, 242,
-1, 242, -1, 239, 100, 242, -1, -1, 241, -1,
236, 104, 236, -1, 241, 100, 236, 104, 236, -1,
- 219, -1, 244, -1, 243, -1, 232, -1, 234, -1,
- 233, -1, 211, -1, 6, -1, 123, 228, 124, -1,
+ 219, -1, 243, -1, 232, -1, 234, -1, 233, -1,
+ 244, -1, 211, -1, 6, -1, 123, 228, 124, -1,
69, 240, 131, -1, 242, 108, 242, -1, 242, 109,
242, -1, 242, 74, 242, -1, 242, 75, 242, -1,
242, 70, 242, -1, 242, 71, 242, -1, 242, 73,
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 1881, 1881, 1883, 1883, 1884, 1885, 1887, 1888, 1889,
- 1890, 1891, 1892, 1893, 1894, 1896, 1896, 1897, 1898, 1900,
- 1901, 1902, 1903, 1904, 1905, 1906, 1908, 1909, 1911, 1912,
- 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924,
- 1925, 1926, 1927, 1928, 1931, 1932, 1933, 1934, 1935, 1936,
- 1937, 1938, 1942, 1943, 1947, 1954, 1973, 1974, 1976, 1977,
- 1979, 1980, 1982, 2042, 2043, 2046, 2046, 2065, 2066, 2067,
- 2072, 2076, 2081, 2082, 2084, 2104, 2152, 2152, 2171, 2171,
- 2186, 2189, 2192, 2195, 2199, 2200, 2201, 2202, 2203, 2204,
- 2206, 2217, 2220, 2220, 2251, 2251, 2276, 2276, 2292, 2293,
- 2294, 2295, 2303, 2312, 2312, 2361, 2365, 2376, 2386, 2403,
- 2404, 2405, 2407, 2408, 2410, 2410, 2412, 2412, 2435, 2449,
- 2465, 2466, 2467, 2468, 2475, 2476, 2477, 2478, 2479, 2480,
- 2481, 2482, 2483, 2484, 2488, 2489, 2491, 2492, 2494, 2495,
- 2499, 2497, 2505, 2503, 2512, 2513, 2514, 2515, 2516, 2517,
- 2518, 2519, 2521, 2527, 2528, 2529, 2530, 2531, 2532, 2535,
- 2567, 2567, 2569, 2569, 2571, 2572, 2574, 2666, 2667, 2670,
- 2671, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2695, 2699,
- 2705, 2711, 2719, 2724, 2730, 2738, 2746, 2747, 2748, 2751,
- 2750, 2767, 2768, 2770, 2769, 2793, 2812, 2826, 2827, 2829,
- 2830, 2832, 2833, 2834, 2843, 2844, 2848, 2849, 2851, 2852,
- 2853, 2855, 2859, 2860, 2865, 2866, 2903, 2950, 2971, 2993,
- 2996, 3003, 3006, 3009, 3012, 3015, 3018, 3023, 3024, 3026,
- 3032, 3041, 3042, 3043, 3044, 3045, 3046, 3048, 3053, 3073,
- 3083, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100,
- 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110,
- 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120,
- 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130,
- 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3139, 3140, 3141,
- 3142, 3144, 3159, 3165, 3171, 3177, 3183, 3196, 3254, 3363,
- 3370, 3377, 3384, 3408
+ 0, 1882, 1882, 1884, 1884, 1885, 1886, 1888, 1889, 1890,
+ 1891, 1892, 1893, 1894, 1895, 1897, 1897, 1898, 1899, 1901,
+ 1902, 1903, 1904, 1905, 1906, 1907, 1909, 1910, 1912, 1913,
+ 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925,
+ 1926, 1927, 1928, 1929, 1932, 1933, 1934, 1935, 1936, 1937,
+ 1938, 1939, 1943, 1944, 1948, 1955, 1974, 1975, 1977, 1978,
+ 1980, 1981, 1983, 2043, 2044, 2047, 2047, 2066, 2067, 2068,
+ 2073, 2077, 2082, 2083, 2085, 2105, 2153, 2153, 2172, 2172,
+ 2187, 2190, 2193, 2196, 2200, 2201, 2202, 2203, 2204, 2205,
+ 2207, 2218, 2221, 2221, 2252, 2252, 2277, 2277, 2293, 2294,
+ 2295, 2296, 2304, 2313, 2313, 2362, 2366, 2377, 2387, 2404,
+ 2405, 2406, 2408, 2409, 2411, 2411, 2413, 2413, 2436, 2450,
+ 2466, 2467, 2468, 2469, 2476, 2477, 2478, 2479, 2480, 2481,
+ 2482, 2483, 2484, 2485, 2489, 2490, 2492, 2493, 2495, 2496,
+ 2500, 2498, 2506, 2504, 2513, 2514, 2515, 2516, 2517, 2518,
+ 2519, 2520, 2522, 2528, 2529, 2530, 2531, 2532, 2533, 2536,
+ 2568, 2568, 2570, 2570, 2572, 2573, 2575, 2669, 2670, 2678,
+ 2679, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2703, 2707,
+ 2713, 2719, 2727, 2732, 2738, 2746, 2754, 2755, 2756, 2759,
+ 2758, 2775, 2776, 2778, 2777, 2801, 2820, 2834, 2835, 2837,
+ 2838, 2840, 2841, 2842, 2851, 2852, 2856, 2857, 2859, 2860,
+ 2861, 2863, 2867, 2868, 2873, 2874, 2911, 2958, 2979, 3001,
+ 3004, 3011, 3014, 3017, 3020, 3023, 3026, 3031, 3032, 3034,
+ 3040, 3049, 3050, 3051, 3052, 3053, 3054, 3056, 3061, 3081,
+ 3091, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108,
+ 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118,
+ 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128,
+ 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138,
+ 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3147, 3148, 3149,
+ 3150, 3152, 3167, 3173, 3179, 3185, 3191, 3204, 3262, 3395,
+ 3402, 3409, 3416, 3440
};
#endif
0, 14, 0, 0, 0, 0, 208, 120, 0, 0,
2, 120, 5, 54, 12, 0, 36, 67, 31, 32,
33, 34, 35, 38, 120, 37, 7, 30, 0, 121,
- 122, 9, 8, 11, 237, 10, 231, 234, 236, 235,
- 39, 225, 233, 232, 41, 40, 0, 0, 72, 76,
+ 122, 9, 8, 11, 237, 10, 231, 233, 235, 234,
+ 39, 225, 232, 236, 41, 40, 0, 0, 72, 76,
120, 92, 109, 111, 110, 116, 113, 0, 0, 298,
214, 191, 0, 269, 0, 0, 118, 0, 103, 208,
0, 218, 65, 0, 0, 228, 221, 290, 289, 272,
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -406
+#define YYPACT_NINF -429
static const yytype_int16 yypact[] =
{
- 1661, -65, -406, -406, -406, -406, -406, -406, -10, -85,
- -406, -59, 54, -406, -406, -406, 66, -406, 2104, -406,
- 101, -406, -406, 2159, -406, -9, 89, -6, -406, -406,
- -406, -406, -3, -51, -406, -406, 2104, 7, 2104, 2104,
- 2104, -406, 2104, 2104, 2104, 2104, 2104, 629, 120, 130,
- -406, 500, -406, -406, -406, -1, -406, 2034, -406, -406,
- -406, -406, -406, -406, 1911, -406, -406, -406, 225, 344,
- -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
- 31, 2613, -406, -406, -406, -406, 129, 12, -406, -406,
- 1911, -406, -406, -406, -406, -406, -406, -81, 89, -406,
- -54, -406, 18, 119, 2104, 8, -406, 2104, -406, 2104,
- 132, 119, -406, 36, 5, 43, 2613, 119, 119, 595,
- 119, 119, -53, 2613, 21, 46, 2104, -406, 144, 145,
- 2104, 2104, 145, 177, -406, -406, 758, -406, -406, 77,
- -406, -406, -406, -406, 188, -406, -406, -406, -406, 1016,
- 140, 209, -406, 115, 148, 31, 117, -406, 217, 14,
- 223, -406, 224, -406, -406, -406, -406, 2104, 2104, 2104,
+ 1661, -24, -429, -429, -429, -429, -429, -429, -10, -55,
+ -429, -51, 54, -429, -429, -429, 72, -429, 2104, -429,
+ 102, -429, -429, 2159, -429, -6, 123, 7, -429, -429,
+ -429, -429, -2, -85, -429, -429, 2104, 8, 2104, 2104,
+ 2104, -429, 2104, 2104, 2104, 2104, 2104, 629, 121, 130,
+ -429, 500, -429, -429, -429, 6, -429, 2034, -429, -429,
+ -429, -429, -429, -429, 1911, -429, -429, -429, 225, 428,
+ -429, -429, -429, -429, -429, -429, -429, -429, -429, -429,
+ 32, 2613, -429, -429, -429, -429, 131, 12, -429, -429,
+ 1911, -429, -429, -429, -429, -429, -429, -78, 123, -429,
+ -47, -429, 14, 119, 2104, 19, -429, 2104, -429, 2104,
+ 133, 119, -429, 35, 71, 43, 2613, 119, 119, 267,
+ 119, 119, -63, 2613, 22, 47, 2104, -429, 145, 177,
+ 2104, 2104, 177, 201, -429, -429, 758, -429, -429, 82,
+ -429, -429, -429, -429, 196, -429, -429, -429, -429, 1016,
+ 147, 212, -429, 117, 153, 32, 127, -429, 224, 10,
+ 227, -429, 228, -429, -429, -429, -429, 2104, 2104, 2104,
2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
- 2104, -406, -406, 227, 2104, 2104, 2104, 2104, 2104, 2104,
+ 2104, -429, -429, 231, 2104, 2104, 2104, 2104, 2104, 2104,
2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
- 2104, 17, -406, -406, 2104, 219, 2104, 1145, -406, 89,
- 108, 109, -406, -406, -406, 116, 15, 104, 139, 64,
- 2217, 1786, 114, -406, 2104, 2104, -406, 2104, 2104, -406,
- -406, -406, -406, -406, 153, 158, -406, -406, -406, 158,
- -406, -406, -406, 1911, 128, 153, 2104, 2104, -406, 160,
- -406, -406, 257, 211, 216, 269, 2613, 492, 328, 328,
+ 2104, 17, -429, -429, 2104, 223, 2104, 1145, -429, 123,
+ 110, 111, -429, -429, -429, 118, 15, 114, 157, 64,
+ 2217, 1786, 126, -429, 2104, 2104, -429, 2104, 2104, -429,
+ -429, -429, -429, -429, 155, 160, -429, -429, -429, 160,
+ -429, -429, -429, 1911, 138, 155, 2104, 2104, -429, 162,
+ -429, -429, 259, 219, 220, 275, 2613, 492, 328, 328,
328, 2979, 2979, 2979, 2979, 492, 492, 2613, 2613, 2613,
2613, 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2674, 2735,
- -406, 354, 354, 354, 2613, 2430, 2796, 2857, 2918, 492,
- 492, 595, 595, 119, 119, 119, 141, 2491, 189, 2104,
- 276, 150, 159, 2288, -406, 155, 1274, -406, -406, 162,
- -406, -406, -406, -406, 1145, -406, 89, 2104, -406, -19,
- 281, 157, 190, -406, -406, -406, 165, -406, 163, 1786,
- -406, 161, -406, 191, 2613, 86, 195, 145, 887, -406,
- -24, 199, 167, 124, 180, 89, 290, 89, 184, 153,
- 210, -406, 2104, -406, -406, 310, 2359, -406, 1911, 2104,
- 194, -406, -406, 1145, 192, 183, 32, 86, -406, -406,
- 153, 16, 94, 1911, 2104, -406, -406, -406, -406, 2104,
- -406, -406, -406, 2104, 1911, -406, -406, 15, -406, 89,
- 197, -406, 220, -406, 195, 269, 2613, -406, -406, -406,
- 201, 13, 203, -406, -406, -406, 234, 212, 281, -406,
- 214, 222, -406, -406, 94, -406, 277, -406, 2613, -37,
- -406, 208, 220, -406, 89, 229, -406, -406, -406, 2104,
- 240, 215, 13, -406, -406, -406, -406, -406, -406, -406,
- 342, -406, -406, 1911, -406, 1911, 153, 1403, -406, 347,
- -406, 326, 221, 284, -406, 2552, 1786, -406, -406, -406,
- 1786, 1786, 153, -406, -406, 228, -406, -406, 232, 236,
- 230, 1532, -406, -406, -406, -406, 14, -406, -406, 1786,
- -406, 238, 246, 226, -406, 1403, -406, -406, 351, -406,
- -406, -406, -406, 1786, 247, 244, 254, 249, -406, 15,
- 1786, -406, 250, 253, 153, -406, -406
+ -429, -28, -28, -28, 2613, 2430, 2796, 2857, 2918, 492,
+ 492, 267, 267, 119, 119, 119, 148, 2491, 190, 2104,
+ 279, 152, 165, 2288, -429, 156, 1274, -429, -429, 164,
+ -429, -429, -429, -429, 1145, -429, 123, 2104, -429, 18,
+ 287, 159, 193, -429, -429, -429, 168, -429, 166, 1786,
+ -429, 163, -429, 194, 2613, 86, 197, 177, 887, -429,
+ -43, 202, 173, 99, 188, 123, 295, 123, 195, 155,
+ 213, -429, 2104, -429, -429, 312, 2359, -429, 1911, 2104,
+ 198, -429, -429, 1145, 191, 187, 2104, 86, -429, -429,
+ 155, 16, 80, 1911, 2104, -429, -429, -429, -429, 2104,
+ -429, -429, -429, 2104, 1911, -429, -429, 15, -429, 123,
+ 208, -429, 234, -429, 197, 275, 2613, -429, -429, -429,
+ 204, 13, 206, -429, -429, 2613, 237, 215, 287, -429,
+ 216, 222, -429, -429, 80, -429, 280, -429, 2613, -60,
+ -429, 214, 234, -429, 123, 229, -429, -429, -429, 2104,
+ 241, 217, 13, -429, -429, -429, -429, -429, -429, -429,
+ 347, -429, -429, 1911, -429, 1911, 155, 1403, -429, 348,
+ -429, 327, 230, 284, -429, 2552, 1786, -429, -429, -429,
+ 1786, 1786, 155, -429, -429, 239, -429, -429, 240, 236,
+ 235, 1532, -429, -429, -429, -429, 10, -429, -429, 1786,
+ -429, 238, 246, 221, -429, 1403, -429, -429, 351, -429,
+ -429, -429, -429, 1786, 247, 258, 243, 253, -429, 15,
+ 1786, -429, 254, 256, 155, -429, -429
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -406, -406, 237, -406, 308, -296, -406, 69, -405, -30,
- 1, -56, -83, 49, 2, -17, 331, 260, 51, -406,
- -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
- -406, -406, -406, -406, -406, -49, -42, -406, -406, -23,
- -406, -20, -406, -406, -406, -406, -406, -406, -406, -406,
- 9, 76, -406, -406, -406, -406, 0, -406, 336, -406,
- -406, -406, 50, -406, 56, -406, -89, -406, -74, -406,
- -406, -55, -406, 3, -406, -406, 6, -7, 34, -384,
- -406, -308, -73, 4, -406, -406, -406, -406, -406, 386,
- -92, 22, 37, -243, -406, -95, -406, -406, -406, -406,
- -406, -406, -406, -29, -115, 371, -46, -406, -406, -13,
- -406, -406, -406, -406, -406
+ -429, -429, 242, -429, 311, -296, -429, 69, -428, -30,
+ 1, -56, -83, 49, 2, -15, 335, 269, 53, -429,
+ -429, -429, -429, -429, -429, -429, -429, -429, -429, -429,
+ -429, -429, -429, -429, -429, -41, -38, -429, -429, -19,
+ -429, -18, -429, -429, -429, -429, -429, -429, -429, -429,
+ 9, 66, -429, -429, -429, -429, 0, -429, 338, -429,
+ -429, -429, 50, -429, 56, -429, -87, -429, -72, -429,
+ -429, -53, -429, 3, -429, -429, 11, -5, -429, -384,
+ -429, -308, -74, 4, -429, -429, -429, -429, -429, 387,
+ -92, 26, 37, -243, -429, -95, -429, -429, -429, -429,
+ -429, -429, -429, -29, -115, 372, -46, -429, -429, -13,
+ -429, -429, -429, -429, -429
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
{
68, 53, 55, 73, 75, 100, 224, 215, 156, 113,
103, 155, 350, 431, 232, 247, 248, 136, 329, 329,
- 308, 96, 379, 111, 86, 116, 117, 118, 374, 119,
- 120, 121, 123, 116, 156, 96, 89, 3, 193, 87,
- 5, 6, 7, -70, 218, 219, 439, 238, 260, 54,
- 71, 68, 53, 55, 73, 75, 72, 92, 93, 21,
- 22, 490, 91, 167, 261, 491, 492, 92, 93, 210,
- 109, 94, 211, 419, 440, 110, 28, 412, 389, 239,
- 252, 94, 98, 376, 499, 377, 34, 35, 97, 92,
- 93, 123, 92, 93, 230, 455, 116, 242, 507, 311,
- 54, 71, 105, 94, 101, 513, 94, 72, 330, 418,
- 448, 88, 104, 116, 306, 107, 404, 123, 123, 341,
- 420, 385, 108, 146, 149, 512, 421, 395, 112, 396,
- 147, 167, 212, 213, 229, 233, 236, 417, 309, 226,
- 235, 351, 352, 237, 310, 240, 241, 243, 244, 68,
+ 308, 96, 379, 111, -70, 116, 117, 118, 374, 119,
+ 120, 121, 123, 116, 156, 96, 109, 238, 490, 87,
+ 167, 110, 491, 492, 260, 193, 439, 218, 219, 54,
+ 71, 68, 53, 55, 73, 75, 72, 92, 93, 389,
+ 261, 499, 191, 192, 193, 86, 89, 92, 93, 239,
+ 91, 94, 455, 419, 440, 507, 210, 412, 97, 211,
+ 252, 94, 513, 204, 205, 206, 207, 208, 98, 92,
+ 93, 123, 105, 209, 230, 210, 116, 242, 211, 311,
+ 54, 71, 395, 94, 396, 101, 420, 72, 330, 418,
+ 448, 88, 421, 116, 306, 104, 404, 123, 123, 341,
+ 376, 385, 377, 108, 146, 512, 92, 93, 107, 112,
+ 147, 149, 167, 213, 212, 226, 233, 417, 309, 235,
+ 94, 351, 352, 237, 310, 229, 240, 241, 243, 68,
53, 55, 73, 75, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
282, 283, 284, 285, 286, 287, 288, 289, 335, 95,
- 250, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 244, 291, 292, 293, 294, 295, 296, 297, 298, 299,
300, 301, 302, 303, 304, 305, 116, 307, 54, 71,
- 386, 123, 253, 313, 158, 72, 342, -71, 343, 191,
- 192, 193, 255, 475, 256, 257, 258, 68, 53, 319,
- 259, 123, 116, 348, 116, 344, 263, 264, 325, 493,
- 290, 312, 375, 2, -113, 326, 334, 327, 336, 238,
- 209, 158, 210, 123, 123, 211, 340, 13, 14, 15,
- 159, 17, 158, 19, 410, 160, 161, 345, 347, 349,
- 354, 159, 353, 398, 355, 401, 24, 161, 162, 357,
- 163, 516, 359, 363, 459, 29, 30, 31, 365, 367,
- 369, 163, 368, 252, 329, 409, 371, 373, 2, 380,
- 381, -112, 252, 383, 382, 384, 366, 389, 393, 394,
- 426, 397, 13, 14, 15, 399, 17, 401, 19, 403,
- 405, 430, 156, 407, 116, 414, 68, 53, 319, 411,
- 434, 24, 433, 413, 68, 53, 319, 156, 460, 459,
- 29, 30, 31, 438, 445, 336, 376, 447, 156, 449,
- 456, 453, 458, 450, 466, 472, 467, 429, 2, 406,
- 485, 486, 487, 494, 505, 427, 123, 495, 502, 148,
- -153, 496, 13, 14, 15, 509, 17, 168, 19, 500,
- 473, 116, 474, 68, 53, 319, 428, 501, 508, 510,
- 511, 24, 514, 460, 515, 372, 254, 436, 152, 245,
- 29, 30, 31, 468, -155, -155, -155, 156, 391, 156,
- 469, 451, 176, 177, 452, 166, 504, 497, 488, 446,
- 415, 437, 106, 498, 416, -154, 122, 0, 191, 192,
- 193, 432, 194, 195, 196, 0, 465, 0, 0, 0,
- 0, 0, 0, 0, 0, 461, 202, 203, 0, 204,
- 205, 206, 207, 208, 191, 192, 193, 0, 0, 209,
- 0, 210, 0, 0, 211, 0, 0, 479, 477, 478,
- 483, 484, 0, 461, 0, 204, 205, 206, 207, 208,
- 0, 0, 0, 0, 0, 209, 0, 210, 0, 0,
- 211, 479, 477, 478, 483, 484, 0, 0, 0, 0,
+ 386, 123, 236, 313, 250, 72, 342, 253, 343, 191,
+ 192, 193, 158, 475, -71, 255, 256, 68, 53, 319,
+ 257, 123, 116, 348, 116, 344, 258, 259, 325, 493,
+ 263, 264, 375, 2, 290, 312, -113, 326, 336, 327,
+ 209, 158, 210, 123, 123, 211, 334, 13, 14, 15,
+ 159, 17, 158, 19, 410, 160, 161, 238, 340, 345,
+ 347, 159, 354, 398, 353, 401, 24, 161, 162, 349,
+ 163, 516, 355, 357, 459, 29, 30, 31, 359, 365,
+ 363, 163, 367, 252, 368, 409, 369, 371, 2, 373,
+ 329, 380, 252, 381, -112, 383, 366, 382, 384, 389,
+ 426, 393, 13, 14, 15, 394, 17, 401, 19, 397,
+ 399, 430, 156, 405, 116, 407, 68, 53, 319, 414,
+ 403, 24, 413, 411, 68, 53, 319, 156, 460, 459,
+ 29, 30, 31, 433, 434, 336, 438, 445, 156, 376,
+ 447, 449, 458, 450, 453, 466, 456, 429, 467, 406,
+ 472, 485, 486, 502, 505, 427, 123, 191, 192, 193,
+ -153, 487, 148, 415, 494, 495, 496, 168, 510, 500,
+ 473, 116, 474, 68, 53, 319, 428, 501, 508, 509,
+ 206, 207, 208, 460, 511, 372, 514, 515, 209, 436,
+ 210, 254, 152, 211, -155, -155, -155, 156, 245, 156,
+ 391, 468, 176, 177, 469, 451, 452, 166, 504, 497,
+ 488, 446, 498, 106, 416, -154, 437, 122, 191, 192,
+ 193, 0, 194, 195, 196, 432, 465, 0, 0, 0,
+ 0, 0, 2, 0, 0, 461, 202, 203, 0, 204,
+ 205, 206, 207, 208, 0, 0, 13, 14, 15, 209,
+ 17, 210, 19, 0, 211, 0, 0, 479, 477, 478,
+ 483, 484, 0, 461, 0, 24, 0, 0, 0, 0,
+ 0, 0, 0, 0, 29, 30, 31, 0, 0, 0,
+ 0, 479, 477, 478, 483, 484, 0, 0, 0, 0,
0, 0, 0, 0, 0, 479, 477, 478, 483, 484,
-4, 0, 0, 1, 2, 3, 4, 0, 5, 6,
7, 8, 9, 10, 11, 0, 0, 12, 13, 14,
16, 17, 18, 19, 20, 0, 21, 22, 128, 0,
129, 0, 0, 0, 23, 130, 24, 25, 0, 26,
131, 27, 0, 28, 132, 29, 30, 31, 0, 0,
- 32, 33, 0, 34, 35, 191, 192, 193, 0, 0,
+ 32, 33, 0, 34, 35, 0, 0, 0, 0, 0,
0, 36, 37, 0, 133, 0, 0, 0, 38, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 206, 207,
- 208, 0, 0, 0, 0, 0, 209, 0, 210, 39,
- 40, 211, 0, 0, 0, 0, 0, 0, 134, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
+ 40, 0, 0, 0, 0, 0, 0, 0, 134, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42, 0, 0, 0, 0, 43, 44, 0, 0, 0,
45, 0, 46, 0, 47, 0, 48, 0, 0, 0,
{
0, 0, 0, 0, 0, 18, 98, 90, 64, 38,
23, 57, 255, 397, 109, 130, 131, 47, 3, 3,
- 3, 12, 330, 36, 89, 38, 39, 40, 324, 42,
- 43, 44, 45, 46, 90, 26, 121, 5, 92, 49,
- 8, 9, 10, 67, 125, 126, 33, 100, 34, 0,
- 0, 51, 51, 51, 51, 51, 0, 3, 4, 27,
- 28, 466, 121, 100, 50, 470, 471, 3, 4, 123,
- 121, 17, 126, 381, 61, 126, 44, 373, 102, 132,
- 136, 17, 16, 102, 489, 104, 54, 55, 12, 3,
- 4, 104, 3, 4, 107, 132, 109, 126, 503, 214,
- 51, 51, 26, 17, 3, 510, 17, 51, 93, 93,
- 418, 121, 121, 126, 209, 121, 359, 130, 131, 234,
- 26, 35, 125, 3, 125, 509, 32, 3, 121, 5,
- 0, 100, 3, 121, 126, 3, 131, 380, 121, 121,
- 104, 256, 257, 100, 127, 124, 100, 3, 3, 149,
+ 3, 12, 330, 36, 67, 38, 39, 40, 324, 42,
+ 43, 44, 45, 46, 90, 26, 121, 100, 466, 49,
+ 100, 126, 470, 471, 34, 92, 33, 125, 126, 0,
+ 0, 51, 51, 51, 51, 51, 0, 3, 4, 102,
+ 50, 489, 90, 91, 92, 89, 121, 3, 4, 132,
+ 121, 17, 132, 381, 61, 503, 123, 373, 12, 126,
+ 136, 17, 510, 111, 112, 113, 114, 115, 16, 3,
+ 4, 104, 26, 121, 107, 123, 109, 126, 126, 214,
+ 51, 51, 3, 17, 5, 3, 26, 51, 93, 93,
+ 418, 121, 32, 126, 209, 121, 359, 130, 131, 234,
+ 102, 35, 104, 125, 3, 509, 3, 4, 121, 121,
+ 0, 125, 100, 121, 3, 121, 3, 380, 121, 104,
+ 17, 256, 257, 100, 127, 126, 124, 100, 3, 149,
149, 149, 149, 149, 167, 168, 169, 170, 171, 172,
173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
183, 184, 185, 186, 187, 188, 189, 190, 114, 125,
3, 194, 195, 196, 197, 198, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 149, 149,
- 114, 214, 125, 216, 16, 149, 235, 67, 237, 90,
- 91, 92, 3, 456, 99, 67, 99, 217, 217, 217,
- 3, 234, 235, 253, 237, 238, 3, 3, 219, 472,
- 3, 12, 327, 4, 126, 126, 132, 121, 229, 100,
+ 114, 214, 131, 216, 3, 149, 235, 125, 237, 90,
+ 91, 92, 16, 456, 67, 3, 99, 217, 217, 217,
+ 67, 234, 235, 253, 237, 238, 99, 3, 219, 472,
+ 3, 3, 327, 4, 3, 12, 126, 126, 229, 121,
121, 16, 123, 256, 257, 126, 132, 18, 19, 20,
- 25, 22, 16, 24, 369, 30, 31, 104, 100, 131,
- 3, 25, 102, 355, 53, 357, 37, 31, 43, 53,
- 45, 514, 3, 132, 45, 46, 47, 48, 89, 3,
- 121, 45, 132, 339, 3, 368, 131, 125, 4, 132,
- 100, 126, 348, 132, 131, 104, 309, 102, 99, 132,
- 383, 121, 18, 19, 20, 15, 22, 399, 24, 125,
- 100, 394, 368, 3, 327, 132, 316, 316, 316, 125,
- 100, 37, 125, 131, 324, 324, 324, 383, 99, 45,
- 46, 47, 48, 132, 131, 326, 102, 125, 394, 125,
- 132, 64, 434, 121, 104, 3, 131, 393, 4, 362,
- 3, 25, 131, 125, 3, 384, 369, 125, 132, 51,
- 131, 131, 18, 19, 20, 121, 22, 39, 24, 131,
- 453, 384, 455, 373, 373, 373, 389, 131, 131, 125,
- 131, 37, 132, 99, 131, 316, 149, 404, 57, 129,
- 46, 47, 48, 442, 66, 67, 68, 453, 347, 455,
- 442, 424, 74, 75, 424, 69, 495, 481, 463, 416,
- 376, 405, 26, 486, 377, 131, 45, -1, 90, 91,
- 92, 399, 94, 95, 96, -1, 439, -1, -1, -1,
- -1, -1, -1, -1, -1, 435, 108, 109, -1, 111,
- 112, 113, 114, 115, 90, 91, 92, -1, -1, 121,
- -1, 123, -1, -1, 126, -1, -1, 457, 457, 457,
- 457, 457, -1, 463, -1, 111, 112, 113, 114, 115,
- -1, -1, -1, -1, -1, 121, -1, 123, -1, -1,
- 126, 481, 481, 481, 481, 481, -1, -1, -1, -1,
+ 25, 22, 16, 24, 369, 30, 31, 100, 132, 104,
+ 100, 25, 3, 355, 102, 357, 37, 31, 43, 131,
+ 45, 514, 53, 53, 45, 46, 47, 48, 3, 89,
+ 132, 45, 3, 339, 132, 368, 121, 131, 4, 125,
+ 3, 132, 348, 100, 126, 132, 309, 131, 104, 102,
+ 383, 99, 18, 19, 20, 132, 22, 399, 24, 121,
+ 15, 394, 368, 100, 327, 3, 316, 316, 316, 132,
+ 125, 37, 131, 125, 324, 324, 324, 383, 99, 45,
+ 46, 47, 48, 125, 100, 326, 132, 131, 394, 102,
+ 125, 125, 434, 121, 64, 104, 132, 393, 131, 362,
+ 3, 3, 25, 132, 3, 384, 369, 90, 91, 92,
+ 131, 131, 51, 376, 125, 125, 131, 39, 125, 131,
+ 453, 384, 455, 373, 373, 373, 389, 131, 131, 121,
+ 113, 114, 115, 99, 131, 316, 132, 131, 121, 404,
+ 123, 149, 57, 126, 66, 67, 68, 453, 129, 455,
+ 347, 442, 74, 75, 442, 424, 424, 69, 495, 481,
+ 463, 416, 486, 26, 377, 131, 405, 45, 90, 91,
+ 92, -1, 94, 95, 96, 399, 439, -1, -1, -1,
+ -1, -1, 4, -1, -1, 435, 108, 109, -1, 111,
+ 112, 113, 114, 115, -1, -1, 18, 19, 20, 121,
+ 22, 123, 24, -1, 126, -1, -1, 457, 457, 457,
+ 457, 457, -1, 463, -1, 37, -1, -1, -1, -1,
+ -1, -1, -1, -1, 46, 47, 48, -1, -1, -1,
+ -1, 481, 481, 481, 481, 481, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 495, 495, 495, 495, 495,
0, -1, -1, 3, 4, 5, 6, -1, 8, 9,
10, 11, 12, 13, 14, -1, -1, 17, 18, 19,
21, 22, 23, 24, 25, -1, 27, 28, 29, -1,
31, -1, -1, -1, 35, 36, 37, 38, -1, 40,
41, 42, -1, 44, 45, 46, 47, 48, -1, -1,
- 51, 52, -1, 54, 55, 90, 91, 92, -1, -1,
+ 51, 52, -1, 54, 55, -1, -1, -1, -1, -1,
-1, 62, 63, -1, 65, -1, -1, -1, 69, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 113, 114,
- 115, -1, -1, -1, -1, -1, 121, -1, 123, 90,
- 91, 126, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
+ 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
111, -1, -1, -1, -1, 116, 117, -1, -1, -1,
121, -1, 123, -1, 125, -1, 127, -1, -1, -1,
132, 100, 131, 132, 104, 35, 114, 223, 225, 102,
148, 151, 131, 99, 132, 3, 5, 121, 223, 15,
194, 223, 224, 125, 226, 100, 242, 3, 132, 145,
- 237, 125, 138, 131, 132, 211, 225, 226, 93, 214,
+ 237, 125, 138, 131, 132, 242, 225, 226, 93, 214,
26, 32, 172, 174, 176, 177, 145, 236, 242, 239,
145, 212, 224, 125, 100, 198, 148, 209, 132, 33,
61, 166, 167, 168, 169, 131, 210, 125, 214, 125,
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1893 "parser.y"
+#line 1894 "parser.y"
{PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1905 "parser.y"
+#line 1906 "parser.y"
{PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1908 "parser.y"
+#line 1909 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1909 "parser.y"
+#line 1910 "parser.y"
{(yyval.code)=code_new();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1911 "parser.y"
+#line 1912 "parser.y"
{(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1912 "parser.y"
+#line 1913 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1927 "parser.y"
+#line 1928 "parser.y"
{(yyval.code)=(yyvsp[(2) - (3)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1928 "parser.y"
+#line 1929 "parser.y"
{(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1931 "parser.y"
+#line 1932 "parser.y"
{(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1938 "parser.y"
+#line 1939 "parser.y"
{PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1942 "parser.y"
+#line 1943 "parser.y"
{(yyval.code)=(yyvsp[(1) - (2)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1943 "parser.y"
+#line 1944 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1947 "parser.y"
+#line 1948 "parser.y"
{
code_t**cc = &global->init->method->body->code;
*cc = code_append(*cc, (yyvsp[(1) - (1)].code));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1954 "parser.y"
+#line 1955 "parser.y"
{
PASS12
(yyval.number_int)=as3_pass;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1973 "parser.y"
+#line 1974 "parser.y"
{(yyval.node)=(yyvsp[(2) - (2)].node);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1974 "parser.y"
+#line 1975 "parser.y"
{(yyval.node)=mkdummynode();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1976 "parser.y"
+#line 1977 "parser.y"
{(yyval.code)=(yyvsp[(2) - (2)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1977 "parser.y"
+#line 1978 "parser.y"
{(yyval.code)=(yyvsp[(2) - (2)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1979 "parser.y"
+#line 1980 "parser.y"
{(yyval.code) = (yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1980 "parser.y"
+#line 1981 "parser.y"
{(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 1983 "parser.y"
+#line 1984 "parser.y"
{
PASS12
if(variable_exists((yyvsp[(1) - (3)].id)))
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2042 "parser.y"
+#line 2043 "parser.y"
{(yyval.code) = code_new();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2043 "parser.y"
+#line 2044 "parser.y"
{(yyval.code)=(yyvsp[(2) - (2)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2046 "parser.y"
+#line 2047 "parser.y"
{PASS12 new_state();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2046 "parser.y"
+#line 2047 "parser.y"
{
(yyval.code) = code_new();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2065 "parser.y"
+#line 2066 "parser.y"
{(yyval.code)=code_new();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2072 "parser.y"
+#line 2073 "parser.y"
{
PASS1 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),0,1,0);
PASS2 (yyval.id)=(yyvsp[(2) - (3)].id);new_variable((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].classinfo),1,0);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2076 "parser.y"
+#line 2077 "parser.y"
{
PASS12
(yyval.id)=(yyvsp[(1) - (1)].id);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2081 "parser.y"
+#line 2082 "parser.y"
{PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2082 "parser.y"
+#line 2083 "parser.y"
{PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2084 "parser.y"
+#line 2085 "parser.y"
{
if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement");
(yyval.code) = code_new();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2104 "parser.y"
+#line 2105 "parser.y"
{
variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id));
if(!var) {
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2152 "parser.y"
+#line 2153 "parser.y"
{PASS12 new_state();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2152 "parser.y"
+#line 2153 "parser.y"
{
(yyval.code) = code_new();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2171 "parser.y"
+#line 2172 "parser.y"
{PASS12 new_state();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2171 "parser.y"
+#line 2172 "parser.y"
{
(yyval.code) = code_new();
code_t*loopstart = (yyval.code) = abc_label((yyval.code));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2186 "parser.y"
+#line 2187 "parser.y"
{
(yyval.code) = abc___break__(0, "");
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2189 "parser.y"
+#line 2190 "parser.y"
{
(yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2192 "parser.y"
+#line 2193 "parser.y"
{
(yyval.code) = abc___continue__(0, "");
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2195 "parser.y"
+#line 2196 "parser.y"
{
(yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2199 "parser.y"
+#line 2200 "parser.y"
{(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2200 "parser.y"
+#line 2201 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2201 "parser.y"
+#line 2202 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2202 "parser.y"
+#line 2203 "parser.y"
{(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2203 "parser.y"
+#line 2204 "parser.y"
{(yyval.code)=(yyvsp[(1) - (1)].code);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2204 "parser.y"
+#line 2205 "parser.y"
{(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2206 "parser.y"
+#line 2207 "parser.y"
{
(yyval.code) = abc_getlocal(0, state->switch_var);
(yyval.code) = code_append((yyval.code), node_read((yyvsp[(2) - (4)].node)).c);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2217 "parser.y"
+#line 2218 "parser.y"
{
(yyval.code) = (yyvsp[(3) - (3)].code);
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2220 "parser.y"
+#line 2221 "parser.y"
{PASS12 new_state();state->switch_var=alloc_local();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2220 "parser.y"
+#line 2221 "parser.y"
{
(yyval.code) = node_read((yyvsp[(4) - (8)].node)).c;
(yyval.code) = abc_setlocal((yyval.code), state->switch_var);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2251 "parser.y"
+#line 2252 "parser.y"
{PASS12 new_state();
state->exception_name=(yyvsp[(3) - (5)].id);
PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2256 "parser.y"
+#line 2257 "parser.y"
{
namespace_t name_ns = {ACCESS_PACKAGE, ""};
multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)};
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2276 "parser.y"
+#line 2277 "parser.y"
{PASS12 new_state();state->exception_name=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2276 "parser.y"
+#line 2277 "parser.y"
{
(yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code));
if(!(yyvsp[(4) - (5)].code)) {
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2292 "parser.y"
+#line 2293 "parser.y"
{(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2293 "parser.y"
+#line 2294 "parser.y"
{(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2294 "parser.y"
+#line 2295 "parser.y"
{(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2295 "parser.y"
+#line 2296 "parser.y"
{
(yyval.catch_list) = (yyvsp[(1) - (2)].catch_list);
(yyval.catch_list).finally = 0;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2303 "parser.y"
+#line 2304 "parser.y"
{
(yyval.catch_list).l=list_new();
(yyval.catch_list).finally = 0;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2312 "parser.y"
+#line 2313 "parser.y"
{PASS12 new_state();
state->method->has_exceptions=1;
state->method->late_binding=1;//for invariant scope_code
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2315 "parser.y"
+#line 2316 "parser.y"
{
code_t*out = abc_nop(0);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2361 "parser.y"
+#line 2362 "parser.y"
{
(yyval.code)=(yyvsp[(2) - (2)].value).c;
(yyval.code)=abc_throw((yyval.code));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2365 "parser.y"
+#line 2366 "parser.y"
{
if(!state->exception_name)
syntaxerror("re-throw only possible within a catch block");
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2376 "parser.y"
+#line 2377 "parser.y"
{
new_state();
if(state->method->has_exceptions) {
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2386 "parser.y"
+#line 2387 "parser.y"
{
/* remove getlocal;pushwith from scope code again */
state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2404 "parser.y"
+#line 2405 "parser.y"
{PASS12 (yyval.id)="package";}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2405 "parser.y"
+#line 2406 "parser.y"
{PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2407 "parser.y"
+#line 2408 "parser.y"
{PASS12 (yyval.id) = concat3((yyvsp[(1) - (3)].id),".",(yyvsp[(3) - (3)].id));free((yyvsp[(1) - (3)].id));(yyvsp[(1) - (3)].id)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2408 "parser.y"
+#line 2409 "parser.y"
{PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2410 "parser.y"
+#line 2411 "parser.y"
{PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2411 "parser.y"
+#line 2412 "parser.y"
{PASS12 endpackage();(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2412 "parser.y"
+#line 2413 "parser.y"
{PASS12 startpackage("");}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2413 "parser.y"
+#line 2414 "parser.y"
{PASS12 endpackage();(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2435 "parser.y"
+#line 2436 "parser.y"
{
PASS12
slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2449 "parser.y"
+#line 2450 "parser.y"
{
PASS12
if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) {
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2465 "parser.y"
+#line 2466 "parser.y"
{PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2466 "parser.y"
+#line 2467 "parser.y"
{PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2467 "parser.y"
+#line 2468 "parser.y"
{PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2468 "parser.y"
+#line 2469 "parser.y"
{
PASS12
(yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2475 "parser.y"
+#line 2476 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2476 "parser.y"
+#line 2477 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2477 "parser.y"
+#line 2478 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2478 "parser.y"
+#line 2479 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2479 "parser.y"
+#line 2480 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2480 "parser.y"
+#line 2481 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2481 "parser.y"
+#line 2482 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2482 "parser.y"
+#line 2483 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2483 "parser.y"
+#line 2484 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2484 "parser.y"
+#line 2485 "parser.y"
{PASS12 (yyval.flags).flags=FLAG_NAMESPACE;
(yyval.flags).ns=(yyvsp[(1) - (1)].id);
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2488 "parser.y"
+#line 2489 "parser.y"
{PASS12 (yyval.classinfo)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2489 "parser.y"
+#line 2490 "parser.y"
{PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2491 "parser.y"
+#line 2492 "parser.y"
{PASS12 (yyval.classinfo_list)=list_new();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2492 "parser.y"
+#line 2493 "parser.y"
{PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2494 "parser.y"
+#line 2495 "parser.y"
{PASS12 (yyval.classinfo_list)=list_new();}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2495 "parser.y"
+#line 2496 "parser.y"
{PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2499 "parser.y"
+#line 2500 "parser.y"
{PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2501 "parser.y"
+#line 2502 "parser.y"
{PASS12 endclass();(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2505 "parser.y"
+#line 2506 "parser.y"
{PASS12 (yyvsp[(1) - (5)].flags).flags|=FLAG_INTERFACE;
startclass(&(yyvsp[(1) - (5)].flags),(yyvsp[(3) - (5)].id),0,(yyvsp[(4) - (5)].classinfo_list));}
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2508 "parser.y"
+#line 2509 "parser.y"
{PASS12 endclass();(yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2517 "parser.y"
+#line 2518 "parser.y"
{PASS_ALWAYS as3_pass=(yyvsp[(1) - (4)].number_int);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2521 "parser.y"
+#line 2522 "parser.y"
{
code_t*c = state->cls->static_init->header;
c = code_append(c, (yyvsp[(1) - (1)].code));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2532 "parser.y"
+#line 2533 "parser.y"
{
syntaxerror("variable declarations not allowed in interfaces");
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2535 "parser.y"
+#line 2536 "parser.y"
{
PASS12
(yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2569 "parser.y"
+#line 2570 "parser.y"
{PASS12 setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2569 "parser.y"
+#line 2570 "parser.y"
{PASS12 (yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2571 "parser.y"
+#line 2572 "parser.y"
{PASS12 (yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2572 "parser.y"
+#line 2573 "parser.y"
{PASS12 (yyval.code)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2575 "parser.y"
+#line 2576 "parser.y"
{
PASS12
int flags = slotstate_flags->flags;
/* compile time constant */
t->value = malloc(sizeof(constant_t));
memcpy(t->value, &cval, sizeof(constant_t));
+ info->value = constant_clone(t->value);
} else {
typedcode_t v = node_read((yyvsp[(3) - (3)].node));
/* initalization code (if needed) */
if(slotstate_varconst==KW_CONST) {
t->kind= TRAIT_CONST;
+ info->flags |= FLAG_CONST;
}
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2666 "parser.y"
+#line 2669 "parser.y"
{(yyval.constant)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2667 "parser.y"
- {(yyval.constant)=(yyvsp[(2) - (2)].constant);}
+#line 2670 "parser.y"
+ {
+ (yyval.constant) = malloc(sizeof(constant_t));
+ *(yyval.constant) = node_eval((yyvsp[(2) - (2)].node));
+ if((yyval.constant)->type == CONSTANT_UNKNOWN)
+ syntaxerror("can't evaluate default parameter value (needs to be a compile-time constant)");
+}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2670 "parser.y"
+#line 2678 "parser.y"
{(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2671 "parser.y"
+#line 2679 "parser.y"
{
(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2674 "parser.y"
+#line 2682 "parser.y"
{(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2675 "parser.y"
+#line 2683 "parser.y"
{(yyval.constant) = constant_new_string2((yyvsp[(1) - (1)].str).str,(yyvsp[(1) - (1)].str).len);free((char*)(yyvsp[(1) - (1)].str).str);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2676 "parser.y"
+#line 2684 "parser.y"
{(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2677 "parser.y"
+#line 2685 "parser.y"
{(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2678 "parser.y"
+#line 2686 "parser.y"
{(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2679 "parser.y"
+#line 2687 "parser.y"
{(yyval.constant) = constant_new_undefined((yyvsp[(1) - (1)].token));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2680 "parser.y"
+#line 2688 "parser.y"
{(yyval.constant) = constant_new_float(__builtin_nan(""));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2695 "parser.y"
+#line 2703 "parser.y"
{
PASS12
memset(&(yyval.params),0,sizeof((yyval.params)));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2699 "parser.y"
+#line 2707 "parser.y"
{
PASS12
(yyval.params)=(yyvsp[(1) - (1)].params);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2705 "parser.y"
+#line 2713 "parser.y"
{
PASS12
memset(&(yyval.params),0,sizeof((yyval.params)));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2711 "parser.y"
+#line 2719 "parser.y"
{
PASS12
(yyval.params) =(yyvsp[(1) - (4)].params);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2719 "parser.y"
+#line 2727 "parser.y"
{
PASS12
(yyval.params) = (yyvsp[(1) - (3)].params);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2724 "parser.y"
+#line 2732 "parser.y"
{
PASS12
memset(&(yyval.params),0,sizeof((yyval.params)));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2730 "parser.y"
+#line 2738 "parser.y"
{
PASS12
(yyval.param) = rfx_calloc(sizeof(param_t));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2738 "parser.y"
+#line 2746 "parser.y"
{
PASS12
(yyval.param) = rfx_calloc(sizeof(param_t));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2748 "parser.y"
+#line 2756 "parser.y"
{PASS12 (yyval.token)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2751 "parser.y"
+#line 2759 "parser.y"
{PASS12 startfunction(&(yyvsp[(1) - (9)].flags),(yyvsp[(3) - (9)].token),(yyvsp[(4) - (9)].id),&(yyvsp[(6) - (9)].params),(yyvsp[(8) - (9)].classinfo));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2752 "parser.y"
+#line 2760 "parser.y"
{
PASS1
endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2768 "parser.y"
+#line 2776 "parser.y"
{PASS12 (yyval.id)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2770 "parser.y"
+#line 2778 "parser.y"
{PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2771 "parser.y"
+#line 2779 "parser.y"
{
PASS1
endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2793 "parser.y"
+#line 2801 "parser.y"
{
PASS1 NEW(unresolvedinfo_t,c);
memset(c, 0, sizeof(*c));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2812 "parser.y"
+#line 2820 "parser.y"
{
PASS1 NEW(unresolvedinfo_t,c);
memset(c, 0, sizeof(*c));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2829 "parser.y"
+#line 2837 "parser.y"
{PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2830 "parser.y"
+#line 2838 "parser.y"
{PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2832 "parser.y"
+#line 2840 "parser.y"
{PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2833 "parser.y"
+#line 2841 "parser.y"
{PASS12 (yyval.classinfo)=TYPE_ANY;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2834 "parser.y"
+#line 2842 "parser.y"
{PASS12 (yyval.classinfo)=TYPE_ANY;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2843 "parser.y"
+#line 2851 "parser.y"
{PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2844 "parser.y"
+#line 2852 "parser.y"
{PASS12 (yyval.classinfo)=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2848 "parser.y"
+#line 2856 "parser.y"
{(yyval.value_list).cc=0;(yyval.value_list).number=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2849 "parser.y"
+#line 2857 "parser.y"
{(yyval.value_list)=(yyvsp[(2) - (3)].value_list);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2851 "parser.y"
+#line 2859 "parser.y"
{(yyval.value_list).cc=0;(yyval.value_list).number=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2855 "parser.y"
+#line 2863 "parser.y"
{(yyval.value_list).number=1;
(yyval.value_list).cc = (yyvsp[(1) - (1)].value).c;
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2859 "parser.y"
+#line 2867 "parser.y"
{(yyval.value_list) = (yyvsp[(1) - (2)].value_list);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2860 "parser.y"
+#line 2868 "parser.y"
{
(yyval.value_list).number= (yyvsp[(1) - (2)].value_list).number+1;
(yyval.value_list).cc = code_append((yyvsp[(1) - (2)].value_list).cc, (yyvsp[(2) - (2)].value).c);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2866 "parser.y"
+#line 2874 "parser.y"
{
typedcode_t v = node_read((yyvsp[(2) - (4)].node));
(yyval.value).c = v.c;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2903 "parser.y"
+#line 2911 "parser.y"
{
typedcode_t v = node_read((yyvsp[(1) - (4)].node));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2950 "parser.y"
+#line 2958 "parser.y"
{
if(!state->cls) syntaxerror("super() not allowed outside of a class");
if(!state->method) syntaxerror("super() not allowed outside of a function");
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2971 "parser.y"
+#line 2979 "parser.y"
{
typedcode_t v = node_read((yyvsp[(2) - (2)].node));
(yyval.value).c = v.c;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2993 "parser.y"
+#line 3001 "parser.y"
{
(yyval.code) = abc_returnvoid(0);
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 2996 "parser.y"
+#line 3004 "parser.y"
{
(yyval.code) = (yyvsp[(2) - (2)].value).c;
(yyval.code) = abc_returnvalue((yyval.code));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3003 "parser.y"
+#line 3011 "parser.y"
{
(yyval.value) = node_read((yyvsp[(1) - (1)].node));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3006 "parser.y"
+#line 3014 "parser.y"
{
(yyval.value) = node_read((yyvsp[(1) - (1)].node));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3009 "parser.y"
+#line 3017 "parser.y"
{
(yyval.node) = mkmultinode(&node_comma, (yyvsp[(1) - (1)].node));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3012 "parser.y"
+#line 3020 "parser.y"
{
(yyval.node) = multinode_extend((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3015 "parser.y"
+#line 3023 "parser.y"
{
(yyval.code) = node_exec((yyvsp[(1) - (1)].node));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3018 "parser.y"
+#line 3026 "parser.y"
{
(yyval.code) = (yyvsp[(1) - (3)].code);
(yyval.code) = code_append((yyval.code), node_exec((yyvsp[(3) - (3)].node)));
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3023 "parser.y"
+#line 3031 "parser.y"
{(yyval.value_list).cc=0;(yyval.value_list).number=0;}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3024 "parser.y"
+#line 3032 "parser.y"
{(yyval.value_list)=(yyvsp[(1) - (1)].value_list);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3026 "parser.y"
+#line 3034 "parser.y"
{
(yyval.value_list).cc = 0;
(yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3032 "parser.y"
+#line 3040 "parser.y"
{
(yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc;
(yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3041 "parser.y"
+#line 3049 "parser.y"
{(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3042 "parser.y"
+#line 3050 "parser.y"
{(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3043 "parser.y"
+#line 3051 "parser.y"
{(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3044 "parser.y"
+#line 3052 "parser.y"
{(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3045 "parser.y"
+#line 3053 "parser.y"
{(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3046 "parser.y"
- {(yyval.node) = mkcodenode((yyvsp[(1) - (1)].value));}
+#line 3054 "parser.y"
+ {(yyval.node) = (yyvsp[(1) - (1)].node);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3048 "parser.y"
+#line 3056 "parser.y"
{
(yyval.node) = mkconstnode((yyvsp[(1) - (1)].constant));
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3053 "parser.y"
+#line 3061 "parser.y"
{
typedcode_t v;
v.c = 0;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3073 "parser.y"
+#line 3081 "parser.y"
{
typedcode_t v;
v.c = code_new();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3083 "parser.y"
+#line 3091 "parser.y"
{
typedcode_t v;
v.c = code_new();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3092 "parser.y"
+#line 3100 "parser.y"
{(yyval.node) = mknode2(&node_lt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3093 "parser.y"
+#line 3101 "parser.y"
{(yyval.node) = mknode2(&node_gt,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3094 "parser.y"
+#line 3102 "parser.y"
{(yyval.node) = mknode2(&node_le,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3095 "parser.y"
+#line 3103 "parser.y"
{(yyval.node) = mknode2(&node_ge,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3096 "parser.y"
+#line 3104 "parser.y"
{(yyval.node) = mknode2(&node_eqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3097 "parser.y"
+#line 3105 "parser.y"
{(yyval.node) = mknode2(&node_eqeqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3098 "parser.y"
+#line 3106 "parser.y"
{(yyval.node) = mknode2(&node_noteqeq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3099 "parser.y"
+#line 3107 "parser.y"
{(yyval.node) = mknode2(&node_noteq,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3100 "parser.y"
+#line 3108 "parser.y"
{(yyval.node) = mknode2(&node_oror,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3101 "parser.y"
+#line 3109 "parser.y"
{(yyval.node) = mknode2(&node_andand,(yyvsp[(1) - (3)].node),(yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3102 "parser.y"
+#line 3110 "parser.y"
{(yyval.node) = mknode1(&node_not, (yyvsp[(2) - (2)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3103 "parser.y"
+#line 3111 "parser.y"
{(yyval.node) = mknode1(&node_bitnot, (yyvsp[(2) - (2)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3104 "parser.y"
+#line 3112 "parser.y"
{(yyval.node) = mknode2(&node_bitand, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3105 "parser.y"
+#line 3113 "parser.y"
{(yyval.node) = mknode2(&node_bitxor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3106 "parser.y"
+#line 3114 "parser.y"
{(yyval.node) = mknode2(&node_bitor, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3107 "parser.y"
+#line 3115 "parser.y"
{(yyval.node) = mknode2(&node_shr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3108 "parser.y"
+#line 3116 "parser.y"
{(yyval.node) = mknode2(&node_ushr, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3109 "parser.y"
+#line 3117 "parser.y"
{(yyval.node) = mknode2(&node_shl, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3110 "parser.y"
+#line 3118 "parser.y"
{(yyval.node) = mknode2(&node_div, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3111 "parser.y"
+#line 3119 "parser.y"
{(yyval.node) = mknode2(&node_mod, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3112 "parser.y"
+#line 3120 "parser.y"
{(yyval.node) = mknode2(&node_plus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3113 "parser.y"
+#line 3121 "parser.y"
{(yyval.node) = mknode2(&node_minus, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3114 "parser.y"
+#line 3122 "parser.y"
{(yyval.node) = mknode2(&node_multiply, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3115 "parser.y"
+#line 3123 "parser.y"
{(yyval.node) = mknode2(&node_in, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3116 "parser.y"
+#line 3124 "parser.y"
{(yyval.node) = mknode2(&node_as, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3117 "parser.y"
+#line 3125 "parser.y"
{(yyval.node) = mknode2(&node_instanceof, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3118 "parser.y"
+#line 3126 "parser.y"
{(yyval.node) = mknode2(&node_is, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3119 "parser.y"
+#line 3127 "parser.y"
{(yyval.node) = mknode1(&node_typeof, (yyvsp[(3) - (4)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3120 "parser.y"
+#line 3128 "parser.y"
{(yyval.node) = mknode1(&node_void, (yyvsp[(2) - (2)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3121 "parser.y"
+#line 3129 "parser.y"
{ (yyval.node) = mkconstnode(constant_new_undefined());}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3122 "parser.y"
+#line 3130 "parser.y"
{ (yyval.node)=(yyvsp[(2) - (3)].node);}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3123 "parser.y"
+#line 3131 "parser.y"
{(yyval.node) = mknode1(&node_neg, (yyvsp[(2) - (2)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3124 "parser.y"
+#line 3132 "parser.y"
{(yyval.node) = mknode2(&node_arraylookup, (yyvsp[(1) - (4)].node),(yyvsp[(3) - (4)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3125 "parser.y"
+#line 3133 "parser.y"
{(yyval.node) = mknode2(&node_muleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3126 "parser.y"
+#line 3134 "parser.y"
{(yyval.node) = mknode2(&node_modeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3127 "parser.y"
+#line 3135 "parser.y"
{(yyval.node) = mknode2(&node_shleq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3128 "parser.y"
+#line 3136 "parser.y"
{(yyval.node) = mknode2(&node_shreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3129 "parser.y"
+#line 3137 "parser.y"
{(yyval.node) = mknode2(&node_ushreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3130 "parser.y"
+#line 3138 "parser.y"
{ (yyval.node) = mknode2(&node_diveq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3131 "parser.y"
+#line 3139 "parser.y"
{ (yyval.node) = mknode2(&node_bitoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3132 "parser.y"
+#line 3140 "parser.y"
{ (yyval.node) = mknode2(&node_bitxoreq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3133 "parser.y"
+#line 3141 "parser.y"
{ (yyval.node) = mknode2(&node_bitandeq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3134 "parser.y"
+#line 3142 "parser.y"
{ (yyval.node) = mknode2(&node_pluseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3135 "parser.y"
+#line 3143 "parser.y"
{ (yyval.node) = mknode2(&node_minuseq, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3136 "parser.y"
+#line 3144 "parser.y"
{ (yyval.node) = mknode2(&node_assign, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3137 "parser.y"
+#line 3145 "parser.y"
{ (yyval.node) = mknode3(&node_tenary, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3139 "parser.y"
+#line 3147 "parser.y"
{ (yyval.node) = mknode1(&node_rplusplus, (yyvsp[(1) - (2)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3140 "parser.y"
+#line 3148 "parser.y"
{ (yyval.node) = mknode1(&node_rminusminus, (yyvsp[(1) - (2)].node));}
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3141 "parser.y"
+#line 3149 "parser.y"
{(yyval.node) = mknode1(&node_lplusplus, (yyvsp[(2) - (2)].node)); }
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3142 "parser.y"
+#line 3150 "parser.y"
{(yyval.node) = mknode1(&node_lminusminus, (yyvsp[(2) - (2)].node)); }
}
break;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3145 "parser.y"
+#line 3153 "parser.y"
{ if(!state->cls->info)
syntaxerror("super keyword not allowed outside a class");
classinfo_t*t = state->cls->info->superclass;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3159 "parser.y"
+#line 3167 "parser.y"
{
// attribute TODO
(yyval.node) = mkdummynode();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3165 "parser.y"
+#line 3173 "parser.y"
{
// child attribute TODO
(yyval.node) = mkdummynode();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3171 "parser.y"
+#line 3179 "parser.y"
{
// namespace declaration TODO
(yyval.node) = mkdummynode();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3177 "parser.y"
+#line 3185 "parser.y"
{
// descendants TODO
(yyval.node) = mkdummynode();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3183 "parser.y"
+#line 3191 "parser.y"
{
// filter TODO
(yyval.node) = mkdummynode();
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3196 "parser.y"
+#line 3204 "parser.y"
{
typedcode_t v1 = node_read((yyvsp[(1) - (3)].node));
(yyval.value).c = v1.c;
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3254 "parser.y"
+#line 3262 "parser.y"
{
PASS1
/* Queue unresolved identifiers for checking against the parent
as3_schedule_class_noerror(state->package, (yyvsp[(1) - (1)].id));
PASS2
- (yyval.value).t = 0;
- (yyval.value).c = 0;
+ typedcode_t o;
+ o.t = 0;
+ o.c = 0;
+ (yyval.node) = 0;
+
slotinfo_t*a = 0;
memberinfo_t*f = 0;
/* look at variables */
if((v = find_variable(state, (yyvsp[(1) - (1)].id)))) {
// $1 is a local variable
- (yyval.value).c = abc_getlocal((yyval.value).c, v->index);
- (yyval.value).t = v->type;
+ o.c = abc_getlocal(o.c, v->index);
+ o.t = v->type;
+ (yyval.node) = mkcodenode(o);
break;
}
if((v = find_slot(state, (yyvsp[(1) - (1)].id)))) {
- (yyval.value).c = abc_getscopeobject((yyval.value).c, 1);
- (yyval.value).c = abc_getslot((yyval.value).c, v->index);
- (yyval.value).t = v->type;
+ o.c = abc_getscopeobject(o.c, 1);
+ o.c = abc_getslot(o.c, v->index);
+ o.t = v->type;
+ (yyval.node) = mkcodenode(o);
break;
}
/* look at current class' members */
if(!state->method->inner &&
state->cls &&
- (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
- (f->flags&FLAG_STATIC) >= i_am_static)
+ (f = findmember_nsset(state->cls->info, (yyvsp[(1) - (1)].id), 1)))
{
- // $1 is a function in this class
+ // $1 is a member or attribute in this class
int var_is_static = (f->flags&FLAG_STATIC);
- if(f->kind == INFOTYPE_METHOD) {
- (yyval.value).t = TYPE_FUNCTION(f);
- } else {
- (yyval.value).t = f->type;
- }
- if(var_is_static && !i_am_static) {
- /* access to a static member from a non-static location.
- do this via findpropstrict:
- there doesn't seem to be any non-lookup way to access
- static properties of a class */
- state->method->late_binding = 1;
- (yyval.value).t = f->type;
- namespace_t ns = {f->access, f->package};
- multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
- (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
- break;
- } else if(f->slot>0) {
- (yyval.value).c = abc_getlocal_0((yyval.value).c);
- (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
- break;
- } else {
- namespace_t ns = {f->access, f->package};
- multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
- (yyval.value).c = abc_getlocal_0((yyval.value).c);
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
- break;
+ if(f->kind == INFOTYPE_VAR && (f->flags&FLAG_CONST)) {
+ /* if the variable is a constant (and we know what is evaluates to), we
+ can just use the value itself */
+ varinfo_t*v = (varinfo_t*)f;
+ if(v->value) {
+ (yyval.node) = mkconstnode(v->value);
+ break;
+ }
+ }
+
+ if(var_is_static >= i_am_static) {
+ if(f->kind == INFOTYPE_METHOD) {
+ o.t = TYPE_FUNCTION(f);
+ } else {
+ o.t = f->type;
+ }
+
+ if(var_is_static && !i_am_static) {
+ /* access to a static member from a non-static location.
+ do this via findpropstrict:
+ there doesn't seem to be any non-lookup way to access
+ static properties of a class */
+ state->method->late_binding = 1;
+ o.t = f->type;
+ namespace_t ns = {f->access, f->package};
+ multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
+ o.c = abc_findpropstrict2(o.c, &m);
+ o.c = abc_getproperty2(o.c, &m);
+ (yyval.node) = mkcodenode(o);
+ break;
+ } else if(f->slot>0) {
+ o.c = abc_getlocal_0(o.c);
+ o.c = abc_getslot(o.c, f->slot);
+ (yyval.node) = mkcodenode(o);
+ break;
+ } else {
+ namespace_t ns = {f->access, f->package};
+ multiname_t m = {QNAME, &ns, 0, (yyvsp[(1) - (1)].id)};
+ o.c = abc_getlocal_0(o.c);
+ o.c = abc_getproperty2(o.c, &m);
+ (yyval.node) = mkcodenode(o);
+ break;
+ }
}
}
/* look at actual classes, in the current package and imported */
if((a = find_class((yyvsp[(1) - (1)].id)))) {
- (yyval.value) = push_class(a);
+ o = push_class(a);
+ (yyval.node) = mkcodenode(o);
break;
}
/* look through package prefixes */
if(dict_contains(state->import_toplevel_packages, (yyvsp[(1) - (1)].id)) ||
registry_ispackage((yyvsp[(1) - (1)].id))) {
- (yyval.value).c = abc___pushpackage__((yyval.value).c, (yyvsp[(1) - (1)].id));
- (yyval.value).t = 0;
+ o.c = abc___pushpackage__(o.c, (yyvsp[(1) - (1)].id));
+ o.t = 0;
+ (yyval.node) = mkcodenode(o); //?
break;
}
multiname_t m = {MULTINAME, 0, &nopackage_namespace_set, (yyvsp[(1) - (1)].id)};
- (yyval.value).t = 0;
- (yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
- (yyval.value).c = abc_getproperty2((yyval.value).c, &m);
+ o.t = 0;
+ o.c = abc_findpropstrict2(o.c, &m);
+ o.c = abc_getproperty2(o.c, &m);
+ (yyval.node) = mkcodenode(o);
+ break;
}
}
}
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3363 "parser.y"
+#line 3395 "parser.y"
{
PASS12
NEW(namespace_decl_t,n);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3370 "parser.y"
+#line 3402 "parser.y"
{
PASS12
NEW(namespace_decl_t,n);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3377 "parser.y"
+#line 3409 "parser.y"
{
PASS12
NEW(namespace_decl_t,n);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3384 "parser.y"
+#line 3416 "parser.y"
{
PASS12
trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url);
if(as3_pass==2) {
/* Line 1464 of skeleton.m4 */
-#line 3408 "parser.y"
+#line 3440 "parser.y"
{
PASS12
const char*url = (yyvsp[(3) - (3)].classinfo)->name;
syntaxerror("Couldn't resolve namespace %s", (yyvsp[(3) - (3)].classinfo)->name);
}
- if(!s || s->kind != INFOTYPE_SLOT)
+ if(!s || s->kind != INFOTYPE_VAR)
syntaxerror("%s.%s is not a public namespace (%d)", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name, s?s->kind:-1);
if(!s->value || !NS_TYPE(s->value->type))
syntaxerror("%s.%s is not a namespace", (yyvsp[(3) - (3)].classinfo)->package, (yyvsp[(3) - (3)].classinfo)->name);
/* Line 1464 of skeleton.m4 */
-#line 7850 "parser.tab.c"
+#line 7881 "parser.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);