From 6927b6338b9655974db79c429e6ffc73037ab5e0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 29 Mar 2019 20:49:29 +0100 Subject: Fix ssa call, use correct tokenizer in error --- include/ssa/ssa.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/ssa') diff --git a/include/ssa/ssa.h b/include/ssa/ssa.h index c374ffb..16ceb25 100644 --- a/include/ssa/ssa.h +++ b/include/ssa/ssa.h @@ -38,7 +38,7 @@ typedef struct { typedef u16 SsaRegister; typedef u16 SsaIntermediateIndex; typedef u16 SsaStringIndex; -typedef u32 SsaFuncIndex; +typedef usize SsaFuncIndex; typedef struct { Buffer/*instruction data*/ instructions; @@ -63,12 +63,11 @@ CHECK_RESULT int ssa_ins_binop(Ssa *self, SsaInstructionType binop_type, SsaRegi CHECK_RESULT int ssa_ins_func_start(Ssa *self, u8 num_args, SsaFuncIndex *result); CHECK_RESULT int ssa_ins_func_end(Ssa *self); CHECK_RESULT int ssa_ins_push(Ssa *self, SsaRegister reg); -CHECK_RESULT int ssa_ins_call(Ssa *self, SsaFuncIndex func, SsaRegister *result); +CHECK_RESULT int ssa_ins_call(Ssa *self, void *func, SsaRegister *result); typedef struct { jmp_buf env; - Parser *parser; Ssa ssa; } SsaCompilerContext; -- cgit v1.2.3