summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-05-15 11:07:51 +0300
committerDmitry Stogov <dmitry@zend.com>2019-05-15 11:07:51 +0300
commit139da4b2718076dee245cb17fc0a00bdcb0f177f (patch)
tree6655244d85b48e0ca33861e4401d795934ded044
parenta522fae382ba1774b69790270898344ce753327b (diff)
parentf9e801584701779e9035e1a21b815e30f6e59129 (diff)
downloadphp-git-139da4b2718076dee245cb17fc0a00bdcb0f177f.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Removed ability to compile PHP without EX(run_time_cache). ZEND_EX_USE_RUN_TIME_CACHE was always defined.
-rw-r--r--Zend/zend_compile.h23
-rw-r--r--Zend/zend_execute.c4
-rw-r--r--Zend/zend_execute.h12
3 files changed, 8 insertions, 31 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 00b2ce2fae..74a8b26368 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -55,11 +55,9 @@ typedef struct _zend_op zend_op;
#if SIZEOF_SIZE_T == 4
# define ZEND_USE_ABS_JMP_ADDR 1
# define ZEND_USE_ABS_CONST_ADDR 1
-# define ZEND_EX_USE_RUN_TIME_CACHE 1
#else
# define ZEND_USE_ABS_JMP_ADDR 0
# define ZEND_USE_ABS_CONST_ADDR 0
-# define ZEND_EX_USE_RUN_TIME_CACHE 1
#endif
typedef union _znode_op {
@@ -487,9 +485,7 @@ struct _zend_execute_data {
zval This; /* this + call_info + num_args */
zend_execute_data *prev_execute_data;
zend_array *symbol_table;
-#if ZEND_EX_USE_RUN_TIME_CACHE
void **run_time_cache; /* cache op_array->run_time_cache */
-#endif
};
#define ZEND_CALL_HAS_THIS IS_OBJECT_EX
@@ -681,25 +677,6 @@ struct _zend_execute_data {
#define ZEND_OP_ARRAY_EXTENSION(op_array, handle) \
((void**)RUN_TIME_CACHE(op_array))[handle]
-#if ZEND_EX_USE_RUN_TIME_CACHE
-
-# define EX_RUN_TIME_CACHE() \
- EX(run_time_cache)
-
-# define EX_LOAD_RUN_TIME_CACHE(op_array) do { \
- EX(run_time_cache) = RUN_TIME_CACHE(op_array); \
- } while (0)
-
-#else
-
-# define EX_RUN_TIME_CACHE() \
- RUN_TIME_CACHE(&EX(func)->op_array)
-
-# define EX_LOAD_RUN_TIME_CACHE(op_array) do { \
- } while (0)
-
-#endif
-
#define IS_UNUSED 0 /* Unused operand */
#define IS_CONST (1<<0)
#define IS_TMP_VAR (1<<1)
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 67ef2d4bc0..10dd64a15d 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -3368,7 +3368,7 @@ static zend_always_inline void i_init_func_execute_data(zend_op_array *op_array,
/* Initialize CV variables (skip arguments) */
zend_init_cvs(num_args, op_array->last_var EXECUTE_DATA_CC);
- EX_LOAD_RUN_TIME_CACHE(op_array);
+ EX(run_time_cache) = RUN_TIME_CACHE(op_array);
EG(current_execute_data) = execute_data;
#if defined(ZEND_VM_IP_GLOBAL_REG) && ((ZEND_VM_KIND == ZEND_VM_KIND_CALL) || (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID))
@@ -3444,7 +3444,7 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
ZEND_MAP_PTR_SET(op_array->run_time_cache, ptr);
memset(ptr, 0, op_array->cache_size);
}
- EX_LOAD_RUN_TIME_CACHE(op_array);
+ EX(run_time_cache) = RUN_TIME_CACHE(op_array);
EG(current_execute_data) = execute_data;
}
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 4abdaca9fd..aa14a313aa 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -363,22 +363,22 @@ ZEND_API void zend_free_compiled_variables(zend_execute_data *execute_data);
ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num);
#define CACHE_ADDR(num) \
- ((void**)((char*)EX_RUN_TIME_CACHE() + (num)))
+ ((void**)((char*)EX(run_time_cache) + (num)))
#define CACHED_PTR(num) \
- ((void**)((char*)EX_RUN_TIME_CACHE() + (num)))[0]
+ ((void**)((char*)EX(run_time_cache) + (num)))[0]
#define CACHE_PTR(num, ptr) do { \
- ((void**)((char*)EX_RUN_TIME_CACHE() + (num)))[0] = (ptr); \
+ ((void**)((char*)EX(run_time_cache) + (num)))[0] = (ptr); \
} while (0)
#define CACHED_POLYMORPHIC_PTR(num, ce) \
- (EXPECTED(((void**)((char*)EX_RUN_TIME_CACHE() + (num)))[0] == (void*)(ce)) ? \
- ((void**)((char*)EX_RUN_TIME_CACHE() + (num)))[1] : \
+ (EXPECTED(((void**)((char*)EX(run_time_cache) + (num)))[0] == (void*)(ce)) ? \
+ ((void**)((char*)EX(run_time_cache) + (num)))[1] : \
NULL)
#define CACHE_POLYMORPHIC_PTR(num, ce, ptr) do { \
- void **slot = (void**)((char*)EX_RUN_TIME_CACHE() + (num)); \
+ void **slot = (void**)((char*)EX(run_time_cache) + (num)); \
slot[0] = (ce); \
slot[1] = (ptr); \
} while (0)