@@ -26,7 +26,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
2626 override Location getLocation ( ) { hasLocation ( this , result ) }
2727
2828 override File getFile ( ) {
29- result = getLocation ( ) .getFile ( ) // Specialized for performance reasons
29+ result = this . getLocation ( ) .getFile ( ) // Specialized for performance reasons
3030 }
3131
3232 /** Gets the first token belonging to this element. */
@@ -76,7 +76,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
7676
7777 /** Gets the toplevel syntactic unit to which this element belongs. */
7878 cached
79- TopLevel getTopLevel ( ) { Stages:: Ast:: ref ( ) and result = getParent ( ) .getTopLevel ( ) }
79+ TopLevel getTopLevel ( ) { Stages:: Ast:: ref ( ) and result = this . getParent ( ) .getTopLevel ( ) }
8080
8181 /**
8282 * Gets the `i`th child node of this node.
@@ -85,10 +85,10 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
8585 * change between versions of the extractor.
8686 */
8787 ASTNode getChild ( int i ) {
88- result = getChildExpr ( i ) or
89- result = getChildStmt ( i ) or
88+ result = this . getChildExpr ( i ) or
89+ result = this . getChildStmt ( i ) or
9090 properties ( result , this , i , _, _) or
91- result = getChildTypeExpr ( i )
91+ result = this . getChildTypeExpr ( i )
9292 }
9393
9494 /** Gets the `i`th child statement of this node. */
@@ -101,22 +101,22 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
101101 TypeExpr getChildTypeExpr ( int i ) { typeexprs ( result , _, this , i , _) }
102102
103103 /** Gets a child node of this node. */
104- ASTNode getAChild ( ) { result = getChild ( _) }
104+ ASTNode getAChild ( ) { result = this . getChild ( _) }
105105
106106 /** Gets a child expression of this node. */
107- Expr getAChildExpr ( ) { result = getChildExpr ( _) }
107+ Expr getAChildExpr ( ) { result = this . getChildExpr ( _) }
108108
109109 /** Gets a child statement of this node. */
110- Stmt getAChildStmt ( ) { result = getChildStmt ( _) }
110+ Stmt getAChildStmt ( ) { result = this . getChildStmt ( _) }
111111
112112 /** Gets the number of child nodes of this node. */
113- int getNumChild ( ) { result = count ( getAChild ( ) ) }
113+ int getNumChild ( ) { result = count ( this . getAChild ( ) ) }
114114
115115 /** Gets the number of child expressions of this node. */
116- int getNumChildExpr ( ) { result = count ( getAChildExpr ( ) ) }
116+ int getNumChildExpr ( ) { result = count ( this . getAChildExpr ( ) ) }
117117
118118 /** Gets the number of child statements of this node. */
119- int getNumChildStmt ( ) { result = count ( getAChildStmt ( ) ) }
119+ int getNumChildStmt ( ) { result = count ( this . getAChildStmt ( ) ) }
120120
121121 /** Gets the parent node of this node, if any. */
122122 cached
@@ -126,7 +126,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
126126 ControlFlowNode getFirstControlFlowNode ( ) { result = this }
127127
128128 /** Holds if this syntactic entity belongs to an externs file. */
129- predicate inExternsFile ( ) { getTopLevel ( ) .isExterns ( ) }
129+ predicate inExternsFile ( ) { this . getTopLevel ( ) .isExterns ( ) }
130130
131131 /**
132132 * Holds if this is an ambient node that is not a `TypeExpr` and is not inside a `.d.ts` file
@@ -137,9 +137,9 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
137137 cached
138138 private predicate isAmbientInternal ( ) {
139139 Stages:: Ast:: ref ( ) and
140- getParent ( ) .isAmbientInternal ( )
140+ this . getParent ( ) .isAmbientInternal ( )
141141 or
142- not isAmbientTopLevel ( getTopLevel ( ) ) and
142+ not isAmbientTopLevel ( this . getTopLevel ( ) ) and
143143 (
144144 this instanceof ExternalModuleDeclaration
145145 or
@@ -176,9 +176,9 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
176176 */
177177 pragma [ inline]
178178 predicate isAmbient ( ) {
179- isAmbientInternal ( )
179+ this . isAmbientInternal ( )
180180 or
181- isAmbientTopLevel ( getTopLevel ( ) )
181+ isAmbientTopLevel ( this . getTopLevel ( ) )
182182 or
183183 this instanceof TypeExpr
184184 }
@@ -209,11 +209,11 @@ class TopLevel extends @toplevel, StmtContainer {
209209 /** Holds if this toplevel is minified. */
210210 predicate isMinified ( ) {
211211 // file name contains 'min' (not as part of a longer word)
212- getFile ( ) .getBaseName ( ) .regexpMatch ( ".*[^-._]*[-._]min([-._].*)?\\.\\w+" )
212+ this . getFile ( ) .getBaseName ( ) .regexpMatch ( ".*[^-._]*[-._]min([-._].*)?\\.\\w+" )
213213 or
214214 exists ( int numstmt | numstmt = strictcount ( Stmt s | s .getTopLevel ( ) = this ) |
215215 // there are more than two statements per line on average
216- numstmt .( float ) / getNumberOfLines ( ) > 2 and
216+ numstmt .( float ) / this . getNumberOfLines ( ) > 2 and
217217 // and there are at least ten statements overall
218218 numstmt >= 10
219219 )
@@ -247,9 +247,9 @@ class TopLevel extends @toplevel, StmtContainer {
247247 /** Gets the number of lines containing comments in this toplevel. */
248248 int getNumberOfLinesOfComments ( ) { numlines ( this , _, _, result ) }
249249
250- override predicate isStrict ( ) { getAStmt ( ) instanceof StrictModeDecl }
250+ override predicate isStrict ( ) { this . getAStmt ( ) instanceof StrictModeDecl }
251251
252- override ControlFlowNode getFirstControlFlowNode ( ) { result = getEntry ( ) }
252+ override ControlFlowNode getFirstControlFlowNode ( ) { result = this . getEntry ( ) }
253253
254254 override string toString ( ) { result = "<toplevel>" }
255255}
@@ -346,7 +346,7 @@ class JavaScriptURL extends @javascript_url, CodeInAttribute { }
346346 * </pre>
347347 */
348348class Externs extends TopLevel {
349- Externs ( ) { isExterns ( ) }
349+ Externs ( ) { this . isExterns ( ) }
350350}
351351
352352/**
@@ -391,7 +391,7 @@ class StmtContainer extends @stmt_container, ASTNode {
391391 StmtContainer getFunctionBoundary ( ) {
392392 if this instanceof Function or this instanceof TopLevel
393393 then result = this
394- else result = getEnclosingContainer ( ) .getFunctionBoundary ( )
394+ else result = this . getEnclosingContainer ( ) .getFunctionBoundary ( )
395395 }
396396
397397 /** Gets a statement that belongs to this container. */
@@ -425,19 +425,19 @@ class StmtContainer extends @stmt_container, ASTNode {
425425 *
426426 * Empty toplevels do not have a start node.
427427 */
428- ConcreteControlFlowNode getStart ( ) { successor ( getEntry ( ) , result ) }
428+ ConcreteControlFlowNode getStart ( ) { successor ( this . getEntry ( ) , result ) }
429429
430430 /**
431431 * Gets the entry basic block of this function, that is, the basic block
432432 * containing the entry node of its CFG.
433433 */
434- EntryBasicBlock getEntryBB ( ) { result = getEntry ( ) }
434+ EntryBasicBlock getEntryBB ( ) { result = this . getEntry ( ) }
435435
436436 /**
437437 * Gets the start basic block of this function, that is, the basic block
438438 * containing the start node of its CFG.
439439 */
440- BasicBlock getStartBB ( ) { result .getANode ( ) = getStart ( ) }
440+ BasicBlock getStartBB ( ) { result .getANode ( ) = this . getStart ( ) }
441441
442442 /** Gets the scope induced by this toplevel or function, if any. */
443443 Scope getScope ( ) { scopenodes ( this , result ) }
@@ -447,7 +447,7 @@ class StmtContainer extends @stmt_container, ASTNode {
447447 *
448448 * See Annex C of the ECMAScript language specification.
449449 */
450- predicate isStrict ( ) { getEnclosingContainer ( ) .isStrict ( ) }
450+ predicate isStrict ( ) { this . getEnclosingContainer ( ) .isStrict ( ) }
451451}
452452
453453/**
0 commit comments