Class MethodContext
java.lang.Object
org.ek9lang.compiler.backend.jvm.support.MethodContext
Shared context for a method that must be coordinated across all generators.
This context tracks:
- Variable to slot mappings
- Temp variable source tracking
- IR labels to JVM labels
- Local variable debug metadata
- Scope boundaries
- Field type descriptors
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintAllocate the next variable slot and increment the counter.Get the field descriptor map (maps "this.fieldName" to JVM descriptor).Get the IR label to JVM label mapping.Get the local variable debug metadata map.Get the scope boundaries map.Get the temp variable source tracking map.Get the variable to slot mapping.Get the variable type map (maps variable name to primitive type or null for objects).
-
Constructor Details
-
MethodContext
public MethodContext()
-
-
Method Details
-
getVariableMap
-
getTempSourceMap
Get the temp variable source tracking map. -
getLabelMap
-
getLocalVariableMetadata
Get the local variable debug metadata map. -
getScopeMap
-
getFieldDescriptorMap
-
getVariableTypeMap
-
allocateNextSlot
public int allocateNextSlot()Allocate the next variable slot and increment the counter.
-