Add stack_limit global_var in Function

This commit is contained in:
Sergey Pepyakin
2018-05-30 23:48:04 +02:00
committed by Dan Gohman
parent e9111d1de2
commit effe770c5f

View File

@@ -30,6 +30,10 @@ pub struct Function {
/// Stack slots allocated in this function.
pub stack_slots: StackSlots,
/// If not `None`, represents the address that the stack pointer should
/// be checked against.
pub stack_limit: Option<ir::GlobalVar>,
/// Global variables referenced.
pub global_vars: PrimaryMap<ir::GlobalVar, ir::GlobalVarData>,
@@ -73,6 +77,7 @@ impl Function {
name,
signature: sig,
stack_slots: StackSlots::new(),
stack_limit: None,
global_vars: PrimaryMap::new(),
heaps: PrimaryMap::new(),
jump_tables: PrimaryMap::new(),