JDK-8257912 : Convert enum iteration to use range-based for loops
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-08
  • Updated: 2022-06-27
  • Resolved: 2020-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b01Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Convert the more verbose syntax:

  for (vmIntrinsicsIterator it = vmIntrinsicsRange.begin(); it != vmIntrinsicsRange.end(); ++it) {
    vmIntrinsicID index = *it;
    nt[as_int(index)] = string;
  }

to

  for (vmIntrinsicID index : EnumRange<vmIntrinsicID>{}) {
    nt[as_int(index)] = string;
  }

Comments
Changeset: 80dac5a8 Author: Ioi Lam <iklam@openjdk.org> Date: 2020-12-10 20:33:13 +0000 URL: https://git.openjdk.java.net/jdk/commit/80dac5a8
10-12-2020