mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-04 13:10:15 +00:00
8180720: method InferenceGraph.initNodes() can potentially add a trivial dependency of a node to itself
Reviewed-by: mcimadamore
This commit is contained in:
parent
095e01f970
commit
b8f2a6edad
@ -1889,10 +1889,13 @@ public class Infer {
|
||||
Type i = n_i.data.first();
|
||||
for (Node n_j : nodes) {
|
||||
Type j = n_j.data.first();
|
||||
UndetVar uv_i = (UndetVar)inferenceContext.asUndetVar(i);
|
||||
if (Type.containsAny(uv_i.getBounds(InferenceBound.values()), List.of(j))) {
|
||||
//update i's bound dependencies
|
||||
n_i.addDependency(n_j);
|
||||
// don't compare a variable to itself
|
||||
if (i != j) {
|
||||
UndetVar uv_i = (UndetVar)inferenceContext.asUndetVar(i);
|
||||
if (Type.containsAny(uv_i.getBounds(InferenceBound.values()), List.of(j))) {
|
||||
//update i's bound dependencies
|
||||
n_i.addDependency(n_j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user