AS3 assembly testdata template generator

This commit is contained in:
Jindra Petřík
2021-01-27 07:25:25 +01:00
parent 98c2b1eba9
commit ae026983de
3 changed files with 139 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
class
refid "tests:Template"
instance QName(PackageNamespace("tests"), "Template")
extends QName(PackageNamespace(""), "Object")
flag SEALED
flag PROTECTEDNS
protectedns ProtectedNamespace("tests:Template")
iinit
refid "tests:Template/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:Template/instance/run"
returns QName(PackageNamespace(""), "void")
body
maxstack 2
localcount 4
initscopedepth 4
maxscopedepth 5
code
getlocal0
pushscope
; TODO: insertcode here
returnvoid
end ; code
end ; body
end ; method
end ; trait
end ; instance
cinit
refid "tests:Template/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:Template/init"
body
maxstack 2
localcount 1
initscopedepth 1
maxscopedepth 3
code
getlocal0
pushscope
findpropstrict Multiname("Template", [PackageNamespace("tests")])
getlex QName(PackageNamespace(""), "Object")
pushscope
getlex Multiname("Object", [PrivateNamespace(null, "tests:Template"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")])
newclass "tests:Template"
popscope
initproperty QName(PackageNamespace("tests"), "Template")
returnvoid
end ; code
end ; body
end ; method
trait class QName(PackageNamespace("tests"), "Template")
#include "Template.class.asasm"
end ; trait
end ; script