summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/pyassem.py
Commit message (Collapse)AuthorAgeFilesLines
* complete rewriteJeremy Hylton2000-03-161-283/+341
| | | | | | | | | code generator uses flowgraph as intermediate representation. the old rep uses a list with explicit "StackRefs" to indicate the target of jumps. pyassem converts flowgraph to bytecode, breaks up individual steps of generating bytecode
* revise arguments for addCode method on lnotab. take several numbersJeremy Hylton2000-03-061-10/+13
| | | | that are internally converted to chars, rather than taking a string.
* satisfy the tabnanny (thanks to MH for noticing the problem)Jeremy Hylton2000-02-211-90/+90
|
* changes to _lookupNameJeremy Hylton2000-02-171-14/+13
| | | | | | - removed now (happily) unused second arg - need to verify results of [].index are correct; for building consts, need to have same value and same type, e.g. 2 not the same as 2L
* the previous quick hack to fix def foo((x,y)) failed on some casesJeremy Hylton2000-02-171-9/+23
| | | | | | | | | | | | | | | (big surprise). new solution is a little less hackish. Code gen adds a TupleArg instance in the argument slot. The tuple arg includes a copy of the names that it is responsble for binding. The PyAssembler uses this information to calculate the correct argcount. all fix this wacky case: del (a, ((b,), c)), d which is the same as: del a, b, c, d (Can't wait for Guido to tell me why.) solution uses findOp which walks a tree to find out whether it contains OP_ASSIGN or OP_DELETE or ...
* fix argcount generation for arg lists containing tuple unpacksJeremy Hylton2000-02-161-2/+13
| | | | this is sort of a hack
* add a little debugging support when new.code raises SystemErrorJeremy Hylton2000-02-151-5/+21
|
* split compile.py into two filesJeremy Hylton2000-02-141-0/+437
add StackDepthFinder (and remove push/pop from CodeGen) add several nodes, including Ellipsis, Bit&|^, Exec