RFR: 8303882: Refactor some iterators in jdk.compiler
Andrey Turbanov
aturbanov at openjdk.org
Sat Mar 11 07:51:20 UTC 2023
On Thu, 9 Mar 2023 13:14:27 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> 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 augmented 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.
test/langtools/tools/javac/util/IteratorsTest.java line 150:
> 148: }
> 149:
> 150: static class TestConverter<I, O> implements Function<I, Iterator<O>> {
Suggestion:
static class TestConverter<I, O> implements Function<I, Iterator<O>> {
-------------
PR: https://git.openjdk.org/jdk/pull/12949
More information about the compiler-dev
mailing list