From 71af54e5f6656af070e4dccd1470bb1376c89568 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 19 Aug 2015 14:40:56 +0300 Subject: Mark error and exception functions as "cold" (Matt's idea) --- Zend/zend_closures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zend/zend_closures.c') diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 6f16935cc7..637e2dd5fc 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -205,7 +205,7 @@ ZEND_METHOD(Closure, bind) } /* }}} */ -static zend_function *zend_closure_get_constructor(zend_object *object) /* {{{ */ +static ZEND_COLD zend_function *zend_closure_get_constructor(zend_object *object) /* {{{ */ { zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed"); return NULL; @@ -448,7 +448,7 @@ static HashTable *zend_closure_get_gc(zval *obj, zval **table, int *n) /* {{{ */ /* {{{ proto Closure::__construct() Private constructor preventing instantiation */ -ZEND_METHOD(Closure, __construct) +ZEND_COLD ZEND_METHOD(Closure, __construct) { zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed"); } -- cgit v1.2.1