mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
move zend_vm_stack_new_page into header for sharing with fibers
This commit is contained in:
parent
d43bc343ab
commit
cb3964aae4
2 changed files with 9 additions and 9 deletions
|
@ -180,15 +180,6 @@ ZEND_API const zend_internal_function zend_pass_function = {
|
|||
(((size) + ZEND_VM_STACK_HEADER_SLOTS * sizeof(zval) \
|
||||
+ ((page_size) - 1)) & ~((page_size) - 1))
|
||||
|
||||
static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend_vm_stack prev) {
|
||||
zend_vm_stack page = (zend_vm_stack)emalloc(size);
|
||||
|
||||
page->top = ZEND_VM_STACK_ELEMENTS(page);
|
||||
page->end = (zval*)((char*)page + size);
|
||||
page->prev = prev;
|
||||
return page;
|
||||
}
|
||||
|
||||
ZEND_API void zend_vm_stack_init(void)
|
||||
{
|
||||
EG(vm_stack_page_size) = ZEND_VM_STACK_PAGE_SIZE;
|
||||
|
|
|
@ -193,6 +193,15 @@ ZEND_API void zend_vm_stack_init_ex(size_t page_size);
|
|||
ZEND_API void zend_vm_stack_destroy(void);
|
||||
ZEND_API void* zend_vm_stack_extend(size_t size);
|
||||
|
||||
static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend_vm_stack prev) {
|
||||
zend_vm_stack page = (zend_vm_stack)emalloc(size);
|
||||
|
||||
page->top = ZEND_VM_STACK_ELEMENTS(page);
|
||||
page->end = (zval*)((char*)page + size);
|
||||
page->prev = prev;
|
||||
return page;
|
||||
}
|
||||
|
||||
static zend_always_inline void zend_vm_init_call_frame(zend_execute_data *call, uint32_t call_info, zend_function *func, uint32_t num_args, void *object_or_called_scope)
|
||||
{
|
||||
call->func = func;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue