Lines Matching refs:stack
102 MARK = '(' # push special markobject on stack
104 POP = '0' # discard topmost stack item
105 POP_MARK = '1' # discard stack top through topmost markobject
106 DUP = '2' # duplicate top stack item
115 BINPERSID = 'Q' # " " " ; " " " " stack
116 REDUCE = 'R' # apply callable to argtuple, both on stack
122 APPEND = 'a' # append stack top to list below it
125 DICT = 'd' # build a dict from stack items
127 APPENDS = 'e' # extend list on stack by topmost stack slice
128 GET = 'g' # push item from memo on stack; index is string arg
131 LONG_BINGET = 'j' # push item from memo on stack; index is 4-byte arg
132 LIST = 'l' # build list from topmost stack items
135 PUT = 'p' # store stack top in memo; index is string arg
139 TUPLE = 't' # build tuple from topmost stack items
154 TUPLE1 = '\x85' # build 1-tuple from stack top
155 TUPLE2 = '\x86' # build 2-tuple from two topmost stack items
156 TUPLE3 = '\x87' # build 3-tuple from three topmost stack items
568 # now is to throw away everything we put on the stack, and
851 self.stack = []
852 self.append = self.stack.append
862 # Return largest index k such that self.stack[k] is self.mark.
863 # If the stack doesn't contain a mark, eventually raises IndexError.
864 # This could be sped by maintaining another stack, of indices at which
865 # the mark appears. For that matter, the latter stack would suffice,
866 # and we wouldn't need to push mark objects on self.stack at all.
871 stack = self.stack
873 k = len(stack)-1
874 while stack[k] is not mark: k = k-1
895 pid = self.stack.pop()
995 self.stack[k:] = [tuple(self.stack[k+1:])]
999 self.stack.append(())
1003 self.stack[-1] = (self.stack[-1],)
1007 self.stack[-2:] = [(self.stack[-2], self.stack[-1])]
1011 self.stack[-3:] = [(self.stack[-3], self.stack[-2], self.stack[-1])]
1015 self.stack.append([])
1019 self.stack.append({})
1024 self.stack[k:] = [self.stack[k+1:]]
1030 items = self.stack[k+1:]
1035 self.stack[k:] = [d]
1044 args = tuple(self.stack[k+1:])
1045 del self.stack[k:]
1074 # Stack is ... markobject classobject arg1 arg2 ...
1076 klass = self.stack.pop(k+1)
1081 args = self.stack.pop()
1082 cls = self.stack[-1]
1084 self.stack[-1] = obj
1130 stack = self.stack
1131 args = stack.pop()
1132 func = stack[-1]
1134 stack[-1] = value
1138 del self.stack[-1]
1143 del self.stack[k:]
1147 self.append(self.stack[-1])
1165 self.memo[self.readline()[:-1]] = self.stack[-1]
1170 self.memo[repr(i)] = self.stack[-1]
1175 self.memo[repr(i)] = self.stack[-1]
1179 stack = self.stack
1180 value = stack.pop()
1181 list = stack[-1]
1186 stack = self.stack
1188 list = stack[mark - 1]
1189 list.extend(stack[mark + 1:])
1190 del stack[mark:]
1194 stack = self.stack
1195 value = stack.pop()
1196 key = stack.pop()
1197 dict = stack[-1]
1202 stack = self.stack
1204 dict = stack[mark - 1]
1205 for i in range(mark + 1, len(stack), 2):
1206 dict[stack[i]] = stack[i + 1]
1208 del stack[mark:]
1212 stack = self.stack
1213 state = stack.pop()
1214 inst = stack[-1]
1255 value = self.stack.pop()