[pypy-svn] r65757 - pypy/branch/pyjitpl5/pypy/rpython/memory/gctransform
arigo at codespeak.net
arigo at codespeak.net
Sat Jun 13 20:30:47 CEST 2009
Author: arigo
Date: Sat Jun 13 20:30:46 2009
New Revision: 65757
Modified:
pypy/branch/pyjitpl5/pypy/rpython/memory/gctransform/asmgcroot.py
Log:
Fix a bug. Only shown by one test in the JIT, which still fails :-(
Modified: pypy/branch/pyjitpl5/pypy/rpython/memory/gctransform/asmgcroot.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/rpython/memory/gctransform/asmgcroot.py (original)
+++ pypy/branch/pyjitpl5/pypy/rpython/memory/gctransform/asmgcroot.py Sat Jun 13 20:30:46 2009
@@ -179,13 +179,13 @@
gcmapend2 = self._extra_gcmapend()
if gcmapstart2 != gcmapend2:
# we have a non-empty JIT-produced table to look in
- item = search_in_gcmap(gcmapstart2, gcmapend2, retaddr)
+ item = search_in_gcmap2(gcmapstart2, gcmapend2, retaddr)
if item:
self._shape_decompressor.setaddr(item.address[1])
return
# maybe the JIT-produced table is not sorted?
sort_gcmap(gcmapstart2, gcmapend2)
- item = search_in_gcmap(gcmapstart2, gcmapend2, retaddr)
+ item = search_in_gcmap2(gcmapstart2, gcmapend2, retaddr)
if item:
self._shape_decompressor.setaddr(item.address[1])
return
@@ -263,6 +263,15 @@
else:
return llmemory.NULL # failed
+def search_in_gcmap2(gcmapstart, gcmapend, retaddr):
+ # same as 'search_in_gcmap', but without range checking support
+ # (item.signed[1] is an address in this case, not a signed at all!)
+ item = binary_search(gcmapstart, gcmapend, retaddr)
+ if item.address[0] == retaddr:
+ return item # found
+ else:
+ return llmemory.NULL # failed
+
def sort_gcmap(gcmapstart, gcmapend):
count = (gcmapend - gcmapstart) // arrayitemsize
qsort(gcmapstart,
More information about the Pypy-commit
mailing list