diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2012-11-30 13:39:23 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2012-11-30 13:39:23 +0400 |
| commit | 70f83f35d089d0cafae12ae231a38541f5c8e41c (patch) | |
| tree | 1dee0f4716d742a57558d59a9285392805b25a9b /Zend/zend_ptr_stack.c | |
| parent | 9f7e53fde8b0feac271230cbc6731e9de90f2a03 (diff) | |
| download | php-git-70f83f35d089d0cafae12ae231a38541f5c8e41c.tar.gz | |
. 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.
Diffstat (limited to 'Zend/zend_ptr_stack.c')
| -rw-r--r-- | Zend/zend_ptr_stack.c | 17 |
1 files changed, 0 insertions, 17 deletions
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 |
