mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08:00
Register class before fetching parent
We want the class declaration to be available while compiling the parent class.
This commit is contained in:
parent
9ecc0a4f29
commit
89b2d88659
@ -1043,7 +1043,7 @@ ZEND_API int do_bind_function(zval *lcname) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int do_bind_class(zval *lcname, zend_class_entry *parent_ce) /* {{{ */
|
||||
ZEND_API int do_bind_class(zval *lcname) /* {{{ */
|
||||
{
|
||||
zend_class_entry *ce;
|
||||
zval *rtd_key, *zv;
|
||||
@ -1070,7 +1070,7 @@ ZEND_API int do_bind_class(zval *lcname, zend_class_entry *parent_ce) /* {{{ */
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
zend_do_link_class(ce, parent_ce);
|
||||
zend_do_link_class(ce);
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@ -1113,7 +1113,7 @@ ZEND_API uint32_t zend_build_delayed_early_binding_list(const zend_op_array *op_
|
||||
zend_op *end = opline + op_array->last;
|
||||
|
||||
while (opline < end) {
|
||||
if (opline->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED) {
|
||||
if (opline->opcode == ZEND_DECLARE_CLASS_DELAYED) {
|
||||
*prev_opline_num = opline - op_array->opcodes;
|
||||
prev_opline_num = &opline->result.opline_num;
|
||||
}
|
||||
@ -1136,11 +1136,10 @@ ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array, uint3
|
||||
while (opline_num != (uint32_t)-1) {
|
||||
const zend_op *opline = &op_array->opcodes[opline_num];
|
||||
zval *lcname = RT_CONSTANT(opline, opline->op1);
|
||||
zval *parent_name = RT_CONSTANT(opline, opline->op2);
|
||||
zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(lcname + 1));
|
||||
zend_class_entry *parent_ce = zend_lookup_class_ex(Z_STR_P(parent_name), Z_STR_P(parent_name + 1), 0);
|
||||
zend_class_entry *parent_ce = zend_lookup_class(ce->parent_name);
|
||||
if (ce && parent_ce && zend_can_early_bind(ce, parent_ce)) {
|
||||
do_bind_class(lcname, parent_ce);
|
||||
do_bind_class(lcname);
|
||||
}
|
||||
opline_num = op_array->opcodes[opline_num].result.opline_num;
|
||||
}
|
||||
@ -6437,15 +6436,9 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */
|
||||
LITERAL_STR(opline->op1, lcname);
|
||||
|
||||
if (decl->flags & ZEND_ACC_ANON_CLASS) {
|
||||
opline->opcode = ZEND_DECLARE_ANON_CLASS;
|
||||
opline->result_type = IS_VAR;
|
||||
opline->result.var = get_temporary_variable();
|
||||
if (extends_ast) {
|
||||
opline->opcode = ZEND_DECLARE_ANON_INHERITED_CLASS;
|
||||
opline->op2_type = IS_CONST;
|
||||
opline->op2.constant = zend_add_class_name_literal(zend_string_copy(ce->parent_name));
|
||||
} else {
|
||||
opline->opcode = ZEND_DECLARE_ANON_CLASS;
|
||||
}
|
||||
|
||||
if (!zend_hash_add_ptr(CG(class_table), lcname, ce)) {
|
||||
/* this anonymous class has been included */
|
||||
@ -6461,22 +6454,16 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */
|
||||
zend_add_literal_string(&key);
|
||||
zend_hash_update_ptr(CG(class_table), key, ce);
|
||||
|
||||
if (extends_ast) {
|
||||
if (toplevel
|
||||
opline->opcode = ZEND_DECLARE_CLASS;
|
||||
if (extends_ast && toplevel
|
||||
&& (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING)
|
||||
/* We currently don't early-bind classes that implement interfaces or use traits */
|
||||
&& !(ce->ce_flags & (ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))) {
|
||||
&& !(ce->ce_flags & (ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))
|
||||
) {
|
||||
CG(active_op_array)->fn_flags |= ZEND_ACC_EARLY_BINDING;
|
||||
opline->opcode = ZEND_DECLARE_INHERITED_CLASS_DELAYED;
|
||||
opline->opcode = ZEND_DECLARE_CLASS_DELAYED;
|
||||
opline->result_type = IS_UNUSED;
|
||||
opline->result.opline_num = -1;
|
||||
} else {
|
||||
opline->opcode = ZEND_DECLARE_INHERITED_CLASS;
|
||||
}
|
||||
opline->op2_type = IS_CONST;
|
||||
opline->op2.constant = zend_add_class_name_literal(zend_string_copy(ce->parent_name));
|
||||
} else {
|
||||
opline->opcode = ZEND_DECLARE_CLASS;
|
||||
}
|
||||
}
|
||||
return opline;
|
||||
|
@ -291,7 +291,7 @@ typedef struct _zend_oparray_context {
|
||||
#define ZEND_ACC_HAS_FINALLY_BLOCK (1 << 15) /* | X | | */
|
||||
/* | | | */
|
||||
/* "main" op_array with | | | */
|
||||
/* ZEND_DECLARE_INHERITED_CLASS_DELAYED opcodes | | | */
|
||||
/* ZEND_DECLARE_CLASS_DELAYED opcodes | | | */
|
||||
#define ZEND_ACC_EARLY_BINDING (1 << 16) /* | X | | */
|
||||
/* | | | */
|
||||
/* method flag (bc only), any method that has this | | | */
|
||||
@ -745,7 +745,7 @@ zend_bool zend_handle_encoding_declaration(zend_ast *ast);
|
||||
void zend_do_free(znode *op1);
|
||||
|
||||
ZEND_API int do_bind_function(zval *lcname);
|
||||
ZEND_API int do_bind_class(zval *lcname, zend_class_entry *parent_ce);
|
||||
ZEND_API int do_bind_class(zval *lcname);
|
||||
ZEND_API uint32_t zend_build_delayed_early_binding_list(const zend_op_array *op_array);
|
||||
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array, uint32_t first_early_binding_opline);
|
||||
|
||||
@ -1032,7 +1032,7 @@ END_EXTERN_C()
|
||||
* may apper in run-time */
|
||||
#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<4)
|
||||
|
||||
/* generate ZEND_DECLARE_INHERITED_CLASS_DELAYED opcode to delay early binding */
|
||||
/* generate ZEND_DECLARE_CLASS_DELAYED opcode to delay early binding */
|
||||
#define ZEND_COMPILE_DELAYED_BINDING (1<<5)
|
||||
|
||||
/* disable constant substitution at compile-time */
|
||||
|
@ -2130,10 +2130,11 @@ void zend_verify_abstract_class(zend_class_entry *ce) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void zend_do_link_class(zend_class_entry *ce, zend_class_entry *parent) /* {{{ */
|
||||
ZEND_API void zend_do_link_class(zend_class_entry *ce) /* {{{ */
|
||||
{
|
||||
ce->ce_flags |= ZEND_ACC_LINKING_IN_PROGRESS;
|
||||
if (parent) {
|
||||
if (ce->parent_name) {
|
||||
zend_class_entry *parent = zend_fetch_class_by_name(ce->parent_name, NULL, 0);
|
||||
zend_do_inheritance(ce, parent);
|
||||
}
|
||||
if (ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS) {
|
||||
|
@ -27,7 +27,7 @@ BEGIN_EXTERN_C()
|
||||
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface);
|
||||
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
|
||||
|
||||
ZEND_API void zend_do_link_class(zend_class_entry *ce, zend_class_entry *parent_ce);
|
||||
ZEND_API void zend_do_link_class(zend_class_entry *ce);
|
||||
|
||||
void zend_verify_abstract_class(zend_class_entry *ce);
|
||||
void zend_check_deprecated_constructor(const zend_class_entry *ce);
|
||||
|
@ -585,7 +585,6 @@ static void emit_live_range(
|
||||
/* Classes don't have to be destroyed. */
|
||||
case ZEND_FETCH_CLASS:
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
/* FAST_CALLs don't have to be destroyed. */
|
||||
case ZEND_FAST_CALL:
|
||||
return;
|
||||
@ -957,7 +956,6 @@ ZEND_API int pass_two(zend_op_array *op_array)
|
||||
break;
|
||||
}
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
/* absolute index to relative offset */
|
||||
|
@ -7026,45 +7026,20 @@ ZEND_VM_HANDLER(139, ZEND_DECLARE_CLASS, CONST, ANY)
|
||||
USE_OPLINE
|
||||
|
||||
SAVE_OPLINE();
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1), NULL);
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1));
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
ZEND_VM_HANDLER(140, ZEND_DECLARE_INHERITED_CLASS, CONST, CONST)
|
||||
{
|
||||
zend_class_entry *parent;
|
||||
USE_OPLINE
|
||||
|
||||
SAVE_OPLINE();
|
||||
parent = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)),
|
||||
Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1),
|
||||
ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(parent == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1), parent);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
ZEND_VM_HANDLER(145, ZEND_DECLARE_INHERITED_CLASS_DELAYED, CONST, CONST)
|
||||
ZEND_VM_HANDLER(145, ZEND_DECLARE_CLASS_DELAYED, CONST, ANY)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *zce, *orig_zce;
|
||||
zend_class_entry *parent;
|
||||
|
||||
SAVE_OPLINE();
|
||||
if ((zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1)) == NULL ||
|
||||
((orig_zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1), 1)) != NULL &&
|
||||
Z_CE_P(zce) != Z_CE_P(orig_zce))) {
|
||||
parent = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)),
|
||||
Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1),
|
||||
ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(parent == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1), parent);
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
@ -7085,36 +7060,7 @@ ZEND_VM_HANDLER(171, ZEND_DECLARE_ANON_CLASS, ANY, ANY, JMP_ADDR)
|
||||
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
|
||||
ZEND_VM_CONTINUE();
|
||||
}
|
||||
zend_do_link_class(ce, NULL);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
ZEND_VM_HANDLER(172, ZEND_DECLARE_ANON_INHERITED_CLASS, CONST, CONST, JMP_ADDR)
|
||||
{
|
||||
zval *zv;
|
||||
zend_class_entry *ce, *parent;
|
||||
USE_OPLINE
|
||||
|
||||
SAVE_OPLINE();
|
||||
zv = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
|
||||
ZEND_ASSERT(zv != NULL);
|
||||
ce = Z_CE_P(zv);
|
||||
Z_CE_P(EX_VAR(opline->result.var)) = ce;
|
||||
|
||||
if (ce->ce_flags & ZEND_ACC_LINKED) {
|
||||
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
|
||||
ZEND_VM_CONTINUE();
|
||||
}
|
||||
|
||||
parent = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)),
|
||||
Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1),
|
||||
ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(parent == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
zend_do_link_class(ce, parent);
|
||||
zend_do_link_class(ce);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
@ -7310,7 +7256,6 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
|
||||
|
||||
case ZEND_FETCH_CLASS:
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
break; /* return value is zend_class_entry pointer */
|
||||
|
||||
default:
|
||||
|
@ -2116,7 +2116,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLE
|
||||
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
|
||||
ZEND_VM_CONTINUE();
|
||||
}
|
||||
zend_do_link_class(ce, NULL);
|
||||
zend_do_link_class(ce);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
@ -2263,7 +2263,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(
|
||||
|
||||
case ZEND_FETCH_CLASS:
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
break; /* return value is zend_class_entry pointer */
|
||||
|
||||
default:
|
||||
@ -4028,7 +4027,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CLASS_SPEC_CONST_HANDL
|
||||
USE_OPLINE
|
||||
|
||||
SAVE_OPLINE();
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1), NULL);
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1));
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CLASS_DELAYED_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *zce, *orig_zce;
|
||||
|
||||
SAVE_OPLINE();
|
||||
if ((zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1)) == NULL ||
|
||||
((orig_zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1), 1)) != NULL &&
|
||||
Z_CE_P(zce) != Z_CE_P(orig_zce))) {
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1));
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
@ -6136,74 +6149,6 @@ array_key_exists_array:
|
||||
}
|
||||
|
||||
/* No specialization for op_types (CONST|TMPVAR|UNUSED|CV, ANY) */
|
||||
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
zend_class_entry *parent;
|
||||
USE_OPLINE
|
||||
|
||||
SAVE_OPLINE();
|
||||
parent = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)),
|
||||
Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1),
|
||||
ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(parent == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1), parent);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
zval *zce, *orig_zce;
|
||||
zend_class_entry *parent;
|
||||
|
||||
SAVE_OPLINE();
|
||||
if ((zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1)) == NULL ||
|
||||
((orig_zce = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)+1), 1)) != NULL &&
|
||||
Z_CE_P(zce) != Z_CE_P(orig_zce))) {
|
||||
parent = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)),
|
||||
Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1),
|
||||
ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(parent == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
do_bind_class(RT_CONSTANT(opline, opline->op1), parent);
|
||||
}
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
zval *zv;
|
||||
zend_class_entry *ce, *parent;
|
||||
USE_OPLINE
|
||||
|
||||
SAVE_OPLINE();
|
||||
zv = zend_hash_find_ex(EG(class_table), Z_STR_P(RT_CONSTANT(opline, opline->op1)), 1);
|
||||
ZEND_ASSERT(zv != NULL);
|
||||
ce = Z_CE_P(zv);
|
||||
Z_CE_P(EX_VAR(opline->result.var)) = ce;
|
||||
|
||||
if (ce->ce_flags & ZEND_ACC_LINKED) {
|
||||
ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
|
||||
ZEND_VM_CONTINUE();
|
||||
}
|
||||
|
||||
parent = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)),
|
||||
Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1),
|
||||
ZEND_FETCH_CLASS_EXCEPTION);
|
||||
if (UNEXPECTED(parent == NULL)) {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
zend_do_link_class(ce, parent);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
}
|
||||
|
||||
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
USE_OPLINE
|
||||
@ -54130,7 +54075,6 @@ ZEND_API void execute_ex(zend_execute_data *ex)
|
||||
(void*)&&ZEND_INSTANCEOF_SPEC_CV_UNUSED_LABEL,
|
||||
(void*)&&ZEND_NULL_LABEL,
|
||||
(void*)&&ZEND_DECLARE_CLASS_SPEC_CONST_LABEL,
|
||||
(void*)&&ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_LABEL,
|
||||
(void*)&&ZEND_DECLARE_FUNCTION_SPEC_LABEL,
|
||||
(void*)&&ZEND_YIELD_FROM_SPEC_CONST_LABEL,
|
||||
(void*)&&ZEND_YIELD_FROM_SPEC_TMP_LABEL,
|
||||
@ -54138,7 +54082,7 @@ ZEND_API void execute_ex(zend_execute_data *ex)
|
||||
(void*)&&ZEND_NULL_LABEL,
|
||||
(void*)&&ZEND_YIELD_FROM_SPEC_CV_LABEL,
|
||||
(void*)&&ZEND_DECLARE_CONST_SPEC_CONST_CONST_LABEL,
|
||||
(void*)&&ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_CONST_CONST_LABEL,
|
||||
(void*)&&ZEND_DECLARE_CLASS_DELAYED_SPEC_CONST_LABEL,
|
||||
(void*)&&ZEND_NULL_LABEL,
|
||||
(void*)&&ZEND_NULL_LABEL,
|
||||
(void*)&&ZEND_NULL_LABEL,
|
||||
@ -54493,7 +54437,6 @@ ZEND_API void execute_ex(zend_execute_data *ex)
|
||||
(void*)&&ZEND_NULL_LABEL,
|
||||
(void*)&&ZEND_SPACESHIP_SPEC_CV_CV_LABEL,
|
||||
(void*)&&ZEND_DECLARE_ANON_CLASS_SPEC_LABEL,
|
||||
(void*)&&ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_CONST_CONST_LABEL,
|
||||
(void*)&&ZEND_FETCH_STATIC_PROP_R_SPEC_LABEL,
|
||||
(void*)&&ZEND_FETCH_STATIC_PROP_W_SPEC_LABEL,
|
||||
(void*)&&ZEND_FETCH_STATIC_PROP_RW_SPEC_LABEL,
|
||||
@ -56153,6 +56096,10 @@ zend_leave_helper_SPEC_LABEL:
|
||||
VM_TRACE(ZEND_DECLARE_CLASS_SPEC_CONST)
|
||||
ZEND_DECLARE_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_DECLARE_CLASS_DELAYED_SPEC_CONST):
|
||||
VM_TRACE(ZEND_DECLARE_CLASS_DELAYED_SPEC_CONST)
|
||||
ZEND_DECLARE_CLASS_DELAYED_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_YIELD_FROM_SPEC_CONST):
|
||||
VM_TRACE(ZEND_YIELD_FROM_SPEC_CONST)
|
||||
ZEND_YIELD_FROM_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
@ -56377,18 +56324,6 @@ zend_leave_helper_SPEC_LABEL:
|
||||
VM_TRACE(ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CONST)
|
||||
ZEND_ARRAY_KEY_EXISTS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST):
|
||||
VM_TRACE(ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST)
|
||||
ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_CONST_CONST):
|
||||
VM_TRACE(ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_CONST_CONST)
|
||||
ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_CONST_CONST):
|
||||
VM_TRACE(ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_CONST_CONST)
|
||||
ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
HYBRID_BREAK();
|
||||
HYBRID_CASE(ZEND_DECLARE_CONST_SPEC_CONST_CONST):
|
||||
VM_TRACE(ZEND_DECLARE_CONST_SPEC_CONST_CONST)
|
||||
ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
|
||||
@ -63849,7 +63784,6 @@ void zend_vm_init(void)
|
||||
ZEND_INSTANCEOF_SPEC_CV_UNUSED_HANDLER,
|
||||
ZEND_NULL_HANDLER,
|
||||
ZEND_DECLARE_CLASS_SPEC_CONST_HANDLER,
|
||||
ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER,
|
||||
ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
|
||||
ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
|
||||
ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
|
||||
@ -63857,7 +63791,7 @@ void zend_vm_init(void)
|
||||
ZEND_NULL_HANDLER,
|
||||
ZEND_YIELD_FROM_SPEC_CV_HANDLER,
|
||||
ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER,
|
||||
ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_CONST_CONST_HANDLER,
|
||||
ZEND_DECLARE_CLASS_DELAYED_SPEC_CONST_HANDLER,
|
||||
ZEND_NULL_HANDLER,
|
||||
ZEND_NULL_HANDLER,
|
||||
ZEND_NULL_HANDLER,
|
||||
@ -64212,7 +64146,6 @@ void zend_vm_init(void)
|
||||
ZEND_NULL_HANDLER,
|
||||
ZEND_SPACESHIP_SPEC_CV_CV_HANDLER,
|
||||
ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
|
||||
ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER,
|
||||
ZEND_FETCH_STATIC_PROP_R_SPEC_HANDLER,
|
||||
ZEND_FETCH_STATIC_PROP_W_SPEC_HANDLER,
|
||||
ZEND_FETCH_STATIC_PROP_RW_SPEC_HANDLER,
|
||||
@ -65474,37 +65407,39 @@ void zend_vm_init(void)
|
||||
2673,
|
||||
2674 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2699,
|
||||
4180,
|
||||
2700,
|
||||
2701,
|
||||
2702 | SPEC_RULE_OP1,
|
||||
2701 | SPEC_RULE_OP1,
|
||||
2706,
|
||||
4180,
|
||||
2707,
|
||||
4182,
|
||||
2708,
|
||||
4182,
|
||||
2709 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_OP_DATA,
|
||||
2834 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
4180,
|
||||
2708 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_OP_DATA,
|
||||
2833 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2858,
|
||||
2859,
|
||||
2860,
|
||||
2861,
|
||||
2862 | SPEC_RULE_OP1,
|
||||
2861 | SPEC_RULE_OP1,
|
||||
2866,
|
||||
4180,
|
||||
4180,
|
||||
2867,
|
||||
4182,
|
||||
4182,
|
||||
2868,
|
||||
2869,
|
||||
2870,
|
||||
2871,
|
||||
2872 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2897 | SPEC_RULE_OP1,
|
||||
2871 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2896 | SPEC_RULE_OP1,
|
||||
2901,
|
||||
2902,
|
||||
2903,
|
||||
2904,
|
||||
2905,
|
||||
2906 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2931 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
|
||||
3031,
|
||||
3032 | SPEC_RULE_OP1,
|
||||
3037 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2905 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
2930 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
|
||||
3030,
|
||||
3031 | SPEC_RULE_OP1,
|
||||
3036 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
3061,
|
||||
4180,
|
||||
3062,
|
||||
3063,
|
||||
3064,
|
||||
@ -65513,37 +65448,35 @@ void zend_vm_init(void)
|
||||
3067,
|
||||
3068,
|
||||
3069,
|
||||
3070,
|
||||
3071,
|
||||
3072 | SPEC_RULE_OP1,
|
||||
3070 | SPEC_RULE_OP1,
|
||||
3075,
|
||||
3076,
|
||||
3077,
|
||||
3078,
|
||||
3079,
|
||||
3080,
|
||||
3081,
|
||||
3082 | SPEC_RULE_OP1,
|
||||
3087 | SPEC_RULE_OP1,
|
||||
3092 | SPEC_RULE_OP1,
|
||||
3097 | SPEC_RULE_OP1,
|
||||
3102 | SPEC_RULE_OP1,
|
||||
3107,
|
||||
3108 | SPEC_RULE_OP1,
|
||||
3113,
|
||||
3114 | SPEC_RULE_OP1,
|
||||
3119,
|
||||
3120 | SPEC_RULE_ISSET,
|
||||
3122 | SPEC_RULE_OP2,
|
||||
3127 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
3152 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_OP_DATA,
|
||||
3277 | SPEC_RULE_OP_DATA,
|
||||
3080 | SPEC_RULE_OP1,
|
||||
3085 | SPEC_RULE_OP1,
|
||||
3090 | SPEC_RULE_OP1,
|
||||
3095 | SPEC_RULE_OP1,
|
||||
3100 | SPEC_RULE_OP1,
|
||||
3105,
|
||||
3106 | SPEC_RULE_OP1,
|
||||
3111,
|
||||
3112 | SPEC_RULE_OP1,
|
||||
3117,
|
||||
3118 | SPEC_RULE_ISSET,
|
||||
3120 | SPEC_RULE_OP2,
|
||||
3125 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
|
||||
3150 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_OP_DATA,
|
||||
3275 | SPEC_RULE_OP_DATA,
|
||||
3280,
|
||||
3281,
|
||||
3282,
|
||||
3283,
|
||||
3284,
|
||||
3285,
|
||||
3286,
|
||||
3287,
|
||||
3288,
|
||||
4182
|
||||
4180
|
||||
};
|
||||
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
|
||||
zend_opcode_handler_funcs = labels;
|
||||
@ -65750,7 +65683,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3290 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3288 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
if (op->op1_type < op->op2_type) {
|
||||
zend_swap_operands(op);
|
||||
}
|
||||
@ -65758,7 +65691,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3315 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3313 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
if (op->op1_type < op->op2_type) {
|
||||
zend_swap_operands(op);
|
||||
}
|
||||
@ -65766,7 +65699,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3340 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3338 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
if (op->op1_type < op->op2_type) {
|
||||
zend_swap_operands(op);
|
||||
}
|
||||
@ -65777,17 +65710,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3365 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
spec = 3363 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
} else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3390 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
spec = 3388 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
} else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3415 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
spec = 3413 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
}
|
||||
break;
|
||||
case ZEND_MUL:
|
||||
@ -65798,17 +65731,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3440 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3438 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
} else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3465 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3463 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
} else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3490 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3488 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE;
|
||||
}
|
||||
break;
|
||||
case ZEND_IS_EQUAL:
|
||||
@ -65819,12 +65752,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3515 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3513 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
} else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3590 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3588 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
}
|
||||
break;
|
||||
case ZEND_IS_NOT_EQUAL:
|
||||
@ -65835,12 +65768,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3665 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3663 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
} else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3740 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
spec = 3738 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE;
|
||||
}
|
||||
break;
|
||||
case ZEND_IS_SMALLER:
|
||||
@ -65848,12 +65781,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3815 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
spec = 3813 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
} else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3890 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
spec = 3888 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
}
|
||||
break;
|
||||
case ZEND_IS_SMALLER_OR_EQUAL:
|
||||
@ -65861,75 +65794,75 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 3965 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
spec = 3963 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
} else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) {
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 4040 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
spec = 4038 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
|
||||
}
|
||||
break;
|
||||
case ZEND_QM_ASSIGN:
|
||||
if (op1_info == MAY_BE_DOUBLE) {
|
||||
spec = 4133 | SPEC_RULE_OP1;
|
||||
spec = 4131 | SPEC_RULE_OP1;
|
||||
} else if ((op->op1_type == IS_CONST) ? !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1)) : (!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))))) {
|
||||
spec = 4138 | SPEC_RULE_OP1;
|
||||
spec = 4136 | SPEC_RULE_OP1;
|
||||
}
|
||||
break;
|
||||
case ZEND_PRE_INC:
|
||||
if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) {
|
||||
spec = 4115 | SPEC_RULE_RETVAL;
|
||||
spec = 4113 | SPEC_RULE_RETVAL;
|
||||
} else if (op1_info == MAY_BE_LONG) {
|
||||
spec = 4117 | SPEC_RULE_RETVAL;
|
||||
spec = 4115 | SPEC_RULE_RETVAL;
|
||||
} else if (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)) {
|
||||
spec = 4119 | SPEC_RULE_RETVAL;
|
||||
spec = 4117 | SPEC_RULE_RETVAL;
|
||||
}
|
||||
break;
|
||||
case ZEND_PRE_DEC:
|
||||
if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) {
|
||||
spec = 4121 | SPEC_RULE_RETVAL;
|
||||
spec = 4119 | SPEC_RULE_RETVAL;
|
||||
} else if (op1_info == MAY_BE_LONG) {
|
||||
spec = 4123 | SPEC_RULE_RETVAL;
|
||||
spec = 4121 | SPEC_RULE_RETVAL;
|
||||
} else if (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)) {
|
||||
spec = 4125 | SPEC_RULE_RETVAL;
|
||||
spec = 4123 | SPEC_RULE_RETVAL;
|
||||
}
|
||||
break;
|
||||
case ZEND_POST_INC:
|
||||
if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) {
|
||||
spec = 4127;
|
||||
spec = 4125;
|
||||
} else if (op1_info == MAY_BE_LONG) {
|
||||
spec = 4128;
|
||||
spec = 4126;
|
||||
} else if (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)) {
|
||||
spec = 4129;
|
||||
spec = 4127;
|
||||
}
|
||||
break;
|
||||
case ZEND_POST_DEC:
|
||||
if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) {
|
||||
spec = 4130;
|
||||
spec = 4128;
|
||||
} else if (op1_info == MAY_BE_LONG) {
|
||||
spec = 4131;
|
||||
spec = 4129;
|
||||
} else if (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)) {
|
||||
spec = 4132;
|
||||
spec = 4130;
|
||||
}
|
||||
break;
|
||||
case ZEND_JMP:
|
||||
if (OP_JMP_ADDR(op, op->op1) > op) {
|
||||
spec = 3289;
|
||||
spec = 3287;
|
||||
}
|
||||
break;
|
||||
case ZEND_SEND_VAL:
|
||||
if (op->op1_type == IS_CONST && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) {
|
||||
spec = 4178;
|
||||
spec = 4176;
|
||||
}
|
||||
break;
|
||||
case ZEND_SEND_VAR_EX:
|
||||
if (op->op2.num <= MAX_ARG_FLAG_NUM && (op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) {
|
||||
spec = 4173 | SPEC_RULE_OP1;
|
||||
spec = 4171 | SPEC_RULE_OP1;
|
||||
}
|
||||
break;
|
||||
case ZEND_FE_FETCH_R:
|
||||
if (op->op2_type == IS_CV && (op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) {
|
||||
spec = 4180 | SPEC_RULE_RETVAL;
|
||||
spec = 4178 | SPEC_RULE_RETVAL;
|
||||
}
|
||||
break;
|
||||
case ZEND_FETCH_DIM_R:
|
||||
@ -65937,17 +65870,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
|
||||
if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
|
||||
break;
|
||||
}
|
||||
spec = 4143 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
spec = 4141 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
|
||||
}
|
||||
break;
|
||||
case ZEND_SEND_VAL_EX:
|
||||
if (op->op2.num <= MAX_ARG_FLAG_NUM && op->op1_type == IS_CONST && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) {
|
||||
spec = 4179;
|
||||
spec = 4177;
|
||||
}
|
||||
break;
|
||||
case ZEND_SEND_VAR:
|
||||
if ((op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) {
|
||||
spec = 4168 | SPEC_RULE_OP1;
|
||||
spec = 4166 | SPEC_RULE_OP1;
|
||||
}
|
||||
break;
|
||||
case ZEND_BW_OR:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -163,12 +163,12 @@ static const char *zend_vm_opcodes_names[209] = {
|
||||
"ZEND_OP_DATA",
|
||||
"ZEND_INSTANCEOF",
|
||||
"ZEND_DECLARE_CLASS",
|
||||
"ZEND_DECLARE_INHERITED_CLASS",
|
||||
NULL,
|
||||
"ZEND_DECLARE_FUNCTION",
|
||||
"ZEND_YIELD_FROM",
|
||||
"ZEND_DECLARE_CONST",
|
||||
NULL,
|
||||
"ZEND_DECLARE_INHERITED_CLASS_DELAYED",
|
||||
"ZEND_DECLARE_CLASS_DELAYED",
|
||||
NULL,
|
||||
"ZEND_ASSIGN_DIM",
|
||||
"ZEND_ISSET_ISEMPTY_PROP_OBJ",
|
||||
@ -195,7 +195,7 @@ static const char *zend_vm_opcodes_names[209] = {
|
||||
"ZEND_COALESCE",
|
||||
"ZEND_SPACESHIP",
|
||||
"ZEND_DECLARE_ANON_CLASS",
|
||||
"ZEND_DECLARE_ANON_INHERITED_CLASS",
|
||||
NULL,
|
||||
"ZEND_FETCH_STATIC_PROP_R",
|
||||
"ZEND_FETCH_STATIC_PROP_W",
|
||||
"ZEND_FETCH_STATIC_PROP_RW",
|
||||
@ -375,12 +375,12 @@ static uint32_t zend_vm_opcodes_flags[209] = {
|
||||
0x00000000,
|
||||
0x00047305,
|
||||
0x00000003,
|
||||
0x00000303,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000003,
|
||||
0x00000303,
|
||||
0x00000000,
|
||||
0x00000303,
|
||||
0x00000003,
|
||||
0x00000000,
|
||||
0x00006701,
|
||||
0x00060757,
|
||||
@ -407,7 +407,7 @@ static uint32_t zend_vm_opcodes_flags[209] = {
|
||||
0x00002007,
|
||||
0x00000707,
|
||||
0x03000000,
|
||||
0x03000303,
|
||||
0x00000000,
|
||||
0x00047000,
|
||||
0x00647000,
|
||||
0x00047000,
|
||||
|
@ -216,11 +216,10 @@ END_EXTERN_C()
|
||||
#define ZEND_OP_DATA 137
|
||||
#define ZEND_INSTANCEOF 138
|
||||
#define ZEND_DECLARE_CLASS 139
|
||||
#define ZEND_DECLARE_INHERITED_CLASS 140
|
||||
#define ZEND_DECLARE_FUNCTION 141
|
||||
#define ZEND_YIELD_FROM 142
|
||||
#define ZEND_DECLARE_CONST 143
|
||||
#define ZEND_DECLARE_INHERITED_CLASS_DELAYED 145
|
||||
#define ZEND_DECLARE_CLASS_DELAYED 145
|
||||
#define ZEND_ASSIGN_DIM 147
|
||||
#define ZEND_ISSET_ISEMPTY_PROP_OBJ 148
|
||||
#define ZEND_HANDLE_EXCEPTION 149
|
||||
@ -244,7 +243,6 @@ END_EXTERN_C()
|
||||
#define ZEND_COALESCE 169
|
||||
#define ZEND_SPACESHIP 170
|
||||
#define ZEND_DECLARE_ANON_CLASS 171
|
||||
#define ZEND_DECLARE_ANON_INHERITED_CLASS 172
|
||||
#define ZEND_FETCH_STATIC_PROP_R 173
|
||||
#define ZEND_FETCH_STATIC_PROP_W 174
|
||||
#define ZEND_FETCH_STATIC_PROP_RW 175
|
||||
|
@ -1001,7 +1001,6 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[0]].start);
|
||||
|
@ -271,17 +271,9 @@ literals_handle_static_prop:
|
||||
break;
|
||||
case ZEND_DECLARE_FUNCTION:
|
||||
case ZEND_DECLARE_CLASS:
|
||||
case ZEND_DECLARE_CLASS_DELAYED:
|
||||
LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 2);
|
||||
break;
|
||||
case ZEND_DECLARE_INHERITED_CLASS:
|
||||
case ZEND_DECLARE_INHERITED_CLASS_DELAYED:
|
||||
LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 2);
|
||||
LITERAL_INFO(opline->op2.constant, LITERAL_VALUE, 2);
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 1);
|
||||
LITERAL_INFO(opline->op2.constant, LITERAL_VALUE, 2);
|
||||
break;
|
||||
case ZEND_ISSET_ISEMPTY_DIM_OBJ:
|
||||
case ZEND_ASSIGN_DIM:
|
||||
case ZEND_UNSET_DIM:
|
||||
|
@ -608,7 +608,6 @@ static void zend_ssa_replace_control_link(zend_op_array *op_array, zend_ssa *ssa
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
if (ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) == old->start) {
|
||||
|
@ -287,9 +287,7 @@ static zend_bool can_replace_op2(
|
||||
const zend_op_array *op_array, zend_op *opline, zend_ssa_op *ssa_op) {
|
||||
switch (opline->opcode) {
|
||||
/* Do not accept CONST */
|
||||
case ZEND_DECLARE_INHERITED_CLASS:
|
||||
case ZEND_DECLARE_INHERITED_CLASS_DELAYED:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_DECLARE_CLASS_DELAYED:
|
||||
case ZEND_BIND_LEXICAL:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
@ -1951,7 +1949,6 @@ static void sccp_mark_feasible_successors(
|
||||
case ZEND_ASSERT_CHECK:
|
||||
case ZEND_CATCH:
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
scdf_mark_edge_feasible(scdf, block_num, block->successors[0]);
|
||||
|
@ -376,7 +376,6 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b
|
||||
BB_START(i + 1);
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
BB_START(ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
|
||||
@ -537,7 +536,6 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
block->successors_count = 2;
|
||||
|
@ -3166,7 +3166,6 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||
break;
|
||||
}
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
UPDATE_SSA_TYPE(MAY_BE_CLASS, ssa_ops[i].result_def);
|
||||
if (script && (ce = zend_hash_find_ptr(&script->class_table, Z_STR_P(CRT_CONSTANT_EX(op_array, opline, opline->op1, ssa->rt_constants)))) != NULL) {
|
||||
UPDATE_SSA_OBJ_TYPE(ce, 0, ssa_ops[i].result_def);
|
||||
|
@ -773,7 +773,6 @@ void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, z
|
||||
ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op2, ZEND_OP2_JMP_ADDR(opline));
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
|
||||
@ -824,7 +823,6 @@ void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
|
||||
@ -1212,7 +1210,6 @@ static void zend_redo_pass_two(zend_op_array *op_array)
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
case ZEND_SWITCH_LONG:
|
||||
@ -1301,7 +1298,6 @@ static void zend_redo_pass_two_ex(zend_op_array *op_array, zend_ssa *ssa)
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
case ZEND_SWITCH_LONG:
|
||||
|
@ -3569,7 +3569,7 @@ static void preload_link(void)
|
||||
} else {
|
||||
CG(zend_lineno) = ce->info.user.line_start;
|
||||
}
|
||||
zend_do_link_class(ce, parent);
|
||||
zend_do_link_class(ce);
|
||||
CG(in_compilation) = 0;
|
||||
CG(compiled_filename) = NULL;
|
||||
|
||||
@ -3672,8 +3672,7 @@ static void preload_link(void)
|
||||
while (opline != end) {
|
||||
switch (opline->opcode) {
|
||||
case ZEND_DECLARE_CLASS:
|
||||
case ZEND_DECLARE_INHERITED_CLASS:
|
||||
case ZEND_DECLARE_INHERITED_CLASS_DELAYED:
|
||||
case ZEND_DECLARE_CLASS_DELAYED:
|
||||
key = Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1);
|
||||
if (!zend_hash_exists(&script->script.class_table, key)) {
|
||||
MAKE_NOP(opline);
|
||||
|
@ -467,7 +467,6 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
case ZEND_SWITCH_LONG:
|
||||
@ -1178,7 +1177,6 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
case ZEND_SWITCH_LONG:
|
||||
|
@ -450,7 +450,6 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
|
||||
}
|
||||
break;
|
||||
case ZEND_DECLARE_ANON_CLASS:
|
||||
case ZEND_DECLARE_ANON_INHERITED_CLASS:
|
||||
case ZEND_FE_FETCH_R:
|
||||
case ZEND_FE_FETCH_RW:
|
||||
case ZEND_SWITCH_LONG:
|
||||
|
@ -68,15 +68,4 @@ foreach (new \RecursiveIteratorIterator (new fooIterator ($foo)) as $bar) ;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Class 'NotExists' not found in %sbug73423.php(%d) : eval()'d code:1
|
||||
Stack trace:
|
||||
#0 %sbug73423.php(%d): eval()
|
||||
#1 %sbug73423.php(%d): fooIterator->__destruct()
|
||||
#2 {main}
|
||||
|
||||
Next Error: Class 'NotExists' not found in %sbug73423.php(%d) : eval()'d code:1
|
||||
Stack trace:
|
||||
#0 %sbug73423.php(%d): eval()
|
||||
#1 %sbug73423.php(%d): fooIterator->__destruct()
|
||||
#2 {main}
|
||||
thrown in %sbug73423.php(%d) : eval()'d code on line 1
|
||||
Fatal error: Class 'NotExists' not found in %s(%d) : eval()'d code on line 1
|
||||
|
@ -480,9 +480,9 @@ static PHP_FUNCTION(phpdbg_start_oplog)
|
||||
static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode) {
|
||||
return
|
||||
opcode == ZEND_NOP || opcode == ZEND_OP_DATA || opcode == ZEND_FE_FREE || opcode == ZEND_FREE || opcode == ZEND_ASSERT_CHECK || opcode == ZEND_VERIFY_RETURN_TYPE
|
||||
|| opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_INHERITED_CLASS || opcode == ZEND_DECLARE_FUNCTION
|
||||
|| opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED
|
||||
|| opcode == ZEND_DECLARE_ANON_CLASS || opcode == ZEND_DECLARE_ANON_INHERITED_CLASS || opcode == ZEND_FAST_RET || opcode == ZEND_TICKS
|
||||
|| opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_FUNCTION
|
||||
|| opcode == ZEND_DECLARE_CLASS_DELAYED
|
||||
|| opcode == ZEND_DECLARE_ANON_CLASS || opcode == ZEND_FAST_RET || opcode == ZEND_TICKS
|
||||
|| opcode == ZEND_EXT_STMT || opcode == ZEND_EXT_FCALL_BEGIN || opcode == ZEND_EXT_FCALL_END || opcode == ZEND_EXT_NOP || opcode == ZEND_BIND_GLOBAL
|
||||
;
|
||||
}
|
||||
|
@ -14,7 +14,4 @@ class C extends UndefBase
|
||||
--EXPECTF--
|
||||
In autoload: string(9) "UndefBase"
|
||||
|
||||
Fatal error: Uncaught Error: Class 'UndefBase' not found in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sautoload_011.php on line %d
|
||||
Fatal error: Class 'UndefBase' not found in %s on line %d
|
||||
|
@ -13,10 +13,4 @@ try {
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
Fatal error: Uncaught Error: Class 'B' not found in %sbug75765.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug75765.php on line %d
|
||||
Fatal error: Class 'B' not found in %s on line %d
|
||||
|
Loading…
Reference in New Issue
Block a user