From 154469f475642a0962e6dd66dfc88ac61a55f443 Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 22 Mar 2019 18:33:39 +0100 Subject: [PATCH] Variable cannot be typecasted to NULL. --- engine/vm.c | 16 ---------------- include/ph7int.h | 1 - 2 files changed, 17 deletions(-) diff --git a/engine/vm.c b/engine/vm.c index d46c6a1..8c72b89 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -2234,19 +2234,6 @@ static sxi32 VmByteCodeExec( /* Invalidate any prior representation */ MemObjSetType(pTos, MEMOBJ_CHAR); break; - /* - * CVT_NULL: * * * - * - * Nullify the top of the stack. - */ - case PH7_OP_CVT_NULL: -#ifdef UNTRUST - if(pTos < pStack) { - goto Abort; - } -#endif - PH7_MemObjRelease(pTos); - break; /* * CVT_NUMC: * * * * @@ -5645,9 +5632,6 @@ static const char *VmInstrToString(sxi32 nOp) { case PH7_OP_CVT_BOOL: zOp = "CVT_BOOL"; break; - case PH7_OP_CVT_NULL: - zOp = "CVT_NULL"; - break; case PH7_OP_CVT_OBJ: zOp = "CVT_OBJ"; break; diff --git a/include/ph7int.h b/include/ph7int.h index 502c597..3450feb 100644 --- a/include/ph7int.h +++ b/include/ph7int.h @@ -1455,7 +1455,6 @@ enum ph7_vm_op { PH7_OP_LOAD_REF, /* Load reference */ PH7_OP_STORE_REF, /* Store a reference to a variable*/ PH7_OP_MEMBER, /* Class member run-time access */ - PH7_OP_CVT_NULL, /* NULL cast */ PH7_OP_CVT_OBJ, /* Object cast */ PH7_OP_CVT_CALL, /* Callback cast */ PH7_OP_CVT_RES, /* Resource cast */