mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 21:21:33 +00:00
bytecode: enhance symbol table with both slab and symbol name
This commit is contained in:
@ -4,7 +4,7 @@ import gay.pizza.pork.ast.gen.FunctionDefinition
|
||||
import gay.pizza.pork.execution.ArgumentList
|
||||
|
||||
class FunctionContext(val slabContext: SlabContext, val node: FunctionDefinition) : CallableFunction {
|
||||
val name: String by lazy { "${slabContext.slab.location.commonFriendlyName} ${node.symbol.id}" }
|
||||
val name: String by lazy { "${slabContext.slab.location.commonLocationIdentity} ${node.symbol.id}" }
|
||||
|
||||
private fun resolveMaybeNative(): CallableFunction? = if (node.nativeFunctionDescriptor == null) {
|
||||
null
|
||||
|
@ -7,8 +7,8 @@ import gay.pizza.pork.ast.gen.visit
|
||||
import gay.pizza.pork.frontend.Slab
|
||||
|
||||
class SlabContext(val slab: Slab, val evaluator: Evaluator, rootScope: Scope) {
|
||||
val internalScope = rootScope.fork("internal ${slab.location.commonFriendlyName}")
|
||||
val externalScope = rootScope.fork("external ${slab.location.commonFriendlyName}")
|
||||
val internalScope = rootScope.fork("internal ${slab.location.commonLocationIdentity}")
|
||||
val externalScope = rootScope.fork("external ${slab.location.commonLocationIdentity}")
|
||||
|
||||
init {
|
||||
processAllDefinitions()
|
||||
|
Reference in New Issue
Block a user