X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fexpr.c;h=1a6759498398ede8e1fe2e773c0d7c1f0aa3adf4;hb=32add149087f12dd242eff60e09737389ec587bb;hp=33491d3cabc9d24223c0ea5c37226f615d3ecdf7;hpb=dfa75b5adac950d31e7427c7cc82a71f5ed04294;p=swftools.git diff --git a/lib/as3/expr.c b/lib/as3/expr.c index 33491d3..1a67594 100644 --- a/lib/as3/expr.c +++ b/lib/as3/expr.c @@ -145,7 +145,8 @@ static code_t* toreadwrite(code_t*in, code_t*middlepart, char justassign, char r prefix = abc_dup(prefix); // we need the object, too } use_temp_var = 1; - } else if(m->type == MULTINAMEL || m->type == MULTINAMELA) { + } else if(m->type == MULTINAMEL || m->type == MULTINAMELA || + m->type == RTQNAME || m->type == RTQNAMEA) { if(!justassign) { /* dupping two values on the stack requires 5 operations and one register- couldn't adobe just have given us a dup2? */ @@ -2636,7 +2637,16 @@ exec: node_const_exec typedcode_t node_code_write(node_t*n) { - syntaxerror("not implemented yet"); + typedcode_t t; + t.c = 0; + int tmp = gettempvar(); + t.c = abc_setlocal(t.c, tmp); + code_t*w = toreadwrite(n->code.c, abc_getlocal(0,tmp), 1, 0, 0); + t.c = code_append(t.c, w); + t.c = abc_kill(t.c, tmp); + n->code.c=0; + t.t = n->code.t; + return t; } typedcode_t node_code_read(node_t*n) { @@ -2822,6 +2832,12 @@ typedcode_t node_read(node_t*n) return t; } } +typedcode_t node_write(node_t*n) +{ + typedcode_t t = n->type->write(n); + node_free(n); + return t; +} code_t* node_exec(node_t*n) { code_t*c = n->type->exec(n);