Skip to content

Commit d7d24b5

Browse files
committed
compiler test - rename others with cache name
1 parent 006d13e commit d7d24b5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/GraalCompilerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ protected InstalledCode getCode(final ResolvedJavaMethod installedCodeOwner, Str
11391139
HashMap<ResolvedJavaMethod, Pair<OptionValues, InstalledCode>> tlCache = cache.get();
11401140
Pair<OptionValues, InstalledCode> cached = tlCache.get(installedCodeOwner);
11411141
if (cached != null) {
1142-
// Reuse the cached code is the it's still valid and the same options were used for
1142+
// Reuse the cached code if it is still valid and the same options was used for
11431143
// the compilation. We use a deep equals for the option values to catch cases where
11441144
// users create new option values but with the same values.
11451145
if (cached.getRight().isValid() && (options.getMap().equals(cached.getLeft().getMap()) || optionsMapDeepEquals(options.getMap(), cached.getLeft().getMap()))) {

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/truffle/test/EncodedGraphCacheTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ private static RootTestNode rootTestNode() {
128128
}
129129

130130
private static boolean encodedGraphCacheContains(TruffleCompilerImpl compiler, ResolvedJavaMethod method) {
131-
EconomicMap<ResolvedJavaMethod, EncodedGraph> cache = compiler.getPartialEvaluator().getOrCreateEncodedGraphCache();
132-
return cache.containsKey(method);
131+
EconomicMap<ResolvedJavaMethod, EncodedGraph> cache1 = compiler.getPartialEvaluator().getOrCreateEncodedGraphCache();
132+
return cache1.containsKey(method);
133133
}
134134

135135
@SuppressWarnings("try")
@@ -218,8 +218,8 @@ public void testUnboundedCacheCapacity() {
218218
boolean encodedGraphCache = true;
219219
testHelper(encodedGraphCache, 100_000, compiler -> {
220220
runWithBooleanFlag(compiler, EncodedGraphCacheTest::disableEncodedGraphCachePurges, true, () -> {
221-
EconomicMap<?, ?> cache = compiler.getPartialEvaluator().getOrCreateEncodedGraphCache();
222-
nonEmptyGraphCache[0] = !cache.isEmpty();
221+
EconomicMap<?, ?> cache1 = compiler.getPartialEvaluator().getOrCreateEncodedGraphCache();
222+
nonEmptyGraphCache[0] = !cache1.isEmpty();
223223
});
224224
});
225225
}

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/truffle/test/strings/TStringOpsTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,18 @@ protected ResolvedJavaMethod getIndexOf2ConsecutiveWithStrideIntl() {
176176
}
177177

178178
protected InstalledCode cacheInstalledCodeConstantStride(ResolvedJavaMethod installedCodeOwner, StructuredGraph graph, OptionValues options, ResolvedJavaMethod expectedMethod,
179-
InstalledCode[] cache, int strideA, int strideB) {
180-
return cacheInstalledCodeConstantStrideLength(installedCodeOwner, graph, options, expectedMethod, cache, strideA, strideB, 0);
179+
InstalledCode[] cache1, int strideA, int strideB) {
180+
return cacheInstalledCodeConstantStrideLength(installedCodeOwner, graph, options, expectedMethod, cache1, strideA, strideB, 0);
181181
}
182182

183183
protected InstalledCode cacheInstalledCodeConstantStrideLength(ResolvedJavaMethod installedCodeOwner, StructuredGraph graph, OptionValues options, ResolvedJavaMethod expectedMethod,
184-
InstalledCode[] cache, int strideA, int strideB, int iLength) {
184+
InstalledCode[] cache1, int strideA, int strideB, int iLength) {
185185
Assert.assertEquals(expectedMethod, installedCodeOwner);
186186
int index = (iLength * 9) + (strideA * 3) + strideB;
187-
InstalledCode installedCode = cache[index];
187+
InstalledCode installedCode = cache1[index];
188188
while (installedCode == null || !installedCode.isValid()) {
189189
installedCode = super.getCode(installedCodeOwner, graph, true, false, options);
190-
cache[index] = installedCode;
190+
cache1[index] = installedCode;
191191
}
192192
return installedCode;
193193
}

0 commit comments

Comments
 (0)