mirror of
https://github.com/irmen/prog8.git
synced 2024-11-29 17:50:35 +00:00
fixed a compiler crash because with noopt, strings weren't put on the heap
This commit is contained in:
parent
aa98104d54
commit
28277469b6
@ -104,10 +104,12 @@ private fun compileMain(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
//println(" time4: $time4")
|
//println(" time4: $time4")
|
||||||
|
|
||||||
|
val allScopedSymbolDefinitions = moduleAst.checkIdentifiers(heap) // useful for checking symbol usage later?
|
||||||
|
// moduleAst.simplifyExpressions(namespace, heap)
|
||||||
|
// moduleAst.optimizeStatements(namespace, heap)
|
||||||
if(optimize) {
|
if(optimize) {
|
||||||
// optimize the parse tree
|
// optimize the parse tree
|
||||||
println("Optimizing...")
|
println("Optimizing...")
|
||||||
val allScopedSymbolDefinitions = moduleAst.checkIdentifiers(heap) // useful for checking symbol usage later?
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// keep optimizing expressions and statements until no more steps remain
|
// keep optimizing expressions and statements until no more steps remain
|
||||||
val optsDone1 = moduleAst.simplifyExpressions(namespace, heap)
|
val optsDone1 = moduleAst.simplifyExpressions(namespace, heap)
|
||||||
|
@ -33,6 +33,7 @@ fun Module.checkIdentifiers(heap: HeapValues): MutableMap<String, IStatement> {
|
|||||||
}
|
}
|
||||||
else -> TODO("replace literalvalue by identifierref: $variable (in $parent)")
|
else -> TODO("replace literalvalue by identifierref: $variable (in $parent)")
|
||||||
}
|
}
|
||||||
|
variable.second.linkParents(scope as Node)
|
||||||
}
|
}
|
||||||
|
|
||||||
printErrors(checker.result(), name)
|
printErrors(checker.result(), name)
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
; @todo see problem in looplabelproblem.p8
|
; @todo see problem in looplabelproblem.p8
|
||||||
|
|
||||||
; @todo when using -noopt, the error "can only push address of string that is a variable on the heap" appears when using strings
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sub start() {
|
sub start() {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user