[pypy-svn] r75931 - in pypy/branch/reflex-support/pypy: annotation annotation/test jit/backend/llsupport jit/backend/llsupport/test jit/backend/x86 module/_locale rlib rpython/lltypesystem rpython/lltypesystem/test rpython/memory

arigo at codespeak.net arigo at codespeak.net
Tue Jul 6 18:27:01 CEST 2010


Author: arigo
Date: Tue Jul  6 18:26:59 2010
New Revision: 75931

Modified:
   pypy/branch/reflex-support/pypy/annotation/bookkeeper.py
   pypy/branch/reflex-support/pypy/annotation/model.py
   pypy/branch/reflex-support/pypy/annotation/test/test_model.py
   pypy/branch/reflex-support/pypy/jit/backend/llsupport/descr.py
   pypy/branch/reflex-support/pypy/jit/backend/llsupport/llmodel.py
   pypy/branch/reflex-support/pypy/jit/backend/llsupport/symbolic.py
   pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_descr.py
   pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_symbolic.py
   pypy/branch/reflex-support/pypy/jit/backend/x86/assembler.py
   pypy/branch/reflex-support/pypy/jit/backend/x86/regalloc.py
   pypy/branch/reflex-support/pypy/module/_locale/interp_locale.py
   pypy/branch/reflex-support/pypy/rlib/rlocale.py
   pypy/branch/reflex-support/pypy/rpython/lltypesystem/rffi.py
   pypy/branch/reflex-support/pypy/rpython/lltypesystem/test/test_rffi.py
   pypy/branch/reflex-support/pypy/rpython/memory/lltypelayout.py
Log:
Merge trunk, r75828:HEAD.


