RFR: 8258810: Improve enum traits [v3]
Kim Barrett
kbarrett at openjdk.java.net
Tue Jan 12 03:42:23 UTC 2021
> Please review these miscellaneous improvements to the enum iteration facility.
> Thanks to @albertnetymk for discussions.
>
> (1) Removed some unneeded stuff from EnumIterationTraits.
>
> (2) Various similar bits of error checking code are unified and shared via
> EnumIterationTraits.
>
> (3) Casts between the enum type and the underlying type are now done using
> helper functions in EnumIterationTraits.
>
> (4) JDK-8257466 added accessors for the EnumRange bounds and the index for
> an enumerator, but didn't account for the possibility of an empty subrange.
> Add assertions for that case.
>
> (5) Added some death tests to verify some of the error checking.
>
> Testing:
> mach5 tier1
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 four additional commits since the last revision:
- Merge branch 'master' into improve_enum_traits
- update copyrights
- ayang review
- Improve enum traits and tests
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1868/files
- new: https://git.openjdk.java.net/jdk/pull/1868/files/a4667b70..6fdeda47
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1868&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1868&range=01-02
Stats: 33536 lines in 1245 files changed: 10927 ins; 10970 del; 11639 mod
Patch: https://git.openjdk.java.net/jdk/pull/1868.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1868/head:pull/1868
PR: https://git.openjdk.java.net/jdk/pull/1868
More information about the hotspot-dev
mailing list