SAVE_OPLINE();
value = RT_CONSTANT(opline, opline->op1);
- if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
- if (IS_CONST == IS_VAR) {
+ if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
+ if (IS_CONST & IS_VAR) {
ref = value;
}
value = Z_REFVAL_P(value);
if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CONST == IS_CV) {
if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
- } else if (IS_CONST == IS_VAR && ref) {
+ } else if ((IS_CONST & IS_VAR) && ref) {
zend_reference *r = Z_REF_P(ref);
if (UNEXPECTED(GC_DELREF(r) == 0)) {
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value;
+ zval *ref = NULL;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC);
+
+ if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
+ if ((IS_TMP_VAR|IS_VAR) & IS_VAR) {
+ ref = value;
+ }
+ value = Z_REFVAL_P(value);
+ }
+
+ if (Z_TYPE_P(value) > IS_NULL) {
+ zval *result = EX_VAR(opline->result.var);
+ ZVAL_COPY_VALUE(result, value);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV) {
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
+ } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && ref) {
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(GC_DELREF(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
+ }
+ }
+ ZEND_VM_JMP_EX(OP_JMP_ADDR(opline, opline->op2), 0);
+ }
+
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
- zend_free_op free_op1;
- zval *value;
- zval *ref = NULL;
-
- SAVE_OPLINE();
- value = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC);
-
- if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && Z_ISREF_P(value)) {
- if (IS_TMP_VAR == IS_VAR) {
- ref = value;
- }
- value = Z_REFVAL_P(value);
- }
-
- if (Z_TYPE_P(value) > IS_NULL) {
- zval *result = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(result, value);
- if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
- } else if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
- } else if (IS_TMP_VAR == IS_VAR && ref) {
- zend_reference *r = Z_REF_P(ref);
-
- if (UNEXPECTED(GC_DELREF(r) == 0)) {
- efree_size(r, sizeof(zend_reference));
- } else if (Z_OPT_REFCOUNTED_P(result)) {
- Z_ADDREF_P(result);
- }
- }
- ZEND_VM_JMP_EX(OP_JMP_ADDR(opline, opline->op2), 0);
- }
-
- zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_NEXT_OPCODE();
-}
-
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
- zend_free_op free_op1;
- zval *value;
- zval *ref = NULL;
-
- SAVE_OPLINE();
- value = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC);
-
- if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && Z_ISREF_P(value)) {
- if (IS_VAR == IS_VAR) {
- ref = value;
- }
- value = Z_REFVAL_P(value);
- }
-
- if (Z_TYPE_P(value) > IS_NULL) {
- zval *result = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(result, value);
- if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
- } else if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
- } else if (IS_VAR == IS_VAR && ref) {
- zend_reference *r = Z_REF_P(ref);
-
- if (UNEXPECTED(GC_DELREF(r) == 0)) {
- efree_size(r, sizeof(zend_reference));
- } else if (Z_OPT_REFCOUNTED_P(result)) {
- Z_ADDREF_P(result);
- }
- }
- ZEND_VM_JMP_EX(OP_JMP_ADDR(opline, opline->op2), 0);
- }
-
- zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_NEXT_OPCODE();
-}
-
static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
SAVE_OPLINE();
value = _get_zval_ptr_cv_BP_VAR_IS(opline->op1.var EXECUTE_DATA_CC);
- if ((IS_CV == IS_VAR || IS_CV == IS_CV) && Z_ISREF_P(value)) {
- if (IS_CV == IS_VAR) {
+ if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
+ if (IS_CV & IS_VAR) {
ref = value;
}
value = Z_REFVAL_P(value);
if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CV == IS_CV) {
if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
- } else if (IS_CV == IS_VAR && ref) {
+ } else if ((IS_CV & IS_VAR) && ref) {
zend_reference *r = Z_REF_P(ref);
if (UNEXPECTED(GC_DELREF(r) == 0)) {
(void*)&&ZEND_ASSIGN_POW_SPEC_CV_CV_OBJ_LABEL,
(void*)&&ZEND_BIND_GLOBAL_SPEC_CV_CONST_LABEL,
(void*)&&ZEND_COALESCE_SPEC_CONST_LABEL,
- (void*)&&ZEND_COALESCE_SPEC_TMP_LABEL,
- (void*)&&ZEND_COALESCE_SPEC_VAR_LABEL,
+ (void*)&&ZEND_COALESCE_SPEC_TMPVAR_LABEL,
+ (void*)&&ZEND_COALESCE_SPEC_TMPVAR_LABEL,
(void*)&&ZEND_NULL_LABEL,
(void*)&&ZEND_COALESCE_SPEC_CV_LABEL,
(void*)&&ZEND_SPACESHIP_SPEC_CONST_CONST_LABEL,
VM_TRACE(ZEND_EXIT_SPEC_TMPVAR)
ZEND_EXIT_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
HYBRID_BREAK();
+ HYBRID_CASE(ZEND_COALESCE_SPEC_TMPVAR):
+ VM_TRACE(ZEND_COALESCE_SPEC_TMPVAR)
+ ZEND_COALESCE_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ HYBRID_BREAK();
HYBRID_CASE(ZEND_STRLEN_SPEC_TMPVAR):
VM_TRACE(ZEND_STRLEN_SPEC_TMPVAR)
ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
VM_TRACE(ZEND_JMP_SET_SPEC_TMP)
ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
HYBRID_BREAK();
- HYBRID_CASE(ZEND_COALESCE_SPEC_TMP):
- VM_TRACE(ZEND_COALESCE_SPEC_TMP)
- ZEND_COALESCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
- HYBRID_BREAK();
HYBRID_CASE(ZEND_QM_ASSIGN_SPEC_TMP):
VM_TRACE(ZEND_QM_ASSIGN_SPEC_TMP)
ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
VM_TRACE(ZEND_JMP_SET_SPEC_VAR)
ZEND_JMP_SET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
HYBRID_BREAK();
- HYBRID_CASE(ZEND_COALESCE_SPEC_VAR):
- VM_TRACE(ZEND_COALESCE_SPEC_VAR)
- ZEND_COALESCE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
- HYBRID_BREAK();
HYBRID_CASE(ZEND_QM_ASSIGN_SPEC_VAR):
VM_TRACE(ZEND_QM_ASSIGN_SPEC_VAR)
ZEND_QM_ASSIGN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
ZEND_ASSIGN_POW_SPEC_CV_CV_OBJ_HANDLER,
ZEND_BIND_GLOBAL_SPEC_CV_CONST_HANDLER,
ZEND_COALESCE_SPEC_CONST_HANDLER,
- ZEND_COALESCE_SPEC_TMP_HANDLER,
- ZEND_COALESCE_SPEC_VAR_HANDLER,
+ ZEND_COALESCE_SPEC_TMPVAR_HANDLER,
+ ZEND_COALESCE_SPEC_TMPVAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_COALESCE_SPEC_CV_HANDLER,
ZEND_SPACESHIP_SPEC_CONST_CONST_HANDLER,