/PHP-8.1/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() 36 if (stack->top >= stack->max) { in zend_stack_push() 38 stack->elements = safe_erealloc(stack->elements, stack->size, stack->max, 0); in zend_stack_push() 40 memcpy(ZEND_STACK_ELEMENT(stack, stack->top), element, stack->size); in zend_stack_push() 48 return ZEND_STACK_ELEMENT(stack, stack->top - 1); in zend_stack_top() 57 --stack->top; in zend_stack_del_top() 95 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 | 26 stack->top_element = stack->elements = NULL; in zend_ptr_stack_init_ex() 27 stack->top = stack->max = 0; in zend_ptr_stack_init_ex() 47 stack->top++; in zend_ptr_stack_n_push() 64 stack->top--; in zend_ptr_stack_n_pop() 75 pefree(stack->elements, stack->persistent); in zend_ptr_stack_destroy() 82 int i = stack->top; in zend_ptr_stack_apply() 103 int i = stack->top; in zend_ptr_stack_clean() 106 pefree(stack->elements[i], stack->persistent); in zend_ptr_stack_clean() 109 stack->top = 0; in zend_ptr_stack_clean() 110 stack->top_element = stack->elements; in zend_ptr_stack_clean() [all …]
|
H A D | zend_stack.h | 32 ZEND_API void 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 void zend_stack_del_top(zend_stack *stack); 36 ZEND_API int zend_stack_int_top(const zend_stack *stack); 37 ZEND_API bool zend_stack_is_empty(const zend_stack *stack); 38 ZEND_API void 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_fibers.c | 232 stack->size = stack_size; in zend_fiber_stack_allocate() 236 stack->valgrind_stack_id = VALGRIND_STACK_REGISTER(base, base + stack->size); in zend_fiber_stack_allocate() 240 stack->asan_pointer = stack->pointer; in zend_fiber_stack_allocate() 241 stack->asan_size = stack->size; in zend_fiber_stack_allocate() 244 return stack; in zend_fiber_stack_allocate() 263 efree(stack); in zend_fiber_stack_free() 345 void *stack = (void *) ((uintptr_t) context->stack->pointer + context->stack->size); in zend_fiber_init_context() local 347 context->handle = make_fcontext(stack, context->stack->size, zend_fiber_trampoline); in zend_fiber_init_context() 408 to->stack->asan_pointer, in zend_fiber_switch_context() 409 to->stack->asan_size); in zend_fiber_switch_context() [all …]
|
H A D | zend_gc.c | 289 return stack->next; in gc_stack_next() 295 (*stack) = gc_stack_next(*stack); in gc_stack_push() 307 (*stack) = (*stack)->prev; in gc_stack_pop() 321 stack = p->next; in gc_stack_free() 323 p = stack; in gc_stack_free() 697 GC_STACK_DCL(stack); in gc_scan_black() 819 GC_STACK_DCL(stack); in gc_mark_grey() 996 GC_STACK_DCL(stack); in gc_scan() 1453 gc_stack stack; in zend_gc_collect_cycles() local 1455 stack.prev = NULL; in zend_gc_collect_cycles() [all …]
|
/PHP-8.1/Zend/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-8.1/ext/pcre/pcre2lib/sljit/ |
H A D | sljitUtils.c | 193 stack->end = stack->min_start + max_size; in sljit_allocate_stack() 194 stack->start = stack->end - start_size; in sljit_allocate_stack() 195 stack->top = stack->end; in sljit_allocate_stack() 196 return stack; in sljit_allocate_stack() 230 munmap((void*)stack->min_start, stack->end - stack->min_start); in sljit_free_stack() 263 stack->end = stack->min_start + max_size; in sljit_allocate_stack() 264 stack->start = stack->end; in sljit_allocate_stack() 285 stack->end = stack->min_start + max_size; in sljit_allocate_stack() 286 stack->start = stack->end - start_size; in sljit_allocate_stack() 289 stack->top = stack->end; in sljit_allocate_stack() [all …]
|
/PHP-8.1/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-8.1/ext/com_dotnet/tests/ |
H A D | bug73679.phpt | 12 $stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000); 13 $stack->Push(".Net"); 14 $stack->Push("Hello "); 15 echo $stack->Pop() . $stack->Pop();
|
/PHP-8.1/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-8.1/ext/standard/tests/array/ |
H A D | array_shift_variation7.phpt | 11 $stack = array ('one' => 'un', 'two' => 'deux'); 14 var_dump($result = array_shift($stack)); 17 echo key($stack) . " => " . current ($stack) . "\n";
|
H A D | array_push_variation5.phpt | 11 $stack = array ('one' => 'un', 'two' => 'deux'); 15 var_dump($result = array_push($stack, $var0)); 18 echo key($stack) . " => " . current ($stack) . "\n";
|
H A D | array_shift_variation5.phpt | 7 * as the $stack argument of another call to array_shift() 13 $stack = array ( array ( array ('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei'); 17 var_dump(array_shift(array_shift(array_shift($stack)))); 19 $stack = array (array( array('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei'); 22 $result1 = array_shift($stack);
|
H A D | array_push_variation3.phpt | 8 * 2. as sub-array as $stack arg 19 echo "\n-- Pass sub-array as \$stack argument --\n"; 46 -- Pass sub-array as $stack argument --
|
/PHP-8.1/sapi/phpdbg/ |
H A D | phpdbg_cmd.c | 374 if (stack && stack->next) { in phpdbg_stack_free() 428 stack->next = NULL; in phpdbg_stack_free() 444 stack->top = next; in phpdbg_stack_push() 446 stack->next = next; in phpdbg_stack_push() 449 next->top = stack->top; in phpdbg_stack_push() 450 stack->top = next; in phpdbg_stack_push() 453 stack->len++; in phpdbg_stack_push() 462 param->next = stack; in phpdbg_stack_separate() 463 stack->top = param->top; in phpdbg_stack_separate() 469 const phpdbg_param_t *top = (stack != NULL) ? *stack : NULL; in phpdbg_stack_verify() [all …]
|
/PHP-8.1/Zend/asm/ |
H A D | jump_i386_ms_pe_masm.asm | 28 ; prepare stack 45 ; load current deallocation stack 48 ; load current stack limit 51 ; load current stack base 86 ; restore current deallocation stack 89 ; restore current stack limit 92 ; restore current stack base 106 ; prepare stack
|
H A D | jump_ppc32_sysv_elf_gas.S | 66 stwu %r1, -240(%r1) # allocate stack space, R1 % 16 == 0 184 # adjust stack 201 .section .note.GNU-stack,"",%progbits
|
H A D | make_ppc64_sysv_elf_gas.S | 102 # first arg of make_fcontext() == top address of context-stack 106 # reserve space for context-data on context-stack 156 # save return address on stack, set up stack frame 158 # allocate stack space, R1 % 16 == 0 177 .section .note.GNU-stack,"",%progbits
|
H A D | make_ppc32_sysv_xcoff_gas.S | 75 # reserve space for context-data on context-stack 116 # save return address on stack, set up stack frame 118 # allocate stack space, R1 % 16 == 0
|
H A D | make_ppc64_sysv_xcoff_gas.S | 87 # reserve space for context-data on context-stack 128 # save return address on stack, set up stack frame 130 # allocate stack space, R1 % 16 == 0
|
H A D | make_i386_ms_pe_masm.asm | 30 ; first arg of make_fcontext() == top of context-stack 40 ; reserve space for context-data on context-stack 50 ; first arg of make_fcontext() == top of context-stack 52 ; save top address of context stack as 'base' 54 ; second arg of make_fcontext() == size of context-stack 56 ; negate stack size for LEA instruction (== substraction) 58 ; compute bottom address of context stack (limit) 60 ; save bottom address of context-stack as 'limit' 62 ; save bottom address of context-stack as 'dealloction stack'
|
/PHP-8.1/Zend/tests/ |
H A D | bug36214.phpt | 6 public $stack = array(); 9 $this->stack[$name] = $var;return; 13 return $this->stack[$name];
|