core: Use AST var name for IR name
Aids debugging IR.
This commit is contained in:
parent
19915bac79
commit
6805253515
@ -193,7 +193,13 @@ pub fn gen_assign<'ctx, 'a, G: CodeGenerator>(
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
let ptr = generator.gen_store_target(ctx, target, Some("target.addr"))?;
|
||||
let name = if let ExprKind::Name { id, .. } = &target.node {
|
||||
format!("{}.addr", id.to_string())
|
||||
} else {
|
||||
String::from("target.addr")
|
||||
};
|
||||
let ptr = generator.gen_store_target(ctx, target, Some(name.as_str()))?;
|
||||
|
||||
if let ExprKind::Name { id, .. } = &target.node {
|
||||
let (_, static_value, counter) = ctx.var_assignment.get_mut(id).unwrap();
|
||||
*counter += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user