Modified: pypy/branch/reflex-support/pypy/annotation/bookkeeper.py
==============================================================================
--- pypy/branch/reflex-support/pypy/annotation/bookkeeper.py	(original)
+++ pypy/branch/reflex-support/pypy/annotation/bookkeeper.py	Tue Jul  6 18:26:59 2010
@@ -739,7 +739,7 @@
     """
     w_tuple = SomeTuple
     def newtuple(self, items_s):
-        if items_s == [Ellipsis]:
+        if len(items_s) == 1 and items_s[0] is Ellipsis:
             res = SomeObject()   # hack to get a SomeObject as the *arg
             res.from_ellipsis = True
             return res

Modified: pypy/branch/reflex-support/pypy/annotation/model.py
==============================================================================
--- pypy/branch/reflex-support/pypy/annotation/model.py	(original)
+++ pypy/branch/reflex-support/pypy/annotation/model.py	Tue Jul  6 18:26:59 2010
@@ -34,7 +34,7 @@
 from pypy.tool.pairtype import pair, extendabletype
 from pypy.tool.tls import tlsobject
 from pypy.rlib.rarithmetic import r_uint, r_ulonglong, base_int
-from pypy.rlib.rarithmetic import r_singlefloat
+from pypy.rlib.rarithmetic import r_singlefloat, isnan
 import inspect, weakref
 
 DEBUG = False    # set to False to disable recording of debugging information
@@ -162,6 +162,13 @@
                         # pretend it's a float.
     immutable = True
 
+    def __eq__(self, other):
+        # NaN unpleasantness.
+        if (self.is_constant() and other.is_constant() and
+            isnan(self.const) and isnan(other.const)):
+            return True
+        return super(SomeFloat, self).__eq__(other)
+
     def can_be_none(self):
         return False
 

Modified: pypy/branch/reflex-support/pypy/annotation/test/test_model.py
==============================================================================
--- pypy/branch/reflex-support/pypy/annotation/test/test_model.py	(original)
+++ pypy/branch/reflex-support/pypy/annotation/test/test_model.py	Tue Jul  6 18:26:59 2010
@@ -200,6 +200,15 @@
     s2.const=cls
     assert s1.contains(s2)
 
+def test_nan():
+    f1 = SomeFloat()
+    f1.const = float("nan")
+    f2 = SomeFloat()
+    f2.const = float("nan")
+    assert f1.contains(f1)
+    assert f2.contains(f1)
+    assert f1.contains(f2)
+
 if __name__ == '__main__':
     for name, value in globals().items():
         if name.startswith('test_'):

Modified: pypy/branch/reflex-support/pypy/jit/backend/llsupport/descr.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/llsupport/descr.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/llsupport/descr.py	Tue Jul  6 18:26:59 2010
@@ -151,7 +151,6 @@
     def repr_of_descr(self):
         return '<%s>' % self._clsname
 
-
 class NonGcPtrArrayDescr(BaseArrayDescr):
     _clsname = 'NonGcPtrArrayDescr'
     def get_item_size(self, translate_support_code):
@@ -161,17 +160,45 @@
     _clsname = 'GcPtrArrayDescr'
     _is_array_of_pointers = True
 
+_CA = rffi.CArray(lltype.Signed)
+
+class BaseArrayNoLengthDescr(BaseArrayDescr):
+    def get_base_size(self, translate_support_code):
+        basesize, _, _ = symbolic.get_array_token(_CA, translate_support_code)
+        return basesize
+
+    def get_ofs_length(self, translate_support_code):
+        _, _, ofslength = symbolic.get_array_token(_CA, translate_support_code)
+        return ofslength
+
+class NonGcPtrArrayNoLengthDescr(BaseArrayNoLengthDescr):
+    _clsname = 'NonGcPtrArrayNoLengthDescr'
+    def get_item_size(self, translate_support_code):
+        return symbolic.get_size_of_ptr(translate_support_code)
+
+class GcPtrArrayNoLengthDescr(NonGcPtrArrayNoLengthDescr):
+    _clsname = 'GcPtrArrayNoLengthDescr'
+    _is_array_of_pointers = True
+
 def getArrayDescrClass(ARRAY):
     return getDescrClass(ARRAY.OF, BaseArrayDescr, GcPtrArrayDescr,
                          NonGcPtrArrayDescr, 'Array', 'get_item_size',
                          '_is_array_of_floats')
 
+def getArrayNoLengthDescrClass(ARRAY):
+    return getDescrClass(ARRAY.OF, BaseArrayNoLengthDescr, GcPtrArrayNoLengthDescr,
+                         NonGcPtrArrayNoLengthDescr, 'ArrayNoLength', 'get_item_size',
+                         '_is_array_of_floats')
+
 def get_array_descr(gccache, ARRAY):
     cache = gccache._cache_array
     try:
         return cache[ARRAY]
     except KeyError:
-        arraydescr = getArrayDescrClass(ARRAY)()
+        if ARRAY._hints.get('nolength', False):
+            arraydescr = getArrayNoLengthDescrClass(ARRAY)()
+        else:
+            arraydescr = getArrayDescrClass(ARRAY)()
         # verify basic assumption that all arrays' basesize and ofslength
         # are equal
         basesize, itemsize, ofslength = symbolic.get_array_token(ARRAY, False)

Modified: pypy/branch/reflex-support/pypy/jit/backend/llsupport/llmodel.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/llsupport/llmodel.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/llsupport/llmodel.py	Tue Jul  6 18:26:59 2010
@@ -250,6 +250,7 @@
         ofs = arraydescr.get_ofs_length(self.translate_support_code)
         return rffi.cast(rffi.CArrayPtr(lltype.Signed), array)[ofs/WORD]
 
+    @specialize.argtype(2)
     def bh_getarrayitem_gc_i(self, arraydescr, gcref, itemindex):
         ofs, size = self.unpack_arraydescr_size(arraydescr)
         # --- start of GC unsafe code (no GC operation!) ---
@@ -272,6 +273,7 @@
         # --- end of GC unsafe code ---
         return pval
 
+    @specialize.argtype(2)
     def bh_getarrayitem_gc_f(self, arraydescr, gcref, itemindex):
         ofs = self.unpack_arraydescr(arraydescr)
         # --- start of GC unsafe code (no GC operation!) ---
@@ -281,6 +283,7 @@
         # --- end of GC unsafe code ---
         return fval
 
+    @specialize.argtype(2)
     def bh_setarrayitem_gc_i(self, arraydescr, gcref, itemindex, newvalue):
         ofs, size = self.unpack_arraydescr_size(arraydescr)
         # --- start of GC unsafe code (no GC operation!) ---
@@ -303,6 +306,7 @@
         items[itemindex] = self.cast_gcref_to_int(newvalue)
         # --- end of GC unsafe code ---
 
+    @specialize.argtype(2)
     def bh_setarrayitem_gc_f(self, arraydescr, gcref, itemindex, newvalue):
         ofs = self.unpack_arraydescr(arraydescr)
         # --- start of GC unsafe code (no GC operation!) ---
@@ -311,6 +315,12 @@
         items[itemindex] = newvalue
         # --- end of GC unsafe code ---
 
+    bh_setarrayitem_raw_i = bh_setarrayitem_gc_i
+    bh_setarrayitem_raw_f = bh_setarrayitem_gc_f
+
+    bh_getarrayitem_raw_i = bh_getarrayitem_gc_i
+    bh_getarrayitem_raw_f = bh_getarrayitem_gc_f
+
     def bh_strlen(self, string):
         s = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
         return len(s.chars)

Modified: pypy/branch/reflex-support/pypy/jit/backend/llsupport/symbolic.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/llsupport/symbolic.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/llsupport/symbolic.py	Tue Jul  6 18:26:59 2010
@@ -36,8 +36,11 @@
             ofs_length = (llmemory.offsetof(T, T._arrayfld) +
                           llmemory.ArrayLengthOffset(SUBARRAY))
         else:
+            if T._hints.get('nolength', None):
+                ofs_length = -1
+            else:
+                ofs_length = llmemory.ArrayLengthOffset(T)
             itemsize = llmemory.sizeof(T.OF)
-            ofs_length = llmemory.ArrayLengthOffset(T)
     else:
         if isinstance(T, lltype.Struct):
             assert T._arrayfld is not None, "%r is not variable-sized" % (T,)
@@ -48,8 +51,11 @@
         else:
             before_array_part = 0
         carray = ll2ctypes.get_ctypes_type(T)
-        assert carray.length.size == WORD
-        ofs_length = before_array_part + carray.length.offset
+        if T._hints.get('nolength', None):
+            ofs_length = -1
+        else:
+            assert carray.length.size == WORD
+            ofs_length = before_array_part + carray.length.offset
         basesize = before_array_part + carray.items.offset
         carrayitem = ll2ctypes.get_ctypes_type(T.OF)
         itemsize = ctypes.sizeof(carrayitem)

Modified: pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_descr.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_descr.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_descr.py	Tue Jul  6 18:26:59 2010
@@ -140,7 +140,25 @@
     assert isinstance(descr2.get_item_size(True), Symbolic)
     assert isinstance(descr3.get_item_size(True), Symbolic)
     assert isinstance(descr4.get_item_size(True), Symbolic)
-
+    CA = rffi.CArray(lltype.Signed)
+    descr = get_array_descr(c0, CA)
+    assert not descr.is_array_of_floats()
+    assert descr.get_base_size(False) == 0
+    assert descr.get_ofs_length(False) == -1
+    CA = rffi.CArray(lltype.Ptr(lltype.GcStruct('S')))
+    descr = get_array_descr(c0, CA)
+    assert descr.is_array_of_pointers()
+    assert descr.get_base_size(False) == 0
+    assert descr.get_ofs_length(False) == -1
+    CA = rffi.CArray(lltype.Ptr(lltype.Struct('S')))
+    descr = get_array_descr(c0, CA)
+    assert descr.get_base_size(False) == 0
+    assert descr.get_ofs_length(False) == -1
+    CA = rffi.CArray(lltype.Float)
+    descr = get_array_descr(c0, CA)
+    assert descr.is_array_of_floats()
+    assert descr.get_base_size(False) == 0
+    assert descr.get_ofs_length(False) == -1
 
 def test_get_call_descr_not_translated():
     c0 = GcCache(False)

Modified: pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_symbolic.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_symbolic.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_symbolic.py	Tue Jul  6 18:26:59 2010
@@ -61,6 +61,12 @@
         assert basesize >= WORD # at least the 'length', maybe some gc headers
         assert itemsize == WORD
         assert ofs_length == basesize - WORD
+        A = rffi.CArray(lltype.Signed)
+        arraytok = get_array_token(A, translate_support_code)
+        basesize, itemsize, ofs_length = convert(arraytok)
+        assert basesize == 0
+        assert itemsize == WORD
+        assert ofs_length == -1
 
 def test_varsized_struct_size():    
     S1 = lltype.GcStruct('S1', ('parent', S),

Modified: pypy/branch/reflex-support/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/x86/assembler.py	Tue Jul  6 18:26:59 2010
@@ -815,6 +815,7 @@
                 raise NotImplementedError()
 
     genop_getarrayitem_gc_pure = genop_getarrayitem_gc
+    genop_getarrayitem_raw = genop_getarrayitem_gc
 
     def genop_discard_setfield_gc(self, op, arglocs):
         base_loc, ofs_loc, size_loc, value_loc = arglocs

Modified: pypy/branch/reflex-support/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/reflex-support/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/reflex-support/pypy/jit/backend/x86/regalloc.py	Tue Jul  6 18:26:59 2010
@@ -867,6 +867,7 @@
         result_loc = self.force_allocate_reg(op.result)
         self.Perform(op, [base_loc, ofs_loc, imm(scale), imm(ofs)], result_loc)
 
+    consider_getarrayitem_raw = consider_getarrayitem_gc
     consider_getarrayitem_gc_pure = consider_getarrayitem_gc
 
     def consider_int_is_true(self, op, guard_op):

Modified: pypy/branch/reflex-support/pypy/module/_locale/interp_locale.py
==============================================================================
--- pypy/branch/reflex-support/pypy/module/_locale/interp_locale.py	(original)
+++ pypy/branch/reflex-support/pypy/module/_locale/interp_locale.py	Tue Jul  6 18:26:59 2010
@@ -132,7 +132,13 @@
        space.is_true(space.isinstance(w_s2, space.w_str)):
 
         s1, s2 = space.str_w(w_s1), space.str_w(w_s2)
-        return space.wrap(_strcoll(rffi.str2charp(s1), rffi.str2charp(s2)))
+        s1_c = rffi.str2charp(s1)
+        s2_c = rffi.str2charp(s2)
+        try:
+            return space.wrap(_strcoll(s1_c, s2_c))
+        finally:
+            rffi.free_charp(s1_c)
+            rffi.free_charp(s2_c)
 
     #if not space.is_true(space.isinstance(w_s1, space.w_unicode)) and \
     #   not space.is_true(space.isinstance(w_s2, space.w_unicode)):
@@ -143,7 +149,12 @@
 
     s1_c = rffi.unicode2wcharp(s1)
     s2_c = rffi.unicode2wcharp(s2)
-    result = _wcscoll(s1_c, s2_c)
+    try:
+        result = _wcscoll(s1_c, s2_c)
+    finally:
+        rffi.free_wcharp(s1_c)
+        rffi.free_wcharp(s2_c)
+
     return space.wrap(result)
 
 strcoll.unwrap_spec = [ObjSpace, W_Root, W_Root]
@@ -156,13 +167,21 @@
     n1 = len(s) + 1
 
     buf = lltype.malloc(rffi.CCHARP.TO, n1, flavor="raw", zero=True)
-    n2 = _strxfrm(buf, rffi.str2charp(s), n1) + 1
+    s_c = rffi.str2charp(s)
+    try:
+        n2 = _strxfrm(buf, s_c, n1) + 1
+    finally:
+        rffi.free_charp(s_c)
     if n2 > n1:
         # more space needed
         lltype.free(buf, flavor="raw")
         buf = lltype.malloc(rffi.CCHARP.TO, intmask(n2),
                             flavor="raw", zero=True)
-        _strxfrm(buf, rffi.str2charp(s), n2)
+        s_c = rffi.str2charp(s)
+        try:
+            _strxfrm(buf, s_c, n2)
+        finally:
+            rffi.free_charp(s_c)
 
     val = rffi.charp2str(buf)
     lltype.free(buf, flavor="raw")
@@ -194,7 +213,11 @@
     def gettext(space, msg):
         """gettext(msg) -> string
         Return translation of msg."""
-        return space.wrap(rffi.charp2str(_gettext(rffi.str2charp(msg))))
+        msg_c = rffi.str2charp(msg)
+        try:
+            return space.wrap(rffi.charp2str(_gettext(msg_c)))
+        finally:
+            rffi.free_charp(msg_c)
 
     gettext.unwrap_spec = [ObjSpace, str]
 
@@ -205,10 +228,20 @@
         Return translation of msg in domain."""
         if space.is_w(w_domain, space.w_None):
             domain = None
