Пример #1
0
 def do_getfield_raw(self, structbox, fielddescr):
     assert isinstance(fielddescr, Descr)
     struct = self.cast_int_to_adr(structbox.getint())
     if fielddescr.typeinfo == REF:
         return history.BoxPtr(llimpl.do_getfield_raw_ptr(struct,
                                                          fielddescr.ofs,
                                                          self.memo_cast))
     elif fielddescr.typeinfo == INT:
         return history.BoxInt(llimpl.do_getfield_raw_int(struct,
                                                          fielddescr.ofs,
                                                          self.memo_cast))
     elif fielddescr.typeinfo == FLOAT:
         return history.BoxFloat(llimpl.do_getfield_raw_float(struct,
                                                          fielddescr.ofs,
                                                          self.memo_cast))
     else:
         raise NotImplementedError
Пример #2
0
 def do_getfield_raw(self, structbox, fielddescr):
     assert isinstance(fielddescr, Descr)
     struct = self.cast_int_to_adr(structbox.getint())
     if fielddescr.typeinfo == REF:
         return history.BoxPtr(
             llimpl.do_getfield_raw_ptr(struct, fielddescr.ofs,
                                        self.memo_cast))
     elif fielddescr.typeinfo == INT:
         return history.BoxInt(
             llimpl.do_getfield_raw_int(struct, fielddescr.ofs,
                                        self.memo_cast))
     elif fielddescr.typeinfo == FLOAT:
         return history.BoxFloat(
             llimpl.do_getfield_raw_float(struct, fielddescr.ofs,
                                          self.memo_cast))
     else:
         raise NotImplementedError
Пример #3
0
 def bh_getfield_raw_f(self, struct, fielddescr):
     assert isinstance(fielddescr, Descr)
     return llimpl.do_getfield_raw_float(struct, fielddescr.ofs)
Пример #4
0
 def bh_getfield_raw_f(self, struct, fielddescr):
     assert isinstance(fielddescr, Descr)
     return llimpl.do_getfield_raw_float(struct, fielddescr.ofs)