/PHP-7.3/Zend/ |
H A D | zend_stack.c | 23 #define ZEND_STACK_ELEMENT(stack, n) ((void *)((char *) (stack)->elements + (stack)->size * (n))) argument 27 stack->size = size; in zend_stack_init() 28 stack->top = 0; in zend_stack_init() 29 stack->max = 0; in zend_stack_init() 37 if (stack->top >= stack->max) { in zend_stack_push() 39 stack->elements = safe_erealloc(stack->elements, stack->size, stack->max, 0); in zend_stack_push() 41 memcpy(ZEND_STACK_ELEMENT(stack, stack->top), element, stack->size); in zend_stack_push() 49 return ZEND_STACK_ELEMENT(stack, stack->top - 1); in zend_stack_top() 58 --stack->top; in zend_stack_del_top() 99 return stack->top; in zend_stack_count() [all …]
|
H A D | zend_ptr_stack.h | 46 if (stack->top+count > stack->max) { \ in END_EXTERN_C() 50 } while (stack->top+count > stack->max); \ in END_EXTERN_C() 51 …stack->elements = (void **) perealloc(stack->elements, (sizeof(void *) * (stack->max)), stack->per… in END_EXTERN_C() 52 stack->top_element = stack->elements+stack->top; \ in END_EXTERN_C() 64 *(stack->top_element++) = a; 65 *(stack->top_element++) = b; 89 stack->top -= 3; in zend_ptr_stack_3_pop() 96 stack->top -= 2; in zend_ptr_stack_2_pop() 103 stack->top++; in zend_ptr_stack_push() 109 stack->top--; in zend_ptr_stack_pop() [all …]
|
H A D | zend_ptr_stack.c | 28 stack->top_element = stack->elements = NULL; in zend_ptr_stack_init_ex() 29 stack->top = stack->max = 0; in zend_ptr_stack_init_ex() 49 stack->top++; in zend_ptr_stack_n_push() 66 stack->top--; in zend_ptr_stack_n_pop() 77 pefree(stack->elements, stack->persistent); in zend_ptr_stack_destroy() 84 int i = stack->top; in zend_ptr_stack_apply() 105 int i = stack->top; in zend_ptr_stack_clean() 108 pefree(stack->elements[i], stack->persistent); in zend_ptr_stack_clean() 111 stack->top = 0; in zend_ptr_stack_clean() 112 stack->top_element = stack->elements; in zend_ptr_stack_clean() [all …]
|
H A D | zend_stack.h | 32 ZEND_API int zend_stack_init(zend_stack *stack, int size); 33 ZEND_API int zend_stack_push(zend_stack *stack, const void *element); 34 ZEND_API void *zend_stack_top(const zend_stack *stack); 35 ZEND_API int zend_stack_del_top(zend_stack *stack); 36 ZEND_API int zend_stack_int_top(const zend_stack *stack); 37 ZEND_API int zend_stack_is_empty(const zend_stack *stack); 38 ZEND_API int zend_stack_destroy(zend_stack *stack); 39 ZEND_API void *zend_stack_base(const zend_stack *stack); 40 ZEND_API int zend_stack_count(const zend_stack *stack); 41 ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element)); [all …]
|
H A D | zend_gc.c | 281 return stack->next; in gc_stack_next() 287 (*stack) = gc_stack_next(*stack); in gc_stack_push() 299 (*stack) = (*stack)->prev; in gc_stack_pop() 313 stack = p->next; in gc_stack_free() 315 p = stack; in gc_stack_free() 688 GC_STACK_DCL(stack); in gc_scan_black() 808 GC_STACK_DCL(stack); in gc_mark_grey() 990 GC_STACK_DCL(stack); in gc_scan() 1459 gc_stack stack; in zend_gc_collect_cycles() local 1461 stack.prev = NULL; in zend_gc_collect_cycles() [all …]
|
H A D | zend_execute.h | 152 #define ZEND_VM_STACK_ELEMENTS(stack) \ argument 153 (((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS) 163 …fine ZEND_ASSERT_VM_STACK(stack) ZEND_ASSERT(stack->top > (zval *) stack && stack->end > (zval *) … argument 166 # define ZEND_ASSERT_VM_STACK(stack) argument
|
/PHP-7.3/ext/opcache/Optimizer/ |
H A D | zend_worklist.h | 44 stack->buf = (int*)zend_arena_calloc(arena, sizeof(*stack->buf), len); in zend_worklist_stack_prepare() 45 stack->len = 0; in zend_worklist_stack_prepare() 46 stack->capacity = len; in zend_worklist_stack_prepare() 53 ZEND_ASSERT(stack->len < stack->capacity); in zend_worklist_stack_push() 54 stack->buf[stack->len++] = i; in zend_worklist_stack_push() 59 ZEND_ASSERT(stack->len); in zend_worklist_stack_peek() 60 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek() 65 ZEND_ASSERT(stack->len); in zend_worklist_stack_pop() 66 return stack->buf[--stack->len]; in zend_worklist_stack_pop() 71 zend_worklist_stack stack; member [all …]
|
/PHP-7.3/ext/spl/tests/ |
H A D | dllist_004.phpt | 5 $stack = new SplStack(); 8 $stack->pop(); 13 $stack->shift(); 20 $stack->push($a); 21 echo $stack->pop()."\n"; 24 $stack->push(1); 25 $stack->push(2); 26 echo $stack->top()."\n"; 34 $stack->push(NULL); 35 $stack->push(NULL); [all …]
|
H A D | bug75673.phpt | 5 $stack = new SplStack(); 6 $stack->push("one"); 7 $stack->push("two"); 9 $serialized = $stack->serialize(); 10 var_dump($stack->count()); 11 $stack->unserialize($serialized); 12 var_dump($stack->count()); 13 $stack->unserialize($serialized); 14 var_dump($stack->count());
|
H A D | SplStack_setIteratorMode.phpt | 7 $stack = new SplStack(); 9 $stack->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
|
/PHP-7.3/ext/pcre/pcre2lib/sljit/ |
H A D | sljitUtils.c | 234 if (!stack) in sljit_allocate_stack() 248 stack->end = stack->min_start + max_size; in sljit_allocate_stack() 249 stack->start = stack->end; in sljit_allocate_stack() 251 if (sljit_stack_resize(stack, stack->end - start_size) == NULL) { in sljit_allocate_stack() 272 stack->end = stack->min_start + max_size; in sljit_allocate_stack() 273 stack->start = stack->end - start_size; in sljit_allocate_stack() 275 stack->top = stack->end; in sljit_allocate_stack() 276 return stack; in sljit_allocate_stack() 287 munmap((void*)stack->min_start, stack->end - stack->min_start); in sljit_free_stack() 297 if ((new_start < stack->min_start) || (new_start >= stack->end)) in sljit_stack_resize() [all …]
|
/PHP-7.3/ext/wddx/ |
H A D | wddx.c | 173 stack->top = 0; in wddx_stack_init() 177 stack->done = 0; in wddx_stack_init() 188 stack->elements = (void **) erealloc(stack->elements, in wddx_stack_push() 191 stack->elements[stack->top] = (void *) emalloc(size); in wddx_stack_push() 192 memcpy(stack->elements[stack->top], element, size); in wddx_stack_push() 202 *element = stack->elements[stack->top - 1]; in wddx_stack_top() 800 if (stack->varname) efree(stack->varname); in php_wddx_push_element() 897 stack->top--; in php_wddx_pop_element() 934 stack->top--; in php_wddx_pop_element() 1012 stack->top--; in php_wddx_pop_element() [all …]
|
/PHP-7.3/ext/com_dotnet/tests/ |
H A D | bug73679.phpt | 11 $stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000); 12 $stack->Push(".Net"); 13 $stack->Push("Hello "); 14 echo $stack->Pop() . $stack->Pop();
|
/PHP-7.3/ext/standard/tests/array/ |
H A D | array_shift_variation7.phpt | 5 /* Prototype : mixed array_shift(array &$stack) 16 $stack = array ('one' => 'un', 'two' => 'deux'); 19 var_dump($result = array_shift($stack)); 22 echo key($stack) . " => " . current ($stack) . "\n";
|
H A D | array_push_variation5.phpt | 5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...]) 16 $stack = array ('one' => 'un', 'two' => 'deux'); 20 var_dump($result = array_push($stack, $var0)); 23 echo key($stack) . " => " . current ($stack) . "\n";
|
H A D | array_shift_variation5.phpt | 5 /* Prototype : mixed array_shift(array &$stack) 12 * as the $stack argument of another call to array_shift() 18 $stack = array ( array ( array ('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei'); 22 var_dump(array_shift(array_shift(array_shift($stack)))); 24 $stack = array (array( array('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei'); 27 $result1 = array_shift($stack);
|
H A D | array_push_variation3.phpt | 5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...]) 13 * 2. as sub-array as $stack arg 24 echo "\n-- Pass sub-array as \$stack argument --\n"; 51 -- Pass sub-array as $stack argument --
|
H A D | array_shift_error.phpt | 5 /* Prototype : mixed array_shift(array &$stack) 22 $stack = array(1, 2); 24 var_dump( array_shift($stack, $extra_arg) );
|
/PHP-7.3/tests/lang/ |
H A D | passByReference_012.phpt | 8 $stack = array ( array ( 'two' )); 9 var_dump(array_shift(array_shift($stack))); 13 $stack = $original; 14 var_dump(array_shift(array_shift($stack)));
|
/PHP-7.3/sapi/phpdbg/ |
H A D | phpdbg_cmd.c | 376 if (stack && stack->next) { in phpdbg_stack_free() 430 stack->next = NULL; in phpdbg_stack_free() 446 stack->top = next; in phpdbg_stack_push() 448 stack->next = next; in phpdbg_stack_push() 451 next->top = stack->top; in phpdbg_stack_push() 452 stack->top = next; in phpdbg_stack_push() 455 stack->len++; in phpdbg_stack_push() 464 param->next = stack; in phpdbg_stack_separate() 465 stack->top = param->top; in phpdbg_stack_separate() 471 const phpdbg_param_t *top = (stack != NULL) ? *stack : NULL; in phpdbg_stack_verify() [all …]
|
H A D | phpdbg_cmd.h | 141 PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param); 144 PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param_t **stack); 145 PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe); 146 PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack);
|
/PHP-7.3/Zend/tests/ |
H A D | bug36214.phpt | 6 public $stack = array(); 9 $this->stack[$name] = $var;return; 13 return $this->stack[$name];
|
/PHP-7.3/ext/spl/internal/ |
H A D | splstack.inc | 13 * @brief Implementation of a stack through a DoublyLinkedList. As SplStack 15 * though they don't make much sense for a stack. 19 * stack implemented using a doubly linked list (DLL). 34 * @note The iteration's direction is not modifiable for stack instances
|
/PHP-7.3/ext/pdo_mysql/tests/ |
H A D | pdo_mysql_subclass.phpt | 42 $stack = debug_backtrace(); 43 if (!isset($stack[1])) 46 printf("%s(", $stack[1]['function']); 48 foreach ($stack[1]['args'] as $k => $v)
|
/PHP-7.3/ext/mbstring/tests/ |
H A D | mbregex_stack_limit2.phpt | 2 Test oniguruma stack limit 27 Warning: mb_ereg_replace(): mbregex search failure in php_mbereg_replace_exec(): match-stack limit …
|