Improve zend_binary_assign_op helpers.

Reorder opcode numbers to make ADD-POW and ASSIGN_ADD-ASSIGN_POW opcodes sequencional.
This commit is contained in:
Dmitry Stogov 2019-07-04 17:25:43 +03:00
parent 925fd0fe6f
commit ef05eab432
6 changed files with 2393 additions and 2371 deletions

View File

@ -1301,7 +1301,29 @@ static zend_never_inline void zend_assign_to_object_dim(zval *object, zval *dim,
}
}
static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *property, zval *value, binary_op_type binary_op OPLINE_DC EXECUTE_DATA_DC)
static zend_always_inline int zend_binary_op(zval *ret, zval *op1, zval *op2 OPLINE_DC)
{
static const binary_op_type zend_binary_ops[] = {
add_function,
sub_function,
mul_function,
div_function,
mod_function,
shift_left_function,
shift_right_function,
concat_function,
bitwise_or_function,
bitwise_and_function,
bitwise_xor_function,
pow_function
};
/* size_t cast makes GCC to better optimize 64-bit PIC code */
size_t opcode = (size_t)opline->opcode;
return zend_binary_ops[opcode - ZEND_ASSIGN_ADD](ret, op1, op2);
}
static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *property, zval *value OPLINE_DC EXECUTE_DATA_DC)
{
zval *z;
zval rv, res;
@ -1317,7 +1339,7 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *
}
ZVAL_COPY_VALUE(z, value);
}
if (binary_op(&res, z, value) == SUCCESS) {
if (zend_binary_op(&res, z, value OPLINE_CC) == SUCCESS) {
Z_OBJ_HT_P(object)->write_dimension(object, property, &res);
}
if (z == &rv) {
@ -1335,11 +1357,11 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *
}
}
static zend_never_inline void zend_binary_assign_op_typed_ref(zend_reference *ref, zval *value, binary_op_type binary_op EXECUTE_DATA_DC)
static zend_never_inline void zend_binary_assign_op_typed_ref(zend_reference *ref, zval *value OPLINE_DC EXECUTE_DATA_DC)
{
zval z_copy;
binary_op(&z_copy, &ref->val, value);
zend_binary_op(&z_copy, &ref->val, value OPLINE_CC);
if (EXPECTED(zend_verify_ref_assignable_zval(ref, &z_copy, EX_USES_STRICT_TYPES()))) {
zval_ptr_dtor(&ref->val);
ZVAL_COPY_VALUE(&ref->val, &z_copy);
@ -1348,11 +1370,11 @@ static zend_never_inline void zend_binary_assign_op_typed_ref(zend_reference *re
}
}
static zend_never_inline void zend_binary_assign_op_typed_prop(zend_property_info *prop_info, zval *zptr, zval *value, binary_op_type binary_op EXECUTE_DATA_DC)
static zend_never_inline void zend_binary_assign_op_typed_prop(zend_property_info *prop_info, zval *zptr, zval *value OPLINE_DC EXECUTE_DATA_DC)
{
zval z_copy;
binary_op(&z_copy, zptr, value);
zend_binary_op(&z_copy, zptr, value OPLINE_CC);
if (EXPECTED(zend_verify_property_type(prop_info, &z_copy, EX_USES_STRICT_TYPES()))) {
zval_ptr_dtor(zptr);
ZVAL_COPY_VALUE(zptr, &z_copy);
@ -1872,7 +1894,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object,
zval_ptr_dtor(z);
}
static zend_never_inline void zend_assign_op_overloaded_property(zval *object, zval *property, void **cache_slot, zval *value, binary_op_type binary_op OPLINE_DC EXECUTE_DATA_DC)
static zend_never_inline void zend_assign_op_overloaded_property(zval *object, zval *property, void **cache_slot, zval *value OPLINE_DC EXECUTE_DATA_DC)
{
zval *z;
zval rv, obj, res;
@ -1896,7 +1918,7 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z
}
ZVAL_COPY_VALUE(z, value);
}
if (binary_op(&res, z, value) == SUCCESS) {
if (zend_binary_op(&res, z, value OPLINE_CC) == SUCCESS) {
Z_OBJ_HT(obj)->write_property(&obj, property, &res, cache_slot);
}
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {

View File

@ -274,7 +274,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(7, ZEND_SR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(166, ZEND_POW, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_COLD_CONSTCONST_HANDLER(12, ZEND_POW, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -361,7 +361,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(NO_CONST_
}
}
ZEND_VM_COLD_CONSTCONST_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -379,7 +379,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|T
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(17, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -397,7 +397,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CON
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(17, ZEND_IS_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(18, ZEND_IS_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -475,7 +475,7 @@ ZEND_VM_C_LABEL(is_equal_false):
}
}
ZEND_VM_COLD_CONSTCONST_HANDLER(18, ZEND_IS_NOT_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(19, ZEND_IS_NOT_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -553,7 +553,7 @@ ZEND_VM_C_LABEL(is_not_equal_false):
}
}
ZEND_VM_COLD_CONSTCONST_HANDLER(19, ZEND_IS_SMALLER, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_COLD_CONSTCONST_HANDLER(20, ZEND_IS_SMALLER, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -616,7 +616,7 @@ ZEND_VM_C_LABEL(is_smaller_false):
}
}
ZEND_VM_COLD_CONSTCONST_HANDLER(20, ZEND_IS_SMALLER_OR_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZEND_VM_COLD_CONSTCONST_HANDLER(21, ZEND_IS_SMALLER_OR_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -775,7 +775,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(11, ZEND_BW_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|C
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONSTCONST_HANDLER(14, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
ZEND_VM_COLD_CONSTCONST_HANDLER(15, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV, SPEC(COMMUTATIVE))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -790,7 +790,7 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(14, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONST_HANDLER(12, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY)
ZEND_VM_COLD_CONST_HANDLER(13, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY)
{
USE_OPLINE
zend_free_op free_op1;
@ -809,7 +809,7 @@ ZEND_VM_COLD_CONST_HANDLER(12, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY)
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_COLD_CONST_HANDLER(13, ZEND_BOOL_NOT, CONST|TMPVAR|CV, ANY)
ZEND_VM_COLD_CONST_HANDLER(14, ZEND_BOOL_NOT, CONST|TMPVAR|CV, ANY)
{
USE_OPLINE
zval *val;
@ -869,7 +869,7 @@ ZEND_VM_COLD_HELPER(zend_undefined_function_helper, ANY, ANY)
HANDLE_EXCEPTION();
}
ZEND_VM_HELPER(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, binary_op_type binary_op)
ZEND_VM_HELPER(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data;
@ -919,7 +919,7 @@ ZEND_VM_C_LABEL(assign_op_object):
if (UNEXPECTED(Z_ISREF_P(zptr))) {
ref = Z_REF_P(zptr);
if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) {
zend_binary_assign_op_typed_ref(ref, value, binary_op EXECUTE_DATA_CC);
zend_binary_assign_op_typed_ref(ref, value OPLINE_CC EXECUTE_DATA_CC);
break;
}
zptr = Z_REFVAL_P(zptr);
@ -932,9 +932,9 @@ ZEND_VM_C_LABEL(assign_op_object):
}
if (UNEXPECTED(prop_info)) {
/* special case for typed properties */
zend_binary_assign_op_typed_prop(prop_info, zptr, value, binary_op EXECUTE_DATA_CC);
zend_binary_assign_op_typed_prop(prop_info, zptr, value OPLINE_CC EXECUTE_DATA_CC);
} else {
binary_op(zptr, zptr, value);
zend_binary_op(zptr, zptr, value OPLINE_CC);
}
} while (0);
@ -943,7 +943,7 @@ ZEND_VM_C_LABEL(assign_op_object):
}
}
} else {
zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC);
zend_assign_op_overloaded_property(object, property, cache_slot, value OPLINE_CC EXECUTE_DATA_CC);
}
} while (0);
@ -955,7 +955,7 @@ ZEND_VM_C_LABEL(assign_op_object):
}
/* No specialization for op_types (CONST|TMP|VAR|CV, UNUSED|CONST|TMPVAR) */
ZEND_VM_HELPER(zend_binary_assign_op_static_prop_helper, ANY, ANY, binary_op_type binary_op)
ZEND_VM_HELPER(zend_binary_assign_op_static_prop_helper, ANY, ANY)
{
/* This helper actually never will receive IS_VAR as second op, and has the same handling for VAR and TMP in the first op, but for interoperability with the other binary_assign_op helpers, it is necessary to "include" it */
@ -980,7 +980,7 @@ ZEND_VM_HELPER(zend_binary_assign_op_static_prop_helper, ANY, ANY, binary_op_typ
if (UNEXPECTED(Z_ISREF_P(prop))) {
ref = Z_REF_P(prop);
if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) {
zend_binary_assign_op_typed_ref(ref, value, binary_op EXECUTE_DATA_CC);
zend_binary_assign_op_typed_ref(ref, value OPLINE_CC EXECUTE_DATA_CC);
break;
}
prop = Z_REFVAL_P(prop);
@ -988,9 +988,9 @@ ZEND_VM_HELPER(zend_binary_assign_op_static_prop_helper, ANY, ANY, binary_op_typ
if (UNEXPECTED(prop_info->type)) {
/* special case for typed properties */
zend_binary_assign_op_typed_prop(prop_info, prop, value, binary_op EXECUTE_DATA_CC);
zend_binary_assign_op_typed_prop(prop_info, prop, value OPLINE_CC EXECUTE_DATA_CC);
} else {
binary_op(prop, prop, value);
zend_binary_op(prop, prop, value OPLINE_CC);
}
} while (0);
@ -1003,7 +1003,7 @@ ZEND_VM_HELPER(zend_binary_assign_op_static_prop_helper, ANY, ANY, binary_op_typ
ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
ZEND_VM_HELPER(zend_binary_assign_op_dim_helper, VAR|CV, CONST|TMPVAR|UNUSED|CV, binary_op_type binary_op)
ZEND_VM_HELPER(zend_binary_assign_op_dim_helper, VAR|CV, CONST|TMPVAR|UNUSED|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
@ -1042,11 +1042,11 @@ ZEND_VM_C_LABEL(assign_dim_op_new_array):
zend_reference *ref = Z_REF_P(var_ptr);
var_ptr = Z_REFVAL_P(var_ptr);
if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) {
zend_binary_assign_op_typed_ref(ref, value, binary_op EXECUTE_DATA_CC);
zend_binary_assign_op_typed_ref(ref, value OPLINE_CC EXECUTE_DATA_CC);
break;
}
}
binary_op(var_ptr, var_ptr, value);
zend_binary_op(var_ptr, var_ptr, value OPLINE_CC);
} while (0);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
@ -1067,7 +1067,7 @@ ZEND_VM_C_LABEL(assign_dim_op_new_array):
if (OP2_TYPE == IS_CONST && Z_EXTRA_P(dim) == ZEND_EXTRA_VALUE) {
dim++;
}
zend_binary_assign_op_obj_dim(container, dim, value, binary_op OPLINE_CC EXECUTE_DATA_CC);
zend_binary_assign_op_obj_dim(container, dim, value OPLINE_CC EXECUTE_DATA_CC);
} else {
if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
if (OP2_TYPE == IS_UNUSED) {
@ -1103,7 +1103,7 @@ ZEND_VM_C_LABEL(assign_dim_op_ret_null):
ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
ZEND_VM_HELPER(zend_binary_assign_op_simple_helper, VAR|CV, CONST|TMPVAR|CV, binary_op_type binary_op)
ZEND_VM_HELPER(zend_binary_assign_op_simple_helper, VAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@ -1123,12 +1123,12 @@ ZEND_VM_HELPER(zend_binary_assign_op_simple_helper, VAR|CV, CONST|TMPVAR|CV, bin
if (UNEXPECTED(Z_TYPE_P(var_ptr) == IS_REFERENCE)) {
zend_reference *ref = Z_REF_P(var_ptr);
if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) {
zend_binary_assign_op_typed_ref(ref, value, binary_op EXECUTE_DATA_CC);
zend_binary_assign_op_typed_ref(ref, value OPLINE_CC EXECUTE_DATA_CC);
break;
}
var_ptr = Z_REFVAL_P(var_ptr);
}
binary_op(var_ptr, var_ptr, value);
zend_binary_op(var_ptr, var_ptr, value OPLINE_CC);
} while (0);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
@ -1141,81 +1141,81 @@ ZEND_VM_HELPER(zend_binary_assign_op_simple_helper, VAR|CV, CONST|TMPVAR|CV, bin
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_INLINE_HELPER(zend_binary_assign_op_helper, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, SPEC(DIM_OBJ), binary_op_type binary_op)
ZEND_VM_INLINE_HELPER(zend_binary_assign_op_helper, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, SPEC(DIM_OBJ))
{
USE_OPLINE
if (EXPECTED(opline->extended_value == 0)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_simple_helper, binary_op, binary_op);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_simple_helper);
}
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, binary_op);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper);
}
if (UNEXPECTED(opline->extended_value == ZEND_ASSIGN_STATIC_PROP)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_static_prop_helper, binary_op, binary_op);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_static_prop_helper);
}
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, binary_op);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper);
}
ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(22, ZEND_ASSIGN_ADD, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, add_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(23, ZEND_ASSIGN_SUB, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, sub_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(24, ZEND_ASSIGN_MUL, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, mul_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(25, ZEND_ASSIGN_DIV, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, div_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(26, ZEND_ASSIGN_MOD, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, mod_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(27, ZEND_ASSIGN_SL, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, shift_left_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(28, ZEND_ASSIGN_SR, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, shift_right_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(29, ZEND_ASSIGN_CONCAT, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, concat_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(30, ZEND_ASSIGN_BW_OR, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, bitwise_or_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_AND, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, bitwise_and_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_XOR, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, bitwise_xor_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
ZEND_VM_HANDLER(33, ZEND_ASSIGN_POW, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ|CACHE_SLOT, SPEC(DIM_OBJ))
{
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, pow_function);
ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper);
}
ZEND_VM_HELPER(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV)
@ -4272,7 +4272,7 @@ ZEND_VM_COLD_CONST_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY, SRC)
ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
}
ZEND_VM_HANDLER(41, ZEND_GENERATOR_CREATE, ANY, ANY)
ZEND_VM_HANDLER(139, ZEND_GENERATOR_CREATE, ANY, ANY)
{
zval *return_value = EX(return_value);
@ -5702,7 +5702,7 @@ ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|CV|UNUSED, CONST|TMPVAR|UNUSE
}
}
ZEND_VM_COLD_CONST_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY, TYPE)
ZEND_VM_COLD_CONST_HANDLER(51, ZEND_CAST, CONST|TMP|VAR|CV, ANY, TYPE)
{
USE_OPLINE
zend_free_op free_op1;
@ -7007,7 +7007,7 @@ ZEND_VM_COLD_CONST_HANDLER(169, ZEND_COALESCE, CONST|TMPVAR|CV, JMP_ADDR)
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HOT_HANDLER(22, ZEND_QM_ASSIGN, CONST|TMP|VAR|CV, ANY)
ZEND_VM_HOT_HANDLER(41, ZEND_QM_ASSIGN, CONST|TMP|VAR|CV, ANY)
{
USE_OPLINE
zend_free_op free_op1;
@ -7082,7 +7082,7 @@ ZEND_VM_COLD_HANDLER(103, ZEND_EXT_FCALL_END, ANY, ANY)
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(139, ZEND_DECLARE_CLASS, CONST, ANY)
ZEND_VM_HANDLER(144, ZEND_DECLARE_CLASS, CONST, ANY)
{
USE_OPLINE
@ -8266,7 +8266,7 @@ ZEND_VM_HANDLER(49, ZEND_CHECK_VAR, CV, UNUSED)
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(51, ZEND_MAKE_REF, VAR|CV, UNUSED)
ZEND_VM_HANDLER(140, ZEND_MAKE_REF, VAR|CV, UNUSED)
{
USE_OPLINE
zval *op1 = EX_VAR(opline->op1.var);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_BW_OR",
"ZEND_BW_AND",
"ZEND_BW_XOR",
"ZEND_POW",
"ZEND_BW_NOT",
"ZEND_BOOL_NOT",
"ZEND_BOOL_XOR",
@ -44,8 +45,6 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_IS_NOT_EQUAL",
"ZEND_IS_SMALLER",
"ZEND_IS_SMALLER_OR_EQUAL",
"ZEND_CAST",
"ZEND_QM_ASSIGN",
"ZEND_ASSIGN_ADD",
"ZEND_ASSIGN_SUB",
"ZEND_ASSIGN_MUL",
@ -57,6 +56,7 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_ASSIGN_BW_OR",
"ZEND_ASSIGN_BW_AND",
"ZEND_ASSIGN_BW_XOR",
"ZEND_ASSIGN_POW",
"ZEND_PRE_INC",
"ZEND_PRE_DEC",
"ZEND_POST_INC",
@ -64,7 +64,7 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_ASSIGN",
"ZEND_ASSIGN_REF",
"ZEND_ECHO",
"ZEND_GENERATOR_CREATE",
"ZEND_QM_ASSIGN",
"ZEND_JMP",
"ZEND_JMPZ",
"ZEND_JMPNZ",
@ -74,7 +74,7 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_CASE",
"ZEND_CHECK_VAR",
"ZEND_SEND_VAR_NO_REF_EX",
"ZEND_MAKE_REF",
"ZEND_CAST",
"ZEND_BOOL",
"ZEND_FAST_CONCAT",
"ZEND_ROPE_INIT",
@ -162,12 +162,12 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_ASSIGN_OBJ",
"ZEND_OP_DATA",
"ZEND_INSTANCEOF",
"ZEND_DECLARE_CLASS",
NULL,
"ZEND_GENERATOR_CREATE",
"ZEND_MAKE_REF",
"ZEND_DECLARE_FUNCTION",
"ZEND_YIELD_FROM",
"ZEND_DECLARE_CONST",
NULL,
"ZEND_DECLARE_CLASS",
"ZEND_DECLARE_CLASS_DELAYED",
NULL,
"ZEND_ASSIGN_DIM",
@ -189,8 +189,8 @@ static const char *zend_vm_opcodes_names[209] = {
"ZEND_FAST_RET",
"ZEND_RECV_VARIADIC",
"ZEND_SEND_UNPACK",
"ZEND_POW",
"ZEND_ASSIGN_POW",
NULL,
NULL,
"ZEND_BIND_GLOBAL",
"ZEND_COALESCE",
"ZEND_SPACESHIP",
@ -247,6 +247,7 @@ static uint32_t zend_vm_opcodes_flags[209] = {
0x80000707,
0x80000707,
0x80000707,
0x00000707,
0x00000007,
0x00000007,
0x80000707,
@ -256,8 +257,7 @@ static uint32_t zend_vm_opcodes_flags[209] = {
0x80000707,
0x00000707,
0x00000707,
0x07000003,
0x00000003,
0x04046753,
0x04046753,
0x04046753,
0x04046753,
@ -276,7 +276,7 @@ static uint32_t zend_vm_opcodes_flags[209] = {
0x00000301,
0x0b000101,
0x00000007,
0x00000000,
0x00000003,
0x00000020,
0x00002007,
0x00002007,
@ -286,7 +286,7 @@ static uint32_t zend_vm_opcodes_flags[209] = {
0x00000705,
0x00000101,
0x00001001,
0x00000101,
0x07000003,
0x00000007,
0x00000707,
0x01000701,
@ -374,12 +374,12 @@ static uint32_t zend_vm_opcodes_flags[209] = {
0x00040751,
0x00000000,
0x00047305,
0x00000003,
0x00000000,
0x00000101,
0x00000000,
0x00000003,
0x00000303,
0x00000000,
0x00000003,
0x00000303,
0x00000000,
0x00006701,
@ -401,8 +401,8 @@ static uint32_t zend_vm_opcodes_flags[209] = {
0x00003000,
0x0000a110,
0x00000000,
0x00000707,
0x04046753,
0x00000000,
0x00000000,
0x00040301,
0x00002007,
0x00000707,

View File

@ -88,28 +88,28 @@ END_EXTERN_C()
#define ZEND_BW_OR 9
#define ZEND_BW_AND 10
#define ZEND_BW_XOR 11
#define ZEND_BW_NOT 12
#define ZEND_BOOL_NOT 13
#define ZEND_BOOL_XOR 14
#define ZEND_IS_IDENTICAL 15
#define ZEND_IS_NOT_IDENTICAL 16
#define ZEND_IS_EQUAL 17
#define ZEND_IS_NOT_EQUAL 18
#define ZEND_IS_SMALLER 19
#define ZEND_IS_SMALLER_OR_EQUAL 20
#define ZEND_CAST 21
#define ZEND_QM_ASSIGN 22
#define ZEND_ASSIGN_ADD 23
#define ZEND_ASSIGN_SUB 24
#define ZEND_ASSIGN_MUL 25
#define ZEND_ASSIGN_DIV 26
#define ZEND_ASSIGN_MOD 27
#define ZEND_ASSIGN_SL 28
#define ZEND_ASSIGN_SR 29
#define ZEND_ASSIGN_CONCAT 30
#define ZEND_ASSIGN_BW_OR 31
#define ZEND_ASSIGN_BW_AND 32
#define ZEND_ASSIGN_BW_XOR 33
#define ZEND_POW 12
#define ZEND_BW_NOT 13
#define ZEND_BOOL_NOT 14
#define ZEND_BOOL_XOR 15
#define ZEND_IS_IDENTICAL 16
#define ZEND_IS_NOT_IDENTICAL 17
#define ZEND_IS_EQUAL 18
#define ZEND_IS_NOT_EQUAL 19
#define ZEND_IS_SMALLER 20
#define ZEND_IS_SMALLER_OR_EQUAL 21
#define ZEND_ASSIGN_ADD 22
#define ZEND_ASSIGN_SUB 23
#define ZEND_ASSIGN_MUL 24
#define ZEND_ASSIGN_DIV 25
#define ZEND_ASSIGN_MOD 26
#define ZEND_ASSIGN_SL 27
#define ZEND_ASSIGN_SR 28
#define ZEND_ASSIGN_CONCAT 29
#define ZEND_ASSIGN_BW_OR 30
#define ZEND_ASSIGN_BW_AND 31
#define ZEND_ASSIGN_BW_XOR 32
#define ZEND_ASSIGN_POW 33
#define ZEND_PRE_INC 34
#define ZEND_PRE_DEC 35
#define ZEND_POST_INC 36
@ -117,7 +117,7 @@ END_EXTERN_C()
#define ZEND_ASSIGN 38
#define ZEND_ASSIGN_REF 39
#define ZEND_ECHO 40
#define ZEND_GENERATOR_CREATE 41
#define ZEND_QM_ASSIGN 41
#define ZEND_JMP 42
#define ZEND_JMPZ 43
#define ZEND_JMPNZ 44
@ -127,7 +127,7 @@ END_EXTERN_C()
#define ZEND_CASE 48
#define ZEND_CHECK_VAR 49
#define ZEND_SEND_VAR_NO_REF_EX 50
#define ZEND_MAKE_REF 51
#define ZEND_CAST 51
#define ZEND_BOOL 52
#define ZEND_FAST_CONCAT 53
#define ZEND_ROPE_INIT 54
@ -215,10 +215,12 @@ END_EXTERN_C()
#define ZEND_ASSIGN_OBJ 136
#define ZEND_OP_DATA 137
#define ZEND_INSTANCEOF 138
#define ZEND_DECLARE_CLASS 139
#define ZEND_GENERATOR_CREATE 139
#define ZEND_MAKE_REF 140
#define ZEND_DECLARE_FUNCTION 141
#define ZEND_YIELD_FROM 142
#define ZEND_DECLARE_CONST 143
#define ZEND_DECLARE_CLASS 144
#define ZEND_DECLARE_CLASS_DELAYED 145
#define ZEND_ASSIGN_DIM 147
#define ZEND_ISSET_ISEMPTY_PROP_OBJ 148
@ -237,8 +239,6 @@ END_EXTERN_C()
#define ZEND_FAST_RET 163
#define ZEND_RECV_VARIADIC 164
#define ZEND_SEND_UNPACK 165
#define ZEND_POW 166
#define ZEND_ASSIGN_POW 167
#define ZEND_BIND_GLOBAL 168
#define ZEND_COALESCE 169
#define ZEND_SPACESHIP 170