mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Removed EG(active_op_array) and use corresponding value from EG(current_execute_data)
This commit is contained in:
parent
412ad4b254
commit
4b09dd69e6
17 changed files with 112 additions and 120 deletions
14
Zend/zend.c
14
Zend/zend.c
|
@ -1287,7 +1287,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval *retval, int file_cou
|
|||
va_list files;
|
||||
int i;
|
||||
zend_file_handle *file_handle;
|
||||
zend_op_array *orig_op_array = EG(active_op_array);
|
||||
zend_op_array *op_array;
|
||||
long orig_interactive = CG(interactive);
|
||||
|
||||
va_start(files, file_count);
|
||||
|
@ -1305,13 +1305,13 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval *retval, int file_cou
|
|||
}
|
||||
}
|
||||
|
||||
EG(active_op_array) = zend_compile_file(file_handle, type TSRMLS_CC);
|
||||
op_array = zend_compile_file(file_handle, type TSRMLS_CC);
|
||||
if (file_handle->opened_path) {
|
||||
zend_hash_str_add_empty_element(&EG(included_files), file_handle->opened_path, strlen(file_handle->opened_path));
|
||||
}
|
||||
zend_destroy_file_handle(file_handle TSRMLS_CC);
|
||||
if (EG(active_op_array)) {
|
||||
zend_execute(EG(active_op_array), retval TSRMLS_CC);
|
||||
if (op_array) {
|
||||
zend_execute(op_array, retval TSRMLS_CC);
|
||||
zend_exception_restore(TSRMLS_C);
|
||||
if (EG(exception)) {
|
||||
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
|
||||
|
@ -1338,17 +1338,15 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval *retval, int file_cou
|
|||
zend_exception_error(EG(exception), E_ERROR TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
destroy_op_array(EG(active_op_array) TSRMLS_CC);
|
||||
efree(EG(active_op_array));
|
||||
destroy_op_array(op_array TSRMLS_CC);
|
||||
efree(op_array);
|
||||
} else if (type==ZEND_REQUIRE) {
|
||||
va_end(files);
|
||||
EG(active_op_array) = orig_op_array;
|
||||
CG(interactive) = orig_interactive;
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
va_end(files);
|
||||
EG(active_op_array) = orig_op_array;
|
||||
CG(interactive) = orig_interactive;
|
||||
|
||||
return SUCCESS;
|
||||
|
|
|
@ -2806,8 +2806,13 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache
|
|||
ret = 1;
|
||||
}
|
||||
} else if ((ce = zend_lookup_class_ex(name, NULL, 1 TSRMLS_CC)) != NULL) {
|
||||
zend_class_entry *scope = EG(active_op_array) ? EG(active_op_array)->scope : NULL;
|
||||
zend_class_entry *scope;
|
||||
zend_execute_data *ex = EG(current_execute_data);
|
||||
|
||||
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
|
||||
ex = ex->prev_execute_data;
|
||||
}
|
||||
scope = ex ? ex->func->common.scope : NULL;
|
||||
fcc->calling_scope = ce;
|
||||
if (scope && !fcc->object && Z_OBJ(EG(This)) &&
|
||||
instanceof_function(Z_OBJCE(EG(This)), scope TSRMLS_CC) &&
|
||||
|
|
|
@ -1761,9 +1761,19 @@ static void zend_mm_safe_error(zend_mm_heap *heap,
|
|||
zend_string *str = zend_get_compiled_filename(TSRMLS_C);
|
||||
error_filename = str ? str->val : NULL;
|
||||
error_lineno = zend_get_compiled_lineno(TSRMLS_C);
|
||||
} else if (EG(in_execution)) {
|
||||
error_filename = EG(active_op_array)?EG(active_op_array)->filename->val:NULL;
|
||||
error_lineno = EG(opline_ptr)?(*EG(opline_ptr))->lineno:0;
|
||||
} else if (EG(in_execution) && EG(current_execute_data)) {
|
||||
zend_execute_data *ex = EG(current_execute_data);
|
||||
|
||||
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
|
||||
ex = ex->prev_execute_data;
|
||||
}
|
||||
if (ex) {
|
||||
error_filename = ex->func->op_array.filename->val;
|
||||
error_lineno = ex->opline ? ex->opline->lineno : 0;
|
||||
} else {
|
||||
error_filename = NULL;
|
||||
error_lineno = 0;
|
||||
}
|
||||
} else {
|
||||
error_filename = NULL;
|
||||
error_lineno = 0;
|
||||
|
|
|
@ -116,7 +116,8 @@ static zend_always_inline void zend_pzval_unlock_func(zval *z, zend_free_op *sho
|
|||
|
||||
/* End of zend_execute_locks.h */
|
||||
|
||||
#define CV_DEF_OF(i) (EG(active_op_array)->vars[i])
|
||||
// TODO: avoid global variable usage ???
|
||||
#define CV_DEF_OF(i) (EG(current_execute_data)->func->op_array.vars[i])
|
||||
|
||||
#define CTOR_CALL_BIT 0x1
|
||||
#define CTOR_USED_BIT 0x2
|
||||
|
@ -982,7 +983,7 @@ static void zend_extension_fcall_end_handler(const zend_extension *extension, ze
|
|||
}
|
||||
|
||||
|
||||
static zend_always_inline HashTable *zend_get_target_symbol_table(int fetch_type TSRMLS_DC)
|
||||
static zend_always_inline HashTable *zend_get_target_symbol_table(zend_execute_data *execute_data, int fetch_type TSRMLS_DC)
|
||||
{
|
||||
HashTable *ht;
|
||||
|
||||
|
@ -990,8 +991,8 @@ static zend_always_inline HashTable *zend_get_target_symbol_table(int fetch_type
|
|||
EXPECTED(fetch_type == ZEND_FETCH_GLOBAL)) {
|
||||
ht = &EG(symbol_table).ht;
|
||||
} else if (EXPECTED(fetch_type == ZEND_FETCH_STATIC)) {
|
||||
ZEND_ASSERT(EG(active_op_array)->static_variables != NULL);
|
||||
ht = EG(active_op_array)->static_variables;
|
||||
ZEND_ASSERT(execute_data->func->op_array.static_variables != NULL);
|
||||
ht = execute_data->func->op_array.static_variables;
|
||||
} else {
|
||||
ZEND_ASSERT(fetch_type == ZEND_FETCH_LOCAL);
|
||||
if (!EG(active_symbol_table)) {
|
||||
|
|
|
@ -192,8 +192,6 @@ void init_executor(TSRMLS_D) /* {{{ */
|
|||
|
||||
ZVAL_OBJ(&EG(This), NULL);
|
||||
|
||||
EG(active_op_array) = NULL;
|
||||
|
||||
EG(active) = 1;
|
||||
EG(start_op) = NULL;
|
||||
}
|
||||
|
@ -452,8 +450,13 @@ ZEND_API const char *get_active_function_name(TSRMLS_D) /* {{{ */
|
|||
|
||||
ZEND_API const char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
if (EG(active_op_array)) {
|
||||
return EG(active_op_array)->filename->val;
|
||||
zend_execute_data *ex = EG(current_execute_data);
|
||||
|
||||
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
|
||||
ex = ex->prev_execute_data;
|
||||
}
|
||||
if (ex) {
|
||||
return ex->func->op_array.filename->val;
|
||||
} else {
|
||||
return "[no active file]";
|
||||
}
|
||||
|
@ -462,12 +465,17 @@ ZEND_API const char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
|
|||
|
||||
ZEND_API uint zend_get_executed_lineno(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
if(EG(exception) && EG(opline_ptr) && active_opline->opcode == ZEND_HANDLE_EXCEPTION &&
|
||||
active_opline->lineno == 0 && EG(opline_before_exception)) {
|
||||
zend_execute_data *ex = EG(current_execute_data);
|
||||
|
||||
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
|
||||
ex = ex->prev_execute_data;
|
||||
}
|
||||
if (ex && ex->opline) {
|
||||
if (EG(exception) && ex->opline->opcode == ZEND_HANDLE_EXCEPTION &&
|
||||
ex->opline->lineno == 0 && EG(opline_before_exception)) {
|
||||
return EG(opline_before_exception)->lineno;
|
||||
}
|
||||
if (EG(opline_ptr)) {
|
||||
return active_opline->lineno;
|
||||
return ex->opline->lineno;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
@ -655,7 +663,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
|||
{
|
||||
zend_uint i;
|
||||
zend_array *calling_symbol_table;
|
||||
zend_op_array *original_op_array;
|
||||
zend_op **original_opline_ptr;
|
||||
zend_class_entry *calling_scope = NULL;
|
||||
zend_class_entry *called_scope = NULL;
|
||||
|
@ -856,17 +863,14 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
|||
EG(active_symbol_table) = NULL;
|
||||
}
|
||||
|
||||
original_op_array = EG(active_op_array);
|
||||
EG(active_op_array) = (zend_op_array *) func;
|
||||
original_opline_ptr = EG(opline_ptr);
|
||||
|
||||
if (EXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) == 0)) {
|
||||
zend_execute(EG(active_op_array), fci->retval TSRMLS_CC);
|
||||
if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
|
||||
zend_execute(&func->op_array, fci->retval TSRMLS_CC);
|
||||
} else {
|
||||
zend_generator_create_zval(EG(active_op_array), fci->retval TSRMLS_CC);
|
||||
zend_generator_create_zval(&func->op_array, fci->retval TSRMLS_CC);
|
||||
}
|
||||
|
||||
EG(active_op_array) = original_op_array;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
if (!fci->symbol_table && EG(active_symbol_table)) {
|
||||
zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
|
||||
|
@ -1088,7 +1092,6 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s
|
|||
{
|
||||
zval pv;
|
||||
zend_op_array *new_op_array;
|
||||
zend_op_array *original_active_op_array = EG(active_op_array);
|
||||
zend_uint original_compiler_options;
|
||||
int retval;
|
||||
|
||||
|
@ -1114,7 +1117,6 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s
|
|||
zend_op **original_opline_ptr = EG(opline_ptr);
|
||||
int orig_interactive = CG(interactive);
|
||||
|
||||
EG(active_op_array) = new_op_array;
|
||||
EG(no_extensions)=1;
|
||||
if (!EG(active_symbol_table)) {
|
||||
zend_rebuild_symbol_table(TSRMLS_C);
|
||||
|
@ -1149,7 +1151,6 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s
|
|||
|
||||
EG(no_extensions)=0;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(active_op_array) = original_active_op_array;
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
retval = SUCCESS;
|
||||
|
@ -1250,7 +1251,6 @@ void execute_new_code(TSRMLS_D) /* {{{ */
|
|||
|
||||
zend_release_labels(1 TSRMLS_CC);
|
||||
|
||||
EG(active_op_array) = CG(active_op_array);
|
||||
orig_interactive = CG(interactive);
|
||||
CG(interactive) = 0;
|
||||
zend_execute(CG(active_op_array), NULL TSRMLS_CC);
|
||||
|
|
|
@ -315,7 +315,6 @@ ZEND_API void zend_generator_resume(zend_generator *generator TSRMLS_DC) /* {{{
|
|||
/* Backup executor globals */
|
||||
zend_execute_data *original_execute_data = EG(current_execute_data);
|
||||
zend_op **original_opline_ptr = EG(opline_ptr);
|
||||
zend_op_array *original_active_op_array = EG(active_op_array);
|
||||
zend_array *original_active_symbol_table = EG(active_symbol_table);
|
||||
zend_object *original_This;
|
||||
zend_class_entry *original_scope = EG(scope);
|
||||
|
@ -327,7 +326,6 @@ ZEND_API void zend_generator_resume(zend_generator *generator TSRMLS_DC) /* {{{
|
|||
/* Set executor globals */
|
||||
EG(current_execute_data) = generator->execute_data;
|
||||
EG(opline_ptr) = &generator->execute_data->opline;
|
||||
EG(active_op_array) = &generator->execute_data->func->op_array;
|
||||
EG(active_symbol_table) = generator->execute_data->symbol_table;
|
||||
Z_OBJ(EG(This)) = generator->execute_data->object;
|
||||
EG(scope) = generator->execute_data->scope;
|
||||
|
@ -358,7 +356,6 @@ ZEND_API void zend_generator_resume(zend_generator *generator TSRMLS_DC) /* {{{
|
|||
/* Restore executor globals */
|
||||
EG(current_execute_data) = original_execute_data;
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(active_op_array) = original_active_op_array;
|
||||
EG(active_symbol_table) = original_active_symbol_table;
|
||||
Z_OBJ(EG(This)) = original_This;
|
||||
EG(scope) = original_scope;
|
||||
|
|
|
@ -183,8 +183,6 @@ struct _zend_executor_globals {
|
|||
int orig_error_reporting;
|
||||
int exit_status;
|
||||
|
||||
zend_op_array *active_op_array;
|
||||
|
||||
HashTable *function_table; /* function symbol table */
|
||||
HashTable *class_table; /* class table */
|
||||
HashTable *zend_constants; /* constants table */
|
||||
|
|
|
@ -299,8 +299,8 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui
|
|||
zend_property_info *scope_property_info;
|
||||
zend_bool denied_access = 0;
|
||||
|
||||
if (cache_slot != -1 && EXPECTED(ce == CACHED_PTR_EX(EG(active_op_array), cache_slot))) {
|
||||
property_info = CACHED_PTR_EX(EG(active_op_array), cache_slot + 1);
|
||||
if (cache_slot != -1 && EXPECTED(ce == CACHED_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot))) {
|
||||
property_info = CACHED_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot + 1);
|
||||
if (UNEXPECTED(!property_info)) {
|
||||
EG(std_property_info).flags = ZEND_ACC_PUBLIC;
|
||||
EG(std_property_info).name = member;
|
||||
|
@ -339,7 +339,7 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui
|
|||
zend_error(E_STRICT, "Accessing static property %s::$%s as non static", ce->name->val, member->val);
|
||||
}
|
||||
if (cache_slot != -1) {
|
||||
CACHE_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce, property_info);
|
||||
CACHE_POLYMORPHIC_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot, ce, property_info);
|
||||
}
|
||||
return property_info;
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui
|
|||
&& (scope_property_info = zend_hash_find_ptr(&EG(scope)->properties_info, member)) != NULL
|
||||
&& scope_property_info->flags & ZEND_ACC_PRIVATE) {
|
||||
if (cache_slot != -1) {
|
||||
CACHE_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce, scope_property_info);
|
||||
CACHE_POLYMORPHIC_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot, ce, scope_property_info);
|
||||
}
|
||||
return scope_property_info;
|
||||
} else if (property_info) {
|
||||
|
@ -368,12 +368,12 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui
|
|||
} else {
|
||||
/* fall through, return property_info... */
|
||||
if (cache_slot != -1) {
|
||||
CACHE_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce, property_info);
|
||||
CACHE_POLYMORPHIC_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot, ce, property_info);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (cache_slot != -1) {
|
||||
CACHE_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce, NULL);
|
||||
CACHE_POLYMORPHIC_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot, ce, NULL);
|
||||
}
|
||||
EG(std_property_info).flags = ZEND_ACC_PUBLIC;
|
||||
EG(std_property_info).name = member;
|
||||
|
@ -1276,7 +1276,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
|
|||
zend_property_info *property_info;
|
||||
|
||||
if (UNEXPECTED(cache_slot == -1) ||
|
||||
(property_info = CACHED_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce)) == NULL) {
|
||||
(property_info = CACHED_POLYMORPHIC_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot, ce)) == NULL) {
|
||||
|
||||
if (UNEXPECTED((property_info = zend_hash_find_ptr(&ce->properties_info, property_name)) == NULL)) {
|
||||
if (!silent) {
|
||||
|
@ -1302,7 +1302,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
|
|||
zend_update_class_constants(ce TSRMLS_CC);
|
||||
|
||||
if (EXPECTED(cache_slot != -1)) {
|
||||
CACHE_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce, property_info);
|
||||
CACHE_POLYMORPHIC_PTR_EX(&EG(current_execute_data)->func->op_array, cache_slot, ce, property_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1145,7 +1145,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, UNUSED|CONST|
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((OP1_TYPE == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
FREE_OP1();
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -1790,7 +1790,6 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
|
|||
execute_data = EG(current_execute_data);
|
||||
EX(call) = prev_nested_call;
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
EG(active_symbol_table) = EX(symbol_table);
|
||||
|
||||
if (Z_OBJ(EG(This))) {
|
||||
|
@ -1836,7 +1835,6 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
|
|||
EX(call) = prev_nested_call;
|
||||
zend_attach_symbol_table(execute_data);
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
HANDLE_EXCEPTION_LEAVE();
|
||||
|
@ -2688,7 +2686,6 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
|
|||
EG(scope) = fbc->common.scope;
|
||||
EG(called_scope) = call->called_scope;
|
||||
EG(active_symbol_table) = NULL;
|
||||
EG(active_op_array) = &fbc->op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
|
||||
|
@ -2715,7 +2712,6 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
if (UNEXPECTED(EG(active_symbol_table) != NULL)) {
|
||||
zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
|
||||
}
|
||||
|
@ -3989,7 +3985,6 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
|||
} else if (EXPECTED(new_op_array != NULL)) {
|
||||
zval *return_value = NULL;
|
||||
|
||||
EG(active_op_array) = new_op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
}
|
||||
|
@ -4010,7 +4005,6 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
@ -4082,7 +4076,7 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((OP1_TYPE == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -4600,7 +4594,7 @@ ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
|
|
@ -413,7 +413,6 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
|
|||
execute_data = EG(current_execute_data);
|
||||
EX(call) = prev_nested_call;
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
EG(active_symbol_table) = EX(symbol_table);
|
||||
|
||||
if (Z_OBJ(EG(This))) {
|
||||
|
@ -459,7 +458,6 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
|
|||
EX(call) = prev_nested_call;
|
||||
zend_attach_symbol_table(execute_data);
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
zend_throw_exception_internal(NULL TSRMLS_CC);
|
||||
HANDLE_EXCEPTION_LEAVE();
|
||||
|
@ -640,7 +638,6 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
|||
EG(scope) = fbc->common.scope;
|
||||
EG(called_scope) = call->called_scope;
|
||||
EG(active_symbol_table) = NULL;
|
||||
EG(active_op_array) = &fbc->op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
|
||||
|
@ -667,7 +664,6 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
if (UNEXPECTED(EG(active_symbol_table) != NULL)) {
|
||||
zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
|
||||
}
|
||||
|
@ -2929,7 +2925,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
|||
} else if (EXPECTED(new_op_array != NULL)) {
|
||||
zval *return_value = NULL;
|
||||
|
||||
EG(active_op_array) = new_op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
}
|
||||
|
@ -2950,7 +2945,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
@ -3575,7 +3569,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_CONST(int type
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_CONST == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -4122,7 +4116,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HA
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CONST == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -4185,7 +4179,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_O
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -5397,7 +5391,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type,
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_CONST == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -5824,7 +5818,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HAND
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CONST == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -5887,7 +5881,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPC
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -6107,7 +6101,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int typ
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_CONST == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -6501,7 +6495,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_H
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CONST == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -6564,7 +6558,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -8123,7 +8117,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
|||
} else if (EXPECTED(new_op_array != NULL)) {
|
||||
zval *return_value = NULL;
|
||||
|
||||
EG(active_op_array) = new_op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
}
|
||||
|
@ -8144,7 +8137,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
@ -8818,7 +8810,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_CONST(int type,
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_TMP_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
zval_dtor(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -9262,7 +9254,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HAND
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_TMP_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -9325,7 +9317,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPC
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -10507,7 +10499,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_VAR(int type, ZE
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_TMP_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
zval_dtor(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -10937,7 +10929,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLE
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_TMP_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -11000,7 +10992,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCOD
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -11220,7 +11212,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_UNUSED(int type,
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_TMP_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
zval_dtor(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -11502,7 +11494,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HAN
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_TMP_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -11565,7 +11557,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_UNUSED_HANDLER(ZEND_OP
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -13384,7 +13376,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
|||
} else if (EXPECTED(new_op_array != NULL)) {
|
||||
zval *return_value = NULL;
|
||||
|
||||
EG(active_op_array) = new_op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
}
|
||||
|
@ -13405,7 +13396,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
@ -14730,7 +14720,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_CONST(int type,
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
zval_ptr_dtor_nogc(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -15739,7 +15729,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -15930,7 +15920,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_CONST_HANDLER(ZEND_OPC
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -19085,7 +19075,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_VAR(int type, ZE
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
zval_ptr_dtor_nogc(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -20064,7 +20054,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -20255,7 +20245,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_VAR_HANDLER(ZEND_OPCOD
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -20975,7 +20965,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_UNUSED(int type,
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
zval_ptr_dtor_nogc(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -21512,7 +21502,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HAN
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_VAR == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -21575,7 +21565,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_UNUSED_HANDLER(ZEND_OP
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -30517,7 +30507,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
|||
} else if (EXPECTED(new_op_array != NULL)) {
|
||||
zval *return_value = NULL;
|
||||
|
||||
EG(active_op_array) = new_op_array;
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
return_value = EX_VAR(opline->result.var);
|
||||
}
|
||||
|
@ -30538,7 +30527,6 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
|
|||
}
|
||||
|
||||
EG(opline_ptr) = &EX(opline);
|
||||
EG(active_op_array) = &EX(func)->op_array;
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
@ -31712,7 +31700,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_CONST(int type, Z
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_CV == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -32509,7 +32497,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CV == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -32700,7 +32688,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCO
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -35768,7 +35756,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_VAR(int type, ZEN
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_CV == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -36633,7 +36621,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CV == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -36824,7 +36812,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
@ -37542,7 +37530,7 @@ static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_UNUSED(int type,
|
|||
retval = zend_std_get_static_property(ce, name, 0, ((IS_CV == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
retval = zend_hash_find(target_symbol_table, name);
|
||||
if (retval == NULL) {
|
||||
switch (type) {
|
||||
|
@ -37967,7 +37955,7 @@ static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HAND
|
|||
}
|
||||
zend_std_unset_static_property(ce, Z_STR_P(varname), ((IS_CV == IS_CONST) ? Z_CACHE_SLOT_P(varname) : -1) TSRMLS_CC);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
|
||||
}
|
||||
|
||||
|
@ -38030,7 +38018,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPC
|
|||
isset = 0;
|
||||
}
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
|
||||
if ((value = zend_hash_find(target_symbol_table, Z_STR_P(varname))) == NULL) {
|
||||
isset = 0;
|
||||
}
|
||||
|
|
|
@ -220,11 +220,14 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
|
|||
memcmp(Z_STRVAL(ZEND_OP2_LITERAL(opline)), "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1) == 0) {
|
||||
/* substitute __COMPILER_HALT_OFFSET__ constant */
|
||||
zend_bool orig_in_execution = EG(in_execution);
|
||||
zend_op_array *orig_op_array = EG(active_op_array);
|
||||
zend_execute_data *orig_execute_data = EG(current_execute_data);
|
||||
zend_execute_data fake_execute_data;
|
||||
zval *offset;
|
||||
|
||||
EG(in_execution) = 1;
|
||||
EG(active_op_array) = op_array;
|
||||
memset(&fake_execute_data, 0, sizeof(zend_execute_data));
|
||||
fake_execute_data.func = (zend_function*)op_array;
|
||||
EG(current_execute_data) = &fake_execute_data;
|
||||
if ((offset = zend_get_constant_str("__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1 TSRMLS_CC)) != NULL) {
|
||||
zend_uint tv = ZEND_RESULT(opline).var;
|
||||
|
||||
|
@ -232,7 +235,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
|
|||
MAKE_NOP(opline);
|
||||
replace_tmp_by_const(op_array, opline, tv, offset TSRMLS_CC);
|
||||
}
|
||||
EG(active_op_array) = orig_op_array;
|
||||
EG(current_execute_data) = orig_execute_data;
|
||||
EG(in_execution) = orig_in_execution;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -298,18 +298,21 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
|
|||
|
||||
if (main_persistent_script) {
|
||||
zend_bool orig_in_execution = EG(in_execution);
|
||||
zend_op_array *orig_op_array = EG(active_op_array);
|
||||
zend_execute_data *orig_execute_data = EG(current_execute_data);
|
||||
zend_execute_data fake_execute_data;
|
||||
zval *offset;
|
||||
|
||||
#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
|
||||
main_persistent_script->early_binding = -1;
|
||||
#endif
|
||||
EG(in_execution) = 1;
|
||||
EG(active_op_array) = op_array;
|
||||
memset(&fake_execute_data, 0, sizeof(fake_execute_data));
|
||||
fake_execute_data.func = (zend_function*)op_array;
|
||||
EG(current_execute_data) = &fake_execute_data;
|
||||
if ((offset = zend_get_constant_str("__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1 TSRMLS_CC)) != NULL) {
|
||||
main_persistent_script->compiler_halt_offset = Z_LVAL_P(offset);
|
||||
}
|
||||
EG(active_op_array) = orig_op_array;
|
||||
EG(current_execute_data) = orig_execute_data;
|
||||
EG(in_execution) = orig_in_execution;
|
||||
}
|
||||
|
||||
|
|
|
@ -283,7 +283,6 @@ static int phar_file_action(phar_archive_data *phar, phar_entry_info *info, char
|
|||
#endif
|
||||
if (new_op_array) {
|
||||
ZVAL_UNDEF(&result);
|
||||
EG(active_op_array) = new_op_array;
|
||||
|
||||
zend_try {
|
||||
if (EG(current_execute_data)) {
|
||||
|
|
|
@ -1232,7 +1232,7 @@ static void unset_zval_property(zval* object, char* name TSRMLS_DC)
|
|||
ZVAL_STRING(&member, name);
|
||||
old_scope = EG(scope);
|
||||
EG(scope) = Z_OBJCE_P(object);
|
||||
Z_OBJ_HT_P(object)->unset_property(object, &member, 0 TSRMLS_CC);
|
||||
Z_OBJ_HT_P(object)->unset_property(object, &member, -1 TSRMLS_CC);
|
||||
EG(scope) = old_scope;
|
||||
zval_ptr_dtor(&member);
|
||||
} else if (Z_TYPE_P(object) == IS_ARRAY) {
|
||||
|
|
|
@ -286,7 +286,6 @@ static int spl_autoload(zend_string *class_name, zend_string *lc_name, const cha
|
|||
}
|
||||
STR_RELEASE(opened_path);
|
||||
if (new_op_array) {
|
||||
EG(active_op_array) = new_op_array;
|
||||
if (!EG(active_symbol_table)) {
|
||||
zend_rebuild_symbol_table(TSRMLS_C);
|
||||
}
|
||||
|
@ -320,7 +319,6 @@ PHP_FUNCTION(spl_autoload)
|
|||
char *pos, *pos1;
|
||||
zend_string *class_name, *lc_name, *file_exts = SPL_G(autoload_extensions);
|
||||
zend_op **original_opline_ptr = EG(opline_ptr);
|
||||
zend_op_array *original_active_op_array = EG(active_op_array);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &class_name, &file_exts) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
|
@ -338,7 +336,6 @@ PHP_FUNCTION(spl_autoload)
|
|||
zend_str_tolower_copy(lc_name->val, class_name->val, class_name->len);
|
||||
while (pos && *pos && !EG(exception)) {
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(active_op_array) = original_active_op_array;
|
||||
pos1 = strchr(pos, ',');
|
||||
if (pos1) {
|
||||
pos1_len = pos1 - pos;
|
||||
|
@ -355,7 +352,6 @@ PHP_FUNCTION(spl_autoload)
|
|||
STR_FREE(lc_name);
|
||||
|
||||
EG(opline_ptr) = original_opline_ptr;
|
||||
EG(active_op_array) = original_active_op_array;
|
||||
|
||||
if (!found && !SPL_G(autoload_running)) {
|
||||
/* For internal errors, we generate E_ERROR, for direct calls an exception is thrown.
|
||||
|
|
|
@ -4759,7 +4759,7 @@ PHP_FUNCTION(forward_static_call)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!EG(active_op_array)->scope) {
|
||||
if (!EG(current_execute_data)->prev_execute_data->func->common.scope) {
|
||||
zend_error(E_ERROR, "Cannot call forward_static_call() when no class scope is active");
|
||||
}
|
||||
|
||||
|
|
|
@ -1780,7 +1780,7 @@ void php_request_shutdown(void *dummy)
|
|||
* inside zend_executor callback functions.
|
||||
*/
|
||||
EG(opline_ptr) = NULL;
|
||||
EG(active_op_array) = NULL;
|
||||
EG(current_execute_data) = NULL;
|
||||
|
||||
php_deactivate_ticks(TSRMLS_C);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue