@@ -49,31 +49,17 @@ module CfgInput implements InputSig<Location> {
4949 int maxSplits ( ) { result = 0 }
5050
5151 /** Holds if `first` is first executed when entering `scope`. */
52- predicate scopeFirst ( CfgScope scope , AstNode first ) {
53- scope .( CfgImpl:: ControlFlowTree ) .first ( first )
54- }
52+ predicate scopeFirst ( CfgScope scope , AstNode first ) { scope .scopeFirst ( first ) }
5553
5654 /** Holds if `scope` is exited when `last` finishes with completion `c`. */
57- predicate scopeLast ( CfgScope scope , AstNode last , Completion c ) {
58- scope .( CfgImpl:: ControlFlowTree ) .last ( last , c )
59- }
55+ predicate scopeLast ( CfgScope scope , AstNode last , Completion c ) { scope .scopeLast ( last , c ) }
6056}
6157
6258module CfgImpl = Make< Location , CfgInput > ;
6359
6460import CfgImpl
6561
66- class FunctionTree extends PostOrderTree instanceof Function {
67- override predicate propagatesAbnormal ( AstNode child ) { child = super .getBody ( ) }
68-
69- override predicate first ( AstNode node ) { first ( super .getBody ( ) , node ) }
70-
71- override predicate succ ( AstNode pred , AstNode succ , Completion c ) {
72- last ( super .getBody ( ) , pred , c ) and
73- ( completionIsNormal ( c ) or c instanceof ReturnCompletion ) and
74- succ = this
75- }
76- }
62+ class FunctionTree extends LeafTree instanceof Function { }
7763
7864class BlockExprTree extends StandardPostOrderTree instanceof BlockExpr {
7965 override ControlFlowTree getChildNode ( int i ) {
@@ -233,6 +219,8 @@ class BreakExprTree extends PostOrderTree instanceof BreakExpr {
233219 }
234220}
235221
222+ class ClosureExprTree extends LeafTree instanceof ClosureExpr { }
223+
236224class ContinueExprTree extends LeafTree instanceof ContinueExpr { }
237225
238226class LiteralExprTree extends LeafTree instanceof LiteralExpr { }
0 commit comments