MIR: lexical scoping + builder vars modules
This commit is contained in:
@ -170,6 +170,8 @@ impl super::MirBuilder {
|
||||
// Scope hint for bare block (Program)
|
||||
let scope_id = self.current_block.map(|bb| bb.as_u32()).unwrap_or(0);
|
||||
self.hint_scope_enter(scope_id);
|
||||
let _lex_scope = super::vars::lexical_scope::LexicalScopeGuard::new(self);
|
||||
|
||||
let mut last_value = None;
|
||||
let total = statements.len();
|
||||
eprintln!("[DEBUG/build_block] Processing {} statements", total);
|
||||
@ -336,7 +338,7 @@ impl super::MirBuilder {
|
||||
var_name, var_id
|
||||
);
|
||||
}
|
||||
self.variable_map.insert(var_name.clone(), var_id);
|
||||
self.declare_local_in_current_scope(var_name, var_id)?;
|
||||
// SlotRegistry にもローカル変数スロットを登録しておくよ(観測専用)
|
||||
if let Some(reg) = self.current_slot_registry.as_mut() {
|
||||
let ty = self.value_types.get(&var_id).cloned();
|
||||
|
||||
Reference in New Issue
Block a user