zend_free_op free_op1;
value = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
ZEND_VM_C_LABEL(type_check_resource):
if (EXPECTED(Z_TYPE_P(value) != IS_RESOURCE)
|| EXPECTED(NULL != zend_rsrc_list_get_rsrc_type(Z_RES_P(value)))) {
}
} else if ((OP1_TYPE & (IS_CV|IS_VAR)) && Z_ISREF_P(value)) {
value = Z_REFVAL_P(value);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
ZEND_VM_C_GOTO(type_check_resource);
}
} else if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
value = RT_CONSTANT(opline, opline->op1);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
type_check_resource:
if (EXPECTED(Z_TYPE_P(value) != IS_RESOURCE)
|| EXPECTED(NULL != zend_rsrc_list_get_rsrc_type(Z_RES_P(value)))) {
}
} else if ((IS_CONST & (IS_CV|IS_VAR)) && Z_ISREF_P(value)) {
value = Z_REFVAL_P(value);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
goto type_check_resource;
}
} else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
zend_free_op free_op1;
value = _get_zval_ptr_tmp(opline->op1.var, &free_op1 EXECUTE_DATA_CC);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
type_check_resource:
if (EXPECTED(Z_TYPE_P(value) != IS_RESOURCE)
|| EXPECTED(NULL != zend_rsrc_list_get_rsrc_type(Z_RES_P(value)))) {
}
} else if ((IS_TMP_VAR & (IS_CV|IS_VAR)) && Z_ISREF_P(value)) {
value = Z_REFVAL_P(value);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
goto type_check_resource;
}
} else if (IS_TMP_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
zend_free_op free_op1;
value = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
type_check_resource:
if (EXPECTED(Z_TYPE_P(value) != IS_RESOURCE)
|| EXPECTED(NULL != zend_rsrc_list_get_rsrc_type(Z_RES_P(value)))) {
}
} else if ((IS_VAR & (IS_CV|IS_VAR)) && Z_ISREF_P(value)) {
value = Z_REFVAL_P(value);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
goto type_check_resource;
}
} else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
value = _get_zval_ptr_cv_undef(opline->op1.var EXECUTE_DATA_CC);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
type_check_resource:
if (EXPECTED(Z_TYPE_P(value) != IS_RESOURCE)
|| EXPECTED(NULL != zend_rsrc_list_get_rsrc_type(Z_RES_P(value)))) {
}
} else if ((IS_CV & (IS_CV|IS_VAR)) && Z_ISREF_P(value)) {
value = Z_REFVAL_P(value);
- if ((1 << (uint32_t)Z_TYPE_P(value) & opline->extended_value)) {
+ if ((opline->extended_value >> (uint32_t)Z_TYPE_P(value)) & 1) {
goto type_check_resource;
}
} else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
/* These are allowed as first char: [a-zA-Z_\x7f-\xff] */
ch = (uint32_t)((unsigned char *)var_name)[0];
#if 1
- if (UNEXPECTED(!(charset[ch >> 5] & (1 << (ch & 0x1f))))) {
+ if (UNEXPECTED(!((charset[ch >> 5] >> (ch & 0x1f)) & 1))) {
#else
if (var_name[0] != '_' &&
(ch < 65 /* A */ || /* Z */ ch > 90) &&
do {
ch = (uint32_t)((unsigned char *)var_name)[i];
#if 1
- if (UNEXPECTED(!(charset[8 + (ch >> 5)] & (1 << (ch & 0x1f))))) {
+ if (UNEXPECTED(!((charset[8 + (ch >> 5)] >> (ch & 0x1f)) & 1))) {
#else
if (var_name[i] != '_' &&
(ch < 48 /* 0 */ || /* 9 */ ch > 57) &&