@@ -49,31 +49,17 @@ module CfgInput implements InputSig<Location> {
49
49
int maxSplits ( ) { result = 0 }
50
50
51
51
/** 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 ) }
55
53
56
54
/** 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 ) }
60
56
}
61
57
62
58
module CfgImpl = Make< Location , CfgInput > ;
63
59
64
60
import CfgImpl
65
61
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 { }
77
63
78
64
class BlockExprTree extends StandardPostOrderTree instanceof BlockExpr {
79
65
override ControlFlowTree getChildNode ( int i ) {
@@ -233,6 +219,8 @@ class BreakExprTree extends PostOrderTree instanceof BreakExpr {
233
219
}
234
220
}
235
221
222
+ class ClosureExprTree extends LeafTree instanceof ClosureExpr { }
223
+
236
224
class ContinueExprTree extends LeafTree instanceof ContinueExpr { }
237
225
238
226
class LiteralExprTree extends LeafTree instanceof LiteralExpr { }
0 commit comments