summaryrefslogtreecommitdiffstats
path: root/Tools/compiler
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-08-27 21:58:09 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-08-27 21:58:09 (GMT)
commit80ea40d8585a0e8d67dcf1f1900e8dfe27510927 (patch)
tree0fcaf67991275b1474192df837b158a4ab3ca472 /Tools/compiler
parent2afff324ea3e987bb83503932ffc405a9940a37e (diff)
downloadcpython-80ea40d8585a0e8d67dcf1f1900e8dfe27510927.zip
cpython-80ea40d8585a0e8d67dcf1f1900e8dfe27510927.tar.gz
cpython-80ea40d8585a0e8d67dcf1f1900e8dfe27510927.tar.bz2
emit SET_LINENO for augmented assignments
Diffstat (limited to 'Tools/compiler')
-rw-r--r--Tools/compiler/compiler/pycodegen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tools/compiler/compiler/pycodegen.py b/Tools/compiler/compiler/pycodegen.py
index 67a1033..37b51bf 100644
--- a/Tools/compiler/compiler/pycodegen.py
+++ b/Tools/compiler/compiler/pycodegen.py
@@ -117,6 +117,9 @@ def is_constant_false(node):
return 1
return 0
+def mangle(name):
+ return name
+
class CodeGenerator:
"""Defines basic code generator for Python bytecode
@@ -694,6 +697,7 @@ class CodeGenerator:
# augmented assignment
def visitAugAssign(self, node):
+ self.set_lineno(node)
aug_node = wrap_aug(node.node)
self.visit(aug_node, "load")
self.visit(node.expr)