summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-04-16 12:16:03 +0300
committerDmitry Stogov <dmitry@zend.com>2015-04-16 12:16:03 +0300
commita759967dd1c09f8553bd5dedc82673fec15acb80 (patch)
treea9472d95840a65954cde301e94936763216fd50e /Zend/zend_execute_API.c
parentec8671d4291939ce8f49c731bf4d0730a2ed1c8e (diff)
downloadphp-git-a759967dd1c09f8553bd5dedc82673fec15acb80.tar.gz
Mark call frames to closures with ZEND_CALL_CLOSURE flag to avoid expensive check at zend_leave_helper()
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index b710ae99c0..ac9f4b1c5c 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -833,6 +833,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
ZEND_ASSERT(GC_TYPE(func->op_array.prototype) == IS_OBJECT);
GC_REFCOUNT(func->op_array.prototype)++;
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
}
if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
zend_init_execute_data(call, &func->op_array, fci->retval);