[pypy-commit] pypy flowoperators: Merge FSFrame.record() into .do_operation()
rlamy
noreply at buildbot.pypy.org
Fri Jul 5 19:41:49 CEST 2013
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: flowoperators
Changeset: r65212:2e08f401ff36
Date: 2013-05-02 04:14 +0100
http://bitbucket.org/pypy/pypy/changeset/2e08f401ff36/
Log: Merge FSFrame.record() into .do_operation()
diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -449,21 +449,17 @@
self.last_instr = state.next_instr
self.blockstack = state.blocklist[:]
- def record(self, spaceop):
- """Record an operation into the active block"""
+ def guessbool(self, w_condition, **kwds):
+ return self.recorder.guessbool(self, w_condition, **kwds)
+
+ def do_operation(self, name, *args_w):
recorder = self.recorder
if getattr(recorder, 'final_state', None) is not None:
self.mergeblock(recorder.crnt_block, recorder.final_state)
raise StopFlowing
- recorder.append(spaceop)
-
- def guessbool(self, w_condition, **kwds):
- return self.recorder.guessbool(self, w_condition, **kwds)
-
- def do_operation(self, name, *args_w):
spaceop = SpaceOperation(name, args_w, Variable())
spaceop.offset = self.last_instr
- self.record(spaceop)
+ recorder.append(spaceop)
return spaceop.result
def do_operation_with_implicit_exceptions(self, name, *args_w):
More information about the pypy-commit
mailing list