Home
last modified time | relevance | path

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

12345678910>>...119

/netbsd-src/usr.bin/dc/
H A Dstack.c28 static __inline bool stack_empty(const struct stack *);
29 static void stack_grow(struct stack *);
38 stack_init(struct stack *stack) in stack_init() argument
40 stack->size = 0; in stack_init()
41 stack->sp = -1; in stack_init()
42 stack->stack = NULL; in stack_init()
46 stack_empty(const struct stack *stack) in stack_empty() argument
48 bool empty = stack->sp == -1; in stack_empty()
97 stack_size(const struct stack *stack) in stack_size() argument
99 return (size_t)(stack->sp + 1); in stack_size()
[all …]
H A Dextern.h43 void stack_init(struct stack *);
46 void stack_swap(struct stack *);
47 size_t stack_size(const struct stack *);
48 void stack_dup(struct stack *);
49 void stack_pushnumber(struct stack *, struct number *);
50 void stack_pushstring(struct stack *stack, char *);
51 void stack_push(struct stack *, struct value *);
52 void stack_set_tos(struct stack *, struct value *);
53 struct value *stack_tos(const struct stack *);
54 struct value *stack_pop(struct stack *);
[all …]
/netbsd-src/usr.bin/make/unit-tests/
H A Dhanoi-include.exp1 Move the upper disk from stack A to stack C.
2 Move the upper disk from stack A to stack B.
3 Move the upper disk from stack C to stack B.
4 Move the upper disk from stack A to stack C.
5 Move the upper disk from stack B to stack A.
6 Move the upper disk from stack B to stack C.
7 Move the upper disk from stack A to stack C.
8 Move the upper disk from stack A to stack B.
9 Move the upper disk from stack C to stack B.
10 Move the upper disk from stack C to stack A.
[all …]
/netbsd-src/external/gpl2/xcvs/dist/src/
H A Dstack.c21 do_push (List *stack, void *elem, int isstring) in do_push() argument
30 addnode(stack, p); in do_push()
36 push (List *stack, void *elem) in push() argument
38 do_push (stack, elem, 0); in push()
44 push_string (List *stack, char *elem) in push_string() argument
46 do_push (stack, elem, 1); in push_string()
52 do_pop (List *stack, int isstring) in do_pop() argument
56 if (isempty (stack)) return NULL; in do_pop()
60 elem = stack->list->prev->key; in do_pop()
61 stack->list->prev->key = NULL; in do_pop()
[all …]
/netbsd-src/external/apache2/llvm/dist/libcxx/include/
H A Dstack2 //===---------------------------- stack -----------------------------------===//
14 stack synopsis
20 class stack
33 stack() = default;
34 ~stack() = default;
36 stack(const stack& q) = default;
37 stack(stack&& q) = default;
39 stack& operator=(const stack& q) = default;
40 stack& operator=(stack&& q) = default;
42 explicit stack(const container_type& c);
[all …]
/netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/
H A Dastack.c36 isc_astack_t *stack = isc_mem_get( in isc_astack_new() local
39 *stack = (isc_astack_t){ in isc_astack_new()
42 isc_mem_attach(mctx, &stack->mctx); in isc_astack_new()
43 memset(stack->nodes, 0, size * sizeof(uintptr_t)); in isc_astack_new()
44 isc_mutex_init(&stack->lock); in isc_astack_new()
45 return (stack); in isc_astack_new()
49 isc_astack_trypush(isc_astack_t *stack, void *obj) { in isc_astack_trypush() argument
50 if (!isc_mutex_trylock(&stack->lock)) { in isc_astack_trypush()
51 if (stack->pos >= stack->size) { in isc_astack_trypush()
52 UNLOCK(&stack->lock); in isc_astack_trypush()
[all …]
/netbsd-src/external/mpl/bind/dist/lib/isc/
H A Dastack.c
/netbsd-src/sys/external/bsd/sljit/dist/sljit_src/
H A DsljitUtils.c251 struct sljit_stack *stack; in sljit_allocate_stack() local
280 stack = (struct sljit_stack*)SLJIT_MALLOC(sizeof(struct sljit_stack), allocator_data); in sljit_allocate_stack()
281 if (!stack) in sljit_allocate_stack()
290 SLJIT_FREE(stack, allocator_data); in sljit_allocate_stack()
293 stack->max_limit = (sljit_u8 *)ptr; in sljit_allocate_stack()
294 stack->base = stack->max_limit + max_limit; in sljit_allocate_stack()
295 stack->limit = stack->base; in sljit_allocate_stack()
296 if (sljit_stack_resize(stack, stack->base - limit)) { in sljit_allocate_stack()
297 sljit_free_stack(stack, allocator_data); in sljit_allocate_stack()
303 SLJIT_FREE(stack, allocator_data); in sljit_allocate_stack()
[all …]
/netbsd-src/external/bsd/unbound/dist/services/
H A Dmodstack.c92 modstack_init(struct module_stack* stack) in modstack_init() argument
94 stack->num = 0; in modstack_init()
95 stack->mod = NULL; in modstack_init()
99 modstack_config(struct module_stack* stack, const char* module_conf) in modstack_config() argument
103 stack->num = count_modules(module_conf); in modstack_config()
104 if(stack->num == 0) { in modstack_config()
108 if(stack->num > MAX_MODULE) { in modstack_config()
110 stack->num, MAX_MODULE); in modstack_config()
113 stack->mod = (struct module_func_block**)calloc((size_t) in modstack_config()
114 stack->num, sizeof(struct module_func_block*)); in modstack_config()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/
H A Dstl_stack.h99 class stack in _GLIBCXX_VISIBILITY()
113 operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_VISIBILITY()
117 operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_VISIBILITY()
122 operator<=>(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_VISIBILITY()
157 stack(const _Sequence& __c = _Sequence()) in _GLIBCXX_VISIBILITY()
162 stack() in _GLIBCXX_VISIBILITY()
166 stack(const _Sequence& __c) in _GLIBCXX_VISIBILITY()
170 stack(_Sequence&& __c) in _GLIBCXX_VISIBILITY()
178 stack(_InputIterator __first, _InputIterator __last) in _GLIBCXX_VISIBILITY()
185 stack(const _Alloc& __a) in _GLIBCXX_VISIBILITY()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/include/bits/
H A Dstl_stack.h99 class stack in _GLIBCXX_VISIBILITY()
113 operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_VISIBILITY()
117 operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_VISIBILITY()
122 operator<=>(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_VISIBILITY()
157 stack(const _Sequence& __c = _Sequence()) in _GLIBCXX_VISIBILITY()
162 stack() in _GLIBCXX_VISIBILITY()
166 stack(const _Sequence& __c) in _GLIBCXX_VISIBILITY()
170 stack(_Sequence&& __c) in _GLIBCXX_VISIBILITY()
175 stack(const _Alloc& __a) in _GLIBCXX_VISIBILITY()
179 stack(const _Sequence& __c, const _Alloc& __a) in _GLIBCXX_VISIBILITY()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/
H A Dsanitizer_allocator_report.cpp26 stack(stack_) { in ScopedAllocatorErrorReport()
31 stack->Print(); in ~ScopedAllocatorErrorReport()
33 ReportErrorSummary(error_summary, stack); in ~ScopedAllocatorErrorReport()
39 const StackTrace* const stack; member in __sanitizer::ScopedAllocatorErrorReport
44 const StackTrace *stack) { in ReportCallocOverflow() argument
46 ScopedAllocatorErrorReport report("calloc-overflow", stack); in ReportCallocOverflow()
55 const StackTrace *stack) { in ReportReallocArrayOverflow() argument
57 ScopedAllocatorErrorReport report("reallocarray-overflow", stack); in ReportReallocArrayOverflow()
66 void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack) { in ReportPvallocOverflow() argument
68 ScopedAllocatorErrorReport report("pvalloc-overflow", stack); in ReportPvallocOverflow()
[all …]
/netbsd-src/external/mit/libcbor/dist/src/cbor/internal/
H A Dbuilder_callbacks.c21 if (ctx->stack->size == 0) { in _cbor_builder_append()
26 switch (ctx->stack->top->item->type) { in _cbor_builder_append()
28 if (cbor_array_is_definite(ctx->stack->top->item)) { in _cbor_builder_append()
34 assert(ctx->stack->top->subitems > 0); in _cbor_builder_append()
35 cbor_array_push(ctx->stack->top->item, item); in _cbor_builder_append()
36 ctx->stack->top->subitems--; in _cbor_builder_append()
37 if (ctx->stack->top->subitems == 0) { in _cbor_builder_append()
38 cbor_item_t *item = ctx->stack->top->item; in _cbor_builder_append()
39 _cbor_stack_pop(ctx->stack); in _cbor_builder_append()
45 cbor_array_push(ctx->stack->top->item, item); in _cbor_builder_append()
[all …]
/netbsd-src/common/lib/libprop/
H A Dprop_stack.c36 _prop_stack_init(prop_stack_t stack) in _prop_stack_init() argument
38 stack->used_intern_elems = 0; in _prop_stack_init()
39 SLIST_INIT(&stack->extern_elems); in _prop_stack_init()
43 _prop_stack_push(prop_stack_t stack, prop_object_t obj, void *data1, in _prop_stack_push() argument
49 if (stack->used_intern_elems == PROP_STACK_INTERN_ELEMS) { in _prop_stack_push()
60 SLIST_INSERT_HEAD(&stack->extern_elems, eelem, stack_link); in _prop_stack_push()
65 _PROP_ASSERT(stack->used_intern_elems < PROP_STACK_INTERN_ELEMS); in _prop_stack_push()
66 _PROP_ASSERT(SLIST_EMPTY(&stack->extern_elems)); in _prop_stack_push()
68 ielem = &stack->intern_elems[stack->used_intern_elems]; in _prop_stack_push()
74 ++stack->used_intern_elems; in _prop_stack_push()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libsanitizer/lsan/
H A Dlsan_allocator.cpp60 static void RegisterAllocation(const StackTrace &stack, void *p, uptr size) { in RegisterAllocation() argument
65 m->stack_trace_id = StackDepotPut(stack); in RegisterAllocation()
77 static void *ReportAllocationSizeTooBig(uptr size, const StackTrace &stack) { in ReportAllocationSizeTooBig() argument
82 ReportAllocationSizeTooBig(size, max_malloc_size, &stack); in ReportAllocationSizeTooBig()
85 void *Allocate(const StackTrace &stack, uptr size, uptr alignment, in Allocate() argument
90 return ReportAllocationSizeTooBig(size, stack); in Allocate()
96 ReportOutOfMemory(size, &stack); in Allocate()
101 RegisterAllocation(stack, p, size); in Allocate()
107 static void *Calloc(uptr nmemb, uptr size, const StackTrace &stack) { in Calloc() argument
111 ReportCallocOverflow(nmemb, size, &stack); in Calloc()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libsanitizer/asan/
H A Dasan_allocator.cpp55 u32 tid, u32 stack) { in AtomicContextStore() argument
58 context += stack; in AtomicContextStore()
63 u32 &tid, u32 &stack) { in AtomicContextLoad() argument
65 stack = context; in AtomicContextLoad()
119 void SetAllocContext(u32 tid, u32 stack) { in SetAllocContext() argument
120 AtomicContextStore(&alloc_context_id, tid, stack); in SetAllocContext()
123 void GetAllocContext(u32 &tid, u32 &stack) const { in GetAllocContext()
124 AtomicContextLoad(&alloc_context_id, tid, stack); in GetAllocContext()
132 void SetFreeContext(u32 tid, u32 stack) { in SetFreeContext() argument
133 AtomicContextStore(&free_context_id, tid, stack); in SetFreeContext()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libsanitizer/hwasan/
H A Dhwasan_allocator.cpp125 static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment, in HwasanAllocate() argument
133 ReportAllocationSizeTooBig(orig_size, kMaxAllowedMallocSize, stack); in HwasanAllocate()
151 ReportOutOfMemory(size, stack); in HwasanAllocate()
156 meta->alloc_context_id = StackDepotPut(*stack); in HwasanAllocate()
179 if (flags()->tag_in_malloc && malloc_bisect(stack, orig_size)) { in HwasanAllocate()
211 static bool CheckInvalidFree(StackTrace *stack, void *untagged_ptr, in CheckInvalidFree() argument
216 ReportInvalidFree(stack, reinterpret_cast<uptr>(tagged_ptr)); in CheckInvalidFree()
222 static void HwasanDeallocate(StackTrace *stack, void *tagged_ptr) { in HwasanDeallocate() argument
230 if (CheckInvalidFree(stack, untagged_ptr, tagged_ptr)) in HwasanDeallocate()
239 ReportInvalidFree(stack, reinterpret_cast<uptr>(tagged_ptr)); in HwasanDeallocate()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/
H A Dsanitizer_allocator_report.cc25 stack(stack_) { in ScopedAllocatorErrorReport()
30 stack->Print(); in ~ScopedAllocatorErrorReport()
32 ReportErrorSummary(error_summary, stack); in ~ScopedAllocatorErrorReport()
38 const StackTrace* const stack; member in __sanitizer::ScopedAllocatorErrorReport
43 const StackTrace *stack) { in ReportCallocOverflow() argument
45 ScopedAllocatorErrorReport report("calloc-overflow", stack); in ReportCallocOverflow()
53 void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack) { in ReportPvallocOverflow() argument
55 ScopedAllocatorErrorReport report("pvalloc-overflow", stack); in ReportPvallocOverflow()
64 const StackTrace *stack) { in ReportInvalidAllocationAlignment() argument
66 ScopedAllocatorErrorReport report("invalid-allocation-alignment", stack); in ReportInvalidAllocationAlignment()
[all …]
/netbsd-src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/
H A Dsanitizer_allocator_report.cc27 stack(stack_) { in ScopedAllocatorErrorReport()
32 stack->Print(); in ~ScopedAllocatorErrorReport()
34 ReportErrorSummary(error_summary, stack); in ~ScopedAllocatorErrorReport()
40 const StackTrace* const stack; member in __sanitizer::ScopedAllocatorErrorReport
45 const StackTrace *stack) { in ReportCallocOverflow() argument
47 ScopedAllocatorErrorReport report("calloc-overflow", stack); in ReportCallocOverflow()
55 void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack) { in ReportPvallocOverflow() argument
57 ScopedAllocatorErrorReport report("pvalloc-overflow", stack); in ReportPvallocOverflow()
66 const StackTrace *stack) { in ReportInvalidAllocationAlignment() argument
68 ScopedAllocatorErrorReport report("invalid-allocation-alignment", stack); in ReportInvalidAllocationAlignment()
[all …]
/netbsd-src/sys/external/bsd/compiler_rt/dist/lib/lsan/
H A Dlsan_allocator.cc54 static void RegisterAllocation(const StackTrace &stack, void *p, uptr size) { in RegisterAllocation() argument
59 m->stack_trace_id = StackDepotPut(stack); in RegisterAllocation()
71 static void *ReportAllocationSizeTooBig(uptr size, const StackTrace &stack) { in ReportAllocationSizeTooBig() argument
76 ReportAllocationSizeTooBig(size, kMaxAllowedMallocSize, &stack); in ReportAllocationSizeTooBig()
79 void *Allocate(const StackTrace &stack, uptr size, uptr alignment, in Allocate() argument
84 return ReportAllocationSizeTooBig(size, stack); in Allocate()
90 ReportOutOfMemory(size, &stack); in Allocate()
95 RegisterAllocation(stack, p, size); in Allocate()
101 static void *Calloc(uptr nmemb, uptr size, const StackTrace &stack) { in Calloc() argument
105 ReportCallocOverflow(nmemb, size, &stack); in Calloc()
[all …]
/netbsd-src/sys/external/bsd/compiler_rt/dist/lib/msan/
H A Dmsan_allocator.cc144 static void *MsanAllocate(StackTrace *stack, uptr size, uptr alignment, in MsanAllocate() argument
151 ReportAllocationSizeTooBig(size, kMaxAllowedMallocSize, stack); in MsanAllocate()
167 ReportOutOfMemory(size, stack); in MsanAllocate()
177 stack->tag = StackTrace::TAG_ALLOC; in MsanAllocate()
178 Origin o = Origin::CreateHeapOrigin(stack); in MsanAllocate()
186 void MsanDeallocate(StackTrace *stack, void *p) { in MsanDeallocate() argument
197 stack->tag = StackTrace::TAG_DEALLOC; in MsanDeallocate()
198 Origin o = Origin::CreateHeapOrigin(stack); in MsanDeallocate()
213 void *MsanReallocate(StackTrace *stack, void *old_p, uptr new_size, in MsanReallocate() argument
223 stack->tag = StackTrace::TAG_ALLOC; in MsanReallocate()
[all …]
/netbsd-src/sys/external/bsd/sljit/dist/regex_src/
H A DregexJIT.c154 struct stack { struct
163 static void stack_check(struct stack *stack) in stack_check() argument
168 if (!stack) in stack_check()
171 SLJIT_ASSERT(stack->index >= 0 && stack->index < STACK_FRAGMENT_SIZE); in stack_check()
173 if (stack->first == NULL) { in stack_check()
174 SLJIT_ASSERT(stack->first == NULL && stack->last == NULL); in stack_check()
175 SLJIT_ASSERT(stack->index == STACK_FRAGMENT_SIZE - 1 && stack->count == 0); in stack_check()
180 if (stack->last == NULL) { in stack_check()
181 SLJIT_ASSERT(stack->index == STACK_FRAGMENT_SIZE - 1 && stack->count == 0); in stack_check()
185 SLJIT_ASSERT(stack->index >= 0 && stack->count >= 0); in stack_check()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/gcc/jit/docs/intro/
H A Dtutorial04.rst26 It's a stack-based interpreter, and is intended as a (very simple) example
39 * Functions have a stack of `int` values.
43 frame stack.
54 DUP Duplicate top of stack. ``[..., x]`` ``[..., x, x]``
56 of stack.
58 on the stack.
62 elements on the stack
66 of the stack, and
69 stack.
71 JUMP_ABS_IF_TRUE `arg` Pop; if top of stack was ``[..., x]`` ``[...]``
[all …]
/netbsd-src/external/gpl3/gcc/dist/gcc/jit/docs/intro/
H A Dtutorial04.rst26 It's a stack-based interpreter, and is intended as a (very simple) example
39 * Functions have a stack of `int` values.
43 frame stack.
54 DUP Duplicate top of stack. ``[..., x]`` ``[..., x, x]``
56 of stack.
58 on the stack.
62 elements on the stack
66 of the stack, and
69 stack.
71 JUMP_ABS_IF_TRUE `arg` Pop; if top of stack was ``[..., x]`` ``[...]``
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/gcc/jit/docs/cp/intro/
H A Dtutorial04.rst28 It's a stack-based interpreter, and is intended as a (very simple) example
41 * Functions have a stack of `int` values.
45 frame stack.
56 DUP Duplicate top of stack. ``[..., x]`` ``[..., x, x]``
58 of stack.
60 on the stack.
64 elements on the stack
68 of the stack, and
71 stack.
73 JUMP_ABS_IF_TRUE `arg` Pop; if top of stack was ``[..., x]`` ``[...]``
[all …]

12345678910>>...119