From: Dmitry Stogov Date: Fri, 21 Mar 2014 08:07:27 +0000 (+0400) Subject: Fixed refcounting X-Git-Tag: POST_PHPNG_MERGE~412^2~248 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d735434e47537ab77de96fc872e20f694ca9596f;p=php Fixed refcounting --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index ca6bdba410..509a5b5d6a 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -986,10 +986,6 @@ ZEND_VM_HANDLER(40, ZEND_ECHO, CONST|TMP|VAR|CV, ANY) SAVE_OPLINE(); z = GET_OP1_ZVAL_PTR(BP_VAR_R); - if (OP1_TYPE == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) { - Z_SET_REFCOUNT_P(z, 1); - } - if (UNEXPECTED(Z_ISREF_P(z))) { z = Z_REFVAL_P(z); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 379fbcb927..ed6ad2a948 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2375,10 +2375,6 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) SAVE_OPLINE(); z = opline->op1.zv; - if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) { - Z_SET_REFCOUNT_P(z, 1); - } - if (UNEXPECTED(Z_ISREF_P(z))) { z = Z_REFVAL_P(z); } @@ -7483,10 +7479,6 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) SAVE_OPLINE(); z = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); - if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) { - Z_SET_REFCOUNT_P(z, 1); - } - if (UNEXPECTED(Z_ISREF_P(z))) { z = Z_REFVAL_P(z); } @@ -12536,10 +12528,6 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) SAVE_OPLINE(); z = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); - if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) { - Z_SET_REFCOUNT_P(z, 1); - } - if (UNEXPECTED(Z_ISREF_P(z))) { z = Z_REFVAL_P(z); } @@ -30085,10 +30073,6 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) SAVE_OPLINE(); z = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC); - if (IS_CV == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) { - Z_SET_REFCOUNT_P(z, 1); - } - if (UNEXPECTED(Z_ISREF_P(z))) { z = Z_REFVAL_P(z); }