]> granicus.if.org Git - php/commitdiff
Drop unnecessary ZEND_SEPARATE code
authorNikita Popov <nikic@php.net>
Tue, 12 Apr 2016 12:33:56 +0000 (14:33 +0200)
committerNikita Popov <nikic@php.net>
Tue, 12 Apr 2016 12:44:29 +0000 (14:44 +0200)
The following write ops will separate if necessary.

Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index 8e658f5d8891edeecd4cd5d9d838644b7431352d..cabebe4ec2af3a9d99b7b3cee6314213fb04ded0 100644 (file)
@@ -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();
 }
 
index bdc1bd7df4de3cb5442b701589b9d3eeeb6759b3..b7f0e3c5aeacf059b1870e91dc70c81ad02696b6 100644 (file)
@@ -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();
 }