8214546: Start of release updates for JDK 14

8214547: Add SourceVersion.RELEASE_14
8214548: Add source 14 and target 14 to javac
8214549: Bump maximum recognized class file version to 58 for JDK 14

Reviewed-by: jjg, mikael, erikj, jlahoda, dholmes
This commit is contained in:
Joe Darcy 2019-06-11 16:45:20 -07:00
parent d3af9ce324
commit 4750064828
51 changed files with 2944 additions and 89 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -51,6 +51,7 @@ class Constants {
1.11 to 1.11.X 55,0
1.12 to 1.12.X 56,0
1.13 to 1.13.X 57,0
1.14 to 1.14.X 58,0
*/
public static final Package.Version JAVA_MIN_CLASS_VERSION =
@ -83,6 +84,9 @@ class Constants {
public static final Package.Version JAVA13_MAX_CLASS_VERSION =
Package.Version.of(57, 00);
public static final Package.Version JAVA14_MAX_CLASS_VERSION =
Package.Version.of(58, 00);
public static final int JAVA_PACKAGE_MAGIC = 0xCAFED00D;
public static final Package.Version JAVA5_PACKAGE_VERSION =

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -63,7 +63,7 @@ import static jdk.internal.module.ClassFileConstants.*;
public final class ModuleInfo {
private final int JAVA_MIN_SUPPORTED_VERSION = 53;
private final int JAVA_MAX_SUPPORTED_VERSION = 57;
private final int JAVA_MAX_SUPPORTED_VERSION = 58;
private static final JavaLangModuleAccess JLMA
= SharedSecrets.getJavaLangModuleAccess();

View file

@ -210,7 +210,7 @@ public class ClassReader {
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.V13) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V14) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}

View file

@ -96,6 +96,7 @@ public interface Opcodes {
int V11 = 0 << 16 | 55;
int V12 = 0 << 16 | 56;
int V13 = 0 << 16 | 57;
int V14 = 0 << 16 | 58;
/**
* Version flag indicating that the class is using 'preview' features.