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

/PHP_5_5/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_5_5/main/
H A Dalloca.c5 which is used to allocate space off the run-time stack so
16 that are found to be deeper in the stack than the current
62 /* If your stack is a linked list of frames, you have to
82 /* Define STACK_DIRECTION if you know the direction of stack
107 auto char dummy; /* To get stack address. */
129 (b) keep track of stack depth.
144 char *deep; /* For stack depth measure. */
153 was supposed to be taken from the current stack frame of the
161 auto char probe; /* Probes stack depth: */
170 was allocated from deeper in the stack tha
421 long size, pseg, this_segment, stack; local
[all...]
/PHP_5_5/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);
396 int up_mode = jp->stack[up];
436 machine with a stack.
545 if (type != -1 && jp->stack[j
[all...]
H A DJSON_parser.h17 int* stack; member in struct:JSON_parser_struct
/PHP_5_5/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)
H A Dgd.c1851 /* max depth of stack */
1854 if (sp<stack+FILL_MAX && Y+(DY)>=0 && Y+(DY)<wy2) \
1870 /* stack of filled segments */
1871 /* struct seg stack[FILL_MAX],*sp = stack;; */
1872 struct seg *stack = NULL; local
1913 stack = (struct seg *)safe_emalloc(sizeof(struct seg), ((int)(im->sy*im->sx)/4), 1);
1914 sp = stack;
1920 while (sp>stack) {
1951 efree(stack);
1963 struct seg *stack; local
[all...]
/PHP_5_5/ext/standard/
H A Darray.c1900 /* {{{ proto int array_push(array stack, mixed var [, mixed ...])
1905 *stack, /* Input array */ local
1911 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a+", &stack, &args, &argc) == FAILURE) {
1920 if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), &new_var, sizeof(zval *), NULL) == FAILURE) {
1928 /* Clean up and return the number of values in the stack */
1930 RETVAL_LONG(zend_hash_num_elements(Z_ARRVAL_P(stack)));
1937 zval *stack, /* Input stack */ local
1943 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &stack) == FAILURE) {
1947 if (zend_hash_num_elements(Z_ARRVAL_P(stack))
2017 *stack; /* Input stack */ local
[all...]
H A Dbasic_functions.c368 ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
374 ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
378 ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
382 ZEND_ARG_INFO(1, stack) /* ARRAY_INFO(1, stack, 0) */
/PHP_5_5/Zend/
H A Dzend.c1000 #define SAVE_STACK(stack) do { \
1001 if (CG(stack).top) { \
1002 memcpy(&stack, &CG(stack), sizeof(zend_stack)); \
1003 CG(stack).top = CG(stack).max = 0; \
1004 CG(stack).elements = NULL; \
1006 stack.top = 0; \
1010 #define RESTORE_STACK(stack) do { \
1011 if (stack
[all...]
H A Dzend_execute.h165 #define ZEND_VM_STACK_ELEMETS(stack) \
166 ((void**)(((char*)(stack)) + ZEND_MM_ALIGNED_SIZE(sizeof(struct _zend_vm_stack))))
192 zend_vm_stack stack = EG(argument_stack); local
194 while (stack != NULL) {
195 zend_vm_stack p = stack->prev;
196 efree(stack);
197 stack = p;
242 /* store old top on the stack */
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_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_stack.c25 ZEND_API int zend_stack_init(zend_stack *stack) argument
27 stack->top = 0;
28 stack->max = 0;
29 stack->elements = NULL;
33 ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size) argument
35 if (stack->top >= stack->max) { /* we need to allocate more memory */
36 stack->elements = (void **) erealloc(stack->elements,
37 (sizeof(void **) * (stack
48 zend_stack_top(const zend_stack *stack, void **element) argument
60 zend_stack_del_top(zend_stack *stack) argument
69 zend_stack_int_top(const zend_stack *stack) argument
81 zend_stack_is_empty(const zend_stack *stack) argument
91 zend_stack_destroy(zend_stack *stack) argument
107 zend_stack_base(const zend_stack *stack) argument
113 zend_stack_count(const zend_stack *stack) argument
119 zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element)) argument
142 zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg) argument
[all...]
H A Dzend_stack.h34 ZEND_API int zend_stack_init(zend_stack *stack);
35 ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size);
36 ZEND_API int zend_stack_top(const zend_stack *stack, void **element);
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.c78 /* Clear any backed up stack arguments */
80 void **ptr = generator->stack->top - 1;
126 * up the stack may not be safe in this case. */
132 /* We have added an additional stack frame in prev_execute_data, so we
162 efree(generator->stack);
314 generator->stack = EG(argument_stack);
367 EG(argument_stack) = generator->stack;
371 * The first prev_execute_data contains an additional stack frame,
H A Dzend_generators.h44 /* The separate stack used by generator */
45 zend_vm_stack stack; member in struct:_zend_generator
/PHP_5_5/ext/mbstring/
H A Dmbstring.c3492 zval ***args, ***stack, **var, **hash_entry, **zfrom_enc; local
3543 stack = (zval ***)safe_emalloc(stack_max, sizeof(zval **), 0);
3559 var = stack[stack_level];
3569 ptmp = erealloc(stack, sizeof(zval **)*stack_max);
3570 stack = (zval ***)ptmp;
3572 stack[stack_level] = var;
3601 efree(stack);
3626 stack = (zval ***)safe_emalloc(stack_max, sizeof(zval **), 0);
3640 var = stack[stack_level];
3650 ptmp = erealloc(stack, sizeo
[all...]
/PHP_5_5/ext/wddx/
H A Dwddx.c69 if (stack->varname) { \
70 ent.varname = estrdup(stack->varname); \
71 efree(stack->varname); \
72 stack->varname = NULL; \
175 static int wddx_stack_init(wddx_stack *stack) argument
177 stack->top = 0;
178 stack->elements = (void **) safe_emalloc(sizeof(void **), STACK_BLOCK_SIZE, 0);
179 stack->max = STACK_BLOCK_SIZE;
180 stack->varname = NULL;
181 stack
189 wddx_stack_push(wddx_stack *stack, void *element, int size) argument
203 wddx_stack_top(wddx_stack *stack, void **element) argument
217 wddx_stack_is_empty(wddx_stack *stack) argument
229 wddx_stack_destroy(wddx_stack *stack) argument
739 wddx_stack *stack = (wddx_stack *)user_data; local
917 wddx_stack *stack = (wddx_stack *)user_data; local
1045 wddx_stack *stack = (wddx_stack *)user_data; local
1126 wddx_stack stack; local
[all...]
/PHP_5_5/sapi/apache_hooks/
H A Dmod_php5.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_5_5/ext/openssl/
H A Dopenssl.c1639 STACK_OF(X509) *stack=NULL, *ret=NULL;
1644 if(!(stack = sk_X509_new_null())) {
1650 sk_X509_free(stack);
1656 sk_X509_free(stack);
1660 /* This loads from a file, a stack of x509/crl/pkey sets */
1663 sk_X509_free(stack);
1671 sk_X509_push(stack,xi->x509);
1676 if(!sk_X509_num(stack)) {
1678 sk_X509_free(stack);
1681 ret=stack;
[all...]
/PHP_5_5/ext/pcre/pcrelib/
H A Dpcre_compile.c97 /* This value specifies the size of stack workspace that is used during the
119 remembering named groups during the pre-compile. It is allocated on the stack,
551 "parentheses are too deeply nested (stack check)\0"
903 the stack. A larger block is obtained from malloc() unless the ultimate limit
2429 mutual recursions we keep a chain on the stack. */
2442 stack chain to detect mutual recursions. */
4923 (which is on the stack). We have to remember that there was XCLASS data,
6104 remembering the bracket starts on a stack. In the case of a zero minimum,
6210 makes it possible to reduce greatly the stack usage in pcre_exec(). If
8141 /* If set, call the external function that checks for stack availabilit
[all...]
H A Dpcre_jit_compile.c77 /* Allocate memory for the regex stack on the real machine stack.
81 /* Growth rate for stack allocated by the OS. Should be the multiply
124 '(' matching path (pushing arguments to the stack)
126 ')' matching path (pushing arguments to the stack)
139 code paths. In this way the topmost value on the stack is always belong
142 the matching path eventually. Otherwise it needs to clear out its own stack
147 Saved stack frames:
154 The stack frames are stored in a chain list, and have the following format:
157 Thus we can restore the private data to a particular point in the stack
162 struct sljit_stack *stack; member in struct:jit_arguments
7498 int stack; /* Also contains the offset of control head. */ local
10442 pcre_jit_exec(const pcre *argument_re, const pcre_extra *extra_data, PCRE_SPTR subject, int length, int start_offset, int options, int *offsets, int offset_count, pcre_jit_stack *stack) argument
10576 pcre_jit_stack_free(pcre_jit_stack *stack) argument
10647 pcre_jit_stack_free(pcre_jit_stack *stack) argument
[all...]
/PHP_5_5/ext/pcre/pcrelib/sljit/
H A DsljitLir.h50 - A fixed stack space can be allocated for local variables
58 not stored on the stack. (hence the name comes)
61 - One of the saved registers typically points to a stack interface
139 four will be saved on the stack, because they are defined as saved
147 the stack and restore them after a function call.
169 are allocated on the stack). These registers are called virtual
189 are allocated on the stack). These registers are called virtual
207 /* The SLJIT_SP provides direct access to the linear stack space allocated by
209 The immediate offset is extended by the relative stack offset automatically.
322 /* Local stack siz
[all...]
H A DsljitUtils.c205 struct sljit_stack *stack; local
236 stack = (struct sljit_stack*)SLJIT_MALLOC(sizeof(struct sljit_stack), allocator_data);
237 if (!stack)
243 SLJIT_FREE(stack, allocator_data);
246 stack->base = base.uw;
247 stack->limit = stack->base;
248 stack->max_limit = stack->base + max_limit;
249 if (sljit_stack_resize(stack, stac
279 sljit_free_stack(struct sljit_stack* stack, void *allocator_data) argument
290 sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit) argument
[all...]

Completed in 89 milliseconds