Fix unwind bug and add eval.
This commit is contained in:
@@ -140,7 +140,10 @@ namespace lily {
|
||||
}
|
||||
|
||||
void instruction_eval::gen_llvm(llvm_context& ctx) {
|
||||
// ??
|
||||
llvm::Value* stack = ctx.get_current_function()->arg_begin();
|
||||
llvm::Value* top = builder.CreateCall(stack_pop_func, { stack }, "temp");
|
||||
llvm::Value* evaluated = builder.CreateCall(eval_func, { top }, "temp");
|
||||
builder.CreateCall(stack_push_func, { stack, evaluated });
|
||||
}
|
||||
|
||||
void instruction_op::gen_llvm(llvm_context& ctx) {
|
||||
|
||||
Reference in New Issue
Block a user