From d067b84ece24b77f4dc5973375428128b129fd00 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 29 Oct 2022 13:01:31 +0200 Subject: [PATCH] :art: improve emit kind --- src/emit/emit.c | 2 +- src/emit/kind.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 034c49c7..b419cb2f 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -112,7 +112,7 @@ ANN static inline void frame_push(Frame *frame) { } static const f_instr allocmember[] = {RegPushImm, RegPushImm2, RegPushImm3, - AllocMember4}; + DotMemberMem4}; static const f_instr allocword[] = {AllocWord, AllocWord2, AllocWord3, RegPushMem4}; diff --git a/src/emit/kind.c b/src/emit/kind.c index 0f228f56..404feb52 100644 --- a/src/emit/kind.c +++ b/src/emit/kind.c @@ -16,8 +16,8 @@ static inline enum Kind kindof(const m_uint size, const uint emit_var) { ANN Instr emit_kind(Emitter emit, const m_uint size, const bool addr, const f_instr func[]) { const enum Kind kind = kindof(size, addr); - const Instr instr = emit_add_instr(emit, func[kind]); - instr->m_val2 = size; + const Instr instr = emit_add_instr(emit, func[kind]); + if(kind == KIND_OTHER) instr->m_val2 = size; return instr; } -- 2.43.0