mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Save one zval copy
This commit is contained in:
parent
922285ec55
commit
02fde346f8
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user