From 70f83f35d089d0cafae12ae231a38541f5c8e41c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 30 Nov 2012 13:39:23 +0400 Subject: . The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more. . Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster. --- Zend/zend_ptr_stack.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'Zend/zend_ptr_stack.c') diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index d178cc0184..9d82bba475 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -110,23 +110,6 @@ ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack) { return stack->top; } - -ZEND_API void zend_ptr_stack_push_from_memory(zend_ptr_stack *stack, int count, void **pointers) -{ - ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count); - - memcpy(stack->top_element, pointers, count * sizeof(void *)); - stack->top_element += count; - stack->top += count; -} - -ZEND_API void zend_ptr_stack_pop_into_memory(zend_ptr_stack *stack, int count, void **pointers) -{ - memcpy(pointers, stack->top_element - count, count * sizeof(void *)); - stack->top_element -= count; - stack->top -= count; -} - /* * Local variables: * tab-width: 4 -- cgit v1.2.1