From: Nikita Popov Date: Tue, 12 Apr 2016 12:33:56 +0000 (+0200) Subject: Drop unnecessary ZEND_SEPARATE code X-Git-Tag: php-7.0.7RC1~116^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a2eee520accd26b2b2388ff433887f21f892690;p=php Drop unnecessary ZEND_SEPARATE code The following write ops will separate if necessary. --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 8e658f5d88..cabebe4ec2 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -7302,10 +7302,8 @@ ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED) if (UNEXPECTED(Z_REFCOUNT_P(var_ptr) == 1)) { ZVAL_UNREF(var_ptr); } - } else if (Z_COPYABLE_P(var_ptr) && Z_REFCOUNT_P(var_ptr) > 1) { - Z_DELREF_P(var_ptr); - ZVAL_DUP(EX_VAR(opline->op1.var), var_ptr); } + ZEND_VM_NEXT_OPCODE(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index bdc1bd7df4..b7f0e3c5ae 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -19510,10 +19510,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDL if (UNEXPECTED(Z_REFCOUNT_P(var_ptr) == 1)) { ZVAL_UNREF(var_ptr); } - } else if (Z_COPYABLE_P(var_ptr) && Z_REFCOUNT_P(var_ptr) > 1) { - Z_DELREF_P(var_ptr); - ZVAL_DUP(EX_VAR(opline->op1.var), var_ptr); } + ZEND_VM_NEXT_OPCODE(); }