From: fennecdjay Date: Wed, 9 Oct 2019 23:27:15 +0000 (+0200) Subject: :fire: Remove useless opcode X-Git-Tag: nightly~2198^2~37 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e7e19395cb7cb641d2a5ff8325fb68d5acb485c5;p=gwion.git :fire: Remove useless opcode --- 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();