Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r69849:2c20730cc1bd
Date: 2014-03-11 09:32 +0100
http://bitbucket.org/pypy/pypy/changeset/2c20730cc1bd/

Log:    A potential way to implement better "x in constant-tuple"?

diff --git a/rpython/jit/metainterp/test/test_ajit.py 
b/rpython/jit/metainterp/test/test_ajit.py
--- a/rpython/jit/metainterp/test/test_ajit.py
+++ b/rpython/jit/metainterp/test/test_ajit.py
@@ -3970,3 +3970,11 @@
             return a.x
         res = self.interp_operations(f, [42])
         assert res == 0
+
+    def test_conditions_without_guards(self):
+        def f(n):
+            if (n == 1) | (n == 3) | (n == 17):
+                return 42
+            return 5
+        res = self.interp_operations(f, [17])
+        assert res == 42
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to