-            result = _dgettext(domain, rffi.str2charp(msg))
+            msg_c = rffi.str2charp(msg)
+            try:
+                result = _dgettext(domain, msg_c)
+            finally:
+                rffi.free_charp(msg_c)
         else:
             domain = space.str_w(w_domain)
-            result = _dgettext(rffi.str2charp(domain), rffi.str2charp(msg))
+            domain_c = rffi.str2charp(domain)
+            msg_c = rffi.str2charp(msg)
+            try:
+                result = _dgettext(domain_c, msg_c)
+            finally:
+                rffi.free_charp(domain_c)
+                rffi.free_charp(msg_c)
 
         return space.wrap(rffi.charp2str(result))
 
@@ -223,12 +256,21 @@
 
         if space.is_w(w_domain, space.w_None):
             domain = None
-            result = _dcgettext(domain, rffi.str2charp(msg),
-                                rffi.cast(rffi.INT, category))
+            msg_c = rffi.str2charp(msg)
+            try:
+                result = _dcgettext(domain, msg_c, rffi.cast(rffi.INT, category))
+            finally:
+                rffi.free_charp(msg_c)
         else:
             domain = space.str_w(w_domain)
-            result = _dcgettext(rffi.str2charp(domain), rffi.str2charp(msg),
-                                rffi.cast(rffi.INT, category))
+            domain_c = rffi.str2charp(domain)
+            msg_c = rffi.str2charp(msg)
+            try:
+                result = _dcgettext(domain_c, msg_c,
+                                    rffi.cast(rffi.INT, category))
+            finally:
+                rffi.free_charp(domain_c)
+                rffi.free_charp(msg_c)
 
         return space.wrap(rffi.charp2str(result))
 
