RFR: 8295486: Inconsistent constant field values observed during compilation [v7]

Vladimir Kozlov kvn at openjdk.org
Fri Jan 27 17:52:19 UTC 2023


On Fri, 27 Jan 2023 06:11:25 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> > But why do you need GrowableArray in such case? That confused me because I first thought you cache all values.
> 
> Because there's only a very limited number of constant fields per compilation, so I thought a simple array is good enough. Do you prefer a hash map (`Dict` or something) instead?

My mistake. I thought you collected values per field. But you collected all constant fields per object. Good. GrowableArray is perfectly fine for that. Finally I got this ;^)

One last question. Do I understand correctly that static fields constant value is already handled by `ciField::constant_value()`?

-------------

PR: https://git.openjdk.org/jdk/pull/11861


More information about the hotspot-compiler-dev mailing list