google-code-export / asdec

Automatically exported from code.google.com/p/asdec
1 stars 0 forks source link

Wrong code for chained assignments (AS3) #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Funny, I just reported same issue today to Burak, and there you have it too.

This code

var wires:WireFrame = WireFrame.createEdges (sphere, 0x3F00);
wires.scaleX = wires.scaleY = wires.scaleZ = 1.01;
group.addChild (wires);

shows up as

_loc9_=WireFrame.createEdges(_loc8_,16128);
(WireFrame.createEdges(_loc8_,16128)).scaleZ=1.01;
(WireFrame.createEdges(_loc8_,16128)).scaleY=_loc10_;
(WireFrame.createEdges(_loc8_,16128)).scaleX=_loc10_;
this.group.addChild(_loc9_);

corresponding "assembly" code is

getlex m[57]"alternativa.engine3d.objects.WireFrame"
getlocal 8
pushshort 16128
callproperty m[799]"createEdges" 2
coerce m[57]"alternativa.engine3d.objects.WireFrame"
dup
dup
dup
setlocal 9
pushdouble 1.01
dup
setlocal 10
setproperty m[102]"scaleZ"
getlocal 10
kill 10
dup
setlocal 10
setproperty m[101]"scaleY"
getlocal 10
kill 10
setproperty m[100]"scaleX"
getlocal_0
getproperty m[69]"group"
getlocal 9
callpropvoid m[94]"addChild" 1

Original issue reported on code.google.com by makc.the...@gmail.com on 28 Aug 2011 at 11:18

GoogleCodeExporter commented 9 years ago
Thank you for reporting. Chained assigments are very difficult to implement. I 
will surely look at it, but it is not my priority at the moment.

Original comment by jindra.p...@gmail.com on 27 Dec 2011 at 10:16

GoogleCodeExporter commented 9 years ago
Hi, I have made some changes regarding chained assignments. It is available in 
the repository, you should check it.

Original comment by jindra.p...@gmail.com on 22 Dec 2012 at 5:32

GoogleCodeExporter commented 9 years ago
wow, 1 year - 1 week.

Original comment by makc.the...@gmail.com on 22 Dec 2012 at 5:35

GoogleCodeExporter commented 9 years ago
Yes, I am sorry for big delay, I am very busy during work week and had not much 
time for ASDec. :-)

Original comment by jindra.p...@gmail.com on 22 Dec 2012 at 5:39

GoogleCodeExporter commented 9 years ago
After this time I don't even remember how to run this. I clicked zip link, and 
there seem to be sources only.

Original comment by makc.the...@gmail.com on 22 Dec 2012 at 5:41

GoogleCodeExporter commented 9 years ago
You can download the sources and then go to commandline and type "ant", which 
will compile it. Then you can run "ASDec.jar" in the "dist/" directory.

I will soon publish new version (beta 4 ?), which will be available for 
download. Now it is only as sourcecode.

Original comment by jindra.p...@gmail.com on 22 Dec 2012 at 5:51