Example #1
0
 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))
Example #2
0
 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))
Example #3
0
 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))
Example #4
0
 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))
Example #5
0
 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))
Example #6
0
 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))
Example #7
0
 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))
Example #8
0
 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))
Example #9
0
 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))
Example #10
0
 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))