diff options
| author | Dmitry Stogov <dmitry@php.net> | 2010-04-20 11:16:39 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2010-04-20 11:16:39 +0000 |
| commit | 453b49ed20a0d68173cfbe740eb8a3068f62121a (patch) | |
| tree | 64ce9137e1ca9d1aeddc1c4ad26a9da43e9617fa /Zend/zend_ptr_stack.h | |
| parent | 0bba0bfdc821a18599a5bc4a824ed8b025803c47 (diff) | |
| download | php-git-453b49ed20a0d68173cfbe740eb8a3068f62121a.tar.gz | |
Added a number of small performance tweaks and optimizations
. ZEND_RECV now always has IS_CV as its result
. ZEND_CATCH now has to be used only with constant class names
. ZEND_FETCH_DIM_? may fetch array and dimension operans in a different order
Diffstat (limited to 'Zend/zend_ptr_stack.h')
| -rw-r--r-- | Zend/zend_ptr_stack.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index 901d99f312..affe7d037b 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -54,7 +54,7 @@ END_EXTERN_C() /* Not doing this with a macro because of the loop unrolling in the element assignment. Just using a macro for 3 in the body for readability sake. */ -static inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c) +static zend_always_inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c) { #define ZEND_PTR_STACK_NUM_ARGS 3 @@ -68,7 +68,7 @@ static inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b #undef ZEND_PTR_STACK_NUM_ARGS } -static inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b) +static zend_always_inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b) { #define ZEND_PTR_STACK_NUM_ARGS 2 @@ -81,7 +81,7 @@ static inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b #undef ZEND_PTR_STACK_NUM_ARGS } -static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c) +static zend_always_inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c) { *a = *(--stack->top_element); *b = *(--stack->top_element); @@ -89,14 +89,14 @@ static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void ** stack->top -= 3; } -static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b) +static zend_always_inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b) { *a = *(--stack->top_element); *b = *(--stack->top_element); stack->top -= 2; } -static inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr) +static zend_always_inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr) { ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, 1) @@ -104,7 +104,7 @@ static inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr) *(stack->top_element++) = ptr; } -static inline void *zend_ptr_stack_pop(zend_ptr_stack *stack) +static zend_always_inline void *zend_ptr_stack_pop(zend_ptr_stack *stack) { stack->top--; return *(--stack->top_element); |
