Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r58825:3a1564fee4e4 Date: 2012-11-11 10:09 +0100 http://bitbucket.org/pypy/pypy/changeset/3a1564fee4e4/
Log: merge heads diff --git a/pypy/jit/backend/llsupport/llmodel.py b/pypy/jit/backend/llsupport/llmodel.py --- a/pypy/jit/backend/llsupport/llmodel.py +++ b/pypy/jit/backend/llsupport/llmodel.py @@ -312,7 +312,7 @@ ofs = arraydescr.lendescr.offset return rffi.cast(rffi.CArrayPtr(lltype.Signed), array)[ofs/WORD] - @specialize.argtype(2) + @specialize.argtype(1) def bh_getarrayitem_gc_i(self, gcref, itemindex, arraydescr): ofs, size, sign = self.unpack_arraydescr_size(arraydescr) # --- start of GC unsafe code (no GC operation!) --- @@ -341,7 +341,7 @@ # --- end of GC unsafe code --- return pval - @specialize.argtype(2) + @specialize.argtype(1) def bh_getarrayitem_gc_f(self, gcref, itemindex, arraydescr): ofs = self.unpack_arraydescr(arraydescr) # --- start of GC unsafe code (no GC operation!) --- @@ -351,7 +351,7 @@ # --- end of GC unsafe code --- return fval - @specialize.argtype(2) + @specialize.argtype(1) def bh_setarrayitem_gc_i(self, gcref, itemindex, newvalue, arraydescr): ofs, size, sign = self.unpack_arraydescr_size(arraydescr) # --- start of GC unsafe code (no GC operation!) --- @@ -374,7 +374,7 @@ items[itemindex] = self.cast_gcref_to_int(newvalue) # --- end of GC unsafe code --- - @specialize.argtype(2) + @specialize.argtype(1) def bh_setarrayitem_gc_f(self, gcref, itemindex, newvalue, arraydescr): ofs = self.unpack_arraydescr(arraydescr) # --- start of GC unsafe code (no GC operation!) --- diff --git a/pypy/rlib/rgc.py b/pypy/rlib/rgc.py --- a/pypy/rlib/rgc.py +++ b/pypy/rlib/rgc.py @@ -313,21 +313,21 @@ return True has_gcflag_extra._subopnum = 1 -_gcflag_extras = [] +_gcflag_extras = set() def get_gcflag_extra(gcref): "NOT_RPYTHON" assert gcref # not NULL! - return gcref in _gcflag_extras # XXX slow + return gcref in _gcflag_extras get_gcflag_extra._subopnum = 2 def toggle_gcflag_extra(gcref): "NOT_RPYTHON" assert gcref # not NULL! try: - _gcflag_extras.remove(gcref) # XXX slow - except ValueError: - _gcflag_extras.append(gcref) + _gcflag_extras.remove(gcref) + except KeyError: + _gcflag_extras.add(gcref) toggle_gcflag_extra._subopnum = 3 def assert_no_more_gcflags(): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit