Author: Carl Friedrich Bolz <[email protected]>
Branch: value-profiling
Changeset: r81889:28a4d2d1f711
Date: 2016-01-21 13:51 +0100
http://bitbucket.org/pypy/pypy/changeset/28a4d2d1f711/

Log:    another one, for loop constants

diff --git a/pypy/module/pypyjit/test_pypy_c/test_call.py 
b/pypy/module/pypyjit/test_pypy_c/test_call.py
--- a/pypy/module/pypyjit/test_pypy_c/test_call.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_call.py
@@ -625,3 +625,19 @@
                 i += 1
             return 13
         """, [1000])
+
+    def test_no_type_check_for_loopconst(self):
+        log = self.run("""
+
+        def main(stop):
+            a = [1, 2] # always a W_ListObject
+            i = 0
+            while i < stop:
+                i += isinstance(a, list) # ID: isinstance
+            return 13
+        """, [1000])
+        entry_bridge, = log.loops_by_id('isinstance', is_entry_bridge=True)
+        entry_bridge.match_by_id("isinstance", """
+            i1 = int_add(i0, 1)
+            --TICK--
+        """)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to