Пример #1
0
 def _getfield(self, opinfo, descr, optheap, true_force=True):
     res = opinfo.getfield(descr, optheap)
     if we_are_debug() and res:
         if isinstance(opinfo, info.AbstractStructPtrInfo):
             assert opinfo in self.cached_infos
     if isinstance(res, PreambleOp):
         if not true_force:
             return res.op
         res = optheap.optimizer.force_op_from_preamble(res)
         opinfo.setfield(descr, None, res, optheap=optheap)
     return res
Пример #2
0
 def _getfield(self, opinfo, descr, optheap, true_force=True):
     res = opinfo.getfield(descr, optheap)
     if we_are_debug() and res:
         if isinstance(opinfo, info.AbstractStructPtrInfo):
             assert opinfo in self.cached_infos
     if isinstance(res, PreambleOp):
         if not true_force:
             return res.op
         res = optheap.optimizer.force_op_from_preamble(res)
         opinfo.setfield(descr, None, res, optheap=optheap)
     return res
Пример #3
0
 def _getfield(self, opinfo, descr, optheap, true_force=True):
     res = opinfo.getitem(descr, self.index, optheap)
     if we_are_debug() and res:
         if isinstance(opinfo, info.ArrayPtrInfo):
             assert opinfo in self.cached_infos
     if (isinstance(res, PreambleOp) and
         optheap.optimizer.cpu.supports_guard_gc_type):
         if not true_force:
             return res.op
         index = res.preamble_op.getarg(1).getint()
         res = optheap.optimizer.force_op_from_preamble(res)
         opinfo.setitem(descr, index, None, res, optheap=optheap)
     return res
Пример #4
0
 def _getfield(self, opinfo, descr, optheap, true_force=True):
     res = opinfo.getitem(descr, self.index, optheap)
     if we_are_debug() and res:
         if isinstance(opinfo, info.ArrayPtrInfo):
             assert opinfo in self.cached_infos
     if (isinstance(res, PreambleOp) and
         optheap.optimizer.cpu.supports_guard_gc_type):
         if not true_force:
             return res.op
         index = res.preamble_op.getarg(1).getint()
         res = optheap.optimizer.force_op_from_preamble(res)
         opinfo.setitem(descr, index, None, res, optheap=optheap)
     return res