Add a write.rs module.

Convert a function to text.
This commit is contained in:
Jakob Stoklund Olesen
2016-04-29 13:30:07 -07:00
parent 5c4f3d01e2
commit ddea422ceb
3 changed files with 119 additions and 0 deletions

View File

@@ -382,6 +382,11 @@ impl Function {
Self::with_name_signature(FunctionName::new(), Signature::new())
}
/// Get the signature of this function.
pub fn own_signature(&self) -> &Signature {
&self.signature
}
/// Allocate a new stack slot.
pub fn make_stack_slot(&mut self, data: StackSlotData) -> StackSlot {
let ss = StackSlot::new(self.stack_slots.len());