diff options
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r-- | Zend/zend_vm_execute.h | 116 |
1 files changed, 19 insertions, 97 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 2417f69a76..a9a3c5c2f7 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2059,7 +2059,7 @@ static int ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - zend_free_op free_op1; + zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; @@ -2100,20 +2100,7 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); } else { - if (IS_CONST == IS_VAR && - free_op1.var == NULL && - !array_ptr->is_ref && - array_ptr->refcount > 1) { - /* non-separated return value from function */ - zval *tmp; - - ALLOC_ZVAL(tmp); - INIT_PZVAL_COPY(tmp, array_ptr); - zval_copy_ctor(tmp); - array_ptr = tmp; - } else { - array_ptr->refcount++; - } + array_ptr->refcount++; } } @@ -4531,20 +4518,7 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); } else { - if (IS_TMP_VAR == IS_VAR && - free_op1.var == NULL && - !array_ptr->is_ref && - array_ptr->refcount > 1) { - /* non-separated return value from function */ - zval *tmp; - - ALLOC_ZVAL(tmp); - INIT_PZVAL_COPY(tmp, array_ptr); - zval_copy_ctor(tmp); - array_ptr = tmp; - } else { - array_ptr->refcount++; - } + array_ptr->refcount++; } } @@ -7544,20 +7518,7 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); } else { - if (IS_VAR == IS_VAR && - free_op1.var == NULL && - !array_ptr->is_ref && - array_ptr->refcount > 1) { - /* non-separated return value from function */ - zval *tmp; - - ALLOC_ZVAL(tmp); - INIT_PZVAL_COPY(tmp, array_ptr); - zval_copy_ctor(tmp); - array_ptr = tmp; - } else { - array_ptr->refcount++; - } + array_ptr->refcount++; } } @@ -7763,9 +7724,7 @@ static int ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) key->value.lval = int_key; key->type = IS_LONG; break; - default: - ZVAL_NULL(key); - break; + EMPTY_SWITCH_DEFAULT_CASE() } } @@ -8674,9 +8633,7 @@ static int zend_fetch_property_address_read_helper_SPEC_VAR_CONST(int type, ZEND if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -10100,9 +10057,7 @@ static int zend_fetch_property_address_read_helper_SPEC_VAR_TMP(int type, ZEND_O if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -11529,9 +11484,7 @@ static int zend_fetch_property_address_read_helper_SPEC_VAR_VAR(int type, ZEND_O if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -13403,9 +13356,7 @@ static int zend_fetch_property_address_read_helper_SPEC_VAR_CV(int type, ZEND_OP if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -14600,9 +14551,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(int type, Z if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -15679,9 +15628,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(int type, ZEN if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -16719,9 +16666,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(int type, ZEN if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -18124,9 +18069,7 @@ static int zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(int type, ZEND if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -19631,7 +19574,7 @@ static int ZEND_UNSET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); - zend_free_op free_op1; + zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; @@ -19672,20 +19615,7 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); } else { - if (IS_CV == IS_VAR && - free_op1.var == NULL && - !array_ptr->is_ref && - array_ptr->refcount > 1) { - /* non-separated return value from function */ - zval *tmp; - - ALLOC_ZVAL(tmp); - INIT_PZVAL_COPY(tmp, array_ptr); - zval_copy_ctor(tmp); - array_ptr = tmp; - } else { - array_ptr->refcount++; - } + array_ptr->refcount++; } } @@ -20660,9 +20590,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_CONST(int type, ZEND_ if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -22078,9 +22006,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_TMP(int type, ZEND_OP if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -23499,9 +23425,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_VAR(int type, ZEND_OP if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); @@ -25363,9 +25287,7 @@ static int zend_fetch_property_address_read_helper_SPEC_CV_CV(int type, ZEND_OPC if (container->type != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { - if (type != BP_VAR_IS) { - zend_error(E_NOTICE, "Trying to get property of non-object"); - } + zend_error(E_NOTICE, "Trying to get property of non-object"); *retval = EG(uninitialized_zval_ptr); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); AI_USE_PTR(EX_T(opline->result.u.var).var); |