New Assembled TestSetGetLocalOnStack

This commit is contained in:
Jindra Petřík
2025-09-01 19:58:31 +02:00
parent dd3020d7de
commit 6b559cab3d
8 changed files with 136 additions and 6 deletions

View File

@@ -42,5 +42,6 @@ program
#include "tests/TestPushPlacement.script.asasm"
#include "tests/TestConstructDynamically.script.asasm"
#include "tests/TestCollidingPublicTraits.script.asasm"
#include "tests/TestSetGetLocalOnStack.script.asasm"
; place to add next
end ; program

View File

@@ -0,0 +1,78 @@
class
refid "tests:TestSetGetLocalOnStack"
instance QName(PackageNamespace("tests"), "TestSetGetLocalOnStack")
extends QName(PackageNamespace(""), "Object")
flag SEALED
flag PROTECTEDNS
protectedns ProtectedNamespace("tests:TestSetGetLocalOnStack")
iinit
refid "tests:TestSetGetLocalOnStack/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:TestSetGetLocalOnStack/instance/run"
param QName(PackageNamespace(""),"Object")
returns QName(PackageNamespace(""), "void")
body
maxstack 2
localcount 4
initscopedepth 4
maxscopedepth 5
code
getlocal0
pushscope
getlocal0
getproperty QName(PackageNamespace(""),"arr")
getlocal0
dup
setlocal3
getproperty QName(PackageNamespace(""),"cnt")
dup
increment_i
setlocal 4
getlocal3
getlocal 4
setproperty QName(PackageNamespace(""),"cnt")
kill 4
kill 3
setlocal2
getlocal2
getlocal1
setproperty MultinameL([PackageNamespace(""), PackageNamespace("MyTest")])
returnvoid
end ; code
end ; body
end ; method
end ; trait
end ; instance
cinit
refid "tests:TestSetGetLocalOnStack/class/init"
body
maxstack 1
localcount 1
initscopedepth 3
maxscopedepth 4
code
getlocal0
pushscope
returnvoid
end ; code
end ; body
end ; method
end ; class

View File

@@ -0,0 +1,29 @@
script
sinit
refid "tests:TestSetGetLocalOnStack/init"
body
maxstack 2
localcount 1
initscopedepth 1
maxscopedepth 3
code
getlocal0
pushscope
findpropstrict Multiname("TestSetGetLocalOnStack", [PackageNamespace("tests")])
getlex QName(PackageNamespace(""), "Object")
pushscope
getlex Multiname("Object", [PrivateNamespace(null, "tests:TestSetGetLocalOnStack"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")])
newclass "tests:TestSetGetLocalOnStack"
popscope
initproperty QName(PackageNamespace("tests"), "TestSetGetLocalOnStack")
returnvoid
end ; code
end ; body
end ; method
trait class QName(PackageNamespace("tests"), "TestSetGetLocalOnStack")
#include "TestSetGetLocalOnStack.class.asasm"
end ; trait
end ; script