[pypy-commit] pypy Opcode-class: Merge FSFrame.record() into .do_operation()

rlamy noreply at buildbot.pypy.org
Sat May 4 02:05:35 CEST 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: Opcode-class
Changeset: r63828:fcd38d092db1
Date: 2013-05-02 04:14 +0100
http://bitbucket.org/pypy/pypy/changeset/fcd38d092db1/

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