mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Make all Wasm blocks NoResult and always put return value in a local var.
This commit is contained in:
parent
51119c8142
commit
17dc6668ec
6 changed files with 48 additions and 34 deletions
|
@ -471,7 +471,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
|
||||
/// Build the function header: local declarations, stack frame push/pop code, and function length
|
||||
/// After this, all bytes have been generated (but not yet serialized) and we know the final size.
|
||||
pub fn build_fn_header(
|
||||
pub fn build_fn_header_and_footer(
|
||||
&mut self,
|
||||
local_types: &[ValueType],
|
||||
frame_size: i32,
|
||||
|
@ -483,7 +483,7 @@ impl<'a> CodeBuilder<'a> {
|
|||
if let Some(frame_ptr_id) = frame_pointer {
|
||||
let aligned_size = round_up_to_alignment!(frame_size, FRAME_ALIGNMENT_BYTES);
|
||||
self.build_stack_frame_push(aligned_size, frame_ptr_id);
|
||||
self.build_stack_frame_pop(aligned_size, frame_ptr_id);
|
||||
self.build_stack_frame_pop(aligned_size, frame_ptr_id); // footer
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue