RFR: 8312125: Refactor CDS enum class handling
Matias Saavedra Silva
matsaave at openjdk.org
Wed Jul 3 17:51:20 UTC 2024
On Wed, 3 Jul 2024 17:00:30 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Please review this simple refactoring of the CDS code for handling enum classes. The code is moved to new files cdsEnumKlass.cpp/hpp. There's otherwise no change.
I have two comments but overall this looks good!
src/hotspot/share/cds/cdsEnumKlass.cpp line 2:
> 1: /*
> 2: * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
Please update the copyrights on the new files.
src/hotspot/share/cds/cdsEnumKlass.cpp line 68:
> 66: oop orig_obj) {
> 67: assert(level > 1, "must never be called at the first (outermost) level");
> 68: assert(is_enum_obj(orig_obj), "must be");
Is this assert redundant? You check for this before you make the call to `handle_enum_obj()` below. I think you can move the if statement in here.
-------------
Changes requested by matsaave (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20013#pullrequestreview-2157034791
PR Review Comment: https://git.openjdk.org/jdk/pull/20013#discussion_r1664548371
PR Review Comment: https://git.openjdk.org/jdk/pull/20013#discussion_r1664553655
More information about the hotspot-dev
mailing list