[pypy-commit] pypy translation-cleanup: Inline FSFrame.dispatch_bytecode()
rlamy
noreply at buildbot.pypy.org
Thu Sep 20 19:39:07 CEST 2012
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r57423:a4906822a9fa
Date: 2012-09-15 17:12 +0100
http://bitbucket.org/pypy/pypy/changeset/a4906822a9fa/
Log: Inline FSFrame.dispatch_bytecode()
diff --git a/pypy/objspace/flow/flowcontext.py b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -426,7 +426,13 @@
def handle_bytecode(self, next_instr):
try:
- next_instr = self.dispatch_bytecode(next_instr)
+ while True:
+ self.last_instr = next_instr
+ self.recorder.bytecode_trace(self)
+ next_instr, methodname, oparg = self.pycode.read(next_instr)
+ res = getattr(self, methodname)(oparg, next_instr)
+ if res is not None:
+ next_instr = res
except OperationThatShouldNotBePropagatedError, e:
raise Exception(
'found an operation that always raises %s: %s' % (
@@ -462,18 +468,6 @@
next_instr = block.handle(self, unroller)
return next_instr
- def enter_bytecode(self, next_instr):
- self.last_instr = next_instr
- self.recorder.bytecode_trace(self)
-
- def dispatch_bytecode(self, next_instr):
- while True:
- self.enter_bytecode(next_instr)
- next_instr, methodname, oparg = self.pycode.read(next_instr)
- res = getattr(self, methodname)(oparg, next_instr)
- if res is not None:
- next_instr = res
-
def IMPORT_NAME(self, nameindex, next_instr):
space = self.space
modulename = self.getname_u(nameindex)
More information about the pypy-commit
mailing list