Revert GH-10300

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit 68ada76f9a.
his reverts commit 45384c6e20.
This reverts commit ef7fbfd710.
This reverts commit 9b9ea0d7c6.
This reverts commit f15747c26b.
This reverts commit e883ba93c4.
This reverts commit 7e87551c37.
This reverts commit 921274d2b8.
This reverts commit fc1f528e5e.
This reverts commit 0961715cda.
This reverts commit a93f264526.
This reverts commit 72dd94e1c6.
This reverts commit 29b2dc8964.
This reverts commit 05c7653bba.
This reverts commit 5190e5c260.
This reverts commit 6b55bf228c.
This reverts commit 184b4a12d3.
This reverts commit 4c31b7888a.
This reverts commit d44e9680f0.
This reverts commit 4069a5c43f.
This commit is contained in:
Christoph M. Becker 2023-01-16 12:22:54 +01:00
parent 889dba4016
commit bf1cfc0753
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
37 changed files with 97 additions and 165 deletions

View file

@ -19,13 +19,15 @@
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_arena.h"
#include "zend_objects.h" // for zend_objects_new()
#include "zend_modules.h"
#include "zend_extensions.h"
#include "zend_constants.h"
#include "zend_interfaces.h" // for zend_ce_stringable
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "zend_closures.h"
#include "zend_inheritance.h"
#include "zend_ini.h"
#include "zend_enum.h"

View file

@ -22,13 +22,13 @@
#ifndef ZEND_API_H
#define ZEND_API_H
#include "zend_compile.h" // for zif_handler
#include "zend_execute.h" // for get_active_function_or_method_name()
#include "zend_globals.h" // for struct _zend_compiler_globals used by ZEND_MAP_PTR_GET_IMM()
#include "zend_globals_macros.h" // for CG() used by ZEND_MAP_PTR_GET_IMM()
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_modules.h"
#include "zend_list.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_execute.h"
#include "zend_type_info.h"
typedef struct _zend_module_entry zend_module_entry;
BEGIN_EXTERN_C()

View file

@ -18,13 +18,13 @@
*/
#include "zend_ast.h"
#include "zend_API.h" // for array_set_zval_key
#include "zend_arena.h"
#include "zend_API.h"
#include "zend_operators.h"
#include "zend_language_parser.h"
#include "zend_smart_str.h"
#include "zend_exceptions.h"
#include "zend_constants.h"
#include "zend_enum.h"
#include "zend_language_parser.h" // for T_*
#include "zend_smart_str.h"
#include "zend_exceptions.h" // for zend_throw_error
ZEND_API zend_ast_process_t zend_ast_process = NULL;

View file

@ -21,9 +21,7 @@
#ifndef ZEND_AST_H
#define ZEND_AST_H
#include "zend_types.h" // for zval
#include <stdint.h>
#include "zend.h"
#ifndef ZEND_AST_SPEC
# define ZEND_AST_SPEC 1

View file

@ -18,11 +18,11 @@
/* Inspired from Chromium's stack_util.cc */
#include "zend_call_stack.h"
#include "zend.h"
#include "zend_globals.h"
#include "zend_portability.h"
#include "zend_call_stack.h"
#include <stdint.h>
#ifdef ZEND_WIN32
# include <processthreadsapi.h>
# include <memoryapi.h>

View file

