8150011: Update javac to generate V53.0 class files
authorjjg
Tue, 10 May 2016 15:36:21 -0700
changeset 37940 ead113a2f92e
parent 37939 3eb8c2a89b77
child 37941 d8b9240efe5d
8150011: Update javac to generate V53.0 class files Reviewed-by: darcy Contributed-by: vicente.romero@oracle.com, jonathan.gibbons@oracle.com
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java
langtools/test/tools/javac/6330997/T6330997.java
langtools/test/tools/javac/classfiles/ClassVersionChecker.java
langtools/test/tools/javac/versions/Versions.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Thu May 05 12:55:21 2016 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Tue May 10 15:36:21 2016 -0700
@@ -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 @@
         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;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Thu May 05 12:55:21 2016 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Tue May 10 15:36:21 2016 -0700
@@ -60,8 +60,8 @@
     /** 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<>();
 
--- a/langtools/test/tools/javac/6330997/T6330997.java	Thu May 05 12:55:21 2016 +0200
+++ b/langtools/test/tools/javac/6330997/T6330997.java	Tue May 10 15:36:21 2016 -0700
@@ -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
  */
 
--- a/langtools/test/tools/javac/classfiles/ClassVersionChecker.java	Thu May 05 12:55:21 2016 +0200
+++ b/langtools/test/tools/javac/classfiles/ClassVersionChecker.java	Tue May 10 15:36:21 2016 -0700
@@ -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 @@
 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 @@
          * -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++) {
--- a/langtools/test/tools/javac/versions/Versions.java	Thu May 05 12:55:21 2016 +0200
+++ b/langtools/test/tools/javac/versions/Versions.java	Tue May 10 15:36:21 2016 -0700
@@ -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 @@
 
     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 @@
         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");