mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-02 21:24:43 +00:00
AS3 p-code more RAbcDasm like
- get/setlocal_x renamed to get/setlocalx - QName casing changed from Qname Better increment/decrement detection, chained assignments.
This commit is contained in:
BIN
libsrc/ffdec_lib/testdata/custom/abc/custom-0.abc
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/custom/abc/custom-0.abc
vendored
Normal file
Binary file not shown.
87
libsrc/ffdec_lib/testdata/custom/abc/custom-0/Main.class.asasm
vendored
Normal file
87
libsrc/ffdec_lib/testdata/custom/abc/custom-0/Main.class.asasm
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
class
|
||||
refid "Main"
|
||||
instance QName(PackageNamespace(""), "Main")
|
||||
extends QName(PackageNamespace("flash.display"), "Sprite")
|
||||
flag SEALED
|
||||
flag PROTECTEDNS
|
||||
protectedns ProtectedNamespace("Main")
|
||||
iinit
|
||||
refid "Main/instance/init"
|
||||
body
|
||||
maxstack 3
|
||||
localcount 1
|
||||
initscopedepth 9
|
||||
maxscopedepth 10
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
getlocal0
|
||||
constructsuper 0
|
||||
|
||||
getlex Multiname("stage", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
iffalse L9
|
||||
|
||||
getlocal0
|
||||
callpropvoid Multiname("init", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")]), 0
|
||||
|
||||
jump L15
|
||||
|
||||
L9:
|
||||
findpropstrict Multiname("addEventListener", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
getlex Multiname("Event", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher"), PackageNamespace("flash.events")])
|
||||
getproperty Multiname("ADDED_TO_STAGE", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
getlocal0
|
||||
getproperty Multiname("init", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
callpropvoid Multiname("addEventListener", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")]), 2
|
||||
|
||||
L15:
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
trait method QName(PrivateNamespace(null, "Main/instance"), "init")
|
||||
method
|
||||
refid "Main/instance/Main/instance/init"
|
||||
param QName(PackageNamespace("flash.events"), "Event")
|
||||
returns QName(PackageNamespace(""), "void")
|
||||
flag HAS_OPTIONAL
|
||||
optional Null()
|
||||
body
|
||||
maxstack 3
|
||||
localcount 2
|
||||
initscopedepth 9
|
||||
maxscopedepth 10
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
findpropstrict Multiname("removeEventListener", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
getlex Multiname("Event", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher"), PackageNamespace("flash.events")])
|
||||
getproperty Multiname("ADDED_TO_STAGE", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
getlocal0
|
||||
getproperty Multiname("init", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
|
||||
callpropvoid Multiname("removeEventListener", [PrivateNamespace(null, "Main/instance"), PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), ProtectedNamespace("Main"), StaticProtectedNs("Main"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")]), 2
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; trait
|
||||
end ; instance
|
||||
cinit
|
||||
refid "Main/class/init"
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 8
|
||||
maxscopedepth 9
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; class
|
||||
49
libsrc/ffdec_lib/testdata/custom/abc/custom-0/Main.script.asasm
vendored
Normal file
49
libsrc/ffdec_lib/testdata/custom/abc/custom-0/Main.script.asasm
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
script
|
||||
sinit
|
||||
refid "Main/init"
|
||||
body
|
||||
maxstack 2
|
||||
localcount 1
|
||||
initscopedepth 1
|
||||
maxscopedepth 8
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
getscopeobject 0
|
||||
getlex QName(PackageNamespace(""), "Object")
|
||||
pushscope
|
||||
|
||||
getlex QName(PackageNamespace("flash.events"), "EventDispatcher")
|
||||
pushscope
|
||||
|
||||
getlex QName(PackageNamespace("flash.display"), "DisplayObject")
|
||||
pushscope
|
||||
|
||||
getlex QName(PackageNamespace("flash.display"), "InteractiveObject")
|
||||
pushscope
|
||||
|
||||
getlex QName(PackageNamespace("flash.display"), "DisplayObjectContainer")
|
||||
pushscope
|
||||
|
||||
getlex QName(PackageNamespace("flash.display"), "Sprite")
|
||||
pushscope
|
||||
|
||||
getlex Multiname("Sprite", [PrivateNamespace(null, "Main"), PackageNamespace(""), PackageInternalNs(""), Namespace("http://adobe.com/AS3/2006/builtin"), PackageNamespace("tests"), PackageNamespace("flash.display")])
|
||||
newclass "Main"
|
||||
popscope
|
||||
popscope
|
||||
popscope
|
||||
popscope
|
||||
popscope
|
||||
popscope
|
||||
initproperty QName(PackageNamespace(""), "Main")
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
trait class QName(PackageNamespace(""), "Main") slotid 1
|
||||
#include "Main.class.asasm"
|
||||
end ; trait
|
||||
end ; script
|
||||
BIN
libsrc/ffdec_lib/testdata/custom/abc/custom-0/custom-0.main.abc
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/custom/abc/custom-0/custom-0.main.abc
vendored
Normal file
Binary file not shown.
10
libsrc/ffdec_lib/testdata/custom/abc/custom-0/custom-0.main.asasm
vendored
Normal file
10
libsrc/ffdec_lib/testdata/custom/abc/custom-0/custom-0.main.asasm
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#version 4
|
||||
program
|
||||
minorversion 16
|
||||
majorversion 46
|
||||
|
||||
#include "Main.script.asasm"
|
||||
#include "tests/TestDupAssignment.script.asasm"
|
||||
#include "tests/TestIncrement.script.asasm"
|
||||
|
||||
end ; program
|
||||
77
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestDupAssignment.class.asasm
vendored
Normal file
77
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestDupAssignment.class.asasm
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
class
|
||||
refid "tests:TestDupAssignment"
|
||||
instance QName(PackageNamespace("tests"), "TestDupAssignment")
|
||||
extends QName(PackageNamespace(""), "Object")
|
||||
flag SEALED
|
||||
flag PROTECTEDNS
|
||||
protectedns ProtectedNamespace("tests:TestDupAssignment")
|
||||
iinit
|
||||
refid "tests:TestDupAssignment/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:TestDupAssignment/instance/run"
|
||||
returns QName(PackageNamespace(""), "void")
|
||||
body
|
||||
maxstack 2
|
||||
localcount 4
|
||||
initscopedepth 4
|
||||
maxscopedepth 5
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
pushbyte 0
|
||||
setlocal1
|
||||
|
||||
pushbyte 10
|
||||
setlocal2
|
||||
|
||||
getlocal2
|
||||
dup
|
||||
convert_i
|
||||
setlocal1
|
||||
iffalse L15
|
||||
|
||||
findpropstrict Multiname("trace", [PrivateNamespace(null, "tests:TestDupAssignment/instance/run"), PrivateNamespace(null, "tests:TestDupAssignment"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin"), ProtectedNamespace("tests:TestDupAssignment"), StaticProtectedNs("tests:TestDupAssignment")])
|
||||
getlocal2
|
||||
callpropvoid Multiname("trace", [PrivateNamespace(null, "tests:TestDupAssignment/instance/run"), PrivateNamespace(null, "tests:TestDupAssignment"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin"), ProtectedNamespace("tests:TestDupAssignment"), StaticProtectedNs("tests:TestDupAssignment")]), 1
|
||||
|
||||
L15:
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; trait
|
||||
end ; instance
|
||||
cinit
|
||||
refid "tests:TestDupAssignment/class/init"
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 3
|
||||
maxscopedepth 4
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; class
|
||||
29
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestDupAssignment.script.asasm
vendored
Normal file
29
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestDupAssignment.script.asasm
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
script
|
||||
sinit
|
||||
refid "tests:TestDupAssignment/init"
|
||||
body
|
||||
maxstack 2
|
||||
localcount 1
|
||||
initscopedepth 1
|
||||
maxscopedepth 3
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
findpropstrict Multiname("TestDupAssignment", [PackageNamespace("tests")])
|
||||
getlex QName(PackageNamespace(""), "Object")
|
||||
pushscope
|
||||
|
||||
getlex Multiname("Object", [PrivateNamespace(null, "tests:TestDupAssignment"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")])
|
||||
newclass "tests:TestDupAssignment"
|
||||
popscope
|
||||
initproperty QName(PackageNamespace("tests"), "TestDupAssignment")
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
trait class QName(PackageNamespace("tests"), "TestDupAssignment")
|
||||
#include "TestDupAssignment.class.asasm"
|
||||
end ; trait
|
||||
end ; script
|
||||
71
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestIncrement.class.asasm
vendored
Normal file
71
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestIncrement.class.asasm
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
class
|
||||
refid "tests:TestIncrement"
|
||||
instance QName(PackageNamespace("tests"), "TestIncrement")
|
||||
extends QName(PackageNamespace(""), "Object")
|
||||
flag SEALED
|
||||
flag PROTECTEDNS
|
||||
protectedns ProtectedNamespace("tests:TestIncrement")
|
||||
iinit
|
||||
refid "tests:TestIncrement/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:TestIncrement/instance/run"
|
||||
returns QName(PackageNamespace(""), "void")
|
||||
body
|
||||
maxstack 2
|
||||
localcount 4
|
||||
initscopedepth 4
|
||||
maxscopedepth 5
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
getlocal0
|
||||
constructsuper 0
|
||||
getlex QName(PrivateNamespace("myns"),"a")
|
||||
convert_d
|
||||
dup
|
||||
increment
|
||||
findpropstrict QName(PrivateNamespace("myns"),"a")
|
||||
swap
|
||||
setproperty QName(PrivateNamespace("myns"),"a")
|
||||
findproperty QName(PackageNamespace(""),"b")
|
||||
swap
|
||||
setproperty QName(PackageNamespace(""),"b")
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; trait
|
||||
end ; instance
|
||||
cinit
|
||||
refid "tests:TestIncrement/class/init"
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 3
|
||||
maxscopedepth 4
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
end ; class
|
||||
29
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestIncrement.script.asasm
vendored
Normal file
29
libsrc/ffdec_lib/testdata/custom/abc/custom-0/tests/TestIncrement.script.asasm
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
script
|
||||
sinit
|
||||
refid "tests:TestIncrement/init"
|
||||
body
|
||||
maxstack 2
|
||||
localcount 1
|
||||
initscopedepth 1
|
||||
maxscopedepth 3
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
|
||||
findpropstrict Multiname("TestIncrement", [PackageNamespace("tests")])
|
||||
getlex QName(PackageNamespace(""), "Object")
|
||||
pushscope
|
||||
|
||||
getlex Multiname("Object", [PrivateNamespace(null, "tests:TestIncrement"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")])
|
||||
newclass "tests:TestIncrement"
|
||||
popscope
|
||||
initproperty QName(PackageNamespace("tests"), "TestIncrement")
|
||||
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
trait class QName(PackageNamespace("tests"), "TestIncrement")
|
||||
#include "TestIncrement.class.asasm"
|
||||
end ; trait
|
||||
end ; script
|
||||
Reference in New Issue
Block a user