Skip to content

Commit

Permalink
[GR-36138] Copy cloned IndexedValueMap lazily on the next write.
Browse files Browse the repository at this point in the history
PullRequest: graal/10718
  • Loading branch information
jchalou committed Jan 24, 2022
2 parents 3a82385 + c28402c commit 839b4a6
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ public void remove() {
assert NodeMap.this.values[current] != null;
NodeMap.this.values[current] = null;
}

@SuppressWarnings("unchecked")
@Override
public T setValue(T newValue) {
T oldValue = (T) NodeMap.this.values[current];
NodeMap.this.values[current] = newValue;
return oldValue;
}
};
}

Expand Down
Loading

0 comments on commit 839b4a6

Please sign in to comment.