mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Generatirs are going to be used less than regular functions
This commit is contained in:
parent
8ca4288fd2
commit
e3b2a5cf74
@ -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
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user