def pause_writing(self, args_gv): lnk = llimpl.closeblock1(self.b) b2 = llimpl.closelinktofreshblock(lnk, args_gv, None) self._close() later_builder = LLBuilder(self.rgenop, self.gv_f, llimpl.nullblock) later_builder.later_block = b2 return later_builder
def enter_next_block(self, kinds, args_gv): debug_assert(self.rgenop.currently_writing is self, "enter_next_block: bad currently_writing") lnk = llimpl.closeblock1(self.b) newb_args_gv = self._newblock(kinds) llimpl.closelink(lnk, args_gv, self.b) for i in range(len(args_gv)): args_gv[i] = newb_args_gv[i] return LLLabel(self.b, self.gv_f)
def enter_next_block(self, kinds, args_gv): ll_assert(self.rgenop.currently_writing is self, "enter_next_block: bad currently_writing") lnk = llimpl.closeblock1(self.b) newb_args_gv = self._newblock(kinds) llimpl.closelink(lnk, args_gv, self.b) for i in range(len(args_gv)): args_gv[i] = newb_args_gv[i] return LLLabel(self.b, self.gv_f)
def finish_and_return(self, sigtoken, gv_returnvar): gv_returnvar = gv_returnvar or gv_dummy_placeholder lnk = llimpl.closeblock1(self.b) llimpl.closereturnlink(lnk, gv_returnvar.v, self.gv_f) self._close()
def finish_and_goto(self, args_gv, target): lnk = llimpl.closeblock1(self.b) llimpl.closelink(lnk, args_gv, target.b) self._close()