class Savi::Compiler::Local::Visitor
- Savi::Compiler::Local::Visitor
- Savi::AST::Visitor
- Reference
- Object
Defined in:
savi/compiler/local.crConstructors
Instance Method Summary
- #analysis : Analysis
- #each_possible_predecessor_of(use_site : UseSite, &yield_block : UseSite | Nil -> _)
- #each_possible_predecessor_recurse(orig_use_site, by_location, from_block : Flow::Block, seen_cyclic_edges : Array(Int32), &yield_block : UseSite | Nil -> _)
-
#emit_errors(ctx, member_idents)
Emit all errors gathered during previous analysis.
- #flow : Flow::Analysis
-
#observe(ctx, node : AST::Identifier)
Handle reading from a local variable.
-
#observe(ctx, node : AST::Relate)
Handle assigning to or displacing a local variable.
-
#observe(ctx, node : AST::Prefix)
Handle consuming a local variable.
-
#observe(ctx, node : AST::Try)
Observing a try entails observing the catch expression if it has one.
-
#observe(ctx, node : AST::Call)
Observing a call site entails observing any yield parameters.
-
#observe(ctx, node)
All other node types have no special logic.
-
#observe_param(ctx, node)
Observing a parameter definition has its own logic.
- #observe_predecessors(ctx)
- #refer : Refer::Analysis
- #visit(ctx, node)
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
def self.new(analysis : Savi::Compiler::Local::Analysis, refer : Savi::Compiler::Refer::Analysis, flow : Savi::Compiler::Flow::Analysis)
#
Instance Method Detail
def each_possible_predecessor_recurse(orig_use_site, by_location, from_block : Flow::Block, seen_cyclic_edges : Array(Int32), &yield_block : UseSite | Nil -> _)
#
Observing a try entails observing the catch expression if it has one.
Observing a call site entails observing any yield parameters.