com php-src: Micro optimization: Zend/zend_execute.c Zend /zend_vm_def.h Zend/zend_vm_execute.h
| From: | Dmitry Stogov | Date: | Tue, 07 Oct 2014 19:48:55 +0000 |
| Subject: | com php-src: Micro optimization: Zend/zend_execute.c Zend /zend_vm_def.h Zend/zend_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82176@lists.php.net to get a copy of this message | ||
Commit: fe501914f0794b255057f4735461bb21366bc1f2
Author: Dmitry Stogov <dmitry@zend.com> Tue, 7 Oct 2014 23:48:55 +0400
Parents: 2ea97c6f5a30965a24abaecbc07b7934c2dd02c6
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fe501914f0794b255057f4735461bb21366bc1f2
Log:
Micro optimization
Changed paths:
M Zend/zend_execute.c
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 0c455b8..7348dda 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1427,11 +1427,11 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data
*execu
{
uint32_t first_extra_arg, num_args;
ZEND_ASSERT(EX(func) == (zend_function*)op_array);
+ ZEND_ASSERT(EX(scope) == EG(scope));
EX(opline) = op_array->opcodes;
EX(call) = NULL;
EX(return_value) = return_value;
- EX(scope) = EG(scope);
EX(delayed_exception) = NULL;
EX(silence_op_num) = -1;
@@ -1637,6 +1637,7 @@ ZEND_API zend_execute_data
*zend_create_generator_execute_data(zend_execute_data
}
EX(symbol_table) = NULL;
+ EX(scope) = EG(scope);
i_init_func_execute_data(execute_data, op_array, return_value TSRMLS_CC);
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 9103648..6aeac0e 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2698,7 +2698,7 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
ZEND_VM_C_GOTO(fcall_end);
}
} else if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
- EG(scope) = fbc->common.scope;
+ call->scope = EG(scope) = fbc->common.scope;
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
if (RETURN_VALUE_USED(opline)) {
zend_generator_create_zval(call, &fbc->op_array, EX_VAR(opline->result.var)
TSRMLS_CC);
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index fba611a...e68cf19 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute..h
@@ -580,7 +580,7 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
goto fcall_end;
}
} else if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
- EG(scope) = fbc->common.scope;
+ call->scope = EG(scope) = fbc->common.scope;
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
if (RETURN_VALUE_USED(opline)) {
zend_generator_create_zval(call, &fbc->op_array, EX_VAR(opline->result.var)
TSRMLS_CC);