Integrated: 8321033: Avoid casting Array to GrowableArray
Matias Saavedra Silva
matsaave at openjdk.org
Mon Jun 24 18:08:18 UTC 2024
On Tue, 4 Jun 2024 20:49:16 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> `ModuleEntry::_reads` is declared as an GrowableArray<ModuleEntry*>*, but when stored in a CDS archive, it's assigned to an Array<ModuleEntry*>*. To ensure better type safety, `ModuleEntry::_reads` is changed to a generic pointer which uses two different getters and setters as well as two booleans to ensure the value is interpreted correctly. This was chosen to avoid introducing a new field to the ModuleEntry class, as another pointer and further alignment would increase the size of the ModuleEntry array. Verified with tier1-5 tests.
This pull request has now been integrated.
Changeset: 71a692ab
Author: Matias Saavedra Silva <matsaave at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/71a692ab435fdeea4ce8f8db7a55dd735c7c5016
Stats: 40 lines in 2 files changed: 23 ins; 1 del; 16 mod
8321033: Avoid casting Array to GrowableArray
Reviewed-by: kbarrett, iklam, ccheung
-------------
PR: https://git.openjdk.org/jdk/pull/19549
More information about the hotspot-runtime-dev
mailing list