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

Method visit_While

tensorflow/python/autograph/pyct/cfg.py:780–800  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

778 self.builder.end_statement(node)
779
780 def visit_While(self, node):
781 self.builder.begin_statement(node)
782 self._enter_lexical_scope(node)
783
784 self.builder.enter_section(node)
785
786 self.builder.enter_loop_section(node, node.test)
787 for stmt in node.body:
788 self.visit(stmt)
789 self.builder.exit_loop_section(node)
790
791 # Note: although the orelse is technically part of the loop node,
792 # the statements inside it don't affect the loop itself. For example, a
793 # break in the loop's orelse will not affect the loop itself.
794 self._exit_lexical_scope(node)
795
796 for stmt in node.orelse:
797 self.visit(stmt)
798
799 self.builder.exit_section(node)
800 self.builder.end_statement(node)
801
802 def visit_For(self, node):
803 self.builder.begin_statement(node)

Callers

nothing calls this directly

Calls 9

_enter_lexical_scopeMethod · 0.95
_exit_lexical_scopeMethod · 0.95
begin_statementMethod · 0.80
enter_sectionMethod · 0.80
enter_loop_sectionMethod · 0.80
exit_loop_sectionMethod · 0.80
exit_sectionMethod · 0.80
end_statementMethod · 0.80
visitMethod · 0.45

Tested by

no test coverage detected