2567, 2573, 2578, 2584, 2590, 2594, 2596, 2607, 2616, 2623,
2624, 2626, 2632, 2641, 2648, 2660, 2666, 2672, 2678, 2684,
2690, 2696, 2709, 2720, 2727, 2740, 2767, 2781, 2795, 2809,
2567, 2573, 2578, 2584, 2590, 2594, 2596, 2607, 2616, 2623,
2624, 2626, 2632, 2641, 2648, 2660, 2666, 2672, 2678, 2684,
2690, 2696, 2709, 2720, 2727, 2740, 2767, 2781, 2795, 2809,
- 2824, 2858, 2945, 2946, 2947, 2949
+ 2824, 2858, 2956, 2957, 2958, 2960
// $1 is a local variable
(yyval.value).c = abc_getlocal((yyval.value).c, v->index);
(yyval.value).t = v->type;
// $1 is a local variable
(yyval.value).c = abc_getlocal((yyval.value).c, v->index);
(yyval.value).t = v->type;
- } else if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1))) {
+ if(state->cls && (f = registry_findmember(state->cls->info, (yyvsp[(1) - (1)].id), 1)) &&
+ (f->flags&FLAG_STATIC) >= i_am_static) {
- int i_am_static = ((state->method && state->method->info)?(state->method->info->flags&FLAG_STATIC):FLAG_STATIC);
- if(var_is_static != i_am_static) {
- /* there doesn't seem to be any "static" way to access
- static properties of a class */
+
+ if(f->kind == MEMBER_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 = {flags2access(f->flags), ""};
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);
state->method->late_binding = 1;
(yyval.value).t = f->type;
namespace_t ns = {flags2access(f->flags), ""};
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);
- if(f->slot>0) {
- (yyval.value).c = abc_getlocal_0((yyval.value).c);
- (yyval.value).c = abc_getslot((yyval.value).c, f->slot);
- } else {
- namespace_t ns = {flags2access(f->flags), ""};
- 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);
- }
- }
- if(f->kind == MEMBER_METHOD) {
- (yyval.value).t = TYPE_FUNCTION(f);
- } else {
- (yyval.value).t = f->type;
+ namespace_t ns = {flags2access(f->flags), ""};
+ 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(a->flags & FLAG_METHOD) {
MULTINAME(m, a);
(yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
if(a->flags & FLAG_METHOD) {
MULTINAME(m, a);
(yyval.value).c = abc_findpropstrict2((yyval.value).c, &m);
if(strcmp((yyvsp[(1) - (1)].id),"trace"))
as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
state->method->late_binding = 1;
if(strcmp((yyvsp[(1) - (1)].id),"trace"))
as3_softwarning("Couldn't resolve '%s', doing late binding", (yyvsp[(1) - (1)].id));
state->method->late_binding = 1;
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);