Home
last modified time | relevance | path

Searched refs:stack (Results 1 – 25 of 177) sorted by relevance

12345678

/php-src/Zend/
H A Dzend_stack.c23 #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 Dzend_ptr_stack.h48 if (stack->top+count > stack->max) { \ in END_EXTERN_C()
52 } while (stack->top+count > stack->max); \ in END_EXTERN_C()
53stack->elements = (void **) safe_perealloc(stack->elements, sizeof(void *), (stack->max), 0, stack in END_EXTERN_C()
54 stack->top_element = stack->elements+stack->top; \ in END_EXTERN_C()
66 *(stack->top_element++) = a;
67 *(stack->top_element++) = b;
91 stack->top -= 3; in zend_ptr_stack_3_pop()
98 stack->top -= 2; in zend_ptr_stack_2_pop()
105 stack->top++; in zend_ptr_stack_push()
111 stack->top--; in zend_ptr_stack_pop()
[all …]
H A Dzend_ptr_stack.c26 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 Dzend_call_stack.c168 stack->max_size = max_size; in zend_call_stack_get_linux_pthread()
259 stack->base = (void*)end; in zend_call_stack_get_linux_proc_maps()
260 stack->max_size = max_size; in zend_call_stack_get_linux_proc_maps()
311 stack->max_size = max_size; in zend_call_stack_get_freebsd_pthread()
358 stack->base = stack_base; in zend_call_stack_get_freebsd_sysctl()
474 stack->base = base; in zend_call_stack_get_macos()
475 stack->max_size = max_size; in zend_call_stack_get_macos()
566 stack->base = ti.stack_end; in zend_call_stack_get_haiku()
606 stack->max_size = max_size; in zend_call_stack_get_netbsd_pthread()
666 stack->max_size = max_size; in zend_call_stack_get_netbsd_vm()
[all …]
H A Dzend_stack.h39 ZEND_API void zend_stack_init(zend_stack *stack, int size);
40 ZEND_API int zend_stack_push(zend_stack *stack, const void *element);
41 ZEND_API void *zend_stack_top(const zend_stack *stack);
42 ZEND_API void zend_stack_del_top(zend_stack *stack);
43 ZEND_API int zend_stack_int_top(const zend_stack *stack);
44 ZEND_API bool zend_stack_is_empty(const zend_stack *stack);
45 ZEND_API void zend_stack_destroy(zend_stack *stack);
46 ZEND_API void *zend_stack_base(const zend_stack *stack);
47 ZEND_API int zend_stack_count(const zend_stack *stack);
48 ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
[all …]
H A Dzend_fibers.c278 stack->ss_size = (stack->ss_size + 7) & ~7; in zend_fiber_stack_allocate()
292 stack->valgrind_stack_id = VALGRIND_STACK_REGISTER(base, base + stack->size); in zend_fiber_stack_allocate()
296 stack->asan_pointer = stack->pointer; in zend_fiber_stack_allocate()
297 stack->asan_size = stack->size; in zend_fiber_stack_allocate()
300 return stack; in zend_fiber_stack_allocate()
326 munmap(stack->ss_base, stack->ss_size); in zend_fiber_stack_free()
329 efree(stack); in zend_fiber_stack_free()
352 return (void*)((uintptr_t)stack->pointer + stack->size); in zend_fiber_stack_base()
436 void *stack = (void *) ((uintptr_t) context->stack->pointer + context->stack->size); in zend_fiber_init_context() local
442 *((unsigned long*) (stack - 8)) = (unsigned long)context->stack->ss_base + context->stack->ss_size; in zend_fiber_init_context()
[all …]
/php-src/Zend/Optimizer/
H A Dzend_worklist.h44 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()
51 ZEND_ASSERT(stack->len < stack->capacity); in zend_worklist_stack_push()
52 stack->buf[stack->len++] = i; in zend_worklist_stack_push()
57 ZEND_ASSERT(stack->len); in zend_worklist_stack_peek()
58 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek()
63 ZEND_ASSERT(stack->len); in zend_worklist_stack_pop()
64 return stack->buf[--stack->len]; in zend_worklist_stack_pop()
69 zend_worklist_stack stack; member
[all …]
/php-src/ext/pcre/pcre2lib/sljit/
H A DsljitUtils.c196 stack->end = stack->min_start + max_size; in sljit_allocate_stack()
197 stack->start = stack->end - start_size; in sljit_allocate_stack()
198 stack->top = stack->end; in sljit_allocate_stack()
199 return stack; in sljit_allocate_stack()
233 munmap((void*)stack->min_start, (size_t)(stack->end - stack->min_start)); in sljit_free_stack()
266 stack->end = stack->min_start + max_size; in sljit_allocate_stack()
267 stack->start = stack->end; in sljit_allocate_stack()
288 stack->end = stack->min_start + max_size; in sljit_allocate_stack()
289 stack->start = stack->end - start_size; in sljit_allocate_stack()
292 stack->top = stack->end; in sljit_allocate_stack()
[all …]
/php-src/ext/spl/tests/
H A Ddllist_004.phpt5 $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 Dbug75673.phpt5 $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());
/php-src/ext/com_dotnet/tests/
H A Dbug73679.phpt13 $stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000);
14 $stack->Push(".Net");
15 $stack->Push("Hello ");
16 echo $stack->Pop() . $stack->Pop();
/php-src/ext/json/tests/
H A Dgh15168.phpt2 GH-15168 (stack overflow in json_encode())
6 die('skip No stack limit support');
9 die('skip ASAN needs different stack limit setting due to more stack space usage');
42 string(28) "Maximum stack depth exceeded"
/php-src/ext/standard/tests/serialize/
H A Dgh15169.phpt2 GH-15169 (stack overflow when var serialization in ext/standard/var)
6 die('skip No stack limit support');
9 die('skip ASAN needs different stack limit setting due to more stack space usage');
40 Maximum call stack size of %d bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reache…
/php-src/ext/standard/tests/array/
H A Darray_shift_variation7.phpt11 $stack = array ('one' => 'un', 'two' => 'deux');
14 var_dump($result = array_shift($stack));
17 echo key($stack) . " => " . current ($stack) . "\n";
H A Darray_push_variation5.phpt11 $stack = array ('one' => 'un', 'two' => 'deux');
15 var_dump($result = array_push($stack, $var0));
18 echo key($stack) . " => " . current ($stack) . "\n";
H A Darray_shift_variation5.phpt7 * 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);
/php-src/tests/lang/
H A DpassByReference_012.phpt8 $stack = array ( array ( 'two' ));
9 var_dump(array_shift(array_shift($stack)));
13 $stack = $original;
14 var_dump(array_shift(array_shift($stack)));
/php-src/Zend/tests/stack_limit/
H A Dstack_limit_010.phpt2 Stack limit 010 - Check stack size detection against known defaults
13 $stack = zend_test_zend_call_stack_get();
15 var_dump($stack);
35 printf("Actual max_size: %s\n", $stack['max_size']);
37 var_dump($stack['max_size'] === sprintf('0x%x', $expectedMaxSize));
/php-src/sapi/phpdbg/
H A Dphpdbg_cmd.c380 if (stack->next) { in phpdbg_stack_free()
432 stack->next = NULL; in phpdbg_stack_free()
449 stack->top = next; in phpdbg_stack_push()
451 stack->next = next; in phpdbg_stack_push()
454 next->top = stack->top; in phpdbg_stack_push()
455 stack->top = next; in phpdbg_stack_push()
458 stack->len++; in phpdbg_stack_push()
467 param->next = stack; in phpdbg_stack_separate()
468 stack->top = param->top; in phpdbg_stack_separate()
474 const phpdbg_param_t *top = (stack != NULL) ? *stack : NULL; in phpdbg_stack_verify()
[all …]
/php-src/Zend/asm/
H A Dmake_sparc64_sysv_elf_gas.S25 # shift address in %i0 (allocated stack) to lower 16 byte boundary
28 # reserve space for two frames on the stack
34 # store it in the first stack frame, also clear %fp there to indicate
35 # the end of the stack.
40 # a stack frame. So this code uses an extra trampoline to load
48 # Save framepointer to first stack frame but first substract the BIAS
H A Djump_i386_ms_pe_masm.asm28 ; 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 Djump_ppc32_sysv_elf_gas.S66 stwu %r1, -240(%r1) # allocate stack space, R1 % 16 == 0
184 # adjust stack
201 .section .note.GNU-stack,"",%progbits
H A Dmake_ppc64_sysv_elf_gas.S102 # 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 Djump_arm64_aapcs_pe_armasm.asm64 ; prepare stack for GP + FPU
84 ; save current stack base and limit
87 ; save current fiber data and deallocation stack
98 ; restore stack base and limit
101 ; restore fiber data and deallocation stack
128 ; restore stack from GP + FPU
/php-src/Zend/tests/
H A Dbug36214.phpt6 public $stack = array();
9 $this->stack[$name] = $var;return;
13 return $this->stack[$name];

Completed in 38 milliseconds

12345678