Skip to content

Commit 81efd72

Browse files
committed
renamings - and simplifications of qldoc
1 parent d3fca0a commit 81efd72

19 files changed

+46
-145
lines changed

javascript/ql/src/javascript.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import semmle.javascript.Errors
2525
import semmle.javascript.ES2015Modules
2626
import semmle.javascript.Expr
2727
import semmle.javascript.Extend
28-
import semmle.javascript.ExtendedStaging
2928
import semmle.javascript.Externs
3029
import semmle.javascript.Files
3130
import semmle.javascript.Functions
@@ -34,6 +33,7 @@ import semmle.javascript.GlobalAccessPaths
3433
import semmle.javascript.HTML
3534
import semmle.javascript.HtmlSanitizers
3635
import semmle.javascript.InclusionTests
36+
import semmle.javascript.internal.CachedStages
3737
import semmle.javascript.JSDoc
3838
import semmle.javascript.JSON
3939
import semmle.javascript.JsonParsers

javascript/ql/src/semmle/javascript/AMD.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ private class AmdDependencyImport extends Import {
299299
class AmdModule extends Module {
300300
cached
301301
AmdModule() {
302-
ExtendedStaging::DataFlowStage::ref() and
302+
Stages::DataFlowStage::ref() and
303303
exists(unique(AmdModuleDefinition def | amdModuleTopLevel(def, this)))
304304
}
305305

javascript/ql/src/semmle/javascript/AST.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
7575

7676
/** Gets the toplevel syntactic unit to which this element belongs. */
7777
cached
78-
TopLevel getTopLevel() { ExtendedStaging::Ast::ref() and result = getParent().getTopLevel() }
78+
TopLevel getTopLevel() { Stages::Ast::ref() and result = getParent().getTopLevel() }
7979

8080
/**
8181
* Gets the `i`th child node of this node.
@@ -119,7 +119,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
119119

120120
/** Gets the parent node of this node, if any. */
121121
cached
122-
ASTNode getParent() { ExtendedStaging::Ast::ref() and this = result.getAChild() }
122+
ASTNode getParent() { Stages::Ast::ref() and this = result.getAChild() }
123123

124124
/** Gets the first control flow node belonging to this syntactic entity. */
125125
ControlFlowNode getFirstControlFlowNode() { result = this }
@@ -135,7 +135,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
135135
*/
136136
cached
137137
private predicate isAmbientInternal() {
138-
ExtendedStaging::Ast::ref() and
138+
Stages::Ast::ref() and
139139
getParent().isAmbientInternal()
140140
or
141141
not isAmbientTopLevel(getTopLevel()) and
@@ -188,7 +188,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
188188
*/
189189
cached
190190
private predicate isAmbientTopLevel(TopLevel tl) {
191-
ExtendedStaging::Ast::ref() and tl.getFile().getBaseName().matches("%.d.ts")
191+
Stages::Ast::ref() and tl.getFile().getBaseName().matches("%.d.ts")
192192
}
193193

194194
/**

javascript/ql/src/semmle/javascript/BasicBlocks.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private module Internal {
6060

6161
cached
6262
predicate useAt(BasicBlock bb, int i, Variable v, VarUse u) {
63-
ExtendedStaging::BasicBlocks::ref() and
63+
Stages::BasicBlocks::ref() and
6464
v = u.getVariable() and
6565
bbIndex(bb, u, i)
6666
}

javascript/ql/src/semmle/javascript/Expr.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
109109

110110
/** Gets the constant string value this expression evaluates to, if any. */
111111
cached
112-
string getStringValue() { ExtendedStaging::Ast::ref() and result = getStringValue(this) }
112+
string getStringValue() { Stages::Ast::ref() and result = getStringValue(this) }
113113

114114
/** Holds if this expression is impure, that is, its evaluation could have side effects. */
115115
predicate isImpure() { any() }
@@ -257,7 +257,7 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
257257

258258
cached
259259
private DataFlow::Node getCatchParameterFromStmt(Stmt stmt) {
260-
ExtendedStaging::DataFlowStage::ref() and
260+
Stages::DataFlowStage::ref() and
261261
result =
262262
DataFlow::parameterNode(stmt.getEnclosingTryCatchStmt().getACatchClause().getAParameter())
263263
}
@@ -808,7 +808,7 @@ class FunctionExpr extends @function_expr, Expr, Function {
808808
override Stmt getEnclosingStmt() { result = Expr.super.getEnclosingStmt() }
809809

810810
override StmtContainer getEnclosingContainer() {
811-
ExtendedStaging::Ast::ref() and result = Expr.super.getContainer()
811+
Stages::Ast::ref() and result = Expr.super.getContainer()
812812
}
813813

814814
override predicate isImpure() { none() }

javascript/ql/src/semmle/javascript/GlobalAccessPaths.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ module AccessPath {
539539
*/
540540
cached
541541
predicate hasDominatingWrite(DataFlow::PropRead read) {
542-
ExtendedStaging::FlowSteps::ref() and
542+
Stages::FlowSteps::ref() and
543543
// within the same basic block.
544544
exists(ReachableBasicBlock bb, Root root, string path, int ranking |
545545
read.asExpr() = rankedAccessPath(bb, root, path, ranking, AccessPathRead()) and

javascript/ql/src/semmle/javascript/JSDoc.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract class Documentable extends ASTNode {
5858
/** Gets the JSDoc comment for this element, if any. */
5959
cached
6060
JSDoc getDocumentation() {
61-
ExtendedStaging::Ast::ref() and result.getComment().getNextToken() = getFirstToken()
61+
Stages::Ast::ref() and result.getComment().getNextToken() = getFirstToken()
6262
}
6363
}
6464

javascript/ql/src/semmle/javascript/Modules.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ abstract class Import extends ASTNode {
239239
*/
240240
cached
241241
Module getImportedModule() {
242-
ExtendedStaging::Imports::ref() and
242+
Stages::Imports::ref() and
243243
if exists(resolveExternsImport())
244244
then result = resolveExternsImport()
245245
else (

javascript/ql/src/semmle/javascript/SSA.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ private module Internal {
354354
*/
355355
cached
356356
SsaDefinition getDefReachingEndOf(ReachableBasicBlock bb, SsaSourceVariable v) {
357-
ExtendedStaging::DataFlowStage::ref() and
357+
Stages::DataFlowStage::ref() and
358358
exists(int lastRef | lastRef = max(int i | ssaRef(bb, i, v, _)) |
359359
result = getLocalDefinition(bb, lastRef, v)
360360
or

javascript/ql/src/semmle/javascript/dataflow/Configuration.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ private class FlowStepThroughImport extends AdditionalFlowStep, DataFlow::ValueN
733733
override ImportSpecifier astNode;
734734

735735
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
736-
ExtendedStaging::FlowSteps::ref() and
736+
Stages::FlowSteps::ref() and
737737
pred = this and
738738
succ = DataFlow::ssaDefinitionNode(SSA::definition(astNode))
739739
}

0 commit comments

Comments
 (0)