@ -19,14 +19,12 @@
#ifndef ZEND_CALL_STACK_H
#define ZEND_CALL_STACK_H
#include "zend_portability.h" // for zend_always_inline
#include "zend.h"
#include "zend_portability.h"
#ifdef __APPLE__
# include <pthread.h>
#endif
#include <stdbool.h>
#ifdef ZEND_CHECK_STACK_LIMIT
typedef struct _zend_call_stack {

View file

@ -18,11 +18,14 @@
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_API.h"
#include "zend_closures.h"
#include "zend_API.h" //for ZEND_METHOD()
#include "zend_arena.h"
#include "zend_compile.h" // for union _zend_function
#include "zend_objects.h" // for zend_object_std_init()
#include "zend_exceptions.h"
#include "zend_interfaces.h"
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_globals.h"
#include "zend_closures_arginfo.h"
typedef struct _zend_closure {

View file

@ -20,15 +20,6 @@
#ifndef ZEND_CLOSURES_H
#define ZEND_CLOSURES_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_execute_data zend_execute_data;
typedef union _zend_function zend_function;
typedef struct _zend_object zend_object;
typedef struct _zend_string zend_string;
typedef struct _zval_struct zval;
BEGIN_EXTERN_C()
/* This macro depends on zend_closure structure layout */

View file

@ -18,23 +18,23 @@
+----------------------------------------------------------------------+
*/
#include "zend_compile.h"
#include "zend_API.h" // for zend_get_object_type()
#include "zend_arena.h"
#include <zend_language_parser.h>
#include "zend.h"
#include "zend_attributes.h"
#include "zend_compile.h"
#include "zend_constants.h"
#include "zend_enum.h"
#include "zend_exceptions.h" // for zend_throw_exception_ex()
#include "zend_globals.h" // struct _zend_compiler_globals
#include "zend_globals_macros.h" // for CG()
#include "zend_inheritance.h" // for zend_do_link_class()
#include "zend_language_parser.h"
#include "zend_llist.h"
#include "zend_API.h"
#include "zend_exceptions.h"
#include "zend_interfaces.h"
#include "zend_virtual_cwd.h"
#include "zend_multibyte.h"
#include "zend_language_scanner.h"
#include "zend_list.h" // for zend_init_rsrc_list()
#include "zend_observer.h" // for zend_observer_function_declared_notify()
#include "zend_type_info.h" // for MAY_BE_*
#include "zend_virtual_cwd.h" // for IS_SLASH_P, DEFAULT_SLASH
#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER()
#include "zend_inheritance.h"
#include "zend_vm.h"
#include "zend_enum.h"
#include "zend_observer.h"
#include "zend_call_stack.h"
#define SET_NODE(target, src) do { \
target ## _type = (src)->op_type; \

View file

@ -20,12 +20,12 @@
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
#include "zend.h" // for INTERNAL_FUNCTION_PARAMETERS
#include "zend.h"
#include "zend_ast.h"
#include "zend_portability.h" //for ZEND_FASTCALL
#include "zend_types.h" // for zend_uchar
#include <stdint.h>
#include <stdarg.h>
#include "zend_llist.h"
#define SET_UNUSED(op) do { \
op ## _type = IS_UNUSED; \
@ -758,6 +758,8 @@ struct _zend_execute_data {
#define ZEND_EXTRA_VALUE 1
#include "zend_globals.h"
typedef enum _zend_compile_position {
ZEND_COMPILE_POSITION_AT_SHEBANG = 0,
ZEND_COMPILE_POSITION_AT_OPEN_TAG,

View file

@ -16,13 +16,13 @@
+----------------------------------------------------------------------+
*/
#include "zend_enum.h"
#include "zend_arena.h" // ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2
#include "zend_API.h" // for INIT_CLASS_ENTRY_EX()
#include "zend.h"
#include "zend_API.h"
#include "zend_compile.h"
#include "zend_enum_arginfo.h"
#include "zend_interfaces.h"
#include "zend_extensions.h" // for zend_internal_run_time_cache_reserved_size()
#include "zend_objects.h" // for zend_objects_new()
#include "zend_enum.h"
#include "zend_extensions.h"
#include "zend_observer.h"
#define ZEND_ENUM_DISALLOW_MAGIC_METHOD(propertyName, methodName) \

View file

@ -19,11 +19,8 @@
#ifndef ZEND_ENUM_H
#define ZEND_ENUM_H
#include "zend_compile.h" // for OBJ_PROP_NUM
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_function_entry zend_function_entry;
#include "zend.h"
#include "zend_types.h"
BEGIN_EXTERN_C()

View file

@ -22,12 +22,15 @@
#define ZEND_EXECUTE_H
#include "zend_compile.h" // for zend_op_array
#include "zend_globals.h" // for struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
#include "zend_list.h" // for zend_rsrc_list_get_rsrc_type()
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for zend_execute_data
#if ZEND_DEBUG
#include "zend_globals.h" // for struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
#endif
BEGIN_EXTERN_C()
struct _zend_fcall_info;
ZEND_API extern void (*zend_execute_ex)(zend_execute_data *execute_data);

View file

@ -66,14 +66,9 @@
*
* @see http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf
*/
#include "zend_gc.h"
#include "zend_alloc.h" // for ZEND_MM_OVERHEAD
#include "zend_fibers.h" // for zend_fiber_switch_block()
#include "zend_globals.h" // for struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
#include "zend_objects.h" // for zend_objects_destroy_object()
#include "zend.h" // for zend_error()
#include "zend.h"
#include "zend_API.h"
#include "zend_fibers.h"
#ifndef GC_BENCH
# define GC_BENCH 0

View file

@ -20,9 +20,6 @@
#ifndef ZEND_GC_H
#define ZEND_GC_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for GC_TYPE_INFO()
BEGIN_EXTERN_C()
typedef struct _zend_gc_status {

View file

@ -20,8 +20,6 @@
#ifndef ZEND_GLOBALS_MACROS_H
#define ZEND_GLOBALS_MACROS_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_compiler_globals zend_compiler_globals;
typedef struct _zend_executor_globals zend_executor_globals;
typedef struct _zend_php_scanner_globals zend_php_scanner_globals;

View file

@ -18,7 +18,6 @@
*/
#include "zend.h"
#include "zend_arena.h"
#include "zend_API.h"
#include "zend_compile.h"
#include "zend_execute.h"

View file

@ -16,13 +16,11 @@
+----------------------------------------------------------------------+
*/
#include "zend_interfaces.h"
#include "zend.h"
#include "zend_API.h"
#include "zend_arena.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "zend_interfaces_arginfo.h"
#include "zend_objects.h" // for zend_object_std_init()
ZEND_API zend_class_entry *zend_ce_traversable;
ZEND_API zend_class_entry *zend_ce_aggregate;

View file

@ -19,12 +19,8 @@
#ifndef ZEND_INTERFACES_H
#define ZEND_INTERFACES_H
#include "zend_iterators.h" // for zend_object_iterator
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_serialize_data zend_serialize_data;
typedef struct _zend_unserialize_data zend_unserialize_data;
#include "zend.h"
#include "zend_API.h"
BEGIN_EXTERN_C()

View file

@ -17,10 +17,8 @@
+----------------------------------------------------------------------+
*/
#include "zend_iterators.h"
#include "zend_objects.h"
#include "zend_object_handlers.h"
#include "zend_API.h" // for INIT_CLASS_ENTRY
#include "zend.h"
#include "zend_API.h"
static zend_class_entry zend_iterator_class_entry;

View file

@ -17,11 +17,6 @@
+----------------------------------------------------------------------+
*/
#ifndef ZEND_ITERATORS_H
#define ZEND_ITERATORS_H
#include "zend_types.h" // for zval
/* These iterators were designed to operate within the foreach()
* structures provided by the engine, but could be extended for use
* with other iterative engine opcodes.
@ -94,5 +89,3 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter);
ZEND_API void zend_register_iterator_wrapper(void);
END_EXTERN_C()
#endif /* ZEND_ITERATORS_H */

View file

@ -20,14 +20,6 @@
#ifndef ZEND_SCANNER_H
#define ZEND_SCANNER_H
#include "zend_globals.h" // for zend_php_scanner_event
#include "zend_multibyte.h" // for zend_encoding_filter
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_ptr_stack.h"
#include "zend_stack.h"
typedef struct _zend_file_handle zend_file_handle;
typedef struct _zend_lex_state {
unsigned int yy_leng;
unsigned char *yy_start;

View file

@ -27,7 +27,6 @@
# define YYDEBUG(s, c)
#endif
#include "zend_language_scanner.h"
#include "zend_language_scanner_defs.h"
#include <errno.h>
@ -36,9 +35,9 @@
# include <Winuser.h>
#endif
#include "zend_alloc.h"
#include "zend_arena.h"
#include <zend_language_parser.h>
#include "zend_compile.h"
#include "zend_language_scanner.h"
#include "zend_highlight.h"
#include "zend_constants.h"
#include "zend_variables.h"

View file

@ -19,12 +19,10 @@
/* resource lists */
#include "zend.h"
#include "zend_list.h"
#include "zend_execute.h" // for get_active_class_name()
#include "zend_globals.h" // for struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
#include "zend_hash.h"
#include "zend_types.h" // for zval
#include "zend_API.h"
#include "zend_globals.h"
ZEND_API int le_index_ptr;

View file

@ -20,12 +20,8 @@
#ifndef ZEND_LIST_H
#define ZEND_LIST_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_array HashTable;
typedef struct _zend_resource zend_resource;
typedef struct _zend_string zend_string;
typedef struct _zval_struct zval;
#include "zend_hash.h"
#include "zend_globals.h"
BEGIN_EXTERN_C()

View file

@ -17,8 +17,8 @@
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_llist.h"
#include "zend_alloc.h" //for pemalloc()
#include "zend_sort.h"
ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent)

View file

@ -20,8 +20,6 @@
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_llist_element {
struct _zend_llist_element *next;
struct _zend_llist_element *prev;

View file

@ -18,14 +18,13 @@
+----------------------------------------------------------------------+
*/
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_exceptions.h" // for zend_rethrow_exception()
#include "zend_execute.h" // for ZEND_REF_HAS_TYPE_SOURCES
#include "zend_types.h" // for GC_SET_REFCOUNT()
#include "zend_weakrefs.h" // for zend_weakrefs_notify()
#include "zend.h" // for struct _zend_class_entry
#include "zend_API.h" // for zend_call_known_instance_method_with_0_params()
#include "zend.h"
#include "zend_globals.h"
#include "zend_variables.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "zend_weakrefs.h"
static zend_always_inline void _zend_object_std_init(zend_object *object, zend_class_entry *ce)
{

View file

@ -20,10 +20,7 @@
#ifndef ZEND_OBJECTS_H
#define ZEND_OBJECTS_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_object zend_object;
#include "zend.h"
BEGIN_EXTERN_C()
ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce);

View file

@ -18,12 +18,11 @@
+----------------------------------------------------------------------+
*/
#include "zend_objects_API.h"
#include "zend_objects.h" // for zend_objects_destroy_object()
#include "zend.h"
#include "zend_globals.h"
#include "zend_variables.h"
#include "zend_API.h"
#include "zend_objects_API.h"
#include "zend_fibers.h"
ZEND_API void ZEND_FASTCALL zend_objects_store_init(zend_objects_store *objects, uint32_t init_size)

View file

@ -20,12 +20,8 @@
#ifndef ZEND_OBJECTS_API_H
#define ZEND_OBJECTS_API_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_gc.h" // for GC_MAY_LEAK
#include "zend_compile.h" // for ZEND_ACC_USE_GUARDS
#include "zend.h" // for _zend_class_entry
typedef struct _zend_object zend_object;
#include "zend.h"
#include "zend_compile.h"
#define OBJ_BUCKET_INVALID (1<<0)

View file

@ -18,10 +18,10 @@
*/
#include "zend_observer.h"
#include "zend_fibers.h"
#include "zend_extensions.h" // for zend_get_op_array_extension_handles()
#include "zend_extensions.h"
#include "zend_llist.h"
#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER()
#include "zend_vm.h"
#define ZEND_OBSERVER_DATA(function) \
ZEND_OP_ARRAY_EXTENSION((&(function)->common), zend_observer_fcall_op_array_extension)

View file

@ -20,15 +20,9 @@
#ifndef ZEND_OBSERVER_H
#define ZEND_OBSERVER_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_execute_data zend_execute_data;
typedef struct _zend_fiber_context zend_fiber_context;
typedef union _zend_function zend_function;
typedef struct _zend_op_array zend_op_array;
typedef struct _zend_string zend_string;
typedef struct _zval_struct zval;
#include "zend.h"
#include "zend_compile.h"
#include "zend_fibers.h"
BEGIN_EXTERN_C()

View file

@ -14,11 +14,11 @@
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_interfaces.h"
#include "zend_objects_API.h"
#include "zend_weakrefs.h"
#include "zend_API.h" // for ZEND_BEGIN_ARG_INFO_EX
#include "zend_objects.h" // for zend_object_std_init()
#include "zend_weakrefs_arginfo.h"
#include "zend_interfaces.h" // for zend_create_internal_iterator_zval()
typedef struct _zend_weakref {
zend_object *referent;

View file

@ -17,8 +17,7 @@
#ifndef ZEND_WEAKREFS_H
#define ZEND_WEAKREFS_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for zval
#include "zend_alloc.h"
BEGIN_EXTERN_C()

View file

@ -50,7 +50,6 @@
#include "zend_extensions.h"
#include "zend_compile.h"
#include "zend_modules.h" // for INIT_FUNC_ARGS
#include "Optimizer/zend_optimizer.h"
#include "zend_accelerator_hash.h"

View file

@ -29,8 +29,6 @@
#include "php_version.h"
#include "zend.h"
#include "zend_arena.h"
#include "zend_objects.h"
#include "zend_sort.h"
#include "php_compat.h"