8297294: compiler/c2/irTests/TestMulNodeIdealization.java failed compilation

Reviewed-by: mcimadamore
This commit is contained in:
Vicente Romero 2022-12-01 21:57:55 +00:00
parent 337ca10085
commit 82031d32a0
2 changed files with 5 additions and 7 deletions

View File

@ -57,8 +57,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Optional;
@ -1264,7 +1263,7 @@ public class Infer {
}
/** an incorporation cache keeps track of all executed incorporation-related operations */
Map<IncorporationBinaryOp, Boolean> incorporationCache = new HashMap<>();
Map<IncorporationBinaryOp, Boolean> incorporationCache = new LinkedHashMap<>();
protected static class BoundFilter implements Predicate<Type> {
@ -1426,7 +1425,7 @@ public class Infer {
}
/** cache used to avoid redundant computation of tree costs */
final Map<Node, Pair<List<Node>, Integer>> treeCache = new HashMap<>();
final Map<Node, Pair<List<Node>, Integer>> treeCache = new LinkedHashMap<>();
/** constant value used to mark non-existent paths */
final Pair<List<Node>, Integer> noPath = new Pair<>(null, Integer.MAX_VALUE);
@ -1754,7 +1753,7 @@ public class Infer {
* through all its dependencies.
*/
protected Set<Node> closure() {
Set<Node> closure = new HashSet<>();
Set<Node> closure = new LinkedHashSet<>();
closureInternal(closure);
return closure;
}

View File

@ -27,7 +27,6 @@ package com.sun.tools.javac.comp;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
@ -551,7 +550,7 @@ public class InferenceContext {
* This is why the tree is used as the key of the map below. This map
* stores a Type per AST.
*/
Map<JCTree, Type> captureTypeCache = new HashMap<>();
Map<JCTree, Type> captureTypeCache = new LinkedHashMap<>();
Type cachedCapture(JCTree tree, Type t, boolean readOnly) {
Type captured = captureTypeCache.get(tree);