Home
last modified time | relevance | path

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

12345

/PHP-7.2/Zend/
H A Dzend_stack.c25 #define ZEND_STACK_ELEMENT(stack, n) ((void *)((char *) (stack)->elements + (stack)->size * (n))) argument
29 stack->size = size; in zend_stack_init()
30 stack->top = 0; in zend_stack_init()
31 stack->max = 0; in zend_stack_init()
39 if (stack->top >= stack->max) { in zend_stack_push()
41 stack->elements = safe_erealloc(stack->elements, stack->size, stack->max, 0); in zend_stack_push()
43 memcpy(ZEND_STACK_ELEMENT(stack, stack->top), element, stack->size); in zend_stack_push()
51 return ZEND_STACK_ELEMENT(stack, stack->top - 1); in zend_stack_top()
60 --stack->top; in zend_stack_del_top()
101 return stack->top; in zend_stack_count()
[all …]
H A Dzend_ptr_stack.h47 if (stack->top+count > stack->max) { \ in END_EXTERN_C()
51 } while (stack->top+count > stack->max); \ in END_EXTERN_C()
52stack->elements = (void **) perealloc(stack->elements, (sizeof(void *) * (stack->max)), stack->per… in END_EXTERN_C()
53 stack->top_element = stack->elements+stack->top; \ in END_EXTERN_C()
65 *(stack->top_element++) = a;
66 *(stack->top_element++) = b;
90 stack->top -= 3; in zend_ptr_stack_3_pop()
97 stack->top -= 2; in zend_ptr_stack_2_pop()
104 stack->top++; in zend_ptr_stack_push()
110 stack->top--; in zend_ptr_stack_pop()
[all …]
H A Dzend_ptr_stack.c30 stack->top_element = stack->elements = NULL; in zend_ptr_stack_init_ex()
31 stack->top = stack->max = 0; in zend_ptr_stack_init_ex()
51 stack->top++; in zend_ptr_stack_n_push()
68 stack->top--; in zend_ptr_stack_n_pop()
79 pefree(stack->elements, stack->persistent); in zend_ptr_stack_destroy()
86 int i = stack->top; in zend_ptr_stack_apply()
98 int i = stack->top; in zend_ptr_stack_clean()
101 pefree(stack->elements[i], stack->persistent); in zend_ptr_stack_clean()
104 stack->top = 0; in zend_ptr_stack_clean()
105 stack->top_element = stack->elements; in zend_ptr_stack_clean()
[all …]
H A Dzend_stack.h34 ZEND_API int zend_stack_init(zend_stack *stack, int size);
35 ZEND_API int zend_stack_push(zend_stack *stack, const void *element);
36 ZEND_API void *zend_stack_top(const zend_stack *stack);
37 ZEND_API int zend_stack_del_top(zend_stack *stack);
38 ZEND_API int zend_stack_int_top(const zend_stack *stack);
39 ZEND_API int zend_stack_is_empty(const zend_stack *stack);
40 ZEND_API int zend_stack_destroy(zend_stack *stack);
41 ZEND_API void *zend_stack_base(const zend_stack *stack);
42 ZEND_API int zend_stack_count(const zend_stack *stack);
43 ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
[all …]
H A Dzend_execute.h145 #define ZEND_VM_STACK_ELEMENTS(stack) \ argument
146 (((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS)
156 …fine ZEND_ASSERT_VM_STACK(stack) ZEND_ASSERT(stack->top > (zval *) stack && stack->end > (zval *) argument
159 # define ZEND_ASSERT_VM_STACK(stack) argument
/PHP-7.2/ext/opcache/Optimizer/
H A Dzend_worklist.h46 stack->buf = (int*)zend_arena_calloc(arena, sizeof(*stack->buf), len); in zend_worklist_stack_prepare()
47 stack->len = 0; in zend_worklist_stack_prepare()
48 stack->capacity = len; in zend_worklist_stack_prepare()
55 ZEND_ASSERT(stack->len < stack->capacity); in zend_worklist_stack_push()
56 stack->buf[stack->len++] = i; in zend_worklist_stack_push()
61 ZEND_ASSERT(stack->len); in zend_worklist_stack_peek()
62 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek()
67 ZEND_ASSERT(stack->len); in zend_worklist_stack_pop()
68 return stack->buf[--stack->len]; in zend_worklist_stack_pop()
73 zend_worklist_stack stack; member
[all …]
/PHP-7.2/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 DSplStack_setIteratorMode.phpt7 $stack = new SplStack();
9 $stack->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
/PHP-7.2/ext/pcre/pcrelib/sljit/
H A DsljitUtils.c234 if (!stack) in sljit_allocate_stack()
247 stack->base = stack->max_limit + max_limit; in sljit_allocate_stack()
248 stack->limit = stack->base; in sljit_allocate_stack()
249 if (sljit_stack_resize(stack, stack->base - limit)) { in sljit_allocate_stack()
270 stack->base = stack->max_limit + max_limit; in sljit_allocate_stack()
271 stack->limit = stack->base - limit; in sljit_allocate_stack()
273 stack->top = stack->base; in sljit_allocate_stack()
274 return stack; in sljit_allocate_stack()
285 munmap((void*)stack->max_limit, stack->base - stack->max_limit); in sljit_free_stack()
295 if ((new_limit < stack->max_limit) || (new_limit >= stack->base)) in sljit_stack_resize()
[all …]
/PHP-7.2/ext/wddx/
H A Dwddx.c175 stack->top = 0; in wddx_stack_init()
179 stack->done = 0; in wddx_stack_init()
190 stack->elements = (void **) erealloc(stack->elements, in wddx_stack_push()
193 stack->elements[stack->top] = (void *) emalloc(size); in wddx_stack_push()
194 memcpy(stack->elements[stack->top], element, size); in wddx_stack_push()
204 *element = stack->elements[stack->top - 1]; in wddx_stack_top()
804 if (stack->varname) efree(stack->varname); in php_wddx_push_element()
901 stack->top--; in php_wddx_pop_element()
938 stack->top--; in php_wddx_pop_element()
1016 stack->top--; in php_wddx_pop_element()
[all …]
/PHP-7.2/ext/com_dotnet/tests/
H A Dbug73679.phpt9 $stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000);
10 $stack->Push(".Net");
11 $stack->Push("Hello ");
12 echo $stack->Pop() . $stack->Pop();
/PHP-7.2/ext/standard/tests/array/
H A Darray_shift_variation7.phpt5 /* 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 Darray_push_variation5.phpt5 /* 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 Darray_shift_variation5.phpt5 /* 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 Darray_push_variation3.phpt5 /* 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 Darray_push_error1.phpt5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
18 $stack = array(1, 2);
19 var_dump( array_push($stack) );
H A Darray_shift_error.phpt5 /* Prototype : mixed array_shift(array &$stack)
22 $stack = array(1, 2);
24 var_dump( array_shift($stack, $extra_arg) );
/PHP-7.2/tests/lang/
H A DpassByReference_012.phpt10 $stack = array ( array ( 'two' ));
11 var_dump(array_shift(array_shift($stack)));
15 $stack = $original;
16 var_dump(array_shift(array_shift($stack)));
/PHP-7.2/sapi/phpdbg/
H A Dphpdbg_cmd.c376 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 Dphpdbg_cmd.h141 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);
H A Dphpdbg_lexer.l31 void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) { in ZEND_EXTERN_MODULE_GLOBALS()
32 PHPDBG_G(parser_stack) = stack; in ZEND_EXTERN_MODULE_GLOBALS()
/PHP-7.2/Zend/tests/
H A Dbug36214.phpt8 public $stack = array();
11 $this->stack[$name] = $var;return;
15 return $this->stack[$name];
/PHP-7.2/ext/spl/internal/
H A Dsplstack.inc13 * @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.2/ext/pdo_mysql/tests/
H A Dpdo_mysql_subclass.phpt42 $stack = debug_backtrace();
43 if (!isset($stack[1]))
46 printf("%s(", $stack[1]['function']);
48 foreach ($stack[1]['args'] as $k => $v)
/PHP-7.2/sapi/cli/
H A Dconfig.w3215 ADD_FLAG("LDFLAGS_CLI", "/stack:67108864");
25 ADD_FLAG("LDFLAGS_CLI_WIN32", "/stack:67108864");

Completed in 48 milliseconds

12345