Beispiel #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
Beispiel #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
Beispiel #3
0
 def bh_getfield_raw_i(self, struct, fielddescr):
     assert isinstance(fielddescr, Descr)
     return llimpl.do_getfield_raw_int(struct, fielddescr.ofs)
Beispiel #4
0
 def bh_getfield_raw_i(self, struct, fielddescr):
     assert isinstance(fielddescr, Descr)
     return llimpl.do_getfield_raw_int(struct, fielddescr.ofs)