Store arity of functions in llvm context to generate correct calls.
This commit is contained in:
@@ -109,7 +109,7 @@ namespace lily {
|
||||
void instruction_push_global::gen_llvm(llvm_context& ctx) {
|
||||
llvm::Value* stack = ctx.get_current_function()->arg_begin();
|
||||
llvm::Value* new_node = builder.CreateCall(malloc_node_global_func,
|
||||
{ get_int8_constant(2), ctx.get_supercombinator(name) }, "temp");
|
||||
{ get_int8_constant(ctx.get_supercombinator_arity(name)), ctx.get_supercombinator_function(name) }, "temp");
|
||||
// TODO get arity
|
||||
builder.CreateCall(stack_push_func, { stack, new_node });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user