From e7e19395cb7cb641d2a5ff8325fb68d5acb485c5 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 10 Oct 2019 01:27:15 +0200 Subject: [PATCH] :fire: Remove useless opcode --- include/opcode.h | 2 -- opcode.txt | 1 - src/vm/vm.c | 6 +----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/opcode.h b/include/opcode.h index bda88115..3d25e1ea 100644 --- a/include/opcode.h +++ b/include/opcode.h @@ -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 diff --git a/opcode.txt b/opcode.txt index be86352c..ceef501c 100644 --- a/opcode.txt +++ b/opcode.txt @@ -163,7 +163,6 @@ DotStatic3 DotFunc DotStaticFunc PushStaticCode -RegPushStr GcIni GcAdd GcEnd diff --git a/src/vm/vm.c b/src/vm/vm.c index 5eb145ff..9986b055 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -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, &®pushimm, &&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(); -- 2.43.0