def bh_setinteriorfield_gc(self, a, index, item, descr): array = a._obj.container setattr(array.getitem(index), descr.fieldname, support.cast_arg(descr.FIELD, item))
def bh_getarrayitem_gc(self, a, index, descr): a = support.cast_arg(lltype.Ptr(descr.A), a) array = a._obj return support.cast_result(descr.A.OF, array.getitem(index))
def bh_setarrayitem_gc(self, a, index, item, descr): a = support.cast_arg(lltype.Ptr(descr.A), a) array = a._obj array.setitem(index, support.cast_arg(descr.A.OF, item))
def bh_getfield_gc(self, p, descr): p = support.cast_arg(lltype.Ptr(descr.S), p) return support.cast_result(descr.FIELD, getattr(p, descr.fieldname))
def bh_setfield_gc(self, p, newvalue, descr): p = support.cast_arg(lltype.Ptr(descr.S), p) setattr(p, descr.fieldname, support.cast_arg(descr.FIELD, newvalue))