SAVE_OPLINE();
expr = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R);
+ if (Z_TYPE_P(expr) == opline->extended_value) {
+ ZVAL_COPY_VALUE(result, expr);
+ if (OP1_TYPE == IS_CV) {
+ if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ } else if (OP1_TYPE == IS_CONST) {
+ zval_opt_copy_ctor(result);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
if (opline->extended_value != IS_STRING) {
ZVAL_COPY_VALUE(result, expr);
if (!IS_OP1_TMP_FREE()) {
}
}
-ZEND_VM_C_LABEL(cast_again):
switch (opline->extended_value) {
case IS_NULL:
convert_to_null(result);
case IS_OBJECT:
convert_to_object(result);
break;
- case IS_REFERENCE:
- result = Z_REFVAL_P(result);
- ZEND_VM_C_GOTO(cast_again);
- break;
}
FREE_OP1_IF_VAR();
CHECK_EXCEPTION();
SAVE_OPLINE();
expr = opline->op1.zv;
+ if (Z_TYPE_P(expr) == opline->extended_value) {
+ ZVAL_COPY_VALUE(result, expr);
+ if (IS_CONST == IS_CV) {
+ if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ } else if (IS_CONST == IS_CONST) {
+ zval_opt_copy_ctor(result);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
if (opline->extended_value != IS_STRING) {
ZVAL_COPY_VALUE(result, expr);
if (!0) {
}
}
-cast_again:
switch (opline->extended_value) {
case IS_NULL:
convert_to_null(result);
case IS_OBJECT:
convert_to_object(result);
break;
- case IS_REFERENCE:
- result = Z_REFVAL_P(result);
- goto cast_again;
- break;
}
CHECK_EXCEPTION();
SAVE_OPLINE();
expr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
+ if (Z_TYPE_P(expr) == opline->extended_value) {
+ ZVAL_COPY_VALUE(result, expr);
+ if (IS_TMP_VAR == IS_CV) {
+ if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ } else if (IS_TMP_VAR == IS_CONST) {
+ zval_opt_copy_ctor(result);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
if (opline->extended_value != IS_STRING) {
ZVAL_COPY_VALUE(result, expr);
if (!1) {
}
}
-cast_again:
switch (opline->extended_value) {
case IS_NULL:
convert_to_null(result);
case IS_OBJECT:
convert_to_object(result);
break;
- case IS_REFERENCE:
- result = Z_REFVAL_P(result);
- goto cast_again;
- break;
}
CHECK_EXCEPTION();
SAVE_OPLINE();
expr = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
+ if (Z_TYPE_P(expr) == opline->extended_value) {
+ ZVAL_COPY_VALUE(result, expr);
+ if (IS_VAR == IS_CV) {
+ if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ } else if (IS_VAR == IS_CONST) {
+ zval_opt_copy_ctor(result);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
if (opline->extended_value != IS_STRING) {
ZVAL_COPY_VALUE(result, expr);
if (!0) {
}
}
-cast_again:
switch (opline->extended_value) {
case IS_NULL:
convert_to_null(result);
case IS_OBJECT:
convert_to_object(result);
break;
- case IS_REFERENCE:
- result = Z_REFVAL_P(result);
- goto cast_again;
- break;
}
zval_ptr_dtor_nogc(free_op1.var);
CHECK_EXCEPTION();
SAVE_OPLINE();
expr = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
+ if (Z_TYPE_P(expr) == opline->extended_value) {
+ ZVAL_COPY_VALUE(result, expr);
+ if (IS_CV == IS_CV) {
+ if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ } else if (IS_CV == IS_CONST) {
+ zval_opt_copy_ctor(result);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
if (opline->extended_value != IS_STRING) {
ZVAL_COPY_VALUE(result, expr);
if (!0) {
}
}
-cast_again:
switch (opline->extended_value) {
case IS_NULL:
convert_to_null(result);
case IS_OBJECT:
convert_to_object(result);
break;
- case IS_REFERENCE:
- result = Z_REFVAL_P(result);
- goto cast_again;
- break;
}
CHECK_EXCEPTION();