Fix and enable tests involving empty records

This commit is contained in:
Brian Carroll 2021-11-29 00:57:28 +00:00
parent 88bf6bf1b7
commit dcd4914ac1
6 changed files with 30 additions and 12 deletions

View file

@ -438,10 +438,12 @@ impl<'a> CodeBuilder<'a> {
) {
self.build_local_declarations(local_types);
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);
if frame_size != 0 {
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.code.push(END as u8);