Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: less-stringly-ops
Changeset: r66230:5766800b98b6
Date: 2013-08-09 02:20 +0100
http://bitbucket.org/pypy/pypy/changeset/5766800b98b6/

Log:    Extract record() from FSFrame.do_operation()

diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -439,14 +439,17 @@
         return self.recorder.guessbool(self, w_condition, **kwds)
 
     def do_operation(self, name, *args_w):
+        spaceop = SpaceOperation(name, args_w, Variable())
+        self.record(spaceop)
+        return spaceop.result
+
+    def record(self, spaceop):
         recorder = self.recorder
         if getattr(recorder, 'final_state', None) is not None:
             self.mergeblock(recorder.crnt_block, recorder.final_state)
             raise StopFlowing
-        spaceop = SpaceOperation(name, args_w, Variable())
         spaceop.offset = self.last_instr
         recorder.append(spaceop)
-        return spaceop.result
 
     def do_op(self, operator, *args_w):
         w_result = self.do_operation(operator.name, *args_w)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to