Revert GH-10279

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

This reverts commit 45a128c9de.
This reverts commit 1eb71c3f15.
This reverts commit 492523a779.
This reverts commit c7a4633891.
This reverts commit 308adb915c.
This reverts commit cd27d5e07f.
This reverts commit c5933409b4.
This reverts commit 46371f4eb3.
This reverts commit 623e2e9fc6.
This reverts commit e7434c1247.
This reverts commit d28d323ca2.
This reverts commit 1a067b84ee.
This reverts commit a55c0c5fc3.
This reverts commit b5aeb3a4d4.
This reverts commit f061a035e4.
This reverts commit b088575119.
This reverts commit b1d48774a7.
This reverts commit 94f9a20ce6.
This reverts commit 4831e48708.
This reverts commit cd985de190.
This reverts commit 9521d21681.
This reverts commit d6136151e9.
This commit is contained in:
Christoph M. Becker 2023-01-16 12:25:59 +01:00
parent bf1cfc0753
commit 2f4973fd88
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6
34 changed files with 60 additions and 140 deletions

View File

@ -22,7 +22,6 @@
#include "Optimizer/zend_ssa.h"
#include "Optimizer/zend_func_info.h"
#include "Optimizer/zend_call_graph.h"
#include "zend_arena.h"
#include "zend_bitset.h"
/* This pass implements a form of dead code elimination (DCE). The algorithm optimistically assumes

View File

@ -18,11 +18,8 @@
*/
#include "zend_API.h"
#include "zend_arena.h"
#include "zend_multiply.h" // for zend_safe_address_guarded()
#include "zend_exceptions.h"
#include "zend_ini.h"
#include "zend_optimizer.h"
#include "zend_type_info.h"
#include "Optimizer/zend_optimizer_internal.h"
#include "Optimizer/zend_call_graph.h"

View File

@ -16,9 +16,8 @@
+----------------------------------------------------------------------+
*/
#include "Optimizer/scdf.h"
#include "Optimizer/zend_optimizer_internal.h"
#include "zend_arena.h"
#include "Optimizer/scdf.h"
/* This defines a generic framework for sparse conditional dataflow propagation. The algorithm is
* based on "Sparse conditional constant propagation" by Wegman and Zadeck. We're using a

View File

@ -20,11 +20,6 @@
#define _SCDF_H
#include "zend_bitset.h"
#include "zend_long.h"
#include "zend_ssa.h"
typedef struct _zend_op_array zend_op_array;
typedef struct _zend_optimizer_ctx zend_optimizer_ctx;
typedef struct _scdf_ctx {
zend_op_array *op_array;

View File

@ -16,11 +16,15 @@
+----------------------------------------------------------------------+
*/
#include "zend_call_graph.h"
#include "zend_arena.h"
#include "zend_bitset.h"
#include "zend_func_info.h"
#include "zend_compile.h"
#include "zend_extensions.h"
#include "Optimizer/zend_optimizer.h"
#include "zend_optimizer_internal.h"
#include "zend_inference.h"
#include "zend_call_graph.h"
#include "zend_func_info.h"
#include "zend_inference.h"
#include "zend_call_graph.h"
static void zend_op_array_calc(zend_op_array *op_array, void *context)
{

View File

@ -20,9 +20,8 @@
#define ZEND_CALL_GRAPH_H
#include "zend_ssa.h"
typedef struct _zend_func_info zend_func_info;
typedef struct _zend_call_info zend_call_info;
#include "zend_func_info.h"
#include "zend_optimizer.h"
typedef struct _zend_send_arg_info {
zend_op *opline;

View File

@ -16,12 +16,13 @@
+----------------------------------------------------------------------+
*/
#include "zend_compile.h"
#include "zend_cfg.h"
#include "zend_func_info.h" // for ZEND_FUNC_FREE_LOOP_VAR
#include "zend_globals.h" // struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
#include "zend_optimizer_internal.h"
#include "zend_func_info.h"
#include "zend_worklist.h"
#include "zend_optimizer.h"
#include "zend_optimizer_internal.h"
#include "zend_sort.h"
static void zend_mark_reachable(zend_op *opcodes, zend_cfg *cfg, zend_basic_block *b) /* {{{ */
{

View File

@ -19,13 +19,6 @@
#ifndef ZEND_CFG_H
#define ZEND_CFG_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include <stdint.h>
typedef struct _zend_arena zend_arena;
typedef struct _zend_op_array zend_op_array;
/* zend_basic_block.flags */
#define ZEND_BB_START (1<<0) /* first block */
#define ZEND_BB_FOLLOW (1<<1) /* follows the next block */

View File

@ -16,15 +16,13 @@
+----------------------------------------------------------------------+
*/
#include "zend_compile.h"
#include "zend_generators.h"
#include "zend_inference.h"
#include "zend_closures.h" // for zend_ce_closure
#include "zend_generators.h" // for zend_ce_generator
#include "zend_func_info.h"
#include "zend_globals.h" // struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
#include "zend_call_graph.h"
#include "zend_closures.h"
#include "zend_worklist.h"
#include "zend_optimizer.h"
#include "zend_optimizer_internal.h"
/* The used range inference algorithm is described in:

View File

@ -19,11 +19,12 @@
#ifndef ZEND_INFERENCE_H
#define ZEND_INFERENCE_H
#include "zend_cfg.h" // for CRT_CONSTANT()
#include "zend_compile.h" // for struct _zend_op
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_optimizer.h"
#include "zend_ssa.h"
#include "zend_type_info.h" // for MAY_BE_*
#include "zend_bitset.h"
/* Bitmask for type inference (zend_ssa_var_info.type) */
#include "zend_type_info.h"
#define MAY_BE_PACKED_GUARD (1<<27) /* needs packed array guard */
#define MAY_BE_CLASS_GUARD (1<<27) /* needs class guard */

View File

@ -21,16 +21,17 @@
#include "Optimizer/zend_optimizer.h"
#include "Optimizer/zend_optimizer_internal.h"
#include "php_globals.h" // for PG()
#include "zend_API.h" // for ZVAL_EMPTY_STRING()
#include "zend_arena.h"
#include "zend_call_graph.h" // for struct _zend_func_info
#include "zend_dump.h" // for zend_dump_op_array()
#include "zend_inference.h" // for OP1_INFO(), ...
#include "zend_ini.h"
#include "zend_observer.h"
#include "zend_virtual_cwd.h" //for IS_ABSOLUTE_PATH()
#include "zend_API.h"
#include "zend_constants.h"
#include "zend_execute.h"
#include "zend_vm.h"
#include "zend_cfg.h"
#include "zend_func_info.h"
#include "zend_call_graph.h"
#include "zend_inference.h"
#include "zend_dump.h"
#include "php.h"
#include "zend_observer.h"
#ifndef ZEND_OPTIMIZER_MAX_REGISTERED_PASSES
# define ZEND_OPTIMIZER_MAX_REGISTERED_PASSES 32

View File

@ -22,11 +22,8 @@
#ifndef ZEND_OPTIMIZER_H
#define ZEND_OPTIMIZER_H
#include "zend_compile.h" // for zend_op_array
#include "zend_hash.h"
#include "zend_portability.h" // for BEGIN_EXTERN_C
typedef struct _zend_string zend_string;
#include "zend.h"
#include "zend_compile.h"
#define ZEND_OPTIMIZER_PASS_1 (1<<0) /* Simple local optimizations */
#define ZEND_OPTIMIZER_PASS_2 (1<<1) /* */

View File

@ -17,13 +17,12 @@
+----------------------------------------------------------------------+
*/
#include "zend_ssa.h"
#include "zend_arena.h"
#include "zend_optimizer_internal.h"
#include "zend_compile.h"
#include "zend_dfg.h"
#include "zend_ssa.h"
#include "zend_dump.h"
#include "zend_inference.h" // for zend_sub_will_overflow()
#include "zend_type_info.h" // for MAY_BE_REF
#include "zend_inference.h"
#include "Optimizer/zend_optimizer_internal.h"
static bool dominates(const zend_basic_block *blocks, int a, int b) {
while (blocks[b].level > blocks[a].level) {

View File

@ -19,14 +19,8 @@
#ifndef ZEND_SSA_H
#define ZEND_SSA_H
#include "zend_optimizer.h"
#include "zend_cfg.h"
#include "zend_compile.h" // for struct _zend_op
#include "zend_long.h"
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for zend_result
typedef struct _zend_class_entry zend_class_entry;
typedef struct _zend_script zend_script;
typedef struct _zend_ssa_range {
zend_long min;

View File

@ -19,10 +19,7 @@
#ifndef _ZEND_ARENA_H_
#define _ZEND_ARENA_H_
#include "zend_multiply.h" // for zend_safe_address()
#include "zend.h" // for zend_error()
#include <stddef.h> // for size_t
#include "zend.h"
#ifndef ZEND_TRACK_ARENA_ALLOC

View File

@ -19,13 +19,6 @@
#ifndef _ZEND_BITSET_H_
#define _ZEND_BITSET_H_
#include "zend_portability.h" // for zend_always_inline
#include "zend_long.h"
#include <stdint.h>
#include <string.h>
typedef zend_ulong *zend_bitset;
#define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong)

View File

@ -19,12 +19,6 @@
#ifndef ZEND_BUILD_H
#define ZEND_BUILD_H
#ifdef PHP_WIN32
#include "config.w32.h"
#else
#include "php_config.h"
#endif
#define ZEND_TOSTR_(x) #x
#define ZEND_TOSTR(x) ZEND_TOSTR_(x)

View File

@ -18,10 +18,7 @@
*/
#include "zend_extensions.h"
#include "zend_arena.h"
#include "zend_globals.h" // for struct _zend_compiler_globals
#include "zend_globals_macros.h" // for CG()
#include "zend_system_id.h" // for zend_add_system_entropy()
#include "zend_system_id.h"
ZEND_API zend_llist zend_extensions;
ZEND_API uint32_t zend_extension_flags = 0;

View File

@ -20,15 +20,8 @@
#ifndef ZEND_EXTENSIONS_H
#define ZEND_EXTENSIONS_H
#include "zend_build.h" // for ZEND_TOSTR()
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for zend_result
#include <stddef.h> // for size_t
typedef struct _zend_execute_data zend_execute_data;
typedef struct _zend_op_array zend_op_array;
typedef struct _zend_llist zend_llist;
#include "zend_compile.h"
#include "zend_build.h"
/*
The constants below are derived from ext/opcache/ZendAccelerator.h

View File

@ -16,9 +16,9 @@
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_compile.h"
#include "zend_float.h"
#include "zend_globals.h" // struct _zend_executor_globals
#include "zend_globals_macros.h" // for EG()
ZEND_API void zend_init_fpu(void) /* {{{ */
{

View File

@ -19,8 +19,6 @@
#ifndef ZEND_FLOAT_H
#define ZEND_FLOAT_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
BEGIN_EXTERN_C()
/*

View File

@ -19,12 +19,6 @@
#ifndef ZEND_LONG_H
#define ZEND_LONG_H
#ifdef PHP_WIN32
#include "config.w32.h"
#else
#include "php_config.h" // for SIZEOF_SIZE_T
#endif
#include <inttypes.h>
#include <stdint.h>

View File

@ -19,7 +19,7 @@
#ifndef ZEND_MAP_PTR_H
#define ZEND_MAP_PTR_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_portability.h"
#define ZEND_MAP_PTR_KIND_PTR 0
#define ZEND_MAP_PTR_KIND_PTR_OR_OFFSET 1
@ -69,8 +69,6 @@
# error "Unknown ZEND_MAP_PTR_KIND"
#endif
typedef struct _zend_string zend_string;
BEGIN_EXTERN_C()
ZEND_API void zend_map_ptr_reset(void);

View File

@ -17,12 +17,11 @@
+----------------------------------------------------------------------+
*/
#include "zend_portability.h"
#ifndef ZEND_MULTIPLY_H
#define ZEND_MULTIPLY_H
#include "zend_portability.h"
#include "zend.h" // for zend_error_noreturn()
#if PHP_HAVE_BUILTIN_SMULL_OVERFLOW && SIZEOF_LONG == SIZEOF_ZEND_LONG
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \

View File

@ -19,11 +19,9 @@
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_compile.h"
#include "zend_stream.h"
#include "zend_globals.h" // struct _zend_compiler_globals
#include "zend_globals_macros.h" // for CG()
#include "zend_string.h"
#include "zend.h" // for zend_stream_open_function
ZEND_DLIMPORT int isatty(int fd);

View File

@ -22,16 +22,9 @@
#ifndef ZEND_STREAM_H
#define ZEND_STREAM_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for zend_uchar
#include <stdbool.h>
#include <stdio.h> // for FILE
#include <sys/types.h> // for ssize_t
#include <sys/types.h>
#include <sys/stat.h>
typedef struct _zend_string zend_string;
/* Lightweight stream implementation for the ZE scanners.
* These functions are private to the engine.
* */

View File

@ -15,10 +15,11 @@
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "zend_system_id.h"
#include "zend_extensions.h" // for ZEND_EXTENSION_BUILD_ID
#include "zend_extensions.h"
#include "ext/standard/md5.h"
#include "ext/hash/php_hash.h" // for php_hash_bin2hex()
#include "ext/hash/php_hash.h"
ZEND_API char zend_system_id[32];

View File

@ -17,9 +17,6 @@
#ifndef ZEND_SYSTEM_ID_H
#define ZEND_SYSTEM_ID_H
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_types.h" // for ZEND_RESULT_CODE
BEGIN_EXTERN_C()
/* True global; Write-only during MINIT/startup */
extern ZEND_API char zend_system_id[32];

View File

@ -24,8 +24,6 @@
#include "zend_portability.h"
#include "zend_long.h"
#include "zend_type_info.h" // for MAY_BE_*
#include <stdbool.h>
#ifdef __SSE2__

View File

@ -19,7 +19,9 @@
+----------------------------------------------------------------------+
*/
#include "ZendAccelerator.h"
#include "zend_accelerator_hash.h"
#include "zend_hash.h"
#include "zend_shared_alloc.h"
/* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */

View File

@ -22,12 +22,7 @@
#ifndef ZEND_ACCELERATOR_HASH_H
#define ZEND_ACCELERATOR_HASH_H
#include "zend_long.h"
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include <stdint.h>
typedef struct _zend_string zend_string;
#include "zend.h"
/*
zend_accel_hash - is a hash table allocated in shared memory and

View File

@ -16,6 +16,7 @@
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "md5.h"
PHPAPI void make_digest(char *md5str, const unsigned char *digest) /* {{{ */

View File

@ -18,10 +18,6 @@
#ifndef MD5_H
#define MD5_H
#include "php.h" // for PHPAPI
#include <stdint.h>
PHPAPI void make_digest(char *md5str, const unsigned char *digest);
PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len);

View File

@ -17,7 +17,6 @@
#ifndef PHP_GLOBALS_H
#define PHP_GLOBALS_H
#include "php.h" // for PHPAPI
#include "zend_globals.h"
typedef struct _php_core_globals php_core_globals;