From 79e69e1d109a95f9495b96b29a723758d06a71d9 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Thu, 26 Mar 2009 14:17:22 +0100 Subject: [PATCH] fixed ok/innerfunctionslots.as --- lib/as3/parser.tab.c | 560 ++++++++++++++++++++++++++------------------------ lib/as3/parser.y | 20 +- 2 files changed, 308 insertions(+), 272 deletions(-) diff --git a/lib/as3/parser.tab.c b/lib/as3/parser.tab.c index 155254e..bcf326c 100644 --- a/lib/as3/parser.tab.c +++ b/lib/as3/parser.tab.c @@ -649,6 +649,7 @@ typedef struct _variable { int index; classinfo_t*type; char init; + char is_parameter; methodstate_t*is_inner_method; } variable_t; @@ -835,6 +836,19 @@ static code_t* method_header(methodstate_t*m) c = abc_getlocal_0(c); c = abc_constructsuper(c, 0); } + + if(m->slots) { + /* all parameters that are used by inner functions + need to be copied from local to slot */ + parserassert(m->activation_var); + DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) { + if(v->is_parameter) { + c = abc_getlocal(c, m->activation_var); + c = abc_getlocal(c, v->index); + c = abc_setslot(c, v->index); + } + } + } list_free(m->innerfunctions); m->innerfunctions = 0; return c; @@ -951,9 +965,13 @@ static void function_initvars(methodstate_t*m, params_t*params, int flags, char if(params) { param_list_t*p=0; for(p=params->list;p;p=p->next) { - new_variable(p->param->name, p->param->type, 0, 1); + variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1); + v->is_parameter = 1; } } + if(m->uses_slots) { + dict_dump(m->slots, stdout, ""); + } methodstate_list_t*l = m->innerfunctions; while(l) { @@ -2124,7 +2142,7 @@ code_t* insert_finally(code_t*c, code_t*finally, int tempvar) /* Line 273 of skeleton.m4 */ -#line 2128 "parser.tab.c" +#line 2146 "parser.tab.c" #ifdef short # undef short @@ -2537,37 +2555,37 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 2106, 2106, 2108, 2108, 2109, 2110, 2112, 2113, 2114, - 2115, 2116, 2117, 2118, 2119, 2121, 2121, 2122, 2123, 2125, - 2126, 2127, 2128, 2129, 2130, 2131, 2133, 2134, 2136, 2137, - 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, - 2150, 2151, 2152, 2153, 2156, 2157, 2158, 2159, 2160, 2161, - 2162, 2163, 2167, 2168, 2172, 2179, 2183, 2184, 2188, 2189, - 2191, 2192, 2194, 2255, 2256, 2259, 2259, 2278, 2279, 2280, - 2285, 2289, 2294, 2295, 2297, 2317, 2365, 2365, 2384, 2384, - 2399, 2402, 2405, 2408, 2412, 2413, 2414, 2415, 2416, 2417, - 2419, 2430, 2433, 2433, 2464, 2464, 2489, 2489, 2505, 2506, - 2507, 2508, 2516, 2525, 2525, 2574, 2578, 2589, 2599, 2616, - 2617, 2618, 2620, 2621, 2623, 2623, 2625, 2625, 2628, 2642, - 2658, 2659, 2660, 2661, 2668, 2669, 2670, 2671, 2672, 2673, - 2674, 2675, 2676, 2677, 2681, 2682, 2684, 2685, 2687, 2688, - 2692, 2690, 2698, 2696, 2705, 2706, 2707, 2708, 2709, 2710, - 2711, 2712, 2714, 2720, 2721, 2722, 2723, 2724, 2725, 2728, - 2741, 2741, 2743, 2743, 2745, 2746, 2748, 2823, 2824, 2826, - 2827, 2828, 2829, 2830, 2832, 2833, 2834, 2835, 2847, 2851, - 2857, 2863, 2871, 2876, 2882, 2890, 2898, 2899, 2900, 2903, - 2902, 2919, 2920, 2922, 2921, 2945, 2964, 2978, 2979, 2981, - 2982, 2984, 2985, 2986, 2995, 2996, 3000, 3001, 3003, 3004, - 3005, 3007, 3011, 3012, 3017, 3018, 3054, 3100, 3121, 3142, - 3145, 3152, 3153, 3154, 3160, 3166, 3168, 3170, 3172, 3174, - 3176, 3178, 3195, 3200, 3203, 3206, 3209, 3212, 3215, 3218, - 3221, 3224, 3228, 3231, 3234, 3237, 3240, 3243, 3246, 3249, - 3253, 3264, 3282, 3287, 3292, 3297, 3302, 3307, 3311, 3315, - 3320, 3324, 3328, 3337, 3346, 3356, 3361, 3373, 3379, 3384, - 3390, 3396, 3400, 3402, 3413, 3422, 3429, 3430, 3432, 3438, - 3447, 3454, 3466, 3472, 3478, 3484, 3490, 3496, 3502, 3508, - 3521, 3532, 3539, 3552, 3579, 3593, 3607, 3621, 3636, 3643, - 3650, 3657, 3664, 3675, 3727, 3836, 3843, 3850, 3857, 3872 + 0, 2124, 2124, 2126, 2126, 2127, 2128, 2130, 2131, 2132, + 2133, 2134, 2135, 2136, 2137, 2139, 2139, 2140, 2141, 2143, + 2144, 2145, 2146, 2147, 2148, 2149, 2151, 2152, 2154, 2155, + 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, + 2168, 2169, 2170, 2171, 2174, 2175, 2176, 2177, 2178, 2179, + 2180, 2181, 2185, 2186, 2190, 2197, 2201, 2202, 2206, 2207, + 2209, 2210, 2212, 2273, 2274, 2277, 2277, 2296, 2297, 2298, + 2303, 2307, 2312, 2313, 2315, 2335, 2383, 2383, 2402, 2402, + 2417, 2420, 2423, 2426, 2430, 2431, 2432, 2433, 2434, 2435, + 2437, 2448, 2451, 2451, 2482, 2482, 2507, 2507, 2523, 2524, + 2525, 2526, 2534, 2543, 2543, 2592, 2596, 2607, 2617, 2634, + 2635, 2636, 2638, 2639, 2641, 2641, 2643, 2643, 2646, 2660, + 2676, 2677, 2678, 2679, 2686, 2687, 2688, 2689, 2690, 2691, + 2692, 2693, 2694, 2695, 2699, 2700, 2702, 2703, 2705, 2706, + 2710, 2708, 2716, 2714, 2723, 2724, 2725, 2726, 2727, 2728, + 2729, 2730, 2732, 2738, 2739, 2740, 2741, 2742, 2743, 2746, + 2759, 2759, 2761, 2761, 2763, 2764, 2766, 2841, 2842, 2844, + 2845, 2846, 2847, 2848, 2850, 2851, 2852, 2853, 2865, 2869, + 2875, 2881, 2889, 2894, 2900, 2908, 2916, 2917, 2918, 2921, + 2920, 2937, 2938, 2940, 2939, 2963, 2982, 2996, 2997, 2999, + 3000, 3002, 3003, 3004, 3013, 3014, 3018, 3019, 3021, 3022, + 3023, 3025, 3029, 3030, 3035, 3036, 3072, 3118, 3139, 3160, + 3163, 3170, 3171, 3172, 3178, 3184, 3186, 3188, 3190, 3192, + 3194, 3196, 3213, 3218, 3221, 3224, 3227, 3230, 3233, 3236, + 3239, 3242, 3246, 3249, 3252, 3255, 3258, 3261, 3264, 3267, + 3271, 3282, 3300, 3305, 3310, 3315, 3320, 3325, 3329, 3333, + 3338, 3342, 3346, 3355, 3364, 3374, 3379, 3391, 3397, 3402, + 3408, 3414, 3418, 3420, 3431, 3440, 3447, 3448, 3450, 3456, + 3465, 3472, 3484, 3490, 3496, 3502, 3508, 3514, 3520, 3526, + 3539, 3550, 3557, 3570, 3597, 3611, 3625, 3639, 3654, 3661, + 3668, 3675, 3682, 3693, 3745, 3854, 3861, 3868, 3875, 3890 }; #endif @@ -4362,7 +4380,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2133 "parser.y" +#line 2151 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4373,7 +4391,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2134 "parser.y" +#line 2152 "parser.y" {(yyval.code)=code_new();} } break; @@ -4384,7 +4402,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2136 "parser.y" +#line 2154 "parser.y" {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));} } break; @@ -4395,7 +4413,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2137 "parser.y" +#line 2155 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4406,7 +4424,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2152 "parser.y" +#line 2170 "parser.y" {(yyval.code)=(yyvsp[(2) - (3)].code);} } break; @@ -4417,7 +4435,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2153 "parser.y" +#line 2171 "parser.y" {(yyval.code)=0;} } break; @@ -4428,7 +4446,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2156 "parser.y" +#line 2174 "parser.y" {(yyval.code)=0;} } break; @@ -4439,7 +4457,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2163 "parser.y" +#line 2181 "parser.y" {(yyval.code)=(yyvsp[(3) - (4)].code);} } break; @@ -4450,7 +4468,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2167 "parser.y" +#line 2185 "parser.y" {(yyval.code)=(yyvsp[(1) - (2)].code);} } break; @@ -4461,7 +4479,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2168 "parser.y" +#line 2186 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4472,7 +4490,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2172 "parser.y" +#line 2190 "parser.y" { code_t**cc = &global->init->method->body->code; *cc = code_append(*cc, (yyvsp[(1) - (1)].code)); @@ -4486,7 +4504,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2183 "parser.y" +#line 2201 "parser.y" {(yyval.value)=(yyvsp[(2) - (2)].value);} } break; @@ -4497,7 +4515,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2184 "parser.y" +#line 2202 "parser.y" {(yyval.value).c=abc_pushundefined(0); (yyval.value).t=TYPE_ANY; } @@ -4510,7 +4528,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2188 "parser.y" +#line 2206 "parser.y" {(yyval.code)=(yyvsp[(2) - (2)].code);} } break; @@ -4521,7 +4539,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2189 "parser.y" +#line 2207 "parser.y" {(yyval.code)=(yyvsp[(2) - (2)].code);} } break; @@ -4532,7 +4550,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2191 "parser.y" +#line 2209 "parser.y" {(yyval.code) = (yyvsp[(1) - (1)].code);} } break; @@ -4543,7 +4561,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2192 "parser.y" +#line 2210 "parser.y" {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));} } break; @@ -4554,7 +4572,7 @@ yyreduce: if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2195 "parser.y" +#line 2213 "parser.y" { PASS12 if(variable_exists((yyvsp[(1) - (3)].id))) @@ -4621,7 +4639,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2255 "parser.y" +#line 2273 "parser.y" {(yyval.code) = code_new();} } break; @@ -4632,7 +4650,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2256 "parser.y" +#line 2274 "parser.y" {(yyval.code)=(yyvsp[(2) - (2)].code);} } break; @@ -4643,7 +4661,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2259 "parser.y" +#line 2277 "parser.y" {PASS12 new_state();} } break; @@ -4654,7 +4672,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2259 "parser.y" +#line 2277 "parser.y" { (yyval.code) = code_new(); @@ -4682,7 +4700,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2278 "parser.y" +#line 2296 "parser.y" {(yyval.code)=code_new();} } break; @@ -4693,7 +4711,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2285 "parser.y" +#line 2303 "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); @@ -4707,7 +4725,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2289 "parser.y" +#line 2307 "parser.y" { PASS12 (yyval.id)=(yyvsp[(1) - (1)].id); @@ -4721,7 +4739,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2294 "parser.y" +#line 2312 "parser.y" {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (2)].id);(yyval.for_start).each=0;} } break; @@ -4732,7 +4750,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2295 "parser.y" +#line 2313 "parser.y" {PASS12 new_state();(yyval.for_start).name=(yyvsp[(1) - (3)].id);(yyval.for_start).each=1;} } break; @@ -4743,7 +4761,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2297 "parser.y" +#line 2315 "parser.y" { if((yyvsp[(1) - (8)].for_start).each) syntaxerror("invalid syntax: ; not allowed in for each statement"); (yyval.code) = code_new(); @@ -4772,7 +4790,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2317 "parser.y" +#line 2335 "parser.y" { variable_t*var = find_variable(state, (yyvsp[(2) - (6)].id)); if(!var) { @@ -4829,7 +4847,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2365 "parser.y" +#line 2383 "parser.y" {PASS12 new_state();} } break; @@ -4840,7 +4858,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2365 "parser.y" +#line 2383 "parser.y" { (yyval.code) = code_new(); @@ -4868,7 +4886,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2384 "parser.y" +#line 2402 "parser.y" {PASS12 new_state();} } break; @@ -4879,7 +4897,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2384 "parser.y" +#line 2402 "parser.y" { (yyval.code) = code_new(); code_t*loopstart = (yyval.code) = abc_label((yyval.code)); @@ -4903,7 +4921,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2399 "parser.y" +#line 2417 "parser.y" { (yyval.code) = abc___break__(0, ""); } @@ -4916,7 +4934,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2402 "parser.y" +#line 2420 "parser.y" { (yyval.code) = abc___break__(0, (yyvsp[(2) - (2)].id)); } @@ -4929,7 +4947,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2405 "parser.y" +#line 2423 "parser.y" { (yyval.code) = abc___continue__(0, ""); } @@ -4942,7 +4960,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2408 "parser.y" +#line 2426 "parser.y" { (yyval.code) = abc___continue__(0, (yyvsp[(2) - (2)].id)); } @@ -4955,7 +4973,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2412 "parser.y" +#line 2430 "parser.y" {(yyval.code)=0;} } break; @@ -4966,7 +4984,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2413 "parser.y" +#line 2431 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4977,7 +4995,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2414 "parser.y" +#line 2432 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -4988,7 +5006,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2415 "parser.y" +#line 2433 "parser.y" {(yyval.code)=code_append((yyvsp[(1) - (2)].code),(yyvsp[(2) - (2)].code));} } break; @@ -4999,7 +5017,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2416 "parser.y" +#line 2434 "parser.y" {(yyval.code)=(yyvsp[(1) - (1)].code);} } break; @@ -5010,7 +5028,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2417 "parser.y" +#line 2435 "parser.y" {(yyval.code)=code_append((yyval.code),(yyvsp[(2) - (2)].code));} } break; @@ -5021,7 +5039,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2419 "parser.y" +#line 2437 "parser.y" { (yyval.code) = abc_getlocal(0, state->switch_var); (yyval.code) = code_append((yyval.code), (yyvsp[(2) - (4)].value).c); @@ -5042,7 +5060,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2430 "parser.y" +#line 2448 "parser.y" { (yyval.code) = (yyvsp[(3) - (3)].code); } @@ -5055,7 +5073,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2433 "parser.y" +#line 2451 "parser.y" {PASS12 new_state();state->switch_var=alloc_local();} } break; @@ -5066,7 +5084,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2433 "parser.y" +#line 2451 "parser.y" { (yyval.code)=(yyvsp[(4) - (8)].value).c; (yyval.code) = abc_setlocal((yyval.code), state->switch_var); @@ -5104,7 +5122,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2464 "parser.y" +#line 2482 "parser.y" {PASS12 new_state(); state->exception_name=(yyvsp[(3) - (5)].id); PASS1 new_variable((yyvsp[(3) - (5)].id), 0, 0, 0); @@ -5119,7 +5137,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2469 "parser.y" +#line 2487 "parser.y" { namespace_t name_ns = {ACCESS_PACKAGE, ""}; multiname_t name = {QNAME, &name_ns, 0, (yyvsp[(3) - (9)].id)}; @@ -5149,7 +5167,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2489 "parser.y" +#line 2507 "parser.y" {PASS12 new_state();state->exception_name=0;} } break; @@ -5160,7 +5178,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2489 "parser.y" +#line 2507 "parser.y" { (yyvsp[(4) - (5)].code) = var_block((yyvsp[(4) - (5)].code)); if(!(yyvsp[(4) - (5)].code)) { @@ -5185,7 +5203,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2505 "parser.y" +#line 2523 "parser.y" {(yyval.catch_list).l=list_new();(yyval.catch_list).finally=0;list_append((yyval.catch_list).l,(yyvsp[(1) - (1)].exception));} } break; @@ -5196,7 +5214,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2506 "parser.y" +#line 2524 "parser.y" {(yyval.catch_list)=(yyvsp[(1) - (2)].catch_list);list_append((yyval.catch_list).l,(yyvsp[(2) - (2)].exception));} } break; @@ -5207,7 +5225,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2507 "parser.y" +#line 2525 "parser.y" {(yyval.catch_list)=(yyvsp[(1) - (1)].catch_list);} } break; @@ -5218,7 +5236,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2508 "parser.y" +#line 2526 "parser.y" { (yyval.catch_list) = (yyvsp[(1) - (2)].catch_list); (yyval.catch_list).finally = 0; @@ -5236,7 +5254,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2516 "parser.y" +#line 2534 "parser.y" { (yyval.catch_list).l=list_new(); (yyval.catch_list).finally = 0; @@ -5254,7 +5272,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2525 "parser.y" +#line 2543 "parser.y" {PASS12 new_state(); state->method->has_exceptions=1; state->method->late_binding=1;//for invariant scope_code @@ -5268,7 +5286,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2528 "parser.y" +#line 2546 "parser.y" { code_t*out = abc_nop(0); @@ -5321,7 +5339,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2574 "parser.y" +#line 2592 "parser.y" { (yyval.code)=(yyvsp[(2) - (2)].value).c; (yyval.code)=abc_throw((yyval.code)); @@ -5335,7 +5353,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2578 "parser.y" +#line 2596 "parser.y" { if(!state->exception_name) syntaxerror("re-throw only possible within a catch block"); @@ -5353,7 +5371,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2589 "parser.y" +#line 2607 "parser.y" { new_state(); if(state->method->has_exceptions) { @@ -5373,7 +5391,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2599 "parser.y" +#line 2617 "parser.y" { /* remove getlocal;pushwith from scope code again */ state->method->scope_code = code_cutlast(code_cutlast(state->method->scope_code)); @@ -5397,7 +5415,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2617 "parser.y" +#line 2635 "parser.y" {PASS12 (yyval.id)="package";} } break; @@ -5408,7 +5426,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2618 "parser.y" +#line 2636 "parser.y" {PASS12 (yyval.id)=(yyvsp[(1) - (1)].id);} } break; @@ -5419,7 +5437,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2620 "parser.y" +#line 2638 "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; @@ -5430,7 +5448,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2621 "parser.y" +#line 2639 "parser.y" {PASS12 (yyval.id)=strdup((yyvsp[(1) - (1)].id));} } break; @@ -5441,7 +5459,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2623 "parser.y" +#line 2641 "parser.y" {PASS12 startpackage((yyvsp[(2) - (3)].id));free((yyvsp[(2) - (3)].id));(yyvsp[(2) - (3)].id)=0;} } break; @@ -5452,7 +5470,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2624 "parser.y" +#line 2642 "parser.y" {PASS12 endpackage();(yyval.code)=0;} } break; @@ -5463,7 +5481,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2625 "parser.y" +#line 2643 "parser.y" {PASS12 startpackage("");} } break; @@ -5474,7 +5492,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2626 "parser.y" +#line 2644 "parser.y" {PASS12 endpackage();(yyval.code)=0;} } break; @@ -5485,7 +5503,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2628 "parser.y" +#line 2646 "parser.y" { PASS12 slotinfo_t*s = registry_find((yyvsp[(2) - (2)].classinfo)->package, (yyvsp[(2) - (2)].classinfo)->name); @@ -5509,7 +5527,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2642 "parser.y" +#line 2660 "parser.y" { PASS12 if(strncmp("flash.", (yyvsp[(2) - (4)].id), 6) && as3_pass==1) { @@ -5532,7 +5550,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2658 "parser.y" +#line 2676 "parser.y" {PASS12 (yyval.flags).flags=0;(yyval.flags).ns=0;} } break; @@ -5543,7 +5561,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2659 "parser.y" +#line 2677 "parser.y" {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);} } break; @@ -5554,7 +5572,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2660 "parser.y" +#line 2678 "parser.y" {PASS12 (yyval.flags)=(yyvsp[(1) - (1)].flags);} } break; @@ -5565,7 +5583,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2661 "parser.y" +#line 2679 "parser.y" { PASS12 (yyval.flags).flags=(yyvsp[(1) - (2)].flags).flags|(yyvsp[(2) - (2)].flags).flags; @@ -5582,7 +5600,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2668 "parser.y" +#line 2686 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PUBLIC;(yyval.flags).ns=0;} } break; @@ -5593,7 +5611,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2669 "parser.y" +#line 2687 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PRIVATE;(yyval.flags).ns=0;} } break; @@ -5604,7 +5622,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2670 "parser.y" +#line 2688 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PROTECTED;(yyval.flags).ns=0;} } break; @@ -5615,7 +5633,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2671 "parser.y" +#line 2689 "parser.y" {PASS12 (yyval.flags).flags=FLAG_STATIC;(yyval.flags).ns=0;} } break; @@ -5626,7 +5644,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2672 "parser.y" +#line 2690 "parser.y" {PASS12 (yyval.flags).flags=FLAG_DYNAMIC;(yyval.flags).ns=0;} } break; @@ -5637,7 +5655,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2673 "parser.y" +#line 2691 "parser.y" {PASS12 (yyval.flags).flags=FLAG_FINAL;(yyval.flags).ns=0;} } break; @@ -5648,7 +5666,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2674 "parser.y" +#line 2692 "parser.y" {PASS12 (yyval.flags).flags=FLAG_OVERRIDE;(yyval.flags).ns=0;} } break; @@ -5659,7 +5677,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2675 "parser.y" +#line 2693 "parser.y" {PASS12 (yyval.flags).flags=FLAG_NATIVE;(yyval.flags).ns=0;} } break; @@ -5670,7 +5688,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2676 "parser.y" +#line 2694 "parser.y" {PASS12 (yyval.flags).flags=FLAG_PACKAGEINTERNAL;(yyval.flags).ns=0;} } break; @@ -5681,7 +5699,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2677 "parser.y" +#line 2695 "parser.y" {PASS12 (yyval.flags).flags=FLAG_NAMESPACE; (yyval.flags).ns=(yyvsp[(1) - (1)].id); } @@ -5694,7 +5712,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2681 "parser.y" +#line 2699 "parser.y" {PASS12 (yyval.classinfo)=0;} } break; @@ -5705,7 +5723,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2682 "parser.y" +#line 2700 "parser.y" {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);} } break; @@ -5716,7 +5734,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2684 "parser.y" +#line 2702 "parser.y" {PASS12 (yyval.classinfo_list)=list_new();} } break; @@ -5727,7 +5745,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2685 "parser.y" +#line 2703 "parser.y" {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);} } break; @@ -5738,7 +5756,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2687 "parser.y" +#line 2705 "parser.y" {PASS12 (yyval.classinfo_list)=list_new();} } break; @@ -5749,7 +5767,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2688 "parser.y" +#line 2706 "parser.y" {PASS12 (yyval.classinfo_list)=(yyvsp[(2) - (2)].classinfo_list);} } break; @@ -5760,7 +5778,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2692 "parser.y" +#line 2710 "parser.y" {PASS12 startclass(&(yyvsp[(1) - (6)].flags),(yyvsp[(3) - (6)].id),(yyvsp[(4) - (6)].classinfo),(yyvsp[(5) - (6)].classinfo_list));} } break; @@ -5771,7 +5789,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2694 "parser.y" +#line 2712 "parser.y" {PASS12 endclass();(yyval.code)=0;} } break; @@ -5782,7 +5800,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2698 "parser.y" +#line 2716 "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));} } @@ -5794,7 +5812,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2701 "parser.y" +#line 2719 "parser.y" {PASS12 endclass();(yyval.code)=0;} } break; @@ -5805,7 +5823,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2714 "parser.y" +#line 2732 "parser.y" { code_t*c = state->cls->static_init->header; c = code_append(c, (yyvsp[(1) - (1)].code)); @@ -5820,7 +5838,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2725 "parser.y" +#line 2743 "parser.y" { syntaxerror("variable declarations not allowed in interfaces"); } @@ -5833,7 +5851,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2728 "parser.y" +#line 2746 "parser.y" { PASS12 (yyvsp[(1) - (8)].flags).flags |= FLAG_PUBLIC; @@ -5853,7 +5871,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2743 "parser.y" +#line 2761 "parser.y" {setslotstate(&(yyvsp[(1) - (2)].flags),(yyvsp[(2) - (2)].token));} } break; @@ -5864,7 +5882,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2743 "parser.y" +#line 2761 "parser.y" {(yyval.code)=(yyvsp[(4) - (4)].code);setslotstate(0, 0);} } break; @@ -5875,7 +5893,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2745 "parser.y" +#line 2763 "parser.y" {(yyval.code) = (yyvsp[(1) - (1)].code);} } break; @@ -5886,7 +5904,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2746 "parser.y" +#line 2764 "parser.y" {(yyval.code) = code_append((yyvsp[(1) - (3)].code), (yyvsp[(3) - (3)].code));} } break; @@ -5897,7 +5915,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2749 "parser.y" +#line 2767 "parser.y" { int flags = slotstate_flags->flags; namespace_t ns = modifiers2access(slotstate_flags); @@ -5978,7 +5996,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2823 "parser.y" +#line 2841 "parser.y" {(yyval.constant)=0;} } break; @@ -5989,7 +6007,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2824 "parser.y" +#line 2842 "parser.y" {(yyval.constant)=(yyvsp[(2) - (2)].constant);} } break; @@ -6000,7 +6018,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2826 "parser.y" +#line 2844 "parser.y" {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_uint));} } break; @@ -6011,7 +6029,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2827 "parser.y" +#line 2845 "parser.y" {(yyval.constant) = constant_new_int((yyvsp[(1) - (1)].number_int));} } break; @@ -6022,7 +6040,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2828 "parser.y" +#line 2846 "parser.y" {(yyval.constant) = constant_new_uint((yyvsp[(1) - (1)].number_uint));} } break; @@ -6033,7 +6051,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2829 "parser.y" +#line 2847 "parser.y" {(yyval.constant) = constant_new_float((yyvsp[(1) - (1)].number_float));} } break; @@ -6044,7 +6062,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2830 "parser.y" +#line 2848 "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; @@ -6055,7 +6073,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2832 "parser.y" +#line 2850 "parser.y" {(yyval.constant) = constant_new_true((yyvsp[(1) - (1)].token));} } break; @@ -6066,7 +6084,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2833 "parser.y" +#line 2851 "parser.y" {(yyval.constant) = constant_new_false((yyvsp[(1) - (1)].token));} } break; @@ -6077,7 +6095,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2834 "parser.y" +#line 2852 "parser.y" {(yyval.constant) = constant_new_null((yyvsp[(1) - (1)].token));} } break; @@ -6088,7 +6106,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2835 "parser.y" +#line 2853 "parser.y" { if(!strcmp((yyvsp[(1) - (1)].id), "NaN")) { (yyval.constant) = constant_new_float(__builtin_nan("")); @@ -6106,7 +6124,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2847 "parser.y" +#line 2865 "parser.y" { PASS12 memset(&(yyval.params),0,sizeof((yyval.params))); @@ -6120,7 +6138,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2851 "parser.y" +#line 2869 "parser.y" { PASS12 (yyval.params)=(yyvsp[(1) - (1)].params); @@ -6134,7 +6152,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2857 "parser.y" +#line 2875 "parser.y" { PASS12 memset(&(yyval.params),0,sizeof((yyval.params))); @@ -6150,7 +6168,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2863 "parser.y" +#line 2881 "parser.y" { PASS12 (yyval.params) =(yyvsp[(1) - (4)].params); @@ -6166,7 +6184,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2871 "parser.y" +#line 2889 "parser.y" { PASS12 (yyval.params) = (yyvsp[(1) - (3)].params); @@ -6181,7 +6199,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2876 "parser.y" +#line 2894 "parser.y" { PASS12 memset(&(yyval.params),0,sizeof((yyval.params))); @@ -6196,7 +6214,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2882 "parser.y" +#line 2900 "parser.y" { PASS12 (yyval.param) = rfx_calloc(sizeof(param_t)); @@ -6214,7 +6232,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2890 "parser.y" +#line 2908 "parser.y" { PASS12 (yyval.param) = rfx_calloc(sizeof(param_t)); @@ -6232,7 +6250,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2900 "parser.y" +#line 2918 "parser.y" {PASS12 (yyval.token)=0;} } break; @@ -6243,7 +6261,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2903 "parser.y" +#line 2921 "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; @@ -6254,7 +6272,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2904 "parser.y" +#line 2922 "parser.y" { PASS1 endfunction(&(yyvsp[(1) - (12)].flags),(yyvsp[(3) - (12)].token),(yyvsp[(4) - (12)].id),&(yyvsp[(6) - (12)].params),0,0); @@ -6278,7 +6296,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2920 "parser.y" +#line 2938 "parser.y" {PASS12 (yyval.id)=0;} } break; @@ -6289,7 +6307,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2922 "parser.y" +#line 2940 "parser.y" {PASS12 innerfunction((yyvsp[(2) - (7)].id),&(yyvsp[(4) - (7)].params),(yyvsp[(6) - (7)].classinfo));} } break; @@ -6300,7 +6318,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2923 "parser.y" +#line 2941 "parser.y" { PASS1 endfunction(0,0,(yyvsp[(2) - (10)].id),&(yyvsp[(4) - (10)].params),0,0); @@ -6328,7 +6346,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2945 "parser.y" +#line 2963 "parser.y" { PASS1 NEW(unresolvedinfo_t,c); memset(c, 0, sizeof(*c)); @@ -6356,7 +6374,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2964 "parser.y" +#line 2982 "parser.y" { PASS1 NEW(unresolvedinfo_t,c); memset(c, 0, sizeof(*c)); @@ -6379,7 +6397,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2981 "parser.y" +#line 2999 "parser.y" {PASS12 (yyval.classinfo_list)=list_new();list_append((yyval.classinfo_list), (yyvsp[(1) - (1)].classinfo));} } break; @@ -6390,7 +6408,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2982 "parser.y" +#line 3000 "parser.y" {PASS12 (yyval.classinfo_list)=(yyvsp[(1) - (3)].classinfo_list);list_append((yyval.classinfo_list),(yyvsp[(3) - (3)].classinfo));} } break; @@ -6401,7 +6419,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2984 "parser.y" +#line 3002 "parser.y" {PASS12 (yyval.classinfo)=(yyvsp[(1) - (1)].classinfo);} } break; @@ -6412,7 +6430,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2985 "parser.y" +#line 3003 "parser.y" {PASS12 (yyval.classinfo)=registry_getanytype();} } break; @@ -6423,7 +6441,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2986 "parser.y" +#line 3004 "parser.y" {PASS12 (yyval.classinfo)=registry_getanytype();} } break; @@ -6434,7 +6452,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2995 "parser.y" +#line 3013 "parser.y" {PASS12 (yyval.classinfo)=(yyvsp[(2) - (2)].classinfo);} } break; @@ -6445,7 +6463,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 2996 "parser.y" +#line 3014 "parser.y" {PASS12 (yyval.classinfo)=0;} } break; @@ -6456,7 +6474,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3000 "parser.y" +#line 3018 "parser.y" {(yyval.value_list).cc=0;(yyval.value_list).number=0;} } break; @@ -6467,7 +6485,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3001 "parser.y" +#line 3019 "parser.y" {(yyval.value_list)=(yyvsp[(2) - (3)].value_list);} } break; @@ -6478,7 +6496,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3003 "parser.y" +#line 3021 "parser.y" {(yyval.value_list).cc=0;(yyval.value_list).number=0;} } break; @@ -6489,7 +6507,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3007 "parser.y" +#line 3025 "parser.y" {(yyval.value_list).number=1; (yyval.value_list).cc = (yyvsp[(1) - (1)].value).c; } @@ -6502,7 +6520,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3011 "parser.y" +#line 3029 "parser.y" {(yyval.value_list) = (yyvsp[(1) - (2)].value_list);} } break; @@ -6513,7 +6531,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3012 "parser.y" +#line 3030 "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); @@ -6527,7 +6545,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3018 "parser.y" +#line 3036 "parser.y" { (yyval.value).c = (yyvsp[(2) - (4)].value).c; if((yyval.value).c->opcode == OPCODE_COERCE_A) (yyval.value).c = code_cutlast((yyval.value).c); @@ -6568,7 +6586,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3054 "parser.y" +#line 3072 "parser.y" { (yyval.value).c = (yyvsp[(1) - (4)].value).c; @@ -6623,7 +6641,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3100 "parser.y" +#line 3118 "parser.y" { if(!state->cls) syntaxerror("super() not allowed outside of a class"); if(!state->method) syntaxerror("super() not allowed outside of a function"); @@ -6653,7 +6671,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3121 "parser.y" +#line 3139 "parser.y" { (yyval.value).c = (yyvsp[(2) - (2)].value).c; if((yyval.value).c->opcode == OPCODE_COERCE_A) { @@ -6683,7 +6701,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3142 "parser.y" +#line 3160 "parser.y" { (yyval.code) = abc_returnvoid(0); } @@ -6696,7 +6714,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3145 "parser.y" +#line 3163 "parser.y" { (yyval.code) = (yyvsp[(2) - (2)].value).c; (yyval.code) = abc_returnvalue((yyval.code)); @@ -6710,7 +6728,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3152 "parser.y" +#line 3170 "parser.y" {(yyval.value)=(yyvsp[(1) - (1)].value);} } break; @@ -6721,7 +6739,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3153 "parser.y" +#line 3171 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6732,7 +6750,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3154 "parser.y" +#line 3172 "parser.y" { (yyval.value).c = (yyvsp[(1) - (3)].value).c; (yyval.value).c = cut_last_push((yyval.value).c); @@ -6748,7 +6766,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3160 "parser.y" +#line 3178 "parser.y" { (yyval.code)=cut_last_push((yyvsp[(1) - (1)].value).c); } @@ -6761,7 +6779,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3166 "parser.y" +#line 3184 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6772,7 +6790,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3170 "parser.y" +#line 3188 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6783,7 +6801,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3172 "parser.y" +#line 3190 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6794,7 +6812,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3174 "parser.y" +#line 3192 "parser.y" {(yyval.value) = (yyvsp[(1) - (1)].value);} } break; @@ -6805,7 +6823,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3178 "parser.y" +#line 3196 "parser.y" { (yyval.value).c = 0; namespace_t ns = {ACCESS_PACKAGE, ""}; @@ -6831,7 +6849,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3195 "parser.y" +#line 3213 "parser.y" {(yyval.value).c = abc_pushbyte(0, (yyvsp[(1) - (1)].number_uint)); //MULTINAME(m, registry_getintclass()); //$$.c = abc_coerce2($$.c, &m); // FIXME @@ -6846,7 +6864,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3200 "parser.y" +#line 3218 "parser.y" {(yyval.value).c = abc_pushshort(0, (yyvsp[(1) - (1)].number_uint)); (yyval.value).t = TYPE_INT; } @@ -6859,7 +6877,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3203 "parser.y" +#line 3221 "parser.y" {(yyval.value).c = abc_pushint(0, (yyvsp[(1) - (1)].number_int)); (yyval.value).t = TYPE_INT; } @@ -6872,7 +6890,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3206 "parser.y" +#line 3224 "parser.y" {(yyval.value).c = abc_pushuint(0, (yyvsp[(1) - (1)].number_uint)); (yyval.value).t = TYPE_UINT; } @@ -6885,7 +6903,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3209 "parser.y" +#line 3227 "parser.y" {(yyval.value).c = abc_pushdouble(0, (yyvsp[(1) - (1)].number_float)); (yyval.value).t = TYPE_FLOAT; } @@ -6898,7 +6916,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3212 "parser.y" +#line 3230 "parser.y" {(yyval.value).c = abc_pushstring2(0, &(yyvsp[(1) - (1)].str));free((char*)(yyvsp[(1) - (1)].str).str); (yyval.value).t = TYPE_STRING; } @@ -6911,7 +6929,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3215 "parser.y" +#line 3233 "parser.y" {(yyval.value).c = abc_pushundefined(0); (yyval.value).t = TYPE_ANY; } @@ -6924,7 +6942,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3218 "parser.y" +#line 3236 "parser.y" {(yyval.value).c = abc_pushtrue(0); (yyval.value).t = TYPE_BOOLEAN; } @@ -6937,7 +6955,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3221 "parser.y" +#line 3239 "parser.y" {(yyval.value).c = abc_pushfalse(0); (yyval.value).t = TYPE_BOOLEAN; } @@ -6950,7 +6968,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3224 "parser.y" +#line 3242 "parser.y" {(yyval.value).c = abc_pushnull(0); (yyval.value).t = TYPE_NULL; } @@ -6963,7 +6981,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3228 "parser.y" +#line 3246 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6976,7 +6994,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3231 "parser.y" +#line 3249 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -6989,7 +7007,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3234 "parser.y" +#line 3252 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterthan((yyval.value).c);(yyval.value).c=abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -7002,7 +7020,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3237 "parser.y" +#line 3255 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_greaterequals((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -7015,7 +7033,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3240 "parser.y" +#line 3258 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -7028,7 +7046,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3243 "parser.y" +#line 3261 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -7041,7 +7059,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3246 "parser.y" +#line 3264 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_strictequals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -7054,7 +7072,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3249 "parser.y" +#line 3267 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c);(yyval.value).c = abc_equals((yyval.value).c);(yyval.value).c = abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; } @@ -7067,7 +7085,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3253 "parser.y" +#line 3271 "parser.y" {(yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'O'); (yyval.value).c = (yyvsp[(1) - (3)].value).c; (yyval.value).c = converttype((yyval.value).c, (yyvsp[(1) - (3)].value).t, (yyval.value).t); @@ -7088,7 +7106,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3264 "parser.y" +#line 3282 "parser.y" { (yyval.value).t = join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'A'); /*printf("%08x:\n",$1.t); @@ -7115,7 +7133,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3282 "parser.y" +#line 3300 "parser.y" {(yyval.value).c=(yyvsp[(2) - (2)].value).c; (yyval.value).c = abc_not((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7129,7 +7147,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3287 "parser.y" +#line 3305 "parser.y" {(yyval.value).c=(yyvsp[(2) - (2)].value).c; (yyval.value).c = abc_bitnot((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7143,7 +7161,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3292 "parser.y" +#line 3310 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_bitand((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7157,7 +7175,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3297 "parser.y" +#line 3315 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_bitxor((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7171,7 +7189,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3302 "parser.y" +#line 3320 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_bitor((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7185,7 +7203,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3307 "parser.y" +#line 3325 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_rshift((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7199,7 +7217,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3311 "parser.y" +#line 3329 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_urshift((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7213,7 +7231,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3315 "parser.y" +#line 3333 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_lshift((yyval.value).c); (yyval.value).t = TYPE_INT; @@ -7227,7 +7245,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3320 "parser.y" +#line 3338 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_divide((yyval.value).c); (yyval.value).t = TYPE_NUMBER; @@ -7241,7 +7259,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3324 "parser.y" +#line 3342 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_modulo((yyval.value).c); (yyval.value).t = TYPE_NUMBER; @@ -7255,7 +7273,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3328 "parser.y" +#line 3346 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); if(BOTH_INT((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t)) { (yyval.value).c = abc_add_i((yyval.value).c); @@ -7274,7 +7292,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3337 "parser.y" +#line 3355 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) { (yyval.value).c = abc_subtract_i((yyval.value).c); @@ -7293,7 +7311,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3346 "parser.y" +#line 3364 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) { (yyval.value).c = abc_multiply_i((yyval.value).c); @@ -7312,7 +7330,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3356 "parser.y" +#line 3374 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c,(yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_in((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7326,7 +7344,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3361 "parser.y" +#line 3379 "parser.y" {char use_astype=0; // flash player's astype works differently than astypelate if(use_astype && TYPE_IS_CLASS((yyvsp[(3) - (3)].value).t) && (yyvsp[(3) - (3)].value).t->data) { MULTINAME(m, (classinfo_t*)((yyvsp[(3) - (3)].value).t->data)); @@ -7347,7 +7365,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3374 "parser.y" +#line 3392 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_instanceof((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7361,7 +7379,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3379 "parser.y" +#line 3397 "parser.y" {(yyval.value).c = code_append((yyvsp[(1) - (3)].value).c, (yyvsp[(3) - (3)].value).c); (yyval.value).c = abc_istypelate((yyval.value).c); (yyval.value).t = TYPE_BOOLEAN; @@ -7375,7 +7393,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3384 "parser.y" +#line 3402 "parser.y" { (yyval.value).c = (yyvsp[(3) - (4)].value).c; (yyval.value).c = abc_typeof((yyval.value).c); @@ -7390,7 +7408,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3390 "parser.y" +#line 3408 "parser.y" { (yyval.value).c = cut_last_push((yyvsp[(2) - (2)].value).c); (yyval.value).c = abc_pushundefined((yyval.value).c); @@ -7405,7 +7423,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3396 "parser.y" +#line 3414 "parser.y" { (yyval.value).c = abc_pushundefined(0); (yyval.value).t = TYPE_ANY; } @@ -7418,7 +7436,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3400 "parser.y" +#line 3418 "parser.y" {(yyval.value)=(yyvsp[(2) - (3)].value);} } break; @@ -7429,7 +7447,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3402 "parser.y" +#line 3420 "parser.y" { (yyval.value)=(yyvsp[(2) - (2)].value); if(IS_INT((yyvsp[(2) - (2)].value).t)) { @@ -7449,7 +7467,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3413 "parser.y" +#line 3431 "parser.y" { (yyval.value).c = (yyvsp[(1) - (4)].value).c; (yyval.value).c = code_append((yyval.value).c, (yyvsp[(3) - (4)].value).c); @@ -7467,7 +7485,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3422 "parser.y" +#line 3440 "parser.y" { (yyval.value).c = code_new(); (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc); @@ -7483,7 +7501,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3429 "parser.y" +#line 3447 "parser.y" {(yyval.value_list).cc=0;(yyval.value_list).number=0;} } break; @@ -7494,7 +7512,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3430 "parser.y" +#line 3448 "parser.y" {(yyval.value_list)=(yyvsp[(1) - (1)].value_list);} } break; @@ -7505,7 +7523,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3432 "parser.y" +#line 3450 "parser.y" { (yyval.value_list).cc = 0; (yyval.value_list).cc = code_append((yyval.value_list).cc, (yyvsp[(1) - (3)].value).c); @@ -7521,7 +7539,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3438 "parser.y" +#line 3456 "parser.y" { (yyval.value_list).cc = (yyvsp[(1) - (5)].value_list).cc; (yyval.value_list).number = (yyvsp[(1) - (5)].value_list).number+2; @@ -7537,7 +7555,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3447 "parser.y" +#line 3465 "parser.y" { (yyval.value).c = code_new(); (yyval.value).c = code_append((yyval.value).c, (yyvsp[(2) - (3)].value_list).cc); @@ -7553,7 +7571,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3454 "parser.y" +#line 3472 "parser.y" { code_t*c = (yyvsp[(3) - (3)].value).c; if(BOTH_INT((yyvsp[(1) - (3)].value).t,(yyvsp[(3) - (3)].value).t)) { @@ -7574,7 +7592,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3466 "parser.y" +#line 3484 "parser.y" { code_t*c = abc_modulo((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '%'), (yyvsp[(1) - (3)].value).t); @@ -7590,7 +7608,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3472 "parser.y" +#line 3490 "parser.y" { code_t*c = abc_lshift((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '<'), (yyvsp[(1) - (3)].value).t); @@ -7606,7 +7624,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3478 "parser.y" +#line 3496 "parser.y" { code_t*c = abc_rshift((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '>'), (yyvsp[(1) - (3)].value).t); @@ -7622,7 +7640,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3484 "parser.y" +#line 3502 "parser.y" { code_t*c = abc_urshift((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, 'U'), (yyvsp[(1) - (3)].value).t); @@ -7638,7 +7656,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3490 "parser.y" +#line 3508 "parser.y" { code_t*c = abc_divide((yyvsp[(3) - (3)].value).c); c=converttype(c, join_types((yyvsp[(1) - (3)].value).t, (yyvsp[(3) - (3)].value).t, '/'), (yyvsp[(1) - (3)].value).t); @@ -7654,7 +7672,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3496 "parser.y" +#line 3514 "parser.y" { code_t*c = abc_bitor((yyvsp[(3) - (3)].value).c); c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t); @@ -7670,7 +7688,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3502 "parser.y" +#line 3520 "parser.y" { code_t*c = abc_bitxor((yyvsp[(3) - (3)].value).c); c=converttype(c, TYPE_INT, (yyvsp[(1) - (3)].value).t); @@ -7686,7 +7704,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3508 "parser.y" +#line 3526 "parser.y" { code_t*c = (yyvsp[(3) - (3)].value).c; @@ -7709,7 +7727,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3521 "parser.y" +#line 3539 "parser.y" { code_t*c = (yyvsp[(3) - (3)].value).c; if(TYPE_IS_INT((yyvsp[(1) - (3)].value).t)) { c=abc_subtract_i(c); @@ -7730,7 +7748,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3532 "parser.y" +#line 3550 "parser.y" { code_t*c = 0; c = code_append(c, (yyvsp[(3) - (3)].value).c); c = converttype(c, (yyvsp[(3) - (3)].value).t, (yyvsp[(1) - (3)].value).t); @@ -7746,7 +7764,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3539 "parser.y" +#line 3557 "parser.y" { (yyval.value).t = join_types((yyvsp[(3) - (5)].value).t,(yyvsp[(5) - (5)].value).t,'?'); (yyval.value).c = (yyvsp[(1) - (5)].value).c; @@ -7768,7 +7786,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3552 "parser.y" +#line 3570 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(1) - (2)].value).t; if(is_getlocal((yyvsp[(1) - (2)].value).c) && (TYPE_IS_INT((yyvsp[(1) - (2)].value).t) || TYPE_IS_NUMBER((yyvsp[(1) - (2)].value).t))) { @@ -7803,7 +7821,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3579 "parser.y" +#line 3597 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(1) - (2)].value).t; if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) { @@ -7826,7 +7844,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3593 "parser.y" +#line 3611 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(2) - (2)].value).t; if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) { @@ -7849,7 +7867,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3607 "parser.y" +#line 3625 "parser.y" { code_t*c = 0; classinfo_t*type = (yyvsp[(2) - (2)].value).t; if(TYPE_IS_INT(type) || TYPE_IS_UINT(type)) { @@ -7872,7 +7890,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3622 "parser.y" +#line 3640 "parser.y" { if(!state->cls->info) syntaxerror("super keyword not allowed outside a class"); classinfo_t*t = state->cls->info->superclass; @@ -7895,7 +7913,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3636 "parser.y" +#line 3654 "parser.y" { // attribute TODO (yyval.value).c = abc_pushundefined(0); @@ -7911,7 +7929,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3643 "parser.y" +#line 3661 "parser.y" { // child attribute TODO (yyval.value).c = abc_pushundefined(0); @@ -7927,7 +7945,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3650 "parser.y" +#line 3668 "parser.y" { // namespace declaration TODO (yyval.value).c = abc_pushundefined(0); @@ -7943,7 +7961,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3657 "parser.y" +#line 3675 "parser.y" { // descendants TODO (yyval.value).c = abc_pushundefined(0); @@ -7959,7 +7977,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3664 "parser.y" +#line 3682 "parser.y" { // filter TODO (yyval.value).c = abc_pushundefined(0); @@ -7975,7 +7993,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3675 "parser.y" +#line 3693 "parser.y" { (yyval.value).c = (yyvsp[(1) - (3)].value).c; classinfo_t*t = (yyvsp[(1) - (3)].value).t; @@ -8036,7 +8054,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3727 "parser.y" +#line 3745 "parser.y" { PASS1 /* Queue unresolved identifiers for checking against the parent @@ -8152,7 +8170,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3836 "parser.y" +#line 3854 "parser.y" { PASS12 NEW(namespace_decl_t,n); @@ -8169,7 +8187,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3843 "parser.y" +#line 3861 "parser.y" { PASS12 NEW(namespace_decl_t,n); @@ -8186,7 +8204,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3850 "parser.y" +#line 3868 "parser.y" { PASS12 NEW(namespace_decl_t,n); @@ -8203,7 +8221,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3857 "parser.y" +#line 3875 "parser.y" { PASS12 trie_put(active_namespaces, (yyvsp[(2) - (2)].namespace_decl)->name, (void*)(yyvsp[(2) - (2)].namespace_decl)->url); @@ -8227,7 +8245,7 @@ PASS2 if(as3_pass==2) { /* Line 1464 of skeleton.m4 */ -#line 3872 "parser.y" +#line 3890 "parser.y" { const char*url = (yyvsp[(3) - (3)].classinfo)->name; @@ -8249,7 +8267,7 @@ PASS2 /* Line 1464 of skeleton.m4 */ -#line 8253 "parser.tab.c" +#line 8271 "parser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/lib/as3/parser.y b/lib/as3/parser.y index 701d49b..3abeaa3 100644 --- a/lib/as3/parser.y +++ b/lib/as3/parser.y @@ -625,6 +625,7 @@ typedef struct _variable { int index; classinfo_t*type; char init; + char is_parameter; methodstate_t*is_inner_method; } variable_t; @@ -811,6 +812,19 @@ static code_t* method_header(methodstate_t*m) c = abc_getlocal_0(c); c = abc_constructsuper(c, 0); } + + if(m->slots) { + /* all parameters that are used by inner functions + need to be copied from local to slot */ + parserassert(m->activation_var); + DICT_ITERATE_ITEMS(m->slots,char*,name,variable_t*,v) { + if(v->is_parameter) { + c = abc_getlocal(c, m->activation_var); + c = abc_getlocal(c, v->index); + c = abc_setslot(c, v->index); + } + } + } list_free(m->innerfunctions); m->innerfunctions = 0; return c; @@ -927,9 +941,13 @@ static void function_initvars(methodstate_t*m, params_t*params, int flags, char if(params) { param_list_t*p=0; for(p=params->list;p;p=p->next) { - new_variable(p->param->name, p->param->type, 0, 1); + variable_t*v = new_variable2(p->param->name, p->param->type, 0, 1); + v->is_parameter = 1; } } + if(m->uses_slots) { + dict_dump(m->slots, stdout, ""); + } methodstate_list_t*l = m->innerfunctions; while(l) { -- 1.7.10.4