com php-src: Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport: Zend/zend_compile.c Zend/zend_com pile.h
Zend/zend_language_parser.y Zend/zend_vm _def.h Zend/zend_vm_execute.h Zend/zend_vm_ex ecute.skl
| From: | Gustavo André dos Santos Lopes | Date: | Sun, 26 Aug 2012 11:03:55 +0000 |
| Subject: | com php-src: Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport: Zend/zend_compile.c Zend/zend_com pile.h Zend/zend_language_parser.y Zend/zend_vm _def.h Zend/zend_vm_execute.h Zend/zend_vm_ex ecute.skl |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70020@lists.php.net to get a copy of this message | ||
Commit: d60e3c6ef53986e82178bb657ad907edc16d2c34
Author: Nikita Popov <nikic@php.net> Sat, 25 Aug 2012 20:07:01 +0200
Parents: bd70d155885fdc087afba912c1b290615b864e2f 35951d4be0bd27c85519995a95429bd0d0a76a00
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d60e3c6ef53986e82178bb657ad907edc16d2c34
Log:
Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Conflicts:
Zend/zend_language_parser.y
Zend/zend_vm_execute.skl
Changed paths:
MM Zend/zend_compile.c
MM Zend/zend_compile..h
MM Zend/zend_language_parser.y
MM Zend/zend_vm_def.h
MM Zend/zend_vm_execute.h
MM Zend/zend_vm_execute.skl
Diff:
diff --cc Zend/zend_vm_def.h
index 1016679,92c5fcf..ffd81b0
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@@ -3049,20 -3053,12 +3051,20 @@@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF
FREE_OP1_IF_VAR();
- if (EX(op_array)->has_finally_block) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_RETURN_BY_REF);
+ if (EXPECTED(!EX(op_array)->has_finally_block)) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
}
- ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_RETURN_BY_REF);
}
+ZEND_VM_HANDLER(161, ZEND_GENERATOR_RETURN, ANY, ANY)
+{
+ if (EX(op_array)->has_finally_block) {
+ ZEND_VM_DISPATCH_TO_HELPER_EX(zend_finally_handler_leaving, type, ZEND_RETURN);
+ }
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+}
+
ZEND_VM_HANDLER(108, ZEND_THROW, CONST|TMP|VAR|CV, ANY)
{
USE_OPLINE
diff --cc Zend/zend_vm_execute.h
index a643967,1e0b2b5..b0e05b1
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@@ -409,26 -400,6 +409,26 @@@ zend_execute_data *zend_create_execute_
EX(function_state).function = (zend_function *) op_array;
EX(function_state).arguments = NULL;
+ return execute_data;
+}
+
+ZEND_API void execute_ex(zend_execute_data *execute_data TSRMLS_DC)
+{
+ DCL_OPLINE
-
- zend_bool original_in_execution = EG(in_execution);
++ zend_bool original_in_execution;
+
+
+
+ if (EG(exception)) {
+ return;
+ }
+
++ original_in_execution = EG(in_execution);
+ EG(in_execution) = 1;
+
+ LOAD_REGS();
+ LOAD_OPLINE();
+
while (1) {
int ret;
#ifdef ZEND_WIN32
diff --cc Zend/zend_vm_execute.skl
index 25b3d71,0c5e8a3..58e5631
--- a/Zend/zend_vm_execute.skl
+++ b/Zend/zend_vm_execute.skl
@@@ -70,28 -63,6 +70,28 @@@ zend_execute_data *zend_create_execute_
EX(function_state).function = (zend_function *) op_array;
EX(function_state).arguments = NULL;
+ return execute_data;
+}
+
+ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *execute_data TSRMLS_DC)
+{
+ DCL_OPLINE
-
- zend_bool original_in_execution = EG(in_execution);
++ zend_bool original_in_execution;
+
+ {%HELPER_VARS%}
+
+ {%INTERNAL_LABELS%}
+
+ if (EG(exception)) {
+ return;
+ }
+
++ original_in_execution = EG(in_execution);
+ EG(in_execution) = 1;
+
+ LOAD_REGS();
+ LOAD_OPLINE();
+
while (1) {
{%ZEND_VM_CONTINUE_LABEL%}
#ifdef ZEND_WIN32