示例#1
0
文件: runner.py 项目: Qointum/pypy
 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))
示例#2
0
文件: runner.py 项目: Qointum/pypy
 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))
示例#3
0
文件: runner.py 项目: Qointum/pypy
 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))
示例#4
0
文件: runner.py 项目: Qointum/pypy
 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))
示例#5
0
文件: runner.py 项目: Qointum/pypy
 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))
示例#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))
示例#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))
示例#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))
示例#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))
示例#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))