rework some bits of the compiler to work more appropriately

This commit is contained in:
Alex Zenla
2025-07-16 23:14:25 -07:00
parent 17b1aa44c0
commit a48fac4581
8 changed files with 27 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class CompileCommand : CliktCommand("compile") {
val compiledSlab = compiler.compilableSlabs.of(slab)
val compiledMain = compiledSlab.resolve(Symbol("main"))
?: throw RuntimeException("'main' function not found.")
val irWorld = compiler.compileIrWorld()
val irWorld = compiler.compileIrWorld(compiledMain)
val compiledWorld = compiler.compile(compiledMain)
if (showIrCode) {
printCompiledIr(irWorld)

View File

@ -16,7 +16,7 @@ class RootCommand : CliktCommand("pork") {
AttributeCommand(),
ScopeAnalysisCommand(),
CopyStdlibCommand(),
CompileCommand()
CompileCommand(),
)
}