mirror of
https://github.com/irmen/prog8.git
synced 2025-11-03 04:17:16 +00:00
move the program startup and cleanup machinery to the front of the program to keep it in system ram
This commit is contained in:
@@ -46,8 +46,7 @@ class TestScoping: FunSpec({
|
||||
"""
|
||||
|
||||
val result = compileText(C64Target(), false, src, writeAssembly = false)!!
|
||||
val module = result.compilerAst.toplevelModule
|
||||
val mainBlock = module.statements.single() as Block
|
||||
val mainBlock = result.compilerAst.entrypoint.definingBlock
|
||||
val start = mainBlock.statements.single() as Subroutine
|
||||
val repeatbody = start.statements.filterIsInstance<RepeatLoop>().single().body
|
||||
withClue("no vars moved to main block") {
|
||||
@@ -120,8 +119,7 @@ class TestScoping: FunSpec({
|
||||
"""
|
||||
|
||||
val result = compileText(C64Target(), false, src, writeAssembly = true)!!
|
||||
val module = result.compilerAst.toplevelModule
|
||||
val mainBlock = module.statements.single() as Block
|
||||
val mainBlock = result.compilerAst.entrypoint.definingBlock
|
||||
val start = mainBlock.statements.single() as Subroutine
|
||||
val labels = start.statements.filterIsInstance<Label>()
|
||||
withClue("only one label in subroutine scope") {
|
||||
|
||||
Reference in New Issue
Block a user