Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
+----------------------------------------------------------------------+
*/

#include "zend.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_modules.h"
#include "zend_arena.h"
#include "zend_objects.h" // for zend_objects_new()
#include "zend_extensions.h"
#include "zend_constants.h"
#include "zend_interfaces.h"
#include "zend_interfaces.h" // for zend_ce_stringable
#include "zend_exceptions.h"
#include "zend_closures.h"
#include "zend_inheritance.h"
#include "zend_ini.h"
#include "zend_enum.h"
Expand Down
12 changes: 6 additions & 6 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#ifndef ZEND_API_H
#define ZEND_API_H

#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"
#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

typedef struct _zend_module_entry zend_module_entry;

BEGIN_EXTERN_C()

Expand Down
10 changes: 5 additions & 5 deletions Zend/zend_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
*/

#include "zend_ast.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_API.h" // for array_set_zval_key
#include "zend_arena.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;

Expand Down
4 changes: 3 additions & 1 deletion Zend/zend_ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#ifndef ZEND_AST_H
#define ZEND_AST_H

#include "zend.h"
#include "zend_types.h" // for zval

#include <stdint.h>

#ifndef ZEND_AST_SPEC
# define ZEND_AST_SPEC 1
Expand Down
6 changes: 3 additions & 3 deletions Zend/zend_call_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

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

#include "zend.h"
#include "zend_globals.h"
#include "zend_portability.h"
#include "zend_call_stack.h"
#include "zend_globals.h"

#include <stdint.h>

#ifdef ZEND_WIN32
# include <processthreadsapi.h>
# include <memoryapi.h>
Expand Down
6 changes: 4 additions & 2 deletions Zend/zend_call_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
#ifndef ZEND_CALL_STACK_H
#define ZEND_CALL_STACK_H

#include "zend.h"
#include "zend_portability.h"
#include "zend_portability.h" // for zend_always_inline

#ifdef __APPLE__
# include <pthread.h>
#endif

#include <stdbool.h>

#ifdef ZEND_CHECK_STACK_LIMIT

typedef struct _zend_call_stack {
Expand Down
11 changes: 4 additions & 7 deletions Zend/zend_closures.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
+----------------------------------------------------------------------+
*/

#include "zend.h"
#include "zend_API.h"
#include "zend_closures.h"
#include "zend_exceptions.h"
#include "zend_interfaces.h"
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_globals.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_closures_arginfo.h"

typedef struct _zend_closure {
Expand Down
9 changes: 9 additions & 0 deletions Zend/zend_closures.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
#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 */
Expand Down
28 changes: 14 additions & 14 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
+----------------------------------------------------------------------+
*/

#include <zend_language_parser.h>
#include "zend.h"
#include "zend_attributes.h"
#include "zend_compile.h"
#include "zend_API.h" // for zend_get_object_type()
#include "zend_arena.h"
#include "zend_attributes.h"
#include "zend_constants.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_inheritance.h"
#include "zend_vm.h"
#include "zend_enum.h"
#include "zend_observer.h"
#include "zend_call_stack.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_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()

#define SET_NODE(target, src) do { \
target ## _type = (src)->op_type; \
Expand Down
10 changes: 4 additions & 6 deletions Zend/zend_compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H

#include "zend.h"
#include "zend.h" // for INTERNAL_FUNCTION_PARAMETERS
#include "zend_ast.h"
#include "zend_portability.h" //for ZEND_FASTCALL
#include "zend_types.h" // for zend_uchar

#include <stdarg.h>

#include "zend_llist.h"
#include <stdint.h>

#define SET_UNUSED(op) do { \
op ## _type = IS_UNUSED; \
Expand Down Expand Up @@ -758,8 +758,6 @@ 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,
Expand Down
10 changes: 5 additions & 5 deletions Zend/zend_enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
+----------------------------------------------------------------------+
*/

#include "zend.h"
#include "zend_API.h"
#include "zend_compile.h"
#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_enum_arginfo.h"
#include "zend_interfaces.h"
#include "zend_enum.h"
#include "zend_extensions.h"
#include "zend_extensions.h" // for zend_internal_run_time_cache_reserved_size()
#include "zend_objects.h" // for zend_objects_new()
#include "zend_observer.h"

#define ZEND_ENUM_DISALLOW_MAGIC_METHOD(propertyName, methodName) \
Expand Down
7 changes: 5 additions & 2 deletions Zend/zend_enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
#ifndef ZEND_ENUM_H
#define ZEND_ENUM_H

#include "zend.h"
#include "zend_types.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;

BEGIN_EXTERN_C()

Expand Down
7 changes: 2 additions & 5 deletions Zend/zend_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@
#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);
Expand Down
11 changes: 8 additions & 3 deletions Zend/zend_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,14 @@
*
* @see http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf
*/
#include "zend.h"
#include "zend_API.h"
#include "zend_fibers.h"

#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()

#ifndef GC_BENCH
# define GC_BENCH 0
Expand Down
3 changes: 3 additions & 0 deletions Zend/zend_gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#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 {
Expand Down
2 changes: 2 additions & 0 deletions Zend/zend_globals_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#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;
Expand Down
1 change: 1 addition & 0 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

#include "zend.h"
#include "zend_arena.h"
#include "zend_API.h"
#include "zend_compile.h"
#include "zend_execute.h"
Expand Down
4 changes: 3 additions & 1 deletion Zend/zend_interfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
+----------------------------------------------------------------------+
*/

#include "zend_interfaces.h"
#include "zend.h"
#include "zend_API.h"
#include "zend_interfaces.h"
#include "zend_arena.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;
Expand Down
8 changes: 6 additions & 2 deletions Zend/zend_interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
#ifndef ZEND_INTERFACES_H
#define ZEND_INTERFACES_H

#include "zend.h"
#include "zend_API.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;

BEGIN_EXTERN_C()

Expand Down
6 changes: 4 additions & 2 deletions Zend/zend_iterators.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
+----------------------------------------------------------------------+
*/

#include "zend.h"
#include "zend_API.h"
#include "zend_iterators.h"
#include "zend_objects.h"
#include "zend_object_handlers.h"
#include "zend_API.h" // for INIT_CLASS_ENTRY

static zend_class_entry zend_iterator_class_entry;

Expand Down
7 changes: 7 additions & 0 deletions Zend/zend_iterators.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
+----------------------------------------------------------------------+
*/

#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.
Expand Down Expand Up @@ -89,3 +94,5 @@ 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 */
8 changes: 8 additions & 0 deletions Zend/zend_language_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
#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;
Expand Down
3 changes: 2 additions & 1 deletion Zend/zend_language_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# define YYDEBUG(s, c)
#endif

#include "zend_language_scanner.h"
#include "zend_language_scanner_defs.h"

#include <errno.h>
Expand All @@ -35,9 +36,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"
Expand Down
Loading