Skip to content

Commit

Permalink
#245 ensure we leave result on top of virtual stack
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Jun 25, 2022
1 parent f280620 commit 4119bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ravicomp/src/linearizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ static Pseudo *linearize_function_expr(Proc *proc, AstNode *expr)
linearize_function(proc->linearizer);
set_current_proc(proc->linearizer, curproc); // restore the proc
ravitype_t target_type = expr->function_expr.type.type_code;
Pseudo *target = allocate_temp_pseudo(proc, target_type, false);
Pseudo *target = allocate_temp_pseudo(proc, target_type, true);
Pseudo *operand = allocate_closure_pseudo(newproc);
Instruction *insn = allocate_instruction(proc, op_closure, expr->line_number);
Pseudo *tofree = add_instruction_operand(proc, insn, operand);
Expand Down

0 comments on commit 4119bba

Please sign in to comment.