RFR: 8303882: Refactor some iterators in jdk.compiler [v4]

Pavel Rappo prappo at openjdk.org
Mon Mar 13 16:01:34 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 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.

Pavel Rappo 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 16 additional commits since the last revision:

 - Address feedback
   
   Continues compound iterator test until the very end.
 - Merge branch 'master' into 8303882
 - Address feedback
   
   Changes generic parameters and adds trailing newline.
 - Merge remote-tracking branch 'myjdk/8303882' into 8303882
 - Update test/langtools/tools/javac/util/IteratorsTest.java
   
   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
 - Squeeze a few extra drops of perf
 - Add a recursive test
 - Try squeeze more performance
 - Add a correctness test
 - Refactor the test
 - ... and 6 more: https://git.openjdk.org/jdk/compare/361befb5...360b4a96

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/12949/files
  - new: https://git.openjdk.org/jdk/pull/12949/files/04596f39..360b4a96

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12949&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12949&range=02-03

  Stats: 65407 lines in 655 files changed: 55620 ins; 3219 del; 6568 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