Skip to content

Commit e14d773

Browse files
committed
Mark "cold" functions
1 parent 8ec0cf8 commit e14d773

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

Zend/zend_API.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,15 +2757,15 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_lengt
27572757

27582758
/* Disabled functions support */
27592759

2760-
zend_op_array *display_disabled_compile_string(zval *source_string, char *filename)
2760+
static ZEND_COLD zend_op_array *display_disabled_compile_string(zval *source_string, char *filename)
27612761
{
27622762
zend_error(E_WARNING, "eval() has been disabled for security reasons");
27632763
return NULL;
27642764
}
27652765

27662766
/* {{{ proto void display_disabled_function(void)
27672767
Dummy function which displays an error when a disabled function is called. */
2768-
ZEND_API ZEND_FUNCTION(display_disabled_function)
2768+
ZEND_API ZEND_COLD ZEND_FUNCTION(display_disabled_function)
27692769
{
27702770
zend_error(E_WARNING, "%s() has been disabled for security reasons", get_active_function_name());
27712771
}
@@ -2794,7 +2794,7 @@ ZEND_API int zend_disable_function(char *function_name, size_t function_name_len
27942794
#ifdef ZEND_WIN32
27952795
#pragma optimize("", off)
27962796
#endif
2797-
static zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{ */
2797+
static ZEND_COLD zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{ */
27982798
{
27992799
zend_object *intern;
28002800

Zend/zend_API.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ ZEND_API zend_bool zend_is_iterable(zval *iterable);
542542
ZEND_API zend_bool zend_is_countable(zval *countable);
543543

544544
ZEND_API ZEND_FUNCTION(display_disabled_function);
545-
ZEND_API ZEND_FUNCTION(display_disabled_class);
546545
END_EXTERN_C()
547546

548547
#if ZEND_DEBUG

Zend/zend_closures.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,28 +412,28 @@ static zend_function *zend_closure_get_method(zend_object **object, zend_string
412412
}
413413
/* }}} */
414414

415-
static zval *zend_closure_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */
415+
static ZEND_COLD zval *zend_closure_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */
416416
{
417417
ZEND_CLOSURE_PROPERTY_ERROR();
418418
return &EG(uninitialized_zval);
419419
}
420420
/* }}} */
421421

422-
static zval *zend_closure_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */
422+
static ZEND_COLD zval *zend_closure_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */
423423
{
424424
ZEND_CLOSURE_PROPERTY_ERROR();
425425
return value;
426426
}
427427
/* }}} */
428428

429-
static zval *zend_closure_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */
429+
static ZEND_COLD zval *zend_closure_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */
430430
{
431431
ZEND_CLOSURE_PROPERTY_ERROR();
432432
return NULL;
433433
}
434434
/* }}} */
435435

436-
static int zend_closure_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */
436+
static ZEND_COLD int zend_closure_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */
437437
{
438438
if (has_set_exists != ZEND_PROPERTY_EXISTS) {
439439
ZEND_CLOSURE_PROPERTY_ERROR();
@@ -442,7 +442,7 @@ static int zend_closure_has_property(zval *object, zval *member, int has_set_exi
442442
}
443443
/* }}} */
444444

445-
static void zend_closure_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */
445+
static ZEND_COLD void zend_closure_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */
446446
{
447447
ZEND_CLOSURE_PROPERTY_ERROR();
448448
}

Zend/zend_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
171171

172172
ZEND_API int zval_update_constant(zval *pp);
173173
ZEND_API int zval_update_constant_ex(zval *pp, zend_class_entry *scope);
174-
ZEND_API int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result);
174+
ZEND_API ZEND_COLD int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result);
175175

176176
/* dedicated Zend executor functions - do not use! */
177177
struct _zend_vm_stack {

Zend/zend_execute_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static void zend_unclean_zval_ptr_dtor(zval *zv) /* {{{ */
212212
}
213213
/* }}} */
214214

215-
static void zend_throw_or_error(int fetch_type, zend_class_entry *exception_ce, const char *format, ...) /* {{{ */
215+
static ZEND_COLD void zend_throw_or_error(int fetch_type, zend_class_entry *exception_ce, const char *format, ...) /* {{{ */
216216
{
217217
va_list va;
218218
char *message = NULL;
@@ -564,7 +564,7 @@ ZEND_API zend_bool zend_is_executing(void) /* {{{ */
564564
}
565565
/* }}} */
566566

567-
ZEND_API int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result) /* {{{ */
567+
ZEND_API ZEND_COLD int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr, zval *result) /* {{{ */
568568
{
569569
char *colon;
570570

Zend/zend_ini.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM)
2727

2828
#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)
29-
#define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type)
29+
#define ZEND_INI_DISP(name) ZEND_COLD void name(zend_ini_entry *ini_entry, int type)
3030

3131
typedef struct _zend_ini_entry_def {
3232
const char *name;

Zend/zend_object_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *c
466466
}
467467
/* }}} */
468468

469-
static zend_never_inline void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */
469+
static ZEND_COLD void zend_wrong_offset(zend_class_entry *ce, zend_string *member) /* {{{ */
470470
{
471471
zend_property_info *dummy;
472472

0 commit comments

Comments
 (0)