From db36d5c80fe9c74b228982911ec9f2cd4aedfdd2 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 16 Feb 2019 11:57:58 +0100 Subject: [PATCH] :art: Remove Instr->ptr --- include/instr.h | 1 - src/emit/emit.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/instr.h b/include/instr.h index 555b20f4..cd68d088 100644 --- a/include/instr.h +++ b/include/instr.h @@ -26,7 +26,6 @@ struct Instr_ { m_uint m_val; }; m_uint m_val2; - m_bit ptr[SZ_MINVAL]; void (*execute)(const VM_Shred shred, const Instr instr); }; diff --git a/src/emit/emit.c b/src/emit/emit.c index 7641e77b..53445025 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -396,7 +396,6 @@ ANN static m_bool prim_num(const Emitter emit, const Exp_Primary * primary) { ANN static m_bool prim_float(const Emitter emit, const Exp_Primary* primary) { const Instr instr = emit_add_instr(emit, RegPushImm2); -// *(m_float*)instr->ptr = primary->d.fnum; instr->f = primary->d.fnum; return GW_OK; } @@ -696,7 +695,6 @@ assert(_instr->execute == DotTmpl); dt->base = f->def; _instr->m_val = (m_uint)dt; _instr->m_val2 = strlen(c); - *(m_int*)_instr->ptr = f->def->tmpl->base; return GW_OK; } const Instr instr = emit_add_instr(emit, RegPushPtr); @@ -1161,7 +1159,6 @@ ANN static m_bool emit_stmt_switch(const Emitter emit, const Stmt_Switch stmt) { instr->m_val = switch_idx(emit->env) ?: emit_code_size(emit); if(push) { emit_switch_map(push, (Map)instr->m_val2); -// *(m_uint*)instr->ptr = SZ_INT; } switch_end(emit->env); pop_vector(&emit->code->stack_break, emit_code_size(emit)); @@ -1326,8 +1323,6 @@ ANN static m_bool emit_dot_static_import_data(const Emitter emit, const Value v, const Instr instr = emit_kind(emit, size, emit_addr, regpushimm); instr->m_val = (isa(v->type, t_object) > 0 ? (m_uint)&v->d.ptr : (m_uint)v->d.ptr); - *(m_uint**)instr->ptr = (m_uint*)(isa(v->type, t_object) > 0 ? - (m_uint*)&v->d.ptr : v->d.ptr); instr->m_val2 = size; } return GW_OK; -- 2.43.0