@@ -246,7 +288,11 @@
             result = _textdomain(domain)
         else:
             domain = space.str_w(w_domain)
-            result = _textdomain(rffi.str2charp(domain))
+            domain_c = rffi.str2charp(domain)
+            try:
+                result = _textdomain(domain_c)
+            finally:
+                rffi.free_charp(domain_c)
 
         return space.wrap(rffi.charp2str(result))
 
@@ -261,11 +307,20 @@
 
         if space.is_w(w_dir, space.w_None):
             dir = None
-            dirname = _bindtextdomain(rffi.str2charp(domain), dir)
+            domain_c = rffi.str2charp(domain)
+            try:
+                dirname = _bindtextdomain(domain_c, dir)
+            finally:
+                rffi.free_charp(domain_c)
         else:
             dir = space.str_w(w_dir)
-            dirname = _bindtextdomain(rffi.str2charp(domain),
-                                        rffi.str2charp(dir))
+            domain_c = rffi.str2charp(domain)
+            dir_c = rffi.str2charp(dir)
+            try:
+                dirname = _bindtextdomain(domain_c, dir_c)
+            finally:
+                rffi.free_charp(domain_c)
+                rffi.free_charp(dir_c)
 
         if not dirname:
             errno = rposix.get_errno()
@@ -284,12 +339,20 @@
 
             if space.is_w(w_codeset, space.w_None):
                 codeset = None
-                result = _bind_textdomain_codeset(
-                                            rffi.str2charp(domain), codeset)
+                domain_c = rffi.str2charp(domain)
+                try:
+                    result = _bind_textdomain_codeset(domain_c, codeset)
+                finally:
+                    rffi.free_charp(domain_c)
             else:
                 codeset = space.str_w(w_codeset)
-                result = _bind_textdomain_codeset(rffi.str2charp(domain),
-                                                rffi.str2charp(codeset))
+                domain_c = rffi.str2charp(domain)
+                codeset_c = rffi.str2charp(codeset)
+                try:
+                    result = _bind_textdomain_codeset(domain_c, codeset_c)
+                finally:
+                    rffi.free_charp(domain_c)
+                    rffi.free_charp(codeset_c)
 
             if not result:
                 return space.w_None

Modified: pypy/branch/reflex-support/pypy/rlib/rlocale.py
==============================================================================
--- pypy/branch/reflex-support/pypy/rlib/rlocale.py	(original)
+++ pypy/branch/reflex-support/pypy/rlib/rlocale.py	Tue Jul  6 18:26:59 2010
@@ -13,15 +13,15 @@
         self.message = message
 
 HAVE_LANGINFO = sys.platform != 'win32'
-#HAVE_LIBINTL  = sys.platform != 'win32'
+HAVE_LIBINTL  = sys.platform != 'win32'
 
 class CConfig:
     includes = ['locale.h', 'limits.h']
 
     if HAVE_LANGINFO:
         includes += ['langinfo.h']
-    #if HAVE_LIBINTL:
-    #    includes += ['libintl.h']
+    if HAVE_LIBINTL:
+        includes += ['libintl.h']
     if sys.platform == 'win32':
         includes += ['windows.h']
     _compilation_info_ = ExternalCompilationInfo(

Modified: pypy/branch/reflex-support/pypy/rpython/lltypesystem/rffi.py
==============================================================================
--- pypy/branch/reflex-support/pypy/rpython/lltypesystem/rffi.py	(original)
+++ pypy/branch/reflex-support/pypy/rpython/lltypesystem/rffi.py	Tue Jul  6 18:26:59 2010
@@ -786,6 +786,8 @@
         return r_wchar_t.BITS/8
     if tp is lltype.Float:
         return 8
+    if tp is lltype.SingleFloat:
+        return 4
     assert isinstance(tp, lltype.Number)
     if tp is lltype.Signed:
         return ULONG._type.BITS/8

Modified: pypy/branch/reflex-support/pypy/rpython/lltypesystem/test/test_rffi.py
==============================================================================
--- pypy/branch/reflex-support/pypy/rpython/lltypesystem/test/test_rffi.py	(original)
+++ pypy/branch/reflex-support/pypy/rpython/lltypesystem/test/test_rffi.py	Tue Jul  6 18:26:59 2010
@@ -707,6 +707,7 @@
             lltype.UniChar:  ctypes.c_wchar,
             lltype.Char:     ctypes.c_ubyte,
             DOUBLE:     ctypes.c_double,
+            FLOAT:      ctypes.c_float,
             SIGNEDCHAR: ctypes.c_byte,
             UCHAR:      ctypes.c_ubyte,
             SHORT:      ctypes.c_short,

Modified: pypy/branch/reflex-support/pypy/rpython/memory/lltypelayout.py
==============================================================================
--- pypy/branch/reflex-support/pypy/rpython/memory/lltypelayout.py	(original)
+++ pypy/branch/reflex-support/pypy/rpython/memory/lltypelayout.py	Tue Jul  6 18:26:59 2010
@@ -111,6 +111,8 @@
     elif isinstance(offset, llmemory.ItemOffset):
         return sizeof(offset.TYPE) * offset.repeat
     elif isinstance(offset, llmemory.ArrayItemsOffset):
+        if offset.TYPE._hints.get('nolength', None):
+            return 0
         return get_fixed_size(lltype.Signed)
     elif isinstance(offset, llmemory.GCHeaderOffset):
         return sizeof(offset.gcheaderbuilder.HDR)



More information about the Pypy-commit mailing list