mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 13:11:32 +00:00
bytecode: enhance symbol table with both slab and symbol name
This commit is contained in:
@ -21,7 +21,7 @@ class CompileCommand : CliktCommand(help = "Compile Pork to Bytecode", name = "c
|
||||
val compiledWorld = compiler.compile(compiledMain)
|
||||
for (symbol in compiledWorld.symbolTable.symbols) {
|
||||
val code = compiledWorld.code.subList(symbol.offset.toInt(), (symbol.offset + symbol.size).toInt())
|
||||
println(symbol.id)
|
||||
println(symbol.commonSymbolIdentity)
|
||||
for ((index, op) in code.withIndex()) {
|
||||
var annotation = ""
|
||||
val annotations = compiledWorld.annotations.filter { it.inst == (symbol.offset + index.toUInt()) }
|
||||
|
@ -20,7 +20,7 @@ class ScopeAnalysisCommand : CliktCommand(help = "Run Scope Analysis", name = "s
|
||||
"symbol ${visibleScopeSymbol.scopeSymbol.symbol.id} " +
|
||||
"type=${visibleScopeSymbol.scopeSymbol.definition.type.name} " +
|
||||
"internal=${visibleScopeSymbol.isInternalSymbol} " +
|
||||
"slab=${visibleScopeSymbol.scopeSymbol.slabScope.slab.location.commonFriendlyName}"
|
||||
"slab=${visibleScopeSymbol.scopeSymbol.slabScope.slab.location.commonLocationIdentity}"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user