Skip to content

Commit 274919c

Browse files
committed
Java: Fix recent perf regressions.
1 parent f6ad22d commit 274919c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

java/ql/src/semmle/code/java/Expr.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class CompileTimeConstantExpr extends Expr {
167167
/**
168168
* Gets the string value of this expression, where possible.
169169
*/
170+
pragma[nomagic]
170171
string getStringValue() {
171172
result = this.(StringLiteral).getRepresentedString()
172173
or

java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

0 commit comments

Comments
 (0)