Lines Matching refs:stack
130 /* Model the evaluation stack, to determine which jumps
132 * The stack is modelled by a 64 integer, treating any
133 * stack that can't fit into 64 bits as "overflowed".
169 push_value(int64_t stack, Kind kind)
171 if (((uint64_t)stack) >= WILL_OVERFLOW) {
175 return (stack << BITS_PER_BLOCK) | kind;
180 pop_value(int64_t stack)
182 return Py_ARITHMETIC_RIGHT_SHIFT(int64_t, stack, BITS_PER_BLOCK);
188 top_of_stack(int64_t stack)
190 return stack & MASK;
194 peek(int64_t stack, int n)
197 return (stack>>(BITS_PER_BLOCK*(n-1))) & MASK;
201 stack_swap(int64_t stack, int n)
204 Kind to_swap = peek(stack, n);
205 Kind top = top_of_stack(stack);
207 int64_t replaced_low = (stack & ~(MASK << shift)) | (top << shift);
213 pop_to_level(int64_t stack, int level) {
219 while (stack > level_max_stack) {
220 stack = pop_value(stack);
222 return stack;
226 /* These functions are useful for debugging the stack marking code */
229 tos_char(int64_t stack) {
230 switch(top_of_stack(stack)) {
246 print_stack(int64_t stack) {
247 if (stack < 0) {
248 if (stack == UNINITIALIZED) {
251 else if (stack == OVERFLOWED) {
259 while (stack) {
260 printf("%c", tos_char(stack));
261 stack = pop_value(stack);
528 return "stack is too deep to analyze";
629 * state of the stack (obvious because you could remove the line and the code
630 * would still work without any stack errors), but there are some constructs
635 * iterator needs to be on the stack.
755 msg = "stack to deep to analyze";
779 /* Pop exception stack as well as the evaluation stack */
841 a separate free list of stack frames (just like floats are
842 allocated in a special way -- see floatobject.c). When a stack
902 /* locals and stack */