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/ast.h | 1 - include/ssa/ssa.h | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ast.h b/include/ast.h index 580ca24..d37fcb3 100644 --- a/include/ast.h +++ b/include/ast.h @@ -148,7 +148,6 @@ struct Binop { typedef struct { jmp_buf env; - Parser *parser; amal_compiler *compiler; Scope *scope; } AstCompilerContext; 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