8150011: Update javac to generate V53.0 class files
Co-authored-by: Vicente Romero <vicente.romero@oracle.com> Reviewed-by: darcy
This commit is contained in:
parent
eb99e4ec1f
commit
695f11e91c
langtools
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm
test/tools/javac
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2016, 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
|
||||
@ -108,7 +108,7 @@ public class ClassFile {
|
||||
V50(50, 0), // JDK 1.6: stackmaps
|
||||
V51(51, 0), // JDK 1.7
|
||||
V52(52, 0), // JDK 1.8: lambda, type annos, param names
|
||||
V53(52, 0); // JDK 1.9: modules **** FIXME TO 53 BEFORE RELEASE *****
|
||||
V53(53, 0); // JDK 1.9: modules, indy string concat
|
||||
Version(int major, int minor) {
|
||||
this.major = major;
|
||||
this.minor = minor;
|
||||
|
@ -60,8 +60,8 @@ public enum Target {
|
||||
/** JDK 8. */
|
||||
JDK1_8("1.8", 52, 0),
|
||||
|
||||
/** JDK 9, initially an alias for 8. */
|
||||
JDK1_9("1.9", 52, 0);
|
||||
/** JDK 9. */
|
||||
JDK1_9("1.9", 53, 0);
|
||||
|
||||
private static final Context.Key<Target> targetKey = new Context.Key<>();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2016, 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
|
||||
@ -32,8 +32,8 @@
|
||||
* jdk.compiler/com.sun.tools.javac.main
|
||||
* jdk.compiler/com.sun.tools.javac.util
|
||||
* @clean T1 T2
|
||||
* @compile -source 8 -target 8 T1.java
|
||||
* @compile -source 8 -target 8 T2.java
|
||||
* @compile -source 9 -target 9 T1.java
|
||||
* @compile -source 9 -target 9 T2.java
|
||||
* @run main/othervm T6330997
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2016, 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
|
||||
@ -38,7 +38,7 @@ import java.util.regex.*;
|
||||
public class ClassVersionChecker {
|
||||
|
||||
int errors;
|
||||
String[] jdk = {"","1.6","1.7","1.8"};
|
||||
String[] jdk = {"", "1.6", "1.7", "1.8", "1.9"};
|
||||
File javaFile = null;
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
@ -58,10 +58,10 @@ public class ClassVersionChecker {
|
||||
* -1 => invalid combinations
|
||||
*/
|
||||
int[][] ver =
|
||||
{{52, -1, -1, -1},
|
||||
{52, 50, 51, 52},
|
||||
{52, -1, 51, 52},
|
||||
{52, -1, -1, 52}};
|
||||
{{53, -1, -1, -1, -1},
|
||||
{53, 50, 51, 52, 53},
|
||||
{53, -1, 51, 52, 53},
|
||||
{53, -1, -1, 52, 53}};
|
||||
|
||||
// Loop to run all possible combinations of source/target values
|
||||
for (int i = 0; i< ver.length; i++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2016, 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
|
||||
@ -61,16 +61,14 @@ public class Versions {
|
||||
|
||||
void run() {
|
||||
|
||||
String jdk9cv = "52.0"; // class version.change when ./dev pushed to 53
|
||||
|
||||
String TC = "";
|
||||
System.out.println("Version.java: Starting");
|
||||
|
||||
check("52.0");
|
||||
check("52.0", "-source 1.6");
|
||||
check("52.0", "-source 1.7");
|
||||
check("52.0", "-source 1.8");
|
||||
check(jdk9cv, "-source 1.9");
|
||||
check("53.0");
|
||||
check("53.0", "-source 1.6");
|
||||
check("53.0", "-source 1.7");
|
||||
check("53.0", "-source 1.8");
|
||||
check("53.0", "-source 1.9");
|
||||
|
||||
check_source_target("50.0", "6", "6");
|
||||
check_source_target("51.0", "6", "7");
|
||||
@ -78,10 +76,10 @@ public class Versions {
|
||||
check_source_target("52.0", "6", "8");
|
||||
check_source_target("52.0", "7", "8");
|
||||
check_source_target("52.0", "8", "8");
|
||||
check_source_target(jdk9cv, "6", "9");
|
||||
check_source_target(jdk9cv, "7", "9");
|
||||
check_source_target(jdk9cv, "8", "9");
|
||||
check_source_target(jdk9cv, "9", "9");
|
||||
check_source_target("53.0", "6", "9");
|
||||
check_source_target("53.0", "7", "9");
|
||||
check_source_target("53.0", "8", "9");
|
||||
check_source_target("53.0", "9", "9");
|
||||
|
||||
checksrc16("-source 1.6");
|
||||
checksrc16("-source 6");
|
||||
|
Loading…
x
Reference in New Issue
Block a user