[pypy-commit] pypy guard-compatible: fix fast isinstance check with guard_compatible

cfbolz pypy.commits at gmail.com
Tue Sep 20 07:58:00 EDT 2016


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: guard-compatible
Changeset: r87253:ccf32f0e0a8d
Date: 2016-09-20 13:57 +0200
http://bitbucket.org/pypy/pypy/changeset/ccf32f0e0a8d/

Log:	fix fast isinstance check with guard_compatible

diff --git a/pypy/module/__builtin__/abstractinst.py b/pypy/module/__builtin__/abstractinst.py
--- a/pypy/module/__builtin__/abstractinst.py
+++ b/pypy/module/__builtin__/abstractinst.py
@@ -102,7 +102,8 @@
     # PyObject_IsInstance() logic.
 
     # Quick test for an exact match
-    if space.type(w_obj) is w_klass_or_tuple:
+    # disabled with jit to make it not impose a strong type condition
+    if not jit.we_are_jitted() and space.type(w_obj) is w_klass_or_tuple:
         return True
 
     # -- case (anything, tuple)


More information about the pypy-commit mailing list