Rename "local variables" to "explicit stack slots".
The term "local variables" predated the SSA builder in the front-end crate, which also provides a way to implement source-language local variables. The name "explicit stack slot" makes it clear what this construct is.
This commit is contained in:
@@ -475,29 +475,29 @@ mod tests {
|
||||
f.name = ExternalName::testcase("foo");
|
||||
assert_eq!(f.to_string(), "function %foo() native {\n}\n");
|
||||
|
||||
f.create_stack_slot(StackSlotData::new(StackSlotKind::Local, 4));
|
||||
f.create_stack_slot(StackSlotData::new(StackSlotKind::ExplicitSlot, 4));
|
||||
assert_eq!(
|
||||
f.to_string(),
|
||||
"function %foo() native {\n ss0 = local 4\n}\n"
|
||||
"function %foo() native {\n ss0 = explicit_slot 4\n}\n"
|
||||
);
|
||||
|
||||
let ebb = f.dfg.make_ebb();
|
||||
f.layout.append_ebb(ebb);
|
||||
assert_eq!(
|
||||
f.to_string(),
|
||||
"function %foo() native {\n ss0 = local 4\n\nebb0:\n}\n"
|
||||
"function %foo() native {\n ss0 = explicit_slot 4\n\nebb0:\n}\n"
|
||||
);
|
||||
|
||||
f.dfg.append_ebb_param(ebb, types::I8);
|
||||
assert_eq!(
|
||||
f.to_string(),
|
||||
"function %foo() native {\n ss0 = local 4\n\nebb0(v0: i8):\n}\n"
|
||||
"function %foo() native {\n ss0 = explicit_slot 4\n\nebb0(v0: i8):\n}\n"
|
||||
);
|
||||
|
||||
f.dfg.append_ebb_param(ebb, types::F32.by(4).unwrap());
|
||||
assert_eq!(
|
||||
f.to_string(),
|
||||
"function %foo() native {\n ss0 = local 4\n\nebb0(v0: i8, v1: f32x4):\n}\n"
|
||||
"function %foo() native {\n ss0 = explicit_slot 4\n\nebb0(v0: i8, v1: f32x4):\n}\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user