8205626: Start of release updates for JDK 13

8205393: Add SourceVersion.RELEASE_13
8205394: Add source 13 and target 13 to javac
8205645: Bump maximum recognized class file version to 57 for JDK 13
8214825: Update preview language features for start of JDK 13

Reviewed-by: erikj, alanb, mchung, mcimadamore, dholmes, smarks, jjg
This commit is contained in:
Joe Darcy 2018-12-13 19:06:11 +01:00
parent f32dc1764c
commit b5f0eec3d8
106 changed files with 183 additions and 140 deletions

View file

@ -50,6 +50,7 @@ class Constants {
1.10 to 1.10.X 54,0
1.11 to 1.11.X 55,0
1.12 to 1.12.X 56,0
1.13 to 1.13.X 57,0
*/
public static final Package.Version JAVA_MIN_CLASS_VERSION =
@ -79,6 +80,9 @@ class Constants {
public static final Package.Version JAVA12_MAX_CLASS_VERSION =
Package.Version.of(56, 00);
public static final Package.Version JAVA13_MAX_CLASS_VERSION =
Package.Version.of(57, 00);
public static final int JAVA_PACKAGE_MAGIC = 0xCAFED00D;
public static final Package.Version JAVA5_PACKAGE_VERSION =
@ -95,7 +99,7 @@ class Constants {
// upper limit, should point to the latest class version
public static final Package.Version JAVA_MAX_CLASS_VERSION =
JAVA12_MAX_CLASS_VERSION;
JAVA13_MAX_CLASS_VERSION;
// upper limit should point to the latest package version, for version info!.
public static final Package.Version MAX_PACKAGE_VERSION =

View file

@ -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 = 56;
private final int JAVA_MAX_SUPPORTED_VERSION = 57;
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.V12) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V13) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}

View file

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