Add symbol name to bound kinds
The `Get`, `DefLocal`, and `DefGlobal` bound kinds now store the symbol name associated with the variable. This information is useful for debugging and provides more context in the compiled output.
This commit is contained in:
@@ -95,15 +95,15 @@ impl TCO {
|
||||
..node
|
||||
}
|
||||
},
|
||||
BoundKind::DefLocal { slot, value, captured_by } => {
|
||||
BoundKind::DefLocal { name, slot, value, captured_by } => {
|
||||
Node {
|
||||
kind: BoundKind::DefLocal { slot, value: Box::new(Self::transform(*value, false)), captured_by },
|
||||
kind: BoundKind::DefLocal { name, slot, value: Box::new(Self::transform(*value, false)), captured_by },
|
||||
..node
|
||||
}
|
||||
},
|
||||
BoundKind::DefGlobal { global_index, value } => {
|
||||
BoundKind::DefGlobal { name, global_index, value } => {
|
||||
Node {
|
||||
kind: BoundKind::DefGlobal { global_index, value: Box::new(Self::transform(*value, false)) },
|
||||
kind: BoundKind::DefGlobal { name, global_index, value: Box::new(Self::transform(*value, false)) },
|
||||
..node
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user