A constant class name may be used as a direct operand of ZEND_FETCH_*
instruction without previous ZEND_FETCH_CLASS.
. eliminated unnecessary iterations during request startup/shutdown
+ . zend_stack initialization is delayed before the actual usage
- Added concept of interned strings. All strings constants known at compile
time are allocated in a single copy and never changed. (Dmitry)
- Added an optimization which saves memory and emalloc/efree calls for empty
ZEND_API int zend_stack_init(zend_stack *stack)
{
stack->top = 0;
- stack->elements = (void **) emalloc(sizeof(void **) * STACK_BLOCK_SIZE);
- if (!stack->elements) {
- return FAILURE;
- } else {
- stack->max = STACK_BLOCK_SIZE;
- return SUCCESS;
- }
+ stack->max = 0;
+ stack->elements = NULL;
+ return SUCCESS;
}
ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size)