diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-02-05 19:40:06 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-02-05 19:40:06 +0300 |
commit | 3a794d39f081f73b2204aed8b80163a197ab41c3 (patch) | |
tree | 90af4978f502d85b1a1ac1e1e72ebeaf9e65d6bc /Zend/zend_compile.h | |
parent | 7416562ab0c1062722c43c6b55d38e1a79f217cb (diff) | |
download | php-git-3a794d39f081f73b2204aed8b80163a197ab41c3.tar.gz |
Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and following SEND_VAR_EX. Perform the check once in a new CHECK_FUNC_ARG opcode and reuse in the following FETCH_*FUNC_ARG and SEND_FUNC_ARG (SEND_VAR_EX replacement).
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r-- | Zend/zend_compile.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index e26d6c7cc4..65a03e6b0e 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -481,6 +481,7 @@ struct _zend_execute_data { #define ZEND_CALL_GENERATOR (1 << 8) #define ZEND_CALL_DYNAMIC (1 << 9) #define ZEND_CALL_FAKE_CLOSURE (1 << 10) +#define ZEND_CALL_SEND_ARG_BY_REF (1 << 11) #define ZEND_CALL_INFO_SHIFT 16 @@ -501,10 +502,18 @@ struct _zend_execute_data { call_info |= ((flag) << ZEND_CALL_INFO_SHIFT); \ } while (0) +#define ZEND_DEL_CALL_FLAG_EX(call_info, flag) do { \ + call_info &= ~((flag) << ZEND_CALL_INFO_SHIFT); \ + } while (0) + #define ZEND_ADD_CALL_FLAG(call, flag) do { \ ZEND_ADD_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \ } while (0) +#define ZEND_DEL_CALL_FLAG(call, flag) do { \ + ZEND_DEL_CALL_FLAG_EX(Z_TYPE_INFO((call)->This), flag); \ + } while (0) + #define ZEND_CALL_NUM_ARGS(call) \ (call)->This.u2.num_args @@ -840,11 +849,6 @@ void zend_assert_valid_class_name(const zend_string *const_name); #define BP_VAR_FUNC_ARG 4 #define BP_VAR_UNSET 5 -/* Bottom 3 bits are the type, top bits are arg num for BP_VAR_FUNC_ARG */ -#define BP_VAR_SHIFT 3 -#define BP_VAR_MASK 7 - - #define ZEND_INTERNAL_FUNCTION 1 #define ZEND_USER_FUNCTION 2 #define ZEND_OVERLOADED_FUNCTION 3 @@ -875,8 +879,6 @@ void zend_assert_valid_class_name(const zend_string *const_name); #define ZEND_ISSET 0x00000001 -#define ZEND_FETCH_ARG_MASK 0x0fffffff - #define ZEND_LAST_CATCH 0x00000001 #define ZEND_FREE_ON_RETURN (1<<0) |