Searched refs:stack (Results 1 - 25 of 36) sorted by relevance

12

/PHP_TRUNK/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_TRUNK/Zend/
H A Dzend_ptr_stack.c28 ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent) argument
30 stack->top_element = stack->elements = NULL;
31 stack->top = stack->max = 0;
32 stack->persistent = persistent;
35 ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack) argument
37 zend_ptr_stack_init_ex(stack, 0);
41 ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...) argument
46 ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, coun
59 zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...) argument
76 zend_ptr_stack_destroy(zend_ptr_stack *stack) argument
84 zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *)) argument
94 zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements) argument
109 zend_ptr_stack_num_elements(zend_ptr_stack *stack) argument
[all...]
H A Dzend_stack.c25 #define ZEND_STACK_ELEMENT(stack, n) ((void *)((char *) (stack)->elements + (stack)->size * (n)))
27 ZEND_API int zend_stack_init(zend_stack *stack, int size) argument
29 stack->size = size;
30 stack->top = 0;
31 stack->max = 0;
32 stack->elements = NULL;
36 ZEND_API int zend_stack_push(zend_stack *stack, const void *element) argument
39 if (stack
48 zend_stack_top(const zend_stack *stack) argument
58 zend_stack_del_top(zend_stack *stack) argument
65 zend_stack_int_top(const zend_stack *stack) argument
76 zend_stack_is_empty(const zend_stack *stack) argument
82 zend_stack_destroy(zend_stack *stack) argument
93 zend_stack_base(const zend_stack *stack) argument
99 zend_stack_count(const zend_stack *stack) argument
105 zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element)) argument
128 zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg) argument
150 zend_stack_clean(zend_stack *stack, void (*func)(void *), zend_bool free_elements) argument
[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, in
[all...]
H A Dzend_generators.h36 /* The separate stack used by generator */
37 zend_vm_stack stack; member in struct:_zend_generator
H A Dzend_ptr_stack.h36 ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack);
37 ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent);
38 ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...);
39 ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
40 ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
41 ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
42 ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
43 ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
46 #define ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) \
47 if (stack
58 zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c) argument
72 zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b) argument
85 zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c) argument
93 zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b) argument
100 zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr) argument
108 zend_ptr_stack_pop(zend_ptr_stack *stack) argument
114 zend_ptr_stack_top(zend_ptr_stack *stack) argument
[all...]
H A Dzend.c934 #define SAVE_STACK(stack) do { \
935 if (CG(stack).top) { \
936 memcpy(&stack, &CG(stack), sizeof(zend_stack)); \
937 CG(stack).top = CG(stack).max = 0; \
938 CG(stack).elements = NULL; \
940 stack.top = 0; \
944 #define RESTORE_STACK(stack) do { \
945 if (stack
[all...]
H A Dzend_generators.c106 * up the stack may not be safe in this case. */
126 efree(generator->stack);
268 generator->stack = EG(vm_stack);
269 generator->stack->top = EG(vm_stack_top);
311 EG(vm_stack_top) = generator->stack->top;
312 EG(vm_stack_end) = generator->stack->end;
313 EG(vm_stack) = generator->stack;
H A Dzend_execute.c155 zend_vm_stack stack = EG(vm_stack); local
157 while (stack != NULL) {
158 zend_vm_stack p = stack->prev;
159 efree(stack);
160 stack = p;
166 zend_vm_stack stack; local
169 stack = EG(vm_stack);
170 stack->top = EG(vm_stack_top);
171 EG(vm_stack) = stack = zend_vm_stack_new_page(
174 stack);
[all...]
/PHP_TRUNK/ext/pcre/pcrelib/sljit/
H A DsljitUtils.c205 struct sljit_stack *stack; local
235 stack = (struct sljit_stack*)SLJIT_MALLOC(sizeof(struct sljit_stack));
236 if (!stack)
242 SLJIT_FREE(stack);
245 stack->base = base.uw;
246 stack->limit = stack->base;
247 stack->max_limit = stack->base + max_limit;
248 if (sljit_stack_resize(stack, stac
278 sljit_free_stack(struct sljit_stack* stack) argument
288 sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit) argument
[all...]
H A DsljitLir.h50 - A fixed stack space can be allocated for local variables
58 not stored on the stack. (hence the name comes)
63 - One of the saved registers typically points to a stack interface
115 /* Note: on x86-32, these registers are emulated (using stack
125 /* Note: on x86-32, these registers are emulated (using stack
132 several ABIs has certain limitations about the stack layout. However
134 on the stack. */
223 /* Local stack size. */
367 registers and stack handling among other things. The sljit_emit_enter
376 is also capable of allocating a stack spac
[all...]
/PHP_TRUNK/ext/json/
H A DJSON_parser.c188 These modes can be pushed on the stack.
199 Push a mode onto the stack. Return false if there is overflow.
209 jp->stack[jp->top] = mode;
215 Pop the stack, assuring that the current mode matches the expectation.
221 if (jp->top < 0 || jp->stack[jp->top] != mode) {
249 jp->stack = (int*)ecalloc(depth, sizeof(int));
265 efree((void*)jp->stack);
414 int up_mode = jp->stack[up];
444 machine with a stack.
555 if (type != -1 && jp->stack[j
[all...]
H A DJSON_parser.h17 int* stack; member in struct:JSON_parser_struct
/PHP_TRUNK/sapi/apache_hooks/
H A Dmod_php7.c107 /* {{{ zend stack utility functions
115 int sapi_stack_init_ex(sapi_stack *stack, int persistent) argument
117 stack->top = 0;
118 stack->persistent = persistent;
119 stack->elements = (void **) pemalloc(sizeof(void **) * STACK_BLOCK_SIZE, persistent);
120 if (!stack->elements) {
123 stack->max = STACK_BLOCK_SIZE;
127 int sapi_stack_push(sapi_stack *stack, void *element) argument
129 if (stack->top >= stack
139 sapi_stack_pop(sapi_stack *stack) argument
148 sapi_stack_destroy(sapi_stack *stack) argument
153 sapi_stack_apply_with_argument_all(sapi_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg) argument
173 sapi_stack_apply_with_argument_stop_if_equals(sapi_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg, int stopval) argument
196 sapi_stack_apply_with_argument_stop_if_http_error(sapi_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg) argument
219 php_handler_stack_destroy(sapi_stack *stack) argument
[all...]
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_lexer.h37 void phpdbg_init_lexer (phpdbg_param_t *stack, char *input TSRMLS_DC);
H A Dphpdbg_lexer.l30 void phpdbg_init_lexer (phpdbg_param_t *stack, char *input TSRMLS_DC) {
31 PHPDBG_G(parser_stack) = stack;
H A Dphpdbg_parser.y183 int phpdbg_do_parse(phpdbg_param_t *stack, char *input TSRMLS_DC) {
184 phpdbg_init_lexer(stack, input TSRMLS_CC);
H A Dphpdbg_print.c38 PHPDBG_PRINT_COMMAND_D(stack, "print out the instructions in the current stack", 's', print_stack, NULL, 0, PHPDBG_ASYNC_SAFE),
128 PHPDBG_PRINT(stack) /* {{{ */
H A Dphpdbg_print.h36 PHPDBG_PRINT(stack); variable
H A Dphpdbg_cmd.c51 return "stack";
375 PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack) { argument
376 if (stack && stack->next) {
377 phpdbg_param_t *remove = stack->next;
422 stack->next = NULL;
426 PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param) { argument
436 if (stack->top == NULL) {
437 stack->top = next;
439 stack
640 phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe TSRMLS_DC) argument
[all...]
H A Dphpdbg_cmd.h122 * 1) the lexer/parser creates a stack of commands and arguments from input
123 * 2) the commands at the top of the stack are resolved sensibly using aliases, abbreviations and case insensitive matching
124 * 3) the remaining arguments in the stack are verified (optionally) against the handlers declared argument specification
125 * 4) the handler is called passing the top of the stack as the only parameter
126 * 5) the stack is destroyed upon return from the handler
139 PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param);
141 PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param_t **stack TSRMLS_DC);
142 PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe TSRMLS_DC);
143 PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack);
H A Dphpdbg_prompt.c69 PHPDBG_COMMAND_D(finish, "continue past the end of the stack", 'F', NULL, 0, 0),
70 PHPDBG_COMMAND_D(leave, "continue until the end of the stack", 'L', NULL, 0, 0),
92 static inline int phpdbg_call_register(phpdbg_param_t *stack TSRMLS_DC) /* {{{ */
96 if (stack->type == STACK_PARAM) {
99 name = stack->next;
256 phpdbg_param_t stack; local
258 phpdbg_init_param(&stack, STACK_PARAM);
262 if (phpdbg_do_parse(&stack, input TSRMLS_CC) <= 0) {
263 switch (phpdbg_stack_execute(&stack, 1 /* allow_async_unsafe == 1 */ TSRMLS_CC)) {
266 if (phpdbg_call_register(&stack TSRMLS_C
1227 phpdbg_param_t stack; local
[all...]
/PHP_TRUNK/ext/wddx/
H A Dwddx.c69 if (stack->varname) { \
70 ent.varname = estrdup(stack->varname); \
71 efree(stack->varname); \
72 stack->varname = NULL; \
173 static int wddx_stack_init(wddx_stack *stack) argument
175 stack->top = 0;
176 stack->elements = (void **) safe_emalloc(sizeof(void **), STACK_BLOCK_SIZE, 0);
177 stack->max = STACK_BLOCK_SIZE;
178 stack->varname = NULL;
179 stack
187 wddx_stack_push(wddx_stack *stack, void *element, int size) argument
201 wddx_stack_top(wddx_stack *stack, void **element) argument
215 wddx_stack_is_empty(wddx_stack *stack) argument
227 wddx_stack_destroy(wddx_stack *stack) argument
716 wddx_stack *stack = (wddx_stack *)user_data; local
869 wddx_stack *stack = (wddx_stack *)user_data; local
988 wddx_stack *stack = (wddx_stack *)user_data; local
1051 wddx_stack stack; local
[all...]
/PHP_TRUNK/ext/standard/
H A Darray.c1965 /* {{{ proto int array_push(array stack, mixed var [, mixed ...])
1970 *stack, /* Input array */ local
1976 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/+", &stack, &args, &argc) == FAILURE) {
1984 if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), &new_var) == NULL) {
1991 /* Clean up and return the number of values in the stack */
1992 RETVAL_LONG(zend_hash_num_elements(Z_ARRVAL_P(stack)));
1996 /* {{{ proto mixed array_pop(array stack)
2000 zval *stack, /* Input stack */ local
2006 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &stack)
2061 zval *stack, /* Input stack */ local
2159 *stack; /* Input stack */ local
[all...]
/PHP_TRUNK/ext/gd/libgd/
H A Dgd_gif_in.c89 int stack[STACK_SIZE], *sp; member in struct:__anon2
451 sd->sp = sd->stack;
463 if (sd->sp > sd->stack)
477 sd->sp = sd->stack;
497 if (sd->sp == (sd->stack + STACK_SIZE)) {
508 if (sd->sp == (sd->stack + STACK_SIZE)) {
534 if (sd->sp > sd->stack)

Completed in 102 milliseconds

12