mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-15 22:22:00 +00:00
Fixed #1940 AS3 decompilation - wrong assignment
This commit is contained in:
Binary file not shown.
@@ -30,5 +30,6 @@ program
|
||||
#include "tests/TestTryWhile.script.asasm"
|
||||
#include "tests/TestPushWhile.script.asasm"
|
||||
#include "tests/TestActivationProps.script.asasm"
|
||||
#include "tests/TestSwapAssignment.script.asasm"
|
||||
; place to add next
|
||||
end ; program
|
||||
|
||||
75
libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwapAssignment.class.asasm
vendored
Normal file
75
libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwapAssignment.class.asasm
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
class
|
||||
refid "tests:TestSwapAssignment"
|
||||
instance QName(PackageNamespace("tests"), "TestSwapAssignment")
|
||||
extends QName(PackageNamespace(""), "Object")
|
||||
flag SEALED
|
||||
flag PROTECTEDNS
|
||||
protectedns ProtectedNamespace("tests:TestSwapAssignment")
|
||||
iinit
|
||||
refid "tests:TestSwapAssignment/instance/init"
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 4
|
||||
maxscopedepth 5
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
getlocal0
|
||||
constructsuper 0
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
trait method QName(PackageNamespace(""), "run")
|
||||
method
|
||||
refid "tests:TestSwapAssignment/instance/run"
|
||||
returns QName(PackageNamespace(""), "void")
|
||||
body
|
||||
maxstack 2
|
||||
localcount 4
|
||||
initscopedepth 4
|
||||
maxscopedepth 5
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
getlex QName(PackageNamespace("mypkg"),"MyFactory")
|
||||
callproperty QName(PackageNamespace(""),"createBitmap"), 0
|
||||
coerce QName(PackageNamespace("flash.display"),"Bitmap")
|
||||
dup
|
||||
setlocal 6
|
||||
getproperty QName(PackageNamespace(""),"x")
|
||||
pushbyte 5
|
||||
add
|
||||
getlocal 6
|
||||
swap
|
||||
setproperty QName(PackageNamespace(""),"x")
|
||||
getlocal 6
|
||||
pushbyte -10
|
||||
setproperty QName(PackageNamespace(""),"y")
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; trait
|
||||
end ; instance
|
||||
cinit
|
||||
refid "tests:TestSwapAssignment/class/init"
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 3
|
||||
maxscopedepth 4
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; class
|
||||
@@ -0,0 +1,29 @@
|
||||
script
|
||||
sinit
|
||||
refid "tests:TestSwapAssignment/init"
|
||||
body
|
||||
maxstack 2
|
||||
localcount 1
|
||||
initscopedepth 1
|
||||
maxscopedepth 3
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
findpropstrict Multiname("TestSwapAssignment", [PackageNamespace("tests")])
|
||||
getlex QName(PackageNamespace(""), "Object")
|
||||
pushscope
|
||||
|
||||
getlex Multiname("Object", [PrivateNamespace(null, "tests:TestSwapAssignment"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")])
|
||||
newclass "tests:TestSwapAssignment"
|
||||
popscope
|
||||
initproperty QName(PackageNamespace("tests"), "TestSwapAssignment")
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
trait class QName(PackageNamespace("tests"), "TestSwapAssignment")
|
||||
#include "TestSwapAssignment.class.asasm"
|
||||
end ; trait
|
||||
end ; script
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -38,6 +38,7 @@ package
|
||||
TestDoWhile2;
|
||||
TestDoWhile3;
|
||||
TestDoWhile4;
|
||||
TestExecutionOrder;
|
||||
TestExpressions;
|
||||
TestFinallyZeroJump;
|
||||
TestFor;
|
||||
|
||||
23
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestExecutionOrder.as
vendored
Normal file
23
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestExecutionOrder.as
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestExecutionOrder
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
var m:MyClass;
|
||||
m.x = (m = create() as MyClass).x + 5;
|
||||
trace(m.x);
|
||||
}
|
||||
|
||||
|
||||
private static function create(): Object {
|
||||
return new MyClass();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
public var x:int = 1;
|
||||
public var y:int = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user