Skip to content

Commit 3067f54

Browse files
committed
Merge branch 'PHP-5.5'
* PHP-5.5: Generatirs are going to be used less than regular functions
2 parents 4f4262e + e3b2a5c commit 3067f54

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Zend/zend_execute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ static zend_always_inline zend_execute_data *i_create_execute_data_from_op_array
15981598
* restore it simply by replacing a pointer. The same segment also keeps
15991599
* a copy of previous execute_data and passed parameters.
16001600
*/
1601-
if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
1601+
if (UNEXPECTED((op_array->fn_flags & ZEND_ACC_GENERATOR) != 0)) {
16021602
/* Prepend the regular stack frame with copy on prev_execute_data
16031603
* and passed arguments
16041604
*/

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
20492049
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
20502050
}
20512051

2052-
if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
2052+
if (UNEXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) != 0)) {
20532053
if (RETURN_VALUE_USED(opline)) {
20542054
EX_T(opline->result.var).var.ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
20552055
}

Zend/zend_vm_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
590590
ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
591591
}
592592

593-
if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
593+
if (UNEXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) != 0)) {
594594
if (RETURN_VALUE_USED(opline)) {
595595
EX_T(opline->result.var).var.ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
596596
}

0 commit comments

Comments
 (0)