From e3b2a5cf744d6d6dc8e4587cd081b9f1b662cd5a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 6 Dec 2012 13:14:31 +0400 Subject: [PATCH] Generatirs are going to be used less than regular functions --- Zend/zend_execute.c | 2 +- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 1098c9efaf6..e6034ba2030 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1598,7 +1598,7 @@ static zend_always_inline zend_execute_data *i_create_execute_data_from_op_array * restore it simply by replacing a pointer. The same segment also keeps * a copy of previous execute_data and passed parameters. */ - if (op_array->fn_flags & ZEND_ACC_GENERATOR) { + if (UNEXPECTED((op_array->fn_flags & ZEND_ACC_GENERATOR) != 0)) { /* Prepend the regular stack frame with copy on prev_execute_data * and passed arguments */ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 2b65275fa6b..edbffe12c99 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2049,7 +2049,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY) ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; } - if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) { + if (UNEXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) != 0)) { if (RETURN_VALUE_USED(opline)) { EX_T(opline->result.var).var.ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 5971cc90472..80967bdfb3c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -590,7 +590,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; } - if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) { + if (UNEXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) != 0)) { if (RETURN_VALUE_USED(opline)) { EX_T(opline->result.var).var.ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC); }