8267630: Start of release updates for JDK 18

8267632: Add source 18 and target 18 to javac
8267631: Add SourceVersion.RELEASE_18

Reviewed-by: iris, erikj, dholmes
This commit is contained in:
Joe Darcy 2021-06-10 16:22:14 +00:00
parent 74007890bb
commit b018c450e5
63 changed files with 5352 additions and 60 deletions

View file

@ -222,7 +222,7 @@ public class ClassReader {
this.b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V17) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V18) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}

View file

@ -313,6 +313,7 @@ public interface Opcodes {
int V15 = 0 << 16 | 59;
int V16 = 0 << 16 | 60;
int V17 = 0 << 16 | 61;
int V18 = 0 << 16 | 62;
/**
* Version flag indicating that the class is using 'preview' features.