Exemplo n.º 1
0
 def emit_operation(self, op):        
     self.emitting_operation(op)
     self.emit_postponed_op()
     opnum = op.opnum
     if (rop.is_comparison(opnum) or rop.is_call_may_force(opnum)
         or rop.is_ovf(opnum)):
         self.postponed_op = op
     else:
         Optimization.emit_operation(self, op)
Exemplo n.º 2
0
 def emit(self, op):
     self.emitting_operation(op)
     self.emit_postponed_op()
     opnum = op.opnum
     if (rop.is_comparison(opnum) or rop.is_call_may_force(opnum)
             or rop.is_ovf(opnum)):
         self.postponed_op = op
     else:
         return Optimization.emit(self, op)
Exemplo n.º 3
0
 def prepare_guard_op_guard_not_forced(self, op, prev_op):
     if rop.is_call_release_gil(prev_op.getopnum()):
         arglocs = self._prepare_call(prev_op, save_all_regs=True,
                                      first_arg_index=2)
     elif rop.is_call_assembler(prev_op.getopnum()):
         locs = self.locs_for_call_assembler(prev_op)
         tmploc = self.get_scratch_reg(INT, selected_reg=r.x0)
         resloc = self._call(prev_op, locs + [tmploc], gc_level=2)
         arglocs = locs + [resloc, tmploc]
     else:
         assert rop.is_call_may_force(prev_op.getopnum())
         arglocs = self._prepare_call(prev_op, save_all_regs=True)
     guard_locs = self._guard_impl(op)
     return arglocs + guard_locs, len(arglocs)