}
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();
}
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();