emit SET_LINENO for augmented assignments
This commit is contained in:
parent
2afff324ea
commit
80ea40d858
|
@ -117,6 +117,9 @@ def is_constant_false(node):
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
def mangle(name):
|
||||||
|
return name
|
||||||
|
|
||||||
class CodeGenerator:
|
class CodeGenerator:
|
||||||
"""Defines basic code generator for Python bytecode
|
"""Defines basic code generator for Python bytecode
|
||||||
|
|
||||||
|
@ -694,6 +697,7 @@ class CodeGenerator:
|
||||||
# augmented assignment
|
# augmented assignment
|
||||||
|
|
||||||
def visitAugAssign(self, node):
|
def visitAugAssign(self, node):
|
||||||
|
self.set_lineno(node)
|
||||||
aug_node = wrap_aug(node.node)
|
aug_node = wrap_aug(node.node)
|
||||||
self.visit(aug_node, "load")
|
self.visit(aug_node, "load")
|
||||||
self.visit(node.expr)
|
self.visit(node.expr)
|
||||||
|
|
|
@ -117,6 +117,9 @@ def is_constant_false(node):
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
def mangle(name):
|
||||||
|
return name
|
||||||
|
|
||||||
class CodeGenerator:
|
class CodeGenerator:
|
||||||
"""Defines basic code generator for Python bytecode
|
"""Defines basic code generator for Python bytecode
|
||||||
|
|
||||||
|
@ -694,6 +697,7 @@ class CodeGenerator:
|
||||||
# augmented assignment
|
# augmented assignment
|
||||||
|
|
||||||
def visitAugAssign(self, node):
|
def visitAugAssign(self, node):
|
||||||
|
self.set_lineno(node)
|
||||||
aug_node = wrap_aug(node.node)
|
aug_node = wrap_aug(node.node)
|
||||||
self.visit(aug_node, "load")
|
self.visit(aug_node, "load")
|
||||||
self.visit(node.expr)
|
self.visit(node.expr)
|
||||||
|
|
Loading…
Reference in New Issue