Home | History | Annotate | Download | only in python2.7

Lines Matching refs:memo

9 dis(pickle, out=None, memo=None, indentlevel=4)
39 The PM has two data areas, "the stack" and "the memo".
47 The memo is simply an array of objects, or it can be implemented as a dict
48 mapping little integers to objects. The memo serves as the PM's "long term
49 memory", and the little integers indexing the memo are akin to variable
50 names. Some opcodes pop a stack object into the memo at a given index,
51 and others push a memo object at a given index onto the stack again.
128 efficiently by index (EXT{1,2,4}). This is akin to the memo and GET, but
129 the registry contents are predefined (there's nothing akin to the memo's
1362 # Memo manipulation. There are really only two operations (get and put),
1371 doc="""Read an object from the memo and push it on the stack.
1373 The index of the memo object to push is given by the newline-terminated
1384 doc="""Read an object from the memo and push it on the stack.
1386 The index of the memo object to push is given by the 1-byte unsigned
1396 doc="""Read an object from the memo and push it on the stack.
1398 The index of the memo object to push is given by the 4-byte signed
1408 doc="""Store the stack top into the memo. The stack is not popped.
1410 The index of the memo location to write into is given by the newline-
1421 doc="""Store the stack top into the memo. The stack is not popped.
1423 The index of the memo location to write into is given by the 1-byte
1433 doc="""Store the stack top into the memo. The stack is not popped.
1435 The index of the memo location to write into is given by the 4-byte
1636 is taken off the stack, allowing it to be retrieved from the memo
1891 def dis(pickle, out=None, memo=None, indentlevel=4):
1901 Optional arg 'memo' is a Python dict, used as the pickle's memo. It
1903 Passing the same memo object to another dis() call then allows disassembly
1905 pickler with the same memo. Ordinarily you don't need to worry about this.
1919 + A memo entry isn't referenced before it's defined.
1921 + The markobject isn't stored in the memo.
1923 + A memo entry isn't redefined.
1931 if memo is None:
1932 memo = {} # crude emulation of unpicker memo
1978 # Check for correct memo usage.
1981 if arg in memo:
1982 errormsg = "memo key %r already defined" % arg
1984 errormsg = "stack is empty -- can't store into memo"
1986 errormsg = "can't store markobject in the memo"
1988 memo[arg] = stack[-1]
1991 if arg in memo:
1993 after = [memo[arg]] # for better stack emulation
1995 errormsg = "memo key %r has never been stored into" % arg
2246 >>> memo = {}
2247 >>> dis(f, memo=memo)
2258 >>> dis(f, memo=memo)