summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-05-13 01:40:15 +0300
committerDmitry Stogov <dmitry@zend.com>2016-05-13 01:40:15 +0300
commitccf18da450881bee09e966c0a7fa4d67840d9e38 (patch)
tree8fec76394fc2c631c0b5cddf28d48816dbd18d97 /Zend/zend_execute_API.c
parentb5bdb40cb576fa5b4d769580376ae34881c93574 (diff)
downloadphp-git-ccf18da450881bee09e966c0a7fa4d67840d9e38.tar.gz
Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization. Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index b98e83be52..9817a5f88e 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -834,12 +834,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
if (func->type == ZEND_USER_FUNCTION) {
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
- if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
- zend_init_execute_data(call, &func->op_array, fci->retval);
- zend_execute_ex(call);
- } else {
- zend_generator_create_zval(call, &func->op_array, fci->retval);
- }
+ zend_init_execute_data(call, &func->op_array, fci->retval);
+ zend_execute_ex(call);
if (call_via_handler) {
/* We must re-initialize function again */
fci_cache->initialized = 0;