mirror of
https://github.com/python/cpython.git
synced 2024-11-29 21:05:33 +08:00
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 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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user