JDK-8187296 : Prepare for classfile version 55 and javac "release" update
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11
  • Priority: P3
  • Status: Closed
  • Resolution: External
  • Submitted: 2017-09-07
  • Updated: 2018-01-03
  • Resolved: 2018-01-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11Resolved
Related Reports
Cloners :  
Relates :  
Relates :  
Relates :  
Description
The nestmate changes update the JVMS and require an increment in the class file version number. The tasks here are based on those previously listed for the change to v53: JDK-8148651.

We also look at the changes needed to javac to add a new "release".

Filed in tools->javac though it will cover a range of activities across tools, build and the VM.
Comments
The changes to classfile version 55 are being handled elsewhere. With the new release cadence a bump to the version will happen "automatically" and does not need to be included in the work for any given project/JEP.
03-01-2018

Updated: replace 54 with 55 as 54 will be in 10/18.3 Using release 11 below as a placeholder: jdk/src/java.base/share/native/libjava/System.c ! #define JAVA_MAX_SUPPORTED_VERSION 55 hotspot/src/share/vm/classfile/classFileParser.cpp ! #define JAVA_MAX_SUPPORTED_VERSION 55 + hotspot/test/runtime/classFileParserBug/Class54.jasm jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java - if (readShort(off + 6) > Opcodes.V1_9) { + if (readShort(off + 6) > Opcodes.V_MAX) { jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java + int V_11 = 0 << 16 | 54; + int V_MAX = V_11; langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java + V55(55, 0); // JDK 11: nestmates langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java + JDK_11("11", 55, 0); + tab.put("11", JDK_11); langtools/test/tools/javac/6330997/T6330997.java * @compile -source 11 -target 11 T1.java * @compile -source 11 -target 11 T2.java langtools/test/tools/javac/classfiles/ClassVersionChecker.java String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "10", "11"}; int[][] ver = { {55, -1, -1, -1, -1, -1}, {55, 50, 51, 52, 53, 54. 55}, {55, -1, 51, 52, 53, 54, 55}, {55, -1, -1, 52, 53, 54, 55}, {55, -1, -1, -1, 53, 54, 55}, }; langtools/test/tools/javac/versions/Versions.java - various updates jdk/src/java.base/share/native/include/classfile_constants.h #define JVM_CLASSFILE_MAJOR_VERSION 55
07-11-2017

Updates to source/target for 11 are tracked by JDK-8173382 Changes for 10 are under JDK-8028546.
11-09-2017

Currently support for --release 10 is limited to being an alias for --release 9. The actual update work is tracked by JDK-8180744.
11-09-2017

Yes I've been discovering those issues - see prelim valhalla webrev: http://cr.openjdk.java.net/~dholmes/8187302/webrev/ Because the previous updates were done in two stages I initially missed some of the things required. I needed to find the issue(s) that go with JDK-8148651 for the --release changes. Unfortunately JDK-8148651 does not link to them. So I inferred a lot of the changes from existing release 10 versus earlier, code. Anyway this is what this issue is for - to get everything addressed that needs to be addressed. Meanwhile I'll be prototyping it in valhalla epo nestmates branch. If necessary this sub-task can be converted to an issue in its own right, with additional sub-tasks if needed. But it will need to be completed in its entirety before the nestmate work can also be pushed to mainline to use it. Thanks.
08-09-2017

There's a bunch of stuff that needs to happen in the lang tools world, with respect to updating for a new release ... it's not just adding a couple of switches and bumping the class file version, although that's part of it. A bunch of tests need to be updated. The technology to support -release needs to be updated. The 1+3-back policy needs to be re-evaluated and updated
07-09-2017