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

Method add_exit_node

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

Grows the graph by adding an exit node. This node becomes an exit for the current section. Args: ast_node: ast.AST section_id: Hashable, the node for which ast_node should be considered to be an exit node guards: Tuple[ast.AST, ...], the finally sections that gu

(self, ast_node, section_id, guards)

Source from the content-addressed store, hash-verified

412 return cursor
413
414 def add_exit_node(self, ast_node, section_id, guards):
415 """Grows the graph by adding an exit node.
416
417 This node becomes an exit for the current section.
418
419 Args:
420 ast_node: ast.AST
421 section_id: Hashable, the node for which ast_node should be considered
422 to be an exit node
423 guards: Tuple[ast.AST, ...], the finally sections that guard ast_node
424 """
425 node = self._add_jump_node(ast_node, guards)
426 self.exits[section_id].add(node)
427
428 def add_continue_node(self, ast_node, section_id, guards):
429 """Grows the graph by adding a reentry node.

Callers 1

Calls 2

_add_jump_nodeMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected