]> Nishi Git Mirror - gwion.git/commitdiff
:fire: Remove useless opcode
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 9 Oct 2019 23:27:15 +0000 (01:27 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 9 Oct 2019 23:27:15 +0000 (01:27 +0200)
include/opcode.h
opcode.txt
src/vm/vm.c

index bda88115eefec3922798bfbc80c382e2cfdd347e..3d25e1ea9cb8ad26db2aa25abb6e54b7c4742381 100644 (file)
@@ -166,7 +166,6 @@ enum {
   eDotFunc,
   eDotStaticFunc,
   ePushStaticCode,
-  eRegPushStr,
   eGcIni,
   eGcAdd,
   eGcEnd,
@@ -342,7 +341,6 @@ enum {
 #define  DotFunc             (f_instr)eDotFunc
 #define  DotStaticFunc       (f_instr)eDotStaticFunc
 #define  PushStaticCode      (f_instr)ePushStaticCode
-#define  RegPushStr          (f_instr)eRegPushStr
 #define  GcIni               (f_instr)eGcIni
 #define  GcAdd               (f_instr)eGcAdd
 #define  GcEnd               (f_instr)eGcEnd
index be86352c3572c3990374f49623e759aea7b48d16..ceef501c2596c6806291ca41bdfe21661a933e57 100644 (file)
@@ -163,7 +163,6 @@ DotStatic3
 DotFunc
 DotStaticFunc
 PushStaticCode
-RegPushStr
 GcIni
 GcAdd
 GcEnd
index 5eb145ffeadb5d3ac128ae006c15b186b04e881c..9986b0559b8dcae9f4529e924c4cb7b84a303e25 100644 (file)
@@ -311,7 +311,7 @@ ANN void vm_run(const VM* vm) { // lgtm [cpp/use-of-goto]
     &&newobj, &&addref, &&objassign, &&assign, &&remref,
     &&except, &&allocmemberaddr, &&dotmember, &&dotfloat, &&dotother, &&dotaddr,
     &&staticint, &&staticfloat, &&staticother,
-    &&dotfunc, &&dotstaticfunc, &&pushstaticcode, &&pushstr,
+    &&dotfunc, &&dotstaticfunc, &&pushstaticcode
     &&gcini, &&gcadd, &&gcend,
     &&gack, &&gack3, &&regpushimm, &&other, &&eoc
   };
@@ -804,10 +804,6 @@ pushstaticcode:
   VAL = (*(m_uint*)(reg) = (m_uint)((Func)VAL)->code);
   reg += SZ_INT;
   DISPATCH()
-pushstr:
-  *(M_Object*)reg = new_string2(vm->gwion, shred, (m_str)VAL);
-  reg += SZ_INT;
-  DISPATCH();
 gcini:
   vector_add(&shred->gc, 0);
   DISPATCH();