diff options
Diffstat (limited to 'Lib/compiler/pyassem.py')
-rw-r--r-- | Lib/compiler/pyassem.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py index 86e2c49..9f45d61 100644 --- a/Lib/compiler/pyassem.py +++ b/Lib/compiler/pyassem.py @@ -19,10 +19,10 @@ class FlowGraph: def startBlock(self, block): if self._debug: if self.current: - print "end", repr(self.current) - print " next", self.current.next - print " ", self.current.get_children() - print repr(block) + print("end", repr(self.current)) + print(" next", self.current.next) + print(" ", self.current.get_children()) + print(repr(block)) self.current = block def nextBlock(self, block=None): @@ -68,7 +68,7 @@ class FlowGraph: def emit(self, *inst): if self._debug: - print "\t", inst + print("\t", inst) if inst[0] in ['RETURN_VALUE', 'YIELD_VALUE']: self.current.addOutEdge(self.exit) if len(inst) == 2 and isinstance(inst[1], Block): @@ -400,12 +400,12 @@ class PyFlowGraph(FlowGraph): for t in self.insts: opname = t[0] if opname == "SET_LINENO": - print + print() if len(t) == 1: - print "\t", "%3d" % pc, opname + print("\t", "%3d" % pc, opname) pc = pc + 1 else: - print "\t", "%3d" % pc, opname, t[1] + print("\t", "%3d" % pc, opname, t[1]) pc = pc + 3 if io: sys.stdout = save @@ -601,8 +601,8 @@ class PyFlowGraph(FlowGraph): try: lnotab.addCode(self.opnum[opname], lo, hi) except ValueError: - print opname, oparg - print self.opnum[opname], lo, hi + print(opname, oparg) + print(self.opnum[opname], lo, hi) raise self.stage = DONE @@ -744,7 +744,7 @@ class StackDepthTracker: for i in insts: opname = i[0] if debug: - print i, + print(i, end=' ') delta = self.effect.get(opname, None) if delta is not None: depth = depth + delta @@ -763,7 +763,7 @@ class StackDepthTracker: if depth > maxDepth: maxDepth = depth if debug: - print depth, maxDepth + print(depth, maxDepth) return maxDepth effect = { |