RFR: 8247912: Make narrowOop a scoped enum [v5]
Kim Barrett
kbarrett at openjdk.java.net
Wed Sep 30 18:50:46 UTC 2020
> Please review this change to the type narrowOop from a typedef for juint to a
> scoped enum with uint32_t as the representation type. This provides stronger
> type checking when using this type.
>
> For the most part this was fairly straightforward, and the patch size is
> relatively small. The implementation of some existing CompressedOops
> "primitives" required adjustment. An explicit conversion to narrowOop was
> added, with casts change to use it. There were a few places that were type
> punning and needed explicit conversions,, mostly in platform-specific assembly
> support.
>
> There are a couple of lingering problems.
>
> Relocation::pd_set_data_value in relocInfo_ppc.cpp is treating a narrowKlass
> as a narrowOop. I adjusted the code to accommodate the narrowOop change, but
> this probably ought to be done differently.
>
> There are a couple of `(narrowOop)` casts remaining in s390.ad. I'm not sure
> whether these can be safely converted to CompressedOops::narrow_oop_cast.
>
> There might still be some casts from narrowOop to an integral type. Those are
> hard to find in our cast-happy code base.
>
> Testing:
> tier1-6 for Oracle supported platforms.
> Build fastdebug linux-ppc64le and linux-s390x.
Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev
excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since
the last revision:
- Merge branch 'master' into strong_narrowoop
- add missing inlines for consistency
- stefank review
- improve assertion
- remove NarrowType
- 8247912: Make narrowOop a scoped enum
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/273/files
- new: https://git.openjdk.java.net/jdk/pull/273/files/38d0088f..f6b93d4e
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=273&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=273&range=03-04
Stats: 41108 lines in 2221 files changed: 9689 ins; 25600 del; 5819 mod
Patch: https://git.openjdk.java.net/jdk/pull/273.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/273/head:pull/273
PR: https://git.openjdk.java.net/jdk/pull/273
More information about the shenandoah-dev
mailing list