class Savi::Compiler::Flow::Visitor
- Savi::Compiler::Flow::Visitor
- Savi::AST::Visitor
- Reference
- Object
Defined in:
savi/compiler/flow.crConstructors
Instance Method Summary
- #analysis : Analysis
-
#current_jump_target_for(kind : AST::Jump::Kind)
We track a stack of jump targets for each kind of jump, so that when such a jump is encountered, we can mark it as a predecessor for the given jump target block, tracking that relationship.
- #deep_visit_call(ctx, node : AST::Call) : Bool
- #deep_visit_choice(ctx, node : AST::Choice)
- #deep_visit_loop(ctx, node : AST::Loop)
- #deep_visit_try(ctx, node : AST::Try)
- #finish_analysis
- #pop_jump_target(kind : AST::Jump::Kind)
- #push_jump_target(kind : AST::Jump::Kind, block : Block)
-
#visit(ctx, node)
This visitor never replaces nodes, it just observes them and returns them.
- #visit_call(ctx, node : AST::Call)
- #visit_children?(ctx, node : AST::Node)
- #visit_deferred_child(ctx, node, block : Savi::Compiler::Flow::Block)
- #visit_jump(ctx, node : AST::Jump)
- #with_jump_target(kind : AST::Jump::Kind, block : Block, &)
Instance methods inherited from class Savi::AST::Visitor
visit(ctx : Compiler::Context, node : Node)
visit,
visit_any?(ctx : Compiler::Context, node : Node)
visit_any?,
visit_children?(ctx : Compiler::Context, node : Node)
visit_children?,
visit_pre(ctx : Compiler::Context, node : Node)
visit_pre
Constructor Detail
Instance Method Detail
def current_jump_target_for(kind : AST::Jump::Kind)
#
We track a stack of jump targets for each kind of jump, so that when such a jump is encountered, we can mark it as a predecessor for the given jump target block, tracking that relationship.
def visit(ctx, node)
#
This visitor never replaces nodes, it just observes them and returns them. If we observe a Jump node, we also take some special control flow action.