Skip to content

Commit c8955c0

Browse files
committed
Revert GH-10220
Cf. <#10220 (comment)>. This reverts commit ecc880f. This reverts commit 588a07f. This reverts commit f377e15. This reverts commit b4ba16f. This reverts commit 694ec1d. This reverts commit 6b34de8. This reverts commit aa1cd02. This reverts commit 308fd31. This reverts commit 16203b5. This reverts commit 738fb5c. This reverts commit 9fdbefa. This reverts commit cd4a7c1. This reverts commit 928685e. This reverts commit 01e5ffc.
1 parent 2f4973f commit c8955c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+64
-226
lines changed

Zend/zend.c

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "zend_observer.h"
3737
#include "zend_fibers.h"
3838
#include "zend_call_stack.h"
39-
#include "zend_strtod.h"
4039
#include "Optimizer/zend_optimizer.h"
4140

4241
static size_t global_map_ptr_last = 0;

Zend/zend_execute.c

+16-10
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,34 @@
2020

2121
#define ZEND_INTENSIVE_DEBUGGING 0
2222

23+
#include <stdio.h>
24+
#include <signal.h>
25+
26+
#include "zend.h"
27+
#include "zend_compile.h"
2328
#include "zend_execute.h"
24-
#include "zend_API.h" // for ZEND_FUNCTION()
25-
#include "zend_arena.h"
29+
#include "zend_API.h"
30+
#include "zend_ptr_stack.h"
2631
#include "zend_constants.h"
2732
#include "zend_extensions.h"
2833
#include "zend_ini.h"
2934
#include "zend_exceptions.h"
35+
#include "zend_interfaces.h"
3036
#include "zend_closures.h"
31-
#include "zend_generators.h" // for zend_ce_generator
32-
#include "zend_inheritance.h" // for zend_do_link_class()
37+
#include "zend_generators.h"
38+
#include "zend_vm.h"
39+
#include "zend_dtrace.h"
40+
#include "zend_inheritance.h"
41+
#include "zend_type_info.h"
3342
#include "zend_smart_str.h"
3443
#include "zend_observer.h"
44+
#include "zend_system_id.h"
45+
#include "zend_call_stack.h"
46+
#include "Optimizer/zend_func_info.h"
3547

3648
/* Virtual current working directory support */
3749
#include "zend_virtual_cwd.h"
3850

39-
#include <stdio.h>
40-
#include <signal.h>
41-
4251
#ifdef HAVE_GCC_GLOBAL_REGS
4352
# if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386)
4453
# define ZEND_VM_FP_GLOBAL_REG "%esi"
@@ -5339,9 +5348,6 @@ static zend_always_inline zend_execute_data *_zend_vm_stack_push_call_frame(uint
53395348
/* This callback disables optimization of "vm_stack_data" variable in VM */
53405349
ZEND_API void (ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data) = NULL;
53415350

5342-
#include "zend_fibers.h" // needed by zend_vm_execute.h
5343-
#include "zend_interfaces.h" // needed by zend_vm_execute.h
5344-
#include "zend_objects.h" // needed by zend_vm_execute.h
53455351
#include "zend_vm_execute.h"
53465352

53475353
ZEND_API zend_result zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler)

Zend/zend_execute.h

+4-10
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,10 @@
2121
#ifndef ZEND_EXECUTE_H
2222
#define ZEND_EXECUTE_H
2323

24-
#include "zend_compile.h" // for zend_op_array
25-
#include "zend_list.h" // for zend_rsrc_list_get_rsrc_type()
26-
#include "zend_portability.h" // for BEGIN_EXTERN_C
27-
#include "zend_types.h" // for zend_execute_data
28-
29-
#if ZEND_DEBUG
30-
#include "zend_globals.h" // for struct _zend_executor_globals
31-
#include "zend_globals_macros.h" // for EG()
32-
#endif
24+
#include "zend_compile.h"
25+
#include "zend_hash.h"
26+
#include "zend_operators.h"
27+
#include "zend_variables.h"
3328

3429
BEGIN_EXTERN_C()
3530
struct _zend_fcall_info;
@@ -187,7 +182,6 @@ ZEND_API zend_result ZEND_FASTCALL zval_update_constant_ex(zval *pp, zend_class_
187182
ZEND_API zend_result ZEND_FASTCALL zval_update_constant_with_ctx(zval *pp, zend_class_entry *scope, zend_ast_evaluate_ctx *ctx);
188183

189184
/* dedicated Zend executor functions - do not use! */
190-
typedef struct _zend_vm_stack *zend_vm_stack;
191185
struct _zend_vm_stack {
192186
zval *top;
193187
zval *end;

Zend/zend_execute_API.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,26 @@
1818
+----------------------------------------------------------------------+
1919
*/
2020

21+
#include <stdio.h>
22+
#include <signal.h>
23+
24+
#include "zend.h"
25+
#include "zend_compile.h"
26+
#include "zend_execute.h"
2127
#include "zend_API.h"
28+
#include "zend_stack.h"
2229
#include "zend_constants.h"
2330
#include "zend_extensions.h"
2431
#include "zend_exceptions.h"
2532
#include "zend_closures.h"
33+
#include "zend_generators.h"
34+
#include "zend_vm.h"
35+
#include "zend_float.h"
2636
#include "zend_fibers.h"
2737
#include "zend_weakrefs.h"
38+
#include "zend_inheritance.h"
2839
#include "zend_observer.h"
29-
30-
#include <stdio.h>
31-
#include <signal.h>
32-
40+
#include "zend_call_stack.h"
3341
#ifdef HAVE_SYS_TIME_H
3442
#include <sys/time.h>
3543
#endif

Zend/zend_fibers.c

-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
+----------------------------------------------------------------------+
1818
*/
1919

20-
#include "zend_fibers.h"
21-
#include "zend_objects.h" // for zend_object_std_init()
2220
#include "zend.h"
2321
#include "zend_API.h"
2422
#include "zend_ini.h"
@@ -46,9 +44,6 @@
4644
# include <sys/mman.h>
4745
# include <limits.h>
4846

49-
# include <errno.h>
50-
# include <string.h> // for strerror()
51-
5247
# if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
5348
# define MAP_ANONYMOUS MAP_ANON
5449
# endif

Zend/zend_fibers.h

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@
2020
#ifndef ZEND_FIBERS_H
2121
#define ZEND_FIBERS_H
2222

23-
#include "zend_API.h" // for struct zend_fcall_info
24-
#include "zend_portability.h" // for BEGIN_EXTERN_C
25-
26-
#include <stddef.h>
23+
#include "zend_API.h"
24+
#include "zend_types.h"
2725

2826
#define ZEND_FIBER_GUARD_PAGES 1
2927

3028
#define ZEND_FIBER_DEFAULT_C_STACK_SIZE (4096 * (((sizeof(void *)) < 8) ? 256 : 512))
3129
#define ZEND_FIBER_VM_STACK_SIZE (1024 * sizeof(zval))
3230

33-
typedef struct _zend_fiber_context zend_fiber_context;
34-
3531
BEGIN_EXTERN_C()
3632

3733
typedef enum {

Zend/zend_ini.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,16 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19-
#include "zend_ini.h"
2019
#include "zend.h"
2120
#include "zend_sort.h"
2221
#include "zend_API.h"
22+
#include "zend_ini.h"
2323
#include "zend_alloc.h"
2424
#include "zend_operators.h"
2525
#include "zend_strtod.h"
2626
#include "zend_modules.h"
2727
#include "zend_smart_str.h"
28-
2928
#include <ctype.h>
30-
#include <errno.h>
3129

3230
static HashTable *registered_zend_ini_directives;
3331

Zend/zend_ini.h

-12
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,12 @@
1919
#ifndef ZEND_INI_H
2020
#define ZEND_INI_H
2121

22-
#include "zend_portability.h" // for BEGIN_EXTERN_C
23-
#include "zend_types.h" // for zend_result
24-
25-
#include <stdint.h>
26-
2722
#define ZEND_INI_USER (1<<0)
2823
#define ZEND_INI_PERDIR (1<<1)
2924
#define ZEND_INI_SYSTEM (1<<2)
3025

3126
#define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
3227

33-
// forward declarations
34-
typedef struct _zend_file_handle zend_file_handle;
35-
typedef struct _zend_ini_entry zend_ini_entry;
36-
typedef struct _zend_module_entry zend_module_entry;
37-
typedef struct _zend_string zend_string;
38-
typedef struct _zend_array HashTable;
39-
4028
#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage)
4129
#define ZEND_INI_DISP(name) ZEND_COLD void name(zend_ini_entry *ini_entry, int type)
4230

Zend/zend_multibyte.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
+----------------------------------------------------------------------+
1818
*/
1919

20+
#include "zend.h"
21+
#include "zend_compile.h"
22+
#include "zend_operators.h"
2023
#include "zend_multibyte.h"
21-
#include "zend_alloc.h"
22-
#include "zend_globals.h" // for struct _zend_compiler_globals
23-
#include "zend_globals_macros.h" // for LANG_SCNG()
2424
#include "zend_ini.h"
2525

2626
static const zend_encoding *dummy_encoding_fetcher(const char *encoding_name)

Zend/zend_multibyte.h

-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
#ifndef ZEND_MULTIBYTE_H
2121
#define ZEND_MULTIBYTE_H
2222

23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_types.h" // for zend_result
25-
26-
#include <stdbool.h>
27-
#include <stddef.h> // for size_t
28-
2923
typedef struct _zend_encoding zend_encoding;
3024

3125
typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length);

Zend/zend_object_handlers.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
+----------------------------------------------------------------------+
1919
*/
2020

21-
#include "zend_object_handlers.h"
2221
#include "zend.h"
2322
#include "zend_globals.h"
2423
#include "zend_variables.h"
2524
#include "zend_API.h"
2625
#include "zend_objects.h"
2726
#include "zend_objects_API.h"
27+
#include "zend_object_handlers.h"
2828
#include "zend_interfaces.h"
2929
#include "zend_exceptions.h"
3030
#include "zend_closures.h"

Zend/zend_object_handlers.h

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#ifndef ZEND_OBJECT_HANDLERS_H
2121
#define ZEND_OBJECT_HANDLERS_H
2222

23-
#include "zend_types.h"
24-
2523
struct _zend_property_info;
2624

2725
#define ZEND_WRONG_PROPERTY_INFO \

Zend/zend_operators.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,18 @@
1818
+----------------------------------------------------------------------+
1919
*/
2020

21-
#include "zend_operators.h"
21+
#include <ctype.h>
22+
2223
#include "zend.h"
24+
#include "zend_operators.h"
2325
#include "zend_variables.h"
24-
#include "zend_objects.h" // for zend_objects_new()
2526
#include "zend_globals.h"
26-
#include "zend_multiply.h" // for ZEND_SIGNED_MULTIPLY_LONG()
2727
#include "zend_list.h"
2828
#include "zend_API.h"
2929
#include "zend_strtod.h"
3030
#include "zend_exceptions.h"
3131
#include "zend_closures.h"
3232

33-
#include <ctype.h>
34-
3533
#include <locale.h>
3634
#ifdef HAVE_LANGINFO_H
3735
# include <langinfo.h>

Zend/zend_operators.h

+7-6
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@
2121
#ifndef ZEND_OPERATORS_H
2222
#define ZEND_OPERATORS_H
2323

24-
#include "zend_hash.h" // for zend_hash_num_elements()
25-
#include "zend_object_handlers.h" // for struct _zend_object_handlers
26-
#include "zend_portability.h" // for BEGIN_EXTERN_
27-
#include "zend_types.h" // for zend_result
28-
#include "zend_string.h" // for zend_string_copy()
29-
24+
#include <errno.h>
3025
#include <math.h>
26+
#include <assert.h>
3127
#include <stddef.h>
3228

3329
#ifdef HAVE_IEEEFP_H
3430
#include <ieeefp.h>
3531
#endif
3632

33+
#include "zend_portability.h"
34+
#include "zend_strtod.h"
35+
#include "zend_multiply.h"
36+
#include "zend_object_handlers.h"
37+
3738
#define LONG_SIGN_MASK ZEND_LONG_MIN
3839

3940
BEGIN_EXTERN_C()

Zend/zend_ptr_stack.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
+----------------------------------------------------------------------+
1818
*/
1919

20+
#include "zend.h"
2021
#include "zend_ptr_stack.h"
21-
2222
#include <stdarg.h>
2323

2424
ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, bool persistent)

Zend/zend_ptr_stack.h

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#ifndef ZEND_PTR_STACK_H
2121
#define ZEND_PTR_STACK_H
2222

23-
#include "zend_alloc.h" // for safe_perealloc()
24-
#include "zend_portability.h" // for BEGIN_EXTERN_C
25-
2623
typedef struct _zend_ptr_stack {
2724
int top, max;
2825
void **elements;

Zend/zend_signal.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@
2828
#ifndef _GNU_SOURCE
2929
# define _GNU_SOURCE
3030
#endif
31+
#include <string.h>
3132

32-
#include "zend_signal.h"
33-
#include "zend_alloc.h"
34-
#include "zend.h" // for zend_output_debug_string(), zend_error(), ...
35-
36-
#include <errno.h>
33+
#include "zend.h"
34+
#include "zend_globals.h"
3735
#include <signal.h>
38-
#include <string.h>
3936

4037
#ifdef HAVE_UNISTD_H
4138
#include <unistd.h>

Zend/zend_signal.h

-9
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,9 @@
2121
#ifndef ZEND_SIGNAL_H
2222
#define ZEND_SIGNAL_H
2323

24-
#ifdef PHP_WIN32
25-
#include "config.w32.h"
26-
#else
27-
#include "php_config.h" // for ZEND_SIGNALS
28-
#endif
29-
3024
#ifdef ZEND_SIGNALS
3125

32-
#include "zend_portability.h" // for BEGIN_EXTERN_C
33-
3426
#include <signal.h>
35-
#include <stdbool.h>
3627

3728
#ifndef NSIG
3829
#define NSIG 65

Zend/zend_smart_str.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
#include <zend.h>
1718
#include "zend_smart_str.h"
1819
#include "zend_smart_string.h"
19-
#include "zend_globals_macros.h" // for EG()
20-
#include "zend_globals.h" // struct _zend_executor_globals
21-
#include "zend_strtod.h" // for zend_gcvt()
2220

2321
#define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE + 1)
2422
#define SMART_STR_START_SIZE 256

Zend/zend_smart_str.h

+2-7
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,10 @@
1717
#ifndef ZEND_SMART_STR_H
1818
#define ZEND_SMART_STR_H
1919

20+
#include <zend.h>
21+
#include "zend_globals.h"
2022
#include "zend_smart_str_public.h"
2123

22-
#include "zend_operators.h" // for zend_print_long_to_buf()
23-
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_string.h"
25-
26-
// forward declarations
27-
typedef struct _zval_struct zval;
28-
2924
BEGIN_EXTERN_C()
3025

3126
ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len);

0 commit comments

Comments
 (0)