Save one zval copy

This commit is contained in:
Xinchen Hui 2014-05-26 11:49:43 +08:00
parent 922285ec55
commit 02fde346f8
2 changed files with 10 additions and 16 deletions

View File

@ -1918,16 +1918,13 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
}
}
if (UNEXPECTED(EX(call)->num_additional_args != 0)) {
if (EXPECTED(EX(call)->num_additional_args == 0)) {
num_args = opline->extended_value;
EX(function_state).arguments = zend_vm_stack_top(TSRMLS_C);
ZVAL_LONG(zend_vm_stack_top_inc(TSRMLS_C), num_args);
} else {
num_args = opline->extended_value + EX(call)->num_additional_args;
EX(function_state).arguments = zend_vm_stack_push_args(num_args TSRMLS_CC);
} else {
zval tmp;
num_args = opline->extended_value;
ZVAL_LONG(&tmp, num_args);
EX(function_state).arguments = zend_vm_stack_top(TSRMLS_C);
zend_vm_stack_push(&tmp TSRMLS_CC);
}
LOAD_OPLINE();

View File

@ -528,16 +528,13 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
}
}
if (UNEXPECTED(EX(call)->num_additional_args != 0)) {
if (EXPECTED(EX(call)->num_additional_args == 0)) {
num_args = opline->extended_value;
EX(function_state).arguments = zend_vm_stack_top(TSRMLS_C);
ZVAL_LONG(zend_vm_stack_top_inc(TSRMLS_C), num_args);
} else {
num_args = opline->extended_value + EX(call)->num_additional_args;
EX(function_state).arguments = zend_vm_stack_push_args(num_args TSRMLS_CC);
} else {
zval tmp;
num_args = opline->extended_value;
ZVAL_LONG(&tmp, num_args);
EX(function_state).arguments = zend_vm_stack_top(TSRMLS_C);
zend_vm_stack_push(&tmp TSRMLS_CC);
}
LOAD_OPLINE();