diff options
author | Nikita Popov <nikic@php.net> | 2012-07-20 00:49:50 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2012-07-20 16:09:06 +0200 |
commit | c9709bfbd7a71a42e0472abaf9c7d30598e264bf (patch) | |
tree | 995cb4d438093a87c887f1de4319be4d49a05136 /Zend/zend_vm_opcodes.h | |
parent | 85f077cea13b3cb4927453b8a2f8ce51a9461bbb (diff) | |
download | php-git-c9709bfbd7a71a42e0472abaf9c7d30598e264bf.tar.gz |
Remove asterix modifier (*) for generators
Generators are now automatically detected by the presence of a `yield`
expression in their body.
This removes the ZEND_SUSPEND_AND_RETURN_GENERATOR opcode. Instead
additional checks for ZEND_ACC_GENERATOR are added to the fcall_common
helper and zend_call_function.
This also adds a new function zend_generator_create_zval, which handles
the actual creation of the generator zval from an op array.
I feel like I should deglobalize the zend_create_execute_data_from_op_array
code a bit. It currently changes EG(current_execute_data) and
EG(opline_ptr) which is somewhat confusing (given the name).
Diffstat (limited to 'Zend/zend_vm_opcodes.h')
-rw-r--r-- | Zend/zend_vm_opcodes.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h index 46a711d179..87fabfc2ac 100644 --- a/Zend/zend_vm_opcodes.h +++ b/Zend/zend_vm_opcodes.h @@ -159,6 +159,5 @@ #define ZEND_SEPARATE 156 #define ZEND_QM_ASSIGN_VAR 157 #define ZEND_JMP_SET_VAR 158 -#define ZEND_SUSPEND_AND_RETURN_GENERATOR 159 -#define ZEND_YIELD 160 -#define ZEND_DELEGATE_YIELD 161 +#define ZEND_YIELD 159 +#define ZEND_DELEGATE_YIELD 160 |