]> granicus.if.org Git - python/commit
patches from Mark Hammond
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 2 May 2000 22:32:59 +0000 (22:32 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 2 May 2000 22:32:59 +0000 (22:32 +0000)
commitbe317e615e9c25f3f38062266b9b8a7ad86a1c90
treecbf3aed890a6896aa92505adcd6f89304edefd79
parent0a4f1ff64eeb50cdf0b81bd4cff5b2e1d159daa5
patches from Mark Hammond

Attached is a set of diffs for the .py compiler that adds support
for the new extended call syntax.

compiler/ast.py:
CallFunc node gets 2 new children to support extended call syntax -
"star_args" (for "*args") and "dstar_args" (for "**args")

compiler/pyassem.py
It appear that self.lnotab is supposed to be responsible for
tracking line numbers, but self.firstlineno was still hanging
around.  Removed self.firstlineno completely.  NOTE - I didnt
actually test that the generated code has the correct line numbers!!

Stack depth tracking appeared a little broken - the checks never
made it beyond the "self.patterns" check - thus, the custom methods
were never called!  Fixed this.

(XXX Jeremy notes: I think this code is still broken because it
doesn't track stack effects across block bounaries.)

Added support for the new extended call syntax opcodes for depth
calculations.

compiler/pycodegen.py

Added support for the new extended call syntax opcodes.

compiler/transformer.py

Added support for the new extended call syntax.
Lib/compiler/ast.py
Lib/compiler/pyassem.py
Lib/compiler/pycodegen.py
Lib/compiler/transformer.py
Tools/compiler/compiler/ast.py
Tools/compiler/compiler/pyassem.py
Tools/compiler/compiler/pycodegen.py
Tools/compiler/compiler/transformer.py