mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.3'
* PHP-7.3: Stop using zend_function->reserved[] space.
This commit is contained in:
commit
1321aa5080
4 changed files with 5 additions and 5 deletions
|
@ -234,7 +234,8 @@ static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
|
|||
fci.size = sizeof(zend_fcall_info);
|
||||
fci.retval = return_value;
|
||||
|
||||
fcc.function_handler = (zend_function *) EX(func)->internal_function.reserved[0];
|
||||
fcc.function_handler = (EX(func)->internal_function.fn_flags & ZEND_ACC_STATIC) ?
|
||||
EX(func)->internal_function.scope->__callstatic : EX(func)->internal_function.scope->__call;
|
||||
fci.params = params;
|
||||
fci.param_count = 2;
|
||||
ZVAL_STR(&fci.params[0], EX(func)->common.function_name);
|
||||
|
@ -270,9 +271,9 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
|
|||
memset(&call, 0, sizeof(zend_internal_function));
|
||||
|
||||
call.type = ZEND_INTERNAL_FUNCTION;
|
||||
call.fn_flags = mptr->common.fn_flags & ZEND_ACC_STATIC;
|
||||
call.handler = zend_closure_call_magic;
|
||||
call.function_name = mptr->common.function_name;
|
||||
call.reserved[0] = mptr->op_array.reserved[0];
|
||||
call.scope = mptr->common.scope;
|
||||
|
||||
zend_free_trampoline(mptr);
|
||||
|
|
|
@ -1161,7 +1161,6 @@ ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend
|
|||
}
|
||||
func->opcodes = &EG(call_trampoline_op);
|
||||
func->run_time_cache = (void*)(intptr_t)-1;
|
||||
func->reserved[0] = fbc;
|
||||
func->scope = fbc->common.scope;
|
||||
/* reserve space for arguments, local and temorary variables */
|
||||
func->T = (fbc->type == ZEND_USER_FUNCTION)? MAX(fbc->op_array.last_var + fbc->op_array.T, 2) : 2;
|
||||
|
|
|
@ -7726,7 +7726,7 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
|
|||
call = execute_data;
|
||||
execute_data = EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
call->func = fbc->op_array.reserved[0];
|
||||
call->func = (fbc->op_array.fn_flags & ZEND_ACC_STATIC) ? fbc->op_array.scope->__callstatic : fbc->op_array.scope->__call;
|
||||
ZEND_ASSERT(zend_vm_calc_used_stack(2, call->func) <= (size_t)(((char*)EG(vm_stack_end)) - (char*)call));
|
||||
ZEND_CALL_NUM_ARGS(call) = 2;
|
||||
|
||||
|
|
|
@ -1942,7 +1942,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
|
|||
call = execute_data;
|
||||
execute_data = EG(current_execute_data) = EX(prev_execute_data);
|
||||
|
||||
call->func = fbc->op_array.reserved[0];
|
||||
call->func = (fbc->op_array.fn_flags & ZEND_ACC_STATIC) ? fbc->op_array.scope->__callstatic : fbc->op_array.scope->__call;
|
||||
ZEND_ASSERT(zend_vm_calc_used_stack(2, call->func) <= (size_t)(((char*)EG(vm_stack_end)) - (char*)call));
|
||||
ZEND_CALL_NUM_ARGS(call) = 2;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue