MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / exit_loop_section

Method exit_loop_section

tensorflow/python/autograph/pyct/cfg.py:495–508  ·  view source on GitHub ↗

Exits a loop section.

(self, section_id)

Source from the content-addressed store, hash-verified

493 self.section_entry[section_id] = node
494
495 def exit_loop_section(self, section_id):
496 """Exits a loop section."""
497 self._connect_nodes(self.leaves, self.section_entry[section_id])
498
499 # continues are jump nodes, which may be protected.
500 for reentry in self.continues[section_id]:
501 guard_ends = self._connect_jump_to_finally_sections(reentry)
502 self._connect_nodes(guard_ends, self.section_entry[section_id])
503
504 # Loop nodes always loop back.
505 self.leaves = set((self.section_entry[section_id],))
506
507 del self.continues[section_id]
508 del self.section_entry[section_id]
509
510 def enter_cond_section(self, section_id):
511 """Enters a conditional section.

Callers 2

visit_WhileMethod · 0.80
visit_ForMethod · 0.80

Calls 2

_connect_nodesMethod · 0.95

Tested by

no test coverage detected