new for loop continues detection

This commit is contained in:
Jindra Petřík
2021-01-29 07:32:21 +01:00
parent f8f7d00981
commit bfe0fce888
14 changed files with 250 additions and 128 deletions

View File

@@ -15,5 +15,6 @@ program
#include "tests/TestIncrement3.script.asasm"
#include "tests/TestDup.script.asasm"
#include "tests/TestSwitchDefault.script.asasm"
#include "tests/TestSwitch.script.asasm"
; place to add next
end ; program

View File

@@ -0,0 +1,83 @@
class
refid "tests:TestSwitch"
instance QName(PackageNamespace("tests"), "TestSwitch")
extends QName(PackageNamespace(""), "Object")
flag SEALED
flag PROTECTEDNS
protectedns ProtectedNamespace("tests:TestSwitch")
iinit
refid "tests:TestSwitch/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:TestSwitch/instance/run"
returns QName(PackageNamespace(""), "void")
body
maxstack 2
localcount 4
initscopedepth 4
maxscopedepth 5
code
getlocal0
pushscope
getlex QName(PrivateNamespace("somens"),"somevar")
convert_i
lookupswitch ofs005e, [ofs002d, ofs0038, ofs005e, ofs0050, ofs0059]
ofs002d:
pushstring "X"
setlocal2
returnvoid
ofs0038:
pushstring "A"
coerce_s
setlocal2
jump ofs005e
ofs0050:
pushstring "B"
coerce_s
setlocal2
jump ofs005e
ofs0059:
pushstring "C"
coerce_s
setlocal2
ofs005e:
pushstring "after"
setlocal2
returnvoid
end ; code
end ; body
end ; method
end ; trait
end ; instance
cinit
refid "tests:TestSwitch/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:TestSwitch/init"
body
maxstack 2
localcount 1
initscopedepth 1
maxscopedepth 3
code
getlocal0
pushscope
findpropstrict Multiname("TestSwitch", [PackageNamespace("tests")])
getlex QName(PackageNamespace(""), "Object")
pushscope
getlex Multiname("Object", [PrivateNamespace(null, "tests:TestSwitch"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")])
newclass "tests:TestSwitch"
popscope
initproperty QName(PackageNamespace("tests"), "TestSwitch")
returnvoid
end ; code
end ; body
end ; method
trait class QName(PackageNamespace("tests"), "TestSwitch")
#include "TestSwitch.class.asasm"
end ; trait
end ; script

Binary file not shown.