RFR: 8303882: Refactor some iterators in jdk.compiler
Pavel Rappo
prappo at openjdk.org
Thu Mar 9 13:21:23 UTC 2023
Please review this refactoring to iterators in jdk.compiler. The refactoring delegates more to collections framework, while retaining the performance characteristics of bespoke iterators. The refactoring also adds inline comments, @Override annotations, and fixes some trivial bugs (as can be seen in the added test, which is slightly augment from that suggested by Jan Lahoda here https://github.com/openjdk/jdk/pull/12904#discussion_r1129777660).
I'll add a comment here once I have benchmarked the change formally.
-------------
Commit messages:
- Add a correctness test
- Refactor the test
- Add a test that the unfixed version fails
- Change the test bug id and comment style
- Add the test suggest by Jan Lahoda
- Unify empty iterator in List and Iterators
- Remove bespoke empty iterator in List
- Initial commit from 8303755
Changes: https://git.openjdk.org/jdk/pull/12949/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12949&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8303882
Stats: 219 lines in 3 files changed: 179 ins; 33 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/12949.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12949/head:pull/12949
PR: https://git.openjdk.org/jdk/pull/12949
More information about the compiler-dev
mailing list