pub trait LocalAllocator {
// Required methods
fn create_local_variable(
&self,
root: Rc<RefCell<Scope>>,
scope: Rc<RefCell<Scope>>,
item: Item,
) -> ExpandElement;
fn create_local_binding(
&self,
root: Rc<RefCell<Scope>>,
scope: Rc<RefCell<Scope>>,
item: Item,
) -> ExpandElement;
fn create_local_undeclared(
&self,
root: Rc<RefCell<Scope>>,
scope: Rc<RefCell<Scope>>,
item: Item,
) -> ExpandElement;
}
Expand description
Defines a local variable allocation strategy (i.e. reused mutable variables, SSA)
Required Methods§
Sourcefn create_local_variable(
&self,
root: Rc<RefCell<Scope>>,
scope: Rc<RefCell<Scope>>,
item: Item,
) -> ExpandElement
fn create_local_variable( &self, root: Rc<RefCell<Scope>>, scope: Rc<RefCell<Scope>>, item: Item, ) -> ExpandElement
Creates a local variable that can be (re)assigned
Sourcefn create_local_binding(
&self,
root: Rc<RefCell<Scope>>,
scope: Rc<RefCell<Scope>>,
item: Item,
) -> ExpandElement
fn create_local_binding( &self, root: Rc<RefCell<Scope>>, scope: Rc<RefCell<Scope>>, item: Item, ) -> ExpandElement
Creates an immutable local binding for intermediates
Sourcefn create_local_undeclared(
&self,
root: Rc<RefCell<Scope>>,
scope: Rc<RefCell<Scope>>,
item: Item,
) -> ExpandElement
fn create_local_undeclared( &self, root: Rc<RefCell<Scope>>, scope: Rc<RefCell<Scope>>, item: Item, ) -> ExpandElement
Creates an undeclared local binding that must not be reused regardless of allocator