com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_v m_def.h Zend/zend_vm_execute.h
| From: | Dmitry Stogov | Date: | Mon, 28 Nov 2016 09:30:01 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_v m_def.h Zend/zend_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96091@lists.php.net to get a copy of this message | ||
Commit: 458c732ed4fae4d174da727e6dadf8e014e3c93d
Author: Dmitry Stogov <dmitry@zend.com> Mon, 28 Nov 2016 12:30:01 +0300
Parents: 53655c5af12e68a9fdfa899152e1de8e7fe57431 970f21be97980a18153f13d653f4132cce676158
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=458c732ed4fae4d174da727e6dadf8e014e3c93d
Log:
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed calling generators through magic __call()
Changed paths:
MM Zend/zend_vm_def.h
MM Zend/zend_vm_execute.h
Diff:
diff --cc Zend/zend_vm_def.h
index 6e82ddb,fdce0f9..0f1d754
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@@ -7964,18 -7927,28 +7964,15 @@@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLI
fbc = call->func;
if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
-
- ZEND_ASSERT(!(fbc->common.fn_flags & ZEND_ACC_GENERATOR));
--
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- if (ret) {
- zend_generator_create_zval(call, &fbc->op_array, ret);
- Z_VAR_FLAGS_P(ret) = 0;
- } else {
- if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_CLOSURE)) {
- OBJ_RELEASE((zend_object*)fbc->op_array.prototype);
- }
- zend_vm_stack_free_args(call);
- }
+ if (UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ i_init_func_execute_data(call, &fbc->op_array, ret);
+ if (EXPECTED(zend_execute_ex == execute_ex)) {
+ ZEND_VM_ENTER();
} else {
- call->symbol_table = NULL;
- i_init_func_execute_data(call, &fbc->op_array,
- ret, (fbc->common.fn_flags & ZEND_ACC_STATIC) == 0);
-
- if (EXPECTED(zend_execute_ex == execute_ex)) {
- ZEND_VM_ENTER();
- } else {
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
- zend_execute_ex(call);
- }
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
+ zend_execute_ex(call);
}
} else {
zval retval;
diff --cc Zend/zend_vm_execute.h
index fc1b7f5,c97525e..cb49393
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@@ -1976,18 -1736,28 +1976,15 @@@ static ZEND_OPCODE_HANDLER_RET ZEND_FAS
fbc = call->func;
if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
-
- ZEND_ASSERT(!(fbc->common.fn_flags & ZEND_ACC_GENERATOR));
--
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- if (ret) {
- zend_generator_create_zval(call, &fbc->op_array, ret);
- Z_VAR_FLAGS_P(ret) = 0;
- } else {
- if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_CLOSURE)) {
- OBJ_RELEASE((zend_object*)fbc->op_array.prototype);
- }
- zend_vm_stack_free_args(call);
- }
+ if (UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ i_init_func_execute_data(call, &fbc->op_array, ret);
+ if (EXPECTED(zend_execute_ex == execute_ex)) {
+ ZEND_VM_ENTER();
} else {
- call->symbol_table = NULL;
- i_init_func_execute_data(call, &fbc->op_array,
- ret, (fbc->common.fn_flags & ZEND_ACC_STATIC) == 0);
-
- if (EXPECTED(zend_execute_ex == execute_ex)) {
- ZEND_VM_ENTER();
- } else {
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
- zend_execute_ex(call);
- }
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
+ zend_execute_ex(call);
}
} else {
zval retval;