Author: Armin Rigo <ar...@tunes.org>
Branch: conditional_call_value_2
Changeset: r86991:b3f2dba6bb50
Date: 2016-09-11 10:59 +0200
http://bitbucket.org/pypy/pypy/changeset/b3f2dba6bb50/

Log:    in-progress

diff --git a/rpython/jit/backend/llgraph/runner.py 
b/rpython/jit/backend/llgraph/runner.py
--- a/rpython/jit/backend/llgraph/runner.py
+++ b/rpython/jit/backend/llgraph/runner.py
@@ -1328,11 +1328,21 @@
         x = math.sqrt(y)
         return support.cast_to_floatstorage(x)
 
-    def execute_cond_call(self, calldescr, cond, func, *args):
-        if not cond:
-            return
-        # cond_call can't have a return value
-        self.execute_call_n(calldescr, func, *args)
+    def execute_cond_call_i(self, calldescr, cond, specialval, func, *args):
+        if cond == specialval:
+            cond = self.execute_call_i(calldescr, func, *args)
+        return cond
+
+    def execute_cond_call_r(self, calldescr, cond, specialval, func, *args):
+        if cond == specialval:
+            cond = self.execute_call_r(calldescr, func, *args)
+        return cond
+
+    def execute_cond_call_n(self, calldescr, cond, specialval, func, *args):
+        assert specialval == 1
+        assert cond in (0, 1)
+        if cond == specialval:
+            self.execute_call_n(calldescr, func, *args)
 
     def _execute_call(self, calldescr, func, *args):
         effectinfo = calldescr.get_extra_info()
diff --git a/rpython/jit/metainterp/pyjitpl.py 
b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -1074,9 +1074,9 @@
     @arguments("box", "box", "box", "boxes2", "descr", "orgpc")
     def opimpl_conditional_call_ir_v(self, condbox, specialvalbox,
                                      funcbox, argboxes, calldescr, pc):
-        return self.do_conditional_call(condbox, specialvalbox,
-                                        funcbox, argboxes, calldescr, pc,
-                                        rop.COND_CALL_N)
+        self.do_conditional_call(condbox, specialvalbox,
+                                 funcbox, argboxes, calldescr, pc,
+                                 rop.COND_CALL_N)
 
     @arguments("int", "boxes3", "boxes3", "orgpc")
     def _opimpl_recursive_call(self, jdindex, greenboxes, redboxes, pc):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to