]> Nishi Git Mirror - gwion.git/commitdiff
:art: Remove Instr->ptr
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sat, 16 Feb 2019 10:57:58 +0000 (11:57 +0100)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sat, 16 Feb 2019 10:57:58 +0000 (11:57 +0100)
include/instr.h
src/emit/emit.c

index 555b20f4796530f4ee5a76861967dcd6bfdd2dbf..cd68d088962b227d50b5161ca16701abf023fa8b 100644 (file)
@@ -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);
 };
 
index 7641e77b3cf45f04dddb3cdd9e4536908495a429..53445025c2178d4797fc79e2ff72ad41322b2a53 100644 (file)
@@ -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;