]> Nishi Git Mirror - gwion.git/commitdiff
:art: remove AllocMemberAddr
authorfennecdjay <fennecdjay@gmail.com>
Sat, 29 Oct 2022 11:02:21 +0000 (13:02 +0200)
committerfennecdjay <fennecdjay@gmail.com>
Sat, 29 Oct 2022 11:02:21 +0000 (13:02 +0200)
include/opcode.h
opcode.txt
src/vm/vm.c

index 4aa75b97ede91facd159b2f222d0d64f1ab0eb4e..6e251241c43a13de070fcbce97d1ef9c9a7e1220 100644 (file)
@@ -184,7 +184,6 @@ enum {
   eStructReleaseRegAddr,
   eStructReleaseMem,
   eGWOP_EXCEPT,
-  eAllocMember4,
   eDotMemberMem,
   eDotMemberMem2,
   eDotMemberMem4,
@@ -401,7 +400,6 @@ enum {
 #define  StructReleaseRegAddr  (f_instr)eStructReleaseRegAddr
 #define  StructReleaseMem      (f_instr)eStructReleaseMem
 #define  GWOP_EXCEPT           (f_instr)eGWOP_EXCEPT
-#define  AllocMember4          (f_instr)eAllocMember4
 #define  DotMemberMem          (f_instr)eDotMemberMem
 #define  DotMemberMem2         (f_instr)eDotMemberMem2
 #define  DotMemberMem4         (f_instr)eDotMemberMem4
@@ -1280,11 +1278,6 @@ ANN static inline void dump_opcodes(const VM_Code code) {
         gw_out(" {-R}%-14"UINT_F"{0}", instr->m_val);
         gw_out("\n");
         break;
-      case eAllocMember4:
-        gw_out("{Y}┃{0}{-}% 4lu{0}: AllocMember4", j);
-        gw_out(" {-R}%-14"UINT_F"{0}", instr->m_val);
-        gw_out("\n");
-        break;
       case eDotMemberMem:
         gw_out("{Y}┃{0}{-}% 4lu{0}: DotMemberMem", j);
         gw_out(" {-R}%-14"UINT_F"{0}", instr->m_val);
index 3ec53bb4b4d24411edf3738808fbb1e8e8ab6b78..21a38eab89df45c3ace8a8a0c4dadc6ad6c0ab59 100644 (file)
@@ -181,7 +181,6 @@ ObjectRelease2~p
 StructReleaseRegAddr~u~t
 StructReleaseMem~u~t
 GWOP_EXCEPT~u
-AllocMember4~u
 DotMemberMem~u
 DotMemberMem2~u
 DotMemberMem4~u
index ca32fd2629fa47edca49079171d5a9c0824bb3af..9386740e9fc957a99abc4e3127a531cc22fa9357 100644 (file)
@@ -460,7 +460,7 @@ vm_prepare(const VM *vm, m_bit *prepare_code) { // lgtm [cpp/use-of-goto]
       &&arraytop, &&arrayaccess, &&arrayget, &&arrayaddr, &&newobj, &&addref,
       &&addrefaddr, &&structaddref, &&structaddrefaddr, &&objassign, &&assign,
       &&_remref, &&_remref2, &&_structreleaseregaddr, &&structreleasemem,
-      &&_except, &&_allocmemberaddr,
+      &&_except,
       &&dotmembermem, &&dotmembermem2, /*&&dotmembermem3, */&&dotmembermem4,
       &&dotmember, &&dotfloat, &&dotother, &&dotaddr,
       &&unioncheck, &&unionint, &&unionfloat,
@@ -1096,10 +1096,6 @@ vm_prepare(const VM *vm, m_bit *prepare_code) { // lgtm [cpp/use-of-goto]
         continue;
       }
       DISPATCH();
-    allocmemberaddr:
-      *(m_bit **)reg = (*(M_Object *)mem)->data + VAL;
-      reg += SZ_INT;
-      DISPATCH()
     dotmembermem:
       *(m_uint *)reg =
           *(m_uint *)((*(M_Object *)(mem + VAL2))->data + VAL);
@@ -1309,7 +1305,7 @@ static void *_dispatch[] = {
       &&_arraytop, &&_arrayaccess, &&_arrayget, &&_arrayaddr, &&_newobj, &&_addref,
       &&_addrefaddr, &&_structaddref, &&_structaddrefaddr, &&_objassign, &&_assign,
       &&_remref, &&_remref2, &&_structreleaseregaddr, &&_structreleasemem,
-      &&_except, &&_allocmemberaddr,
+      &&_except,
       &&_dotmembermem, &&_dotmembermem2, /*&&_dotmembermem3, */&&_dotmembermem4,
       &&_dotmember, &&_dotfloat, &&_dotother, &&_dotaddr,
       &&_unioncheck, &&_unionint, &&_unionfloat,
@@ -1533,7 +1529,6 @@ return;
     PREPARE(structreleaseregaddr);
     PREPARE(structreleasemem);
     PREPARE(except);
-    PREPARE(allocmemberaddr);
     PREPARE(dotmembermem);
     PREPARE(dotmembermem2);
     //PREPARE(dotmembermem3);