ir: adding register usage inspections

fix compiler problems with untrimmed inlined asm, and when only a single return statement is present in a subroutine
This commit is contained in:
Irmen de Jong
2022-09-30 20:18:14 +02:00
parent 5a8f97a0b6
commit af6be44676
16 changed files with 277 additions and 80 deletions

View File

@@ -38,6 +38,8 @@ class Inliner(val program: Program): AstWalker() {
is Return -> {
if(stmt.value is NumericLiteral)
true
else if(stmt.value==null)
true
else if (stmt.value is IdentifierReference) {
makeFullyScoped(stmt.value as IdentifierReference)
true