Skip to content

Commit bf1cfc0

Browse files
committed
Revert GH-10300
Cf. <#10220 (comment)>. This reverts commit 68ada76. his reverts commit 45384c6. This reverts commit ef7fbfd. This reverts commit 9b9ea0d. This reverts commit f15747c. This reverts commit e883ba9. This reverts commit 7e87551. This reverts commit 921274d. This reverts commit fc1f528. This reverts commit 0961715. This reverts commit a93f264. This reverts commit 72dd94e. This reverts commit 29b2dc8. This reverts commit 05c7653. This reverts commit 5190e5c. This reverts commit 6b55bf2. This reverts commit 184b4a1. This reverts commit 4c31b78. This reverts commit d44e968. This reverts commit 4069a5c.
1 parent 889dba4 commit bf1cfc0

37 files changed

+97
-165
lines changed

Zend/zend_API.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@
1919
+----------------------------------------------------------------------+
2020
*/
2121

22+
#include "zend.h"
23+
#include "zend_execute.h"
2224
#include "zend_API.h"
23-
#include "zend_arena.h"
24-
#include "zend_objects.h" // for zend_objects_new()
25+
#include "zend_modules.h"
2526
#include "zend_extensions.h"
2627
#include "zend_constants.h"
27-
#include "zend_interfaces.h" // for zend_ce_stringable
28+
#include "zend_interfaces.h"
2829
#include "zend_exceptions.h"
30+
#include "zend_closures.h"
2931
#include "zend_inheritance.h"
3032
#include "zend_ini.h"
3133
#include "zend_enum.h"

Zend/zend_API.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
#ifndef ZEND_API_H
2323
#define ZEND_API_H
2424

25-
#include "zend_compile.h" // for zif_handler
26-
#include "zend_execute.h" // for get_active_function_or_method_name()
27-
#include "zend_globals.h" // for struct _zend_compiler_globals used by ZEND_MAP_PTR_GET_IMM()
28-
#include "zend_globals_macros.h" // for CG() used by ZEND_MAP_PTR_GET_IMM()
29-
#include "zend_portability.h" // for BEGIN_EXTERN_C
25+
#include "zend_modules.h"
26+
#include "zend_list.h"
27+
#include "zend_operators.h"
28+
#include "zend_variables.h"
29+
#include "zend_execute.h"
30+
#include "zend_type_info.h"
3031

31-
typedef struct _zend_module_entry zend_module_entry;
3232

3333
BEGIN_EXTERN_C()
3434

Zend/zend_ast.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
*/
1919

2020
#include "zend_ast.h"
21-
#include "zend_API.h" // for array_set_zval_key
22-
#include "zend_arena.h"
21+
#include "zend_API.h"
22+
#include "zend_operators.h"
23+
#include "zend_language_parser.h"
24+
#include "zend_smart_str.h"
25+
#include "zend_exceptions.h"
2326
#include "zend_constants.h"
2427
#include "zend_enum.h"
25-
#include "zend_language_parser.h" // for T_*
26-
#include "zend_smart_str.h"
27-
#include "zend_exceptions.h" // for zend_throw_error
2828

2929
ZEND_API zend_ast_process_t zend_ast_process = NULL;
3030

Zend/zend_ast.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
#ifndef ZEND_AST_H
2222
#define ZEND_AST_H
2323

24-
#include "zend_types.h" // for zval
25-
26-
#include <stdint.h>
24+
#include "zend.h"
2725

2826
#ifndef ZEND_AST_SPEC
2927
# define ZEND_AST_SPEC 1

Zend/zend_call_stack.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
/* Inspired from Chromium's stack_util.cc */
2020

21-
#include "zend_call_stack.h"
21+
#include "zend.h"
2222
#include "zend_globals.h"
23-
23+
#include "zend_portability.h"
24+
#include "zend_call_stack.h"
2425
#include <stdint.h>
25-
2626
#ifdef ZEND_WIN32
2727
# include <processthreadsapi.h>
2828
# include <memoryapi.h>

Zend/zend_call_stack.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
#ifndef ZEND_CALL_STACK_H
2020
#define ZEND_CALL_STACK_H
2121

22-
#include "zend_portability.h" // for zend_always_inline
23-
22+
#include "zend.h"
23+
#include "zend_portability.h"
2424
#ifdef __APPLE__
2525
# include <pthread.h>
2626
#endif
2727

28-
#include <stdbool.h>
29-
3028
#ifdef ZEND_CHECK_STACK_LIMIT
3129

3230
typedef struct _zend_call_stack {

Zend/zend_closures.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
+----------------------------------------------------------------------+
1919
*/
2020

21+
#include "zend.h"
22+
#include "zend_API.h"
2123
#include "zend_closures.h"
22-
#include "zend_API.h" //for ZEND_METHOD()
23-
#include "zend_arena.h"
24-
#include "zend_compile.h" // for union _zend_function
25-
#include "zend_objects.h" // for zend_object_std_init()
24+
#include "zend_exceptions.h"
25+
#include "zend_interfaces.h"
26+
#include "zend_objects.h"
27+
#include "zend_objects_API.h"
28+
#include "zend_globals.h"
2629
#include "zend_closures_arginfo.h"
2730

2831
typedef struct _zend_closure {

Zend/zend_closures.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@
2020
#ifndef ZEND_CLOSURES_H
2121
#define ZEND_CLOSURES_H
2222

23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
25-
typedef struct _zend_class_entry zend_class_entry;
26-
typedef struct _zend_execute_data zend_execute_data;
27-
typedef union _zend_function zend_function;
28-
typedef struct _zend_object zend_object;
29-
typedef struct _zend_string zend_string;
30-
typedef struct _zval_struct zval;
31-
3223
BEGIN_EXTERN_C()
3324

3425
/* This macro depends on zend_closure structure layout */

Zend/zend_compile.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
+----------------------------------------------------------------------+
1919
*/
2020

21-
#include "zend_compile.h"
22-
#include "zend_API.h" // for zend_get_object_type()
23-
#include "zend_arena.h"
21+
#include <zend_language_parser.h>
22+
#include "zend.h"
2423
#include "zend_attributes.h"
24+
#include "zend_compile.h"
2525
#include "zend_constants.h"
26-
#include "zend_enum.h"
27-
#include "zend_exceptions.h" // for zend_throw_exception_ex()
28-
#include "zend_globals.h" // struct _zend_compiler_globals
29-
#include "zend_globals_macros.h" // for CG()
30-
#include "zend_inheritance.h" // for zend_do_link_class()
31-
#include "zend_language_parser.h"
26+
#include "zend_llist.h"
27+
#include "zend_API.h"
28+
#include "zend_exceptions.h"
29+
#include "zend_interfaces.h"
30+
#include "zend_virtual_cwd.h"
31+
#include "zend_multibyte.h"
3232
#include "zend_language_scanner.h"
33-
#include "zend_list.h" // for zend_init_rsrc_list()
34-
#include "zend_observer.h" // for zend_observer_function_declared_notify()
35-
#include "zend_type_info.h" // for MAY_BE_*
36-
#include "zend_virtual_cwd.h" // for IS_SLASH_P, DEFAULT_SLASH
37-
#include "zend_vm.h" // for ZEND_VM_SET_OPCODE_HANDLER()
33+
#include "zend_inheritance.h"
34+
#include "zend_vm.h"
35+
#include "zend_enum.h"
36+
#include "zend_observer.h"
37+
#include "zend_call_stack.h"
3838

3939
#define SET_NODE(target, src) do { \
4040
target ## _type = (src)->op_type; \

Zend/zend_compile.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#ifndef ZEND_COMPILE_H
2121
#define ZEND_COMPILE_H
2222

23-
#include "zend.h" // for INTERNAL_FUNCTION_PARAMETERS
23+
#include "zend.h"
2424
#include "zend_ast.h"
25-
#include "zend_portability.h" //for ZEND_FASTCALL
26-
#include "zend_types.h" // for zend_uchar
2725

28-
#include <stdint.h>
26+
#include <stdarg.h>
27+
28+
#include "zend_llist.h"
2929

3030
#define SET_UNUSED(op) do { \
3131
op ## _type = IS_UNUSED; \
@@ -758,6 +758,8 @@ struct _zend_execute_data {
758758

759759
#define ZEND_EXTRA_VALUE 1
760760

761+
#include "zend_globals.h"
762+
761763
typedef enum _zend_compile_position {
762764
ZEND_COMPILE_POSITION_AT_SHEBANG = 0,
763765
ZEND_COMPILE_POSITION_AT_OPEN_TAG,

Zend/zend_enum.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19-
#include "zend_enum.h"
20-
#include "zend_arena.h" // ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2
21-
#include "zend_API.h" // for INIT_CLASS_ENTRY_EX()
19+
#include "zend.h"
20+
#include "zend_API.h"
21+
#include "zend_compile.h"
2222
#include "zend_enum_arginfo.h"
2323
#include "zend_interfaces.h"
24-
#include "zend_extensions.h" // for zend_internal_run_time_cache_reserved_size()
25-
#include "zend_objects.h" // for zend_objects_new()
24+
#include "zend_enum.h"
25+
#include "zend_extensions.h"
2626
#include "zend_observer.h"
2727

2828
#define ZEND_ENUM_DISALLOW_MAGIC_METHOD(propertyName, methodName) \

Zend/zend_enum.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919
#ifndef ZEND_ENUM_H
2020
#define ZEND_ENUM_H
2121

22-
#include "zend_compile.h" // for OBJ_PROP_NUM
23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
25-
typedef struct _zend_class_entry zend_class_entry;
26-
typedef struct _zend_function_entry zend_function_entry;
22+
#include "zend.h"
23+
#include "zend_types.h"
2724

2825
BEGIN_EXTERN_C()
2926

Zend/zend_execute.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
#define ZEND_EXECUTE_H
2323

2424
#include "zend_compile.h" // for zend_op_array
25-
#include "zend_globals.h" // for struct _zend_executor_globals
26-
#include "zend_globals_macros.h" // for EG()
2725
#include "zend_list.h" // for zend_rsrc_list_get_rsrc_type()
2826
#include "zend_portability.h" // for BEGIN_EXTERN_C
2927
#include "zend_types.h" // for zend_execute_data
3028

29+
#if ZEND_DEBUG
30+
#include "zend_globals.h" // for struct _zend_executor_globals
31+
#include "zend_globals_macros.h" // for EG()
32+
#endif
33+
3134
BEGIN_EXTERN_C()
3235
struct _zend_fcall_info;
3336
ZEND_API extern void (*zend_execute_ex)(zend_execute_data *execute_data);

Zend/zend_gc.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,9 @@
6666
*
6767
* @see http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf
6868
*/
69-
70-
#include "zend_gc.h"
71-
#include "zend_alloc.h" // for ZEND_MM_OVERHEAD
72-
#include "zend_fibers.h" // for zend_fiber_switch_block()
73-
#include "zend_globals.h" // for struct _zend_executor_globals
74-
#include "zend_globals_macros.h" // for EG()
75-
#include "zend_objects.h" // for zend_objects_destroy_object()
76-
#include "zend.h" // for zend_error()
69+
#include "zend.h"
70+
#include "zend_API.h"
71+
#include "zend_fibers.h"
7772

7873
#ifndef GC_BENCH
7974
# define GC_BENCH 0

Zend/zend_gc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#ifndef ZEND_GC_H
2121
#define ZEND_GC_H
2222

23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_types.h" // for GC_TYPE_INFO()
25-
2623
BEGIN_EXTERN_C()
2724

2825
typedef struct _zend_gc_status {

Zend/zend_globals_macros.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#ifndef ZEND_GLOBALS_MACROS_H
2121
#define ZEND_GLOBALS_MACROS_H
2222

23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
2523
typedef struct _zend_compiler_globals zend_compiler_globals;
2624
typedef struct _zend_executor_globals zend_executor_globals;
2725
typedef struct _zend_php_scanner_globals zend_php_scanner_globals;

Zend/zend_inheritance.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919

2020
#include "zend.h"
21-
#include "zend_arena.h"
2221
#include "zend_API.h"
2322
#include "zend_compile.h"
2423
#include "zend_execute.h"

Zend/zend_interfaces.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19-
#include "zend_interfaces.h"
2019
#include "zend.h"
2120
#include "zend_API.h"
22-
#include "zend_arena.h"
21+
#include "zend_interfaces.h"
2322
#include "zend_exceptions.h"
2423
#include "zend_interfaces_arginfo.h"
25-
#include "zend_objects.h" // for zend_object_std_init()
2624

2725
ZEND_API zend_class_entry *zend_ce_traversable;
2826
ZEND_API zend_class_entry *zend_ce_aggregate;

Zend/zend_interfaces.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919
#ifndef ZEND_INTERFACES_H
2020
#define ZEND_INTERFACES_H
2121

22-
#include "zend_iterators.h" // for zend_object_iterator
23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
25-
typedef struct _zend_class_entry zend_class_entry;
26-
typedef struct _zend_serialize_data zend_serialize_data;
27-
typedef struct _zend_unserialize_data zend_unserialize_data;
22+
#include "zend.h"
23+
#include "zend_API.h"
2824

2925
BEGIN_EXTERN_C()
3026

Zend/zend_iterators.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
+----------------------------------------------------------------------+
1818
*/
1919

20-
#include "zend_iterators.h"
21-
#include "zend_objects.h"
22-
#include "zend_object_handlers.h"
23-
#include "zend_API.h" // for INIT_CLASS_ENTRY
20+
#include "zend.h"
21+
#include "zend_API.h"
2422

2523
static zend_class_entry zend_iterator_class_entry;
2624

Zend/zend_iterators.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
+----------------------------------------------------------------------+
1818
*/
1919

20-
#ifndef ZEND_ITERATORS_H
21-
#define ZEND_ITERATORS_H
22-
23-
#include "zend_types.h" // for zval
24-
2520
/* These iterators were designed to operate within the foreach()
2621
* structures provided by the engine, but could be extended for use
2722
* with other iterative engine opcodes.
@@ -94,5 +89,3 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter);
9489

9590
ZEND_API void zend_register_iterator_wrapper(void);
9691
END_EXTERN_C()
97-
98-
#endif /* ZEND_ITERATORS_H */

Zend/zend_language_scanner.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@
2020
#ifndef ZEND_SCANNER_H
2121
#define ZEND_SCANNER_H
2222

23-
#include "zend_globals.h" // for zend_php_scanner_event
24-
#include "zend_multibyte.h" // for zend_encoding_filter
25-
#include "zend_portability.h" // for BEGIN_EXTERN_C
26-
#include "zend_ptr_stack.h"
27-
#include "zend_stack.h"
28-
29-
typedef struct _zend_file_handle zend_file_handle;
30-
3123
typedef struct _zend_lex_state {
3224
unsigned int yy_leng;
3325
unsigned char *yy_start;

Zend/zend_language_scanner.l

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
# define YYDEBUG(s, c)
2828
#endif
2929

30-
#include "zend_language_scanner.h"
3130
#include "zend_language_scanner_defs.h"
3231

3332
#include <errno.h>
@@ -36,9 +35,9 @@
3635
# include <Winuser.h>
3736
#endif
3837
#include "zend_alloc.h"
39-
#include "zend_arena.h"
4038
#include <zend_language_parser.h>
4139
#include "zend_compile.h"
40+
#include "zend_language_scanner.h"
4241
#include "zend_highlight.h"
4342
#include "zend_constants.h"
4443
#include "zend_variables.h"

0 commit comments

Comments
 (0)