From 798fd7d3b26b992e5a05dd9f6544c49ae6206f6c Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 1 May 2019 12:33:51 +0200 Subject: [PATCH] Remove unused and useless VM instruction. --- engine/vm.c | 17 ----------------- include/ph7int.h | 1 - 2 files changed, 18 deletions(-) diff --git a/engine/vm.c b/engine/vm.c index 285737c..e3089dc 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -2283,20 +2283,6 @@ static sxi32 VmByteCodeExec( /* Invalidate any prior representation */ MemObjSetType(pTos, MEMOBJ_CHAR); break; - /* - * CVT_NUMC: * * * - * - * Force the top of the stack to be a numeric type (integer,real or both). - */ - case PH7_OP_CVT_NUMC: -#ifdef UNTRUST - if(pTos < pStack) { - goto Abort; - } -#endif - /* Force a numeric cast */ - PH7_MemObjToNumeric(pTos); - break; /* * CVT_OBJ: * * * * @@ -5348,9 +5334,6 @@ static const char *VmInstrToString(sxi32 nOp) { case PH7_OP_CVT_OBJ: zOp = "CVT_OBJ"; break; - case PH7_OP_CVT_NUMC: - zOp = "CVT_NUMC"; - break; case PH7_OP_INCR: zOp = "INCR"; break; diff --git a/include/ph7int.h b/include/ph7int.h index 2ce8d9e..ed337df 100644 --- a/include/ph7int.h +++ b/include/ph7int.h @@ -1420,7 +1420,6 @@ enum ph7_vm_op { PH7_OP_YIELD, /* Stack yield */ PH7_OP_CVT_BOOL, /* Boolean cast */ PH7_OP_CVT_CHAR, /* Char cast */ - PH7_OP_CVT_NUMC, /* Numeric (integer,real or both) type cast */ PH7_OP_INCR, /* Increment ++ */ PH7_OP_DECR, /* Decrement -- */ PH7_OP_NEW, /* new */