Skip to content

Commit

Permalink
[GR-58106] Start type IDs at 1.
Browse files Browse the repository at this point in the history
PullRequest: graal/18851
  • Loading branch information
boris-spas committed Oct 2, 2024
2 parents 06bfc92 + 4a849d6 commit ddc870d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public class AnalysisUniverse implements Universe {
private boolean sealed;

private volatile AnalysisType[] typesById = new AnalysisType[ESTIMATED_NUMBER_OF_TYPES];
final AtomicInteger nextTypeId = new AtomicInteger();
final AtomicInteger nextTypeId = new AtomicInteger(1);
final AtomicInteger nextMethodId = new AtomicInteger(1);
final AtomicInteger nextFieldId = new AtomicInteger(1);

Expand Down Expand Up @@ -835,7 +835,7 @@ public void setStartTypeId(int startTid) {
/* No type was created yet, so the array can be overwritten without any concurrency issue */
typesById = new AnalysisType[startTid];

setStartId(nextTypeId, startTid, 0);
setStartId(nextTypeId, startTid, 1);
}

public void setStartMethodId(int startMid) {
Expand Down

0 comments on commit ddc870d

Please sign in to comment.