summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 7aa83ee3b6..a3a781046a 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 {
@@ -491,9 +489,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
@@ -685,25 +681,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 3f8b3d5bb2..8eb71dc49c 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 3690dfdb44..c3fee42f24 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -365,22 +365,22 @@ ZEND_API void zend_cleanup_unfinished_execution(zend_execute_data *execute_data,
ZEND_API int ZEND_FASTCALL zend_do_fcall_overloaded(zend_execute_data *call, zval *ret);
#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)