[pypy-commit] pypy optresult: add a fast path to avoid issues with JitVirtualRef
fijal
noreply at buildbot.pypy.org
Mon Jun 15 13:09:04 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: optresult
Changeset: r78110:69624489a478
Date: 2015-06-15 13:02 +0200
http://bitbucket.org/pypy/pypy/changeset/69624489a478/
Log: add a fast path to avoid issues with JitVirtualRef
diff --git a/rpython/jit/backend/llsupport/descr.py b/rpython/jit/backend/llsupport/descr.py
--- a/rpython/jit/backend/llsupport/descr.py
+++ b/rpython/jit/backend/llsupport/descr.py
@@ -130,8 +130,10 @@
cls = llmemory.cast_adr_to_ptr(
heaptracker.int2adr(self.parent_descr.get_vtable()),
lltype.Ptr(rclass.OBJECT_VTABLE))
- assert rclass.ll_isinstance(lltype.cast_opaque_ptr(
- rclass.OBJECTPTR, struct), cls)
+ tpptr = lltype.cast_opaque_ptr(rclass.OBJECTPTR, struct).typeptr
+ if tpptr != cls:
+ assert rclass.ll_isinstance(lltype.cast_opaque_ptr(
+ rclass.OBJECTPTR, struct), cls)
else:
pass
More information about the pypy-commit
mailing list