diff options
author | Dmitry Stogov <dmitry@zend.com> | 2019-05-29 11:50:27 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-05-29 11:50:27 +0300 |
commit | 6d89553c481099d35a1001540bbdb32afd3281a2 (patch) | |
tree | 76705324975c78f75f78c096d4ab19295fa3ca60 | |
parent | 1aa8d0e6808830958e6f7b63c1fb623227b34037 (diff) | |
parent | e14d77335c5827f1a0445141efd58440a1e65db7 (diff) | |
download | php-git-6d89553c481099d35a1001540bbdb32afd3281a2.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Mark "cold" functions
-rw-r--r-- | Zend/zend_API.c | 6 | ||||
-rw-r--r-- | Zend/zend_API.h | 1 | ||||
-rw-r--r-- | Zend/zend_closures.c | 10 | ||||
-rw-r--r-- | Zend/zend_execute.h | 2 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 4 | ||||
-rw-r--r-- | Zend/zend_ini.h | 2 | ||||
-rw-r--r-- | Zend/zend_object_handlers.c | 2 |
7 files changed, 13 insertions, 14 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 4c5e1abe5e..3627cc6bba 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2642,7 +2642,7 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_lengt /* Disabled functions support */ -zend_op_array *display_disabled_compile_string(zval *source_string, char *filename) +static ZEND_COLD zend_op_array *display_disabled_compile_string(zval *source_string, char *filename) { zend_error(E_WARNING, "eval() has been disabled for security reasons"); return NULL; @@ -2650,7 +2650,7 @@ zend_op_array *display_disabled_compile_string(zval *source_string, char *filena /* {{{ proto void display_disabled_function(void) Dummy function which displays an error when a disabled function is called. */ -ZEND_API ZEND_FUNCTION(display_disabled_function) +ZEND_API ZEND_COLD ZEND_FUNCTION(display_disabled_function) { zend_error(E_WARNING, "%s() has been disabled for security reasons", get_active_function_name()); } @@ -2679,7 +2679,7 @@ ZEND_API int zend_disable_function(char *function_name, size_t function_name_len #ifdef ZEND_WIN32 #pragma optimize("", off) #endif -static zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{ */ +static ZEND_COLD zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{ */ { zend_object *intern; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 7fd9bd2a16..67384041be 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -538,7 +538,6 @@ ZEND_API zend_bool zend_is_iterable(zval *iterable); ZEND_API zend_bool zend_is_countable(zval *countable); ZEND_API ZEND_FUNCTION(display_disabled_function); -ZEND_API ZEND_FUNCTION(display_disabled_class); END_EXTERN_C() #if ZEND_DEBUG diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 6151ce09dc..0b0c7b82aa 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -408,28 +408,28 @@ static zend_function *zend_closure_get_method(zend_object **object, zend_string } /* }}} */ -static zval *zend_closure_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static ZEND_COLD zval *zend_closure_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); return &EG(uninitialized_zval); } /* }}} */ -static zval *zend_closure_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) /* {{{ */ +static ZEND_COLD zval *zend_closure_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); return value; } /* }}} */ -static zval *zend_closure_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) /* {{{ */ +static ZEND_COLD zval *zend_closure_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); return NULL; } /* }}} */ -static int zend_closure_has_property(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ +static ZEND_COLD int zend_closure_has_property(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ { if (has_set_exists != ZEND_PROPERTY_EXISTS) { ZEND_CLOSURE_PROPERTY_ERROR(); @@ -438,7 +438,7 @@ static int zend_closure_has_property(zend_object *object, zend_string *member, i } /* }}} */ -static void zend_closure_unset_property(zend_object *object, zend_string *member, void **cache_slot) /* {{{ */ +static ZEND_COLD void zend_closure_unset_property(zend_object *object, zend_string *member, void **cache_slot) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 1bc984a90b..e34c56def2 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -166,7 +166,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval ZEND_API int zval_update_constant(zval *pp); ZEND_API int zval_update_constant_ex(zval *pp, zend_class_entry *scope); -ZEND_API int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result); +ZEND_API ZEND_COLD int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result); /* dedicated Zend executor functions - do not use! */ struct _zend_vm_stack { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index d90304ccb2..d2c7799d7f 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -210,7 +210,7 @@ static void zend_unclean_zval_ptr_dtor(zval *zv) /* {{{ */ } /* }}} */ -static void zend_throw_or_error(int fetch_type, zend_class_entry *exception_ce, const char *format, ...) /* {{{ */ +static ZEND_COLD void zend_throw_or_error(int fetch_type, zend_class_entry *exception_ce, const char *format, ...) /* {{{ */ { va_list va; char *message = NULL; @@ -562,7 +562,7 @@ ZEND_API zend_bool zend_is_executing(void) /* {{{ */ } /* }}} */ -ZEND_API int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result) /* {{{ */ +ZEND_API ZEND_COLD int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result) /* {{{ */ { char *colon; diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 0b7f148083..596444880a 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -26,7 +26,7 @@ #define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM) #define ZEND_INI_MH(name) int name(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage) -#define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type) +#define ZEND_INI_DISP(name) ZEND_COLD void name(zend_ini_entry *ini_entry, int type) typedef struct _zend_ini_entry_def { const char *name; diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 4a4822687e..142c0408c1 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -462,7 +462,7 @@ found: } /* }}} */ -static zend_never_inline void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */ +static ZEND_COLD void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */ { zend_property_info *dummy; |