]> granicus.if.org Git - php/commitdiff
Removed "dead" code
authorDmitry Stogov <dmitry@zend.com>
Mon, 5 Feb 2018 17:43:08 +0000 (20:43 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 5 Feb 2018 17:43:08 +0000 (20:43 +0300)
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index 1a2f5c402d8dcf6433b2385ee73f7ceef28b0d4d..e95b6ece72a03de2bb32c2f8bce0978e81536f1d 100644 (file)
@@ -4471,33 +4471,20 @@ ZEND_VM_HOT_HANDLER(185, ZEND_SEND_FUNC_ARG, VAR, NUM)
        }
 
        varptr = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
-       if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
-               SAVE_OPLINE();
-               GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
-               arg = ZEND_CALL_VAR(EX(call), opline->result.var);
-               ZVAL_NULL(arg);
-               ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
-       }
-
        arg = ZEND_CALL_VAR(EX(call), opline->result.var);
 
-       if (OP1_TYPE == IS_CV) {
-               ZVAL_OPT_DEREF(varptr);
-               ZVAL_COPY(arg, varptr);
-       } else /* if (OP1_TYPE == IS_VAR) */ {
-               if (UNEXPECTED(Z_ISREF_P(varptr))) {
-                       zend_refcounted *ref = Z_COUNTED_P(varptr);
+       if (UNEXPECTED(Z_ISREF_P(varptr))) {
+               zend_refcounted *ref = Z_COUNTED_P(varptr);
 
-                       varptr = Z_REFVAL_P(varptr);
-                       ZVAL_COPY_VALUE(arg, varptr);
-                       if (UNEXPECTED(GC_DELREF(ref) == 0)) {
-                               efree_size(ref, sizeof(zend_reference));
-                       } else if (Z_OPT_REFCOUNTED_P(arg)) {
-                               Z_ADDREF_P(arg);
-                       }
-               } else {
-                       ZVAL_COPY_VALUE(arg, varptr);
+               varptr = Z_REFVAL_P(varptr);
+               ZVAL_COPY_VALUE(arg, varptr);
+               if (UNEXPECTED(GC_DELREF(ref) == 0)) {
+                       efree_size(ref, sizeof(zend_reference));
+               } else if (Z_OPT_REFCOUNTED_P(arg)) {
+                       Z_ADDREF_P(arg);
                }
+       } else {
+               ZVAL_COPY_VALUE(arg, varptr);
        }
 
        ZEND_VM_NEXT_OPCODE();
index 8c7727003db40cf25c65ca0e96995a4e80b90475..374be547a48484998db44c5efb31faf34010aa53 100644 (file)
@@ -22053,33 +22053,20 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_FUNC_ARG_SPEC
        }
 
        varptr = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC);
-       if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
-               SAVE_OPLINE();
-               GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
-               arg = ZEND_CALL_VAR(EX(call), opline->result.var);
-               ZVAL_NULL(arg);
-               ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
-       }
-
        arg = ZEND_CALL_VAR(EX(call), opline->result.var);
 
-       if (IS_VAR == IS_CV) {
-               ZVAL_OPT_DEREF(varptr);
-               ZVAL_COPY(arg, varptr);
-       } else /* if (IS_VAR == IS_VAR) */ {
-               if (UNEXPECTED(Z_ISREF_P(varptr))) {
-                       zend_refcounted *ref = Z_COUNTED_P(varptr);
+       if (UNEXPECTED(Z_ISREF_P(varptr))) {
+               zend_refcounted *ref = Z_COUNTED_P(varptr);
 
-                       varptr = Z_REFVAL_P(varptr);
-                       ZVAL_COPY_VALUE(arg, varptr);
-                       if (UNEXPECTED(GC_DELREF(ref) == 0)) {
-                               efree_size(ref, sizeof(zend_reference));
-                       } else if (Z_OPT_REFCOUNTED_P(arg)) {
-                               Z_ADDREF_P(arg);
-                       }
-               } else {
-                       ZVAL_COPY_VALUE(arg, varptr);
+               varptr = Z_REFVAL_P(varptr);
+               ZVAL_COPY_VALUE(arg, varptr);
+               if (UNEXPECTED(GC_DELREF(ref) == 0)) {
+                       efree_size(ref, sizeof(zend_reference));
+               } else if (Z_OPT_REFCOUNTED_P(arg)) {
+                       Z_ADDREF_P(arg);
                }
+       } else {
+               ZVAL_COPY_VALUE(arg, varptr);
        }
 
        ZEND_VM_NEXT_OPCODE();