mirror of
https://github.com/irmen/prog8.git
synced 2026-04-25 12:33:55 +00:00
move IR optimizer to IR Codegen module
This commit is contained in:
@@ -6,7 +6,7 @@ import prog8.code.core.CompilationOptions
|
||||
import prog8.code.core.IAssemblyGenerator
|
||||
import prog8.code.core.IAssemblyProgram
|
||||
import prog8.code.core.IErrorReporter
|
||||
import prog8.codegen.intermediate.IntermediateCodeGen
|
||||
import prog8.codegen.intermediate.IRCodeGen
|
||||
import prog8.intermediate.IRFileWriter
|
||||
|
||||
class CodeGen(private val program: PtProgram,
|
||||
@@ -18,7 +18,7 @@ class CodeGen(private val program: PtProgram,
|
||||
|
||||
// you could write a code generator directly on the PtProgram AST,
|
||||
// but you can also use the Intermediate Representation to build a codegen on:
|
||||
val irCodeGen = IntermediateCodeGen(program, symbolTable, options, errors)
|
||||
val irCodeGen = IRCodeGen(program, symbolTable, options, errors)
|
||||
val irProgram = irCodeGen.generate()
|
||||
|
||||
// this stub only writes the IR program to disk but doesn't generate anything else.
|
||||
|
||||
Reference in New Issue
Block a user