8191913: Bump classfile version number to 55
Reviewed-by: dholmes, darcy
Contributed-by: paul.sandoz@oracle.com, erik.joelsson@oracle.com
--- a/make/Main.gmk Wed Dec 20 17:36:50 2017 +0100
+++ b/make/Main.gmk Wed Dec 20 09:14:06 2017 -0800
@@ -637,7 +637,7 @@
# Declare dependencies between hotspot-<variant>* targets
$(foreach v, $(JVM_VARIANTS), \
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
- $(eval hotspot-$v-libs: hotspot-$v-gensrc) \
+ $(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
)
hotspot-ide-project: hotspot exploded-image
@@ -691,8 +691,9 @@
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
# The swing beans need to have java base properly generated to avoid errors
- # in javadoc.
- java.desktop-gensrc-src: java.base-gensrc
+ # in javadoc. The X11 wrappers need the java.base include files to have been
+ # copied and processed.
+ java.desktop-gensrc-src: java.base-gensrc java.base-copy
# The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler
# needs classes from the current JDK.
--- a/make/autoconf/buildjdk-spec.gmk.in Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/buildjdk-spec.gmk.in Wed Dec 20 09:14:06 2017 -0800
@@ -55,6 +55,7 @@
OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
+OPENJDK_TARGET_OS_INCLUDE_SUBDIR := @OPENJDK_BUILD_OS_INCLUDE_SUBDIR@
HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@
--- a/make/autoconf/flags.m4 Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/flags.m4 Wed Dec 20 09:14:06 2017 -0800
@@ -1162,9 +1162,7 @@
# Setup some hard coded includes
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
- -I${TOPDIR}/src/java.base/share/native/include \
- -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \
- -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I${TOPDIR}/src/java.base/share/native/libjava \
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \
-I${TOPDIR}/src/hotspot/share/include \
--- a/make/autoconf/generated-configure.sh Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/generated-configure.sh Wed Dec 20 09:14:06 2017 -0800
@@ -887,6 +887,8 @@
BOOT_JDK
JAVA_CHECK
JAVAC_CHECK
+VERSION_CLASSFILE_MINOR
+VERSION_CLASSFILE_MAJOR
VENDOR_VERSION_STRING
VERSION_DATE
VERSION_IS_GA
@@ -968,6 +970,7 @@
USERNAME
TOPDIR
PATH_SEP
+OPENJDK_BUILD_OS_INCLUDE_SUBDIR
HOTSPOT_BUILD_CPU_DEFINE
HOTSPOT_BUILD_CPU_ARCH
HOTSPOT_BUILD_CPU
@@ -978,6 +981,7 @@
OPENJDK_BUILD_CPU_ISADIR
OPENJDK_BUILD_CPU_LEGACY_LIB
OPENJDK_BUILD_CPU_LEGACY
+OPENJDK_TARGET_OS_INCLUDE_SUBDIR
HOTSPOT_TARGET_CPU_DEFINE
HOTSPOT_TARGET_CPU_ARCH
HOTSPOT_TARGET_CPU
@@ -1093,7 +1097,6 @@
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1383,7 +1386,6 @@
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1636,15 +1638,6 @@
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1782,7 +1775,7 @@
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1935,7 +1928,6 @@
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -5185,7 +5177,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1513206608
+DATE_WHEN_GENERATED=1513362567
###############################################################################
#
@@ -16316,6 +16308,14 @@
fi
+ # For historical reasons, the OS include directories have odd names.
+ OPENJDK_TARGET_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ OPENJDK_TARGET_OS_INCLUDE_SUBDIR="win32"
+ elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ OPENJDK_TARGET_OS_INCLUDE_SUBDIR="darwin"
+ fi
+
# Also store the legacy naming of the cpu.
@@ -16467,6 +16467,14 @@
fi
+ # For historical reasons, the OS include directories have odd names.
+ OPENJDK_BUILD_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ OPENJDK_BUILD_OS_INCLUDE_SUBDIR="win32"
+ elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ OPENJDK_BUILD_OS_INCLUDE_SUBDIR="darwin"
+ fi
+
@@ -25457,6 +25465,10 @@
VENDOR_VERSION_STRING="$with_vendor_version_string"
fi
+ # We could define --with flags for these, if really needed
+ VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
+ VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
$as_echo_n "checking for version string... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
@@ -25478,6 +25490,9 @@
+
+
+
###############################################################################
#
# Setup BootJDK, used to bootstrap the build.
@@ -52888,9 +52903,7 @@
# Setup some hard coded includes
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
- -I${TOPDIR}/src/java.base/share/native/include \
- -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
- -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I${TOPDIR}/src/java.base/share/native/libjava \
-I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
-I${TOPDIR}/src/hotspot/share/include \
@@ -53771,9 +53784,7 @@
# Setup some hard coded includes
OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
- -I${TOPDIR}/src/java.base/share/native/include \
- -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
- -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
+ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I${TOPDIR}/src/java.base/share/native/libjava \
-I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava \
-I${TOPDIR}/src/hotspot/share/include \
--- a/make/autoconf/jdk-version.m4 Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/jdk-version.m4 Wed Dec 20 09:14:06 2017 -0800
@@ -331,6 +331,10 @@
VENDOR_VERSION_STRING="$with_vendor_version_string"
fi
+ # We could define --with flags for these, if really needed
+ VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
+ VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
+
AC_MSG_CHECKING([for version string])
AC_MSG_RESULT([$VERSION_STRING])
@@ -348,4 +352,7 @@
AC_SUBST(VERSION_IS_GA)
AC_SUBST(VERSION_DATE)
AC_SUBST(VENDOR_VERSION_STRING)
+ AC_SUBST(VERSION_CLASSFILE_MAJOR)
+ AC_SUBST(VERSION_CLASSFILE_MINOR)
+
])
--- a/make/autoconf/platform.m4 Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/platform.m4 Wed Dec 20 09:14:06 2017 -0800
@@ -478,6 +478,14 @@
fi
AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
+ # For historical reasons, the OS include directories have odd names.
+ OPENJDK_$1_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ OPENJDK_$1_OS_INCLUDE_SUBDIR="win32"
+ elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ OPENJDK_$1_OS_INCLUDE_SUBDIR="darwin"
+ fi
+ AC_SUBST(OPENJDK_$1_OS_INCLUDE_SUBDIR)
])
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
--- a/make/autoconf/spec.gmk.in Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/spec.gmk.in Wed Dec 20 09:14:06 2017 -0800
@@ -78,6 +78,7 @@
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
+OPENJDK_TARGET_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@
@@ -100,6 +101,8 @@
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
+OPENJDK_BUILD_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
+
# Target platform value in ModuleTarget class file attribute.
OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
@@ -175,6 +178,10 @@
# Vendor version string
VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@
+# Class-file version
+VERSION_CLASSFILE_MAJOR := @VERSION_CLASSFILE_MAJOR@
+VERSION_CLASSFILE_MINOR := @VERSION_CLASSFILE_MINOR@
+
# Convenience CFLAGS settings for passing version information into native programs.
VERSION_CFLAGS := \
-DVERSION_FEATURE=$(VERSION_FEATURE) \
@@ -190,6 +197,8 @@
-DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
-DVERSION_DATE='"$(VERSION_DATE)"' \
-DVENDOR_VERSION_STRING='"$(VENDOR_VERSION_STRING)"' \
+ -DVERSION_CLASSFILE_MAJOR=$(VERSION_CLASSFILE_MAJOR) \
+ -DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \
#
# Platform naming variables
--- a/make/autoconf/version-numbers Wed Dec 20 17:36:50 2017 +0100
+++ b/make/autoconf/version-numbers Wed Dec 20 09:14:06 2017 -0800
@@ -30,6 +30,8 @@
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_DATE=2018-03-20
+DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
+DEFAULT_VERSION_CLASSFILE_MINOR=0
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
--- a/make/copy/Copy-java.base.gmk Wed Dec 20 17:36:50 2017 +0100
+++ b/make/copy/Copy-java.base.gmk Wed Dec 20 09:14:06 2017 -0800
@@ -24,6 +24,7 @@
#
include CopyCommon.gmk
+include TextFileProcessing.gmk
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
@@ -244,3 +245,16 @@
endif
################################################################################
+# Generate classfile_constants.h
+
+$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
+ SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \
+ OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \
+ REPLACEMENTS := \
+ @@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
+ @@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \
+))
+
+TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)
+
+################################################################################
--- a/make/copy/CopyCommon.gmk Wed Dec 20 17:36:50 2017 +0100
+++ b/make/copy/CopyCommon.gmk Wed Dec 20 09:14:06 2017 -0800
@@ -39,20 +39,12 @@
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE, \
SRC := $(INCLUDE_SOURCE_DIR), \
DEST := $(INCLUDE_TARGET_DIR), \
- FILES := $(shell $(FIND) $(INCLUDE_SOURCE_DIR) -type f), \
+ FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_DIR))), \
))
TARGETS += $(COPY_EXPORTED_INCLUDE)
endif
-# For historical reasons, the OS include directories have odd names.
-INCLUDE_TARGET_OS_SUBDIR := $(OPENJDK_TARGET_OS)
-ifeq ($(OPENJDK_TARGET_OS), windows)
- INCLUDE_TARGET_OS_SUBDIR := win32
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
- INCLUDE_TARGET_OS_SUBDIR := darwin
-endif
-
# Use the most specific of OS and OS_TYPE.
INCLUDE_SOURCE_OS_DIR := $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/native/include
ifeq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
@@ -62,8 +54,8 @@
ifneq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE_OS, \
SRC := $(INCLUDE_SOURCE_OS_DIR), \
- DEST := $(INCLUDE_TARGET_DIR)/$(INCLUDE_TARGET_OS_SUBDIR), \
- FILES := $(shell $(FIND) $(INCLUDE_SOURCE_OS_DIR) -type f), \
+ DEST := $(INCLUDE_TARGET_DIR)/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR), \
+ FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \
))
TARGETS += $(COPY_EXPORTED_INCLUDE_OS)
--- a/make/gensrc/GensrcX11Wrappers.gmk Wed Dec 20 17:36:50 2017 +0100
+++ b/make/gensrc/GensrcX11Wrappers.gmk Wed Dec 20 09:14:06 2017 -0800
@@ -92,10 +92,10 @@
endif
SIZER_CFLAGS := \
- -I${TOPDIR}/src/hotspot/share/include \
- -I${TOPDIR}/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
- -I$(TOPDIR)/src/java.base/share/native/include \
- -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
+ -I$(TOPDIR)/src/hotspot/share/include \
+ -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
+ -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I$(TOPDIR)/src/java.base/share/native/libjava \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
--- a/make/hotspot/lib/CompileJvm.gmk Wed Dec 20 17:36:50 2017 +0100
+++ b/make/hotspot/lib/CompileJvm.gmk Wed Dec 20 09:14:06 2017 -0800
@@ -59,8 +59,8 @@
-I$(TOPDIR)/src/hotspot/share/precompiled \
-I$(TOPDIR)/src/hotspot/share/include \
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
- -I$(TOPDIR)/src/java.base/share/native/include \
- -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
+ -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I$(TOPDIR)/src/java.base/share/native/libjimage \
#
--- a/src/hotspot/share/classfile/classFileParser.cpp Wed Dec 20 17:36:50 2017 +0100
+++ b/src/hotspot/share/classfile/classFileParser.cpp Wed Dec 20 09:14:06 2017 -0800
@@ -86,8 +86,6 @@
#define JAVA_CLASSFILE_MAGIC 0xCAFEBABE
#define JAVA_MIN_SUPPORTED_VERSION 45
-#define JAVA_MAX_SUPPORTED_VERSION 54
-#define JAVA_MAX_SUPPORTED_MINOR_VERSION 0
// Used for two backward compatibility reasons:
// - to check for new additions to the class file format in JDK1.5
@@ -110,6 +108,8 @@
#define JAVA_10_VERSION 54
+#define JAVA_11_VERSION 55
+
void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
"Unexpected bad constant pool entry");
@@ -4642,11 +4642,11 @@
}
static bool is_supported_version(u2 major, u2 minor){
- const u2 max_version = JAVA_MAX_SUPPORTED_VERSION;
+ const u2 max_version = JVM_CLASSFILE_MAJOR_VERSION;
return (major >= JAVA_MIN_SUPPORTED_VERSION) &&
(major <= max_version) &&
((major != max_version) ||
- (minor <= JAVA_MAX_SUPPORTED_MINOR_VERSION));
+ (minor <= JVM_CLASSFILE_MINOR_VERSION));
}
void ClassFileParser::verify_legal_field_modifiers(jint flags,
@@ -5808,8 +5808,8 @@
_class_name->as_C_string(),
_major_version,
_minor_version,
- JAVA_MAX_SUPPORTED_VERSION,
- JAVA_MAX_SUPPORTED_MINOR_VERSION);
+ JVM_CLASSFILE_MAJOR_VERSION,
+ JVM_CLASSFILE_MINOR_VERSION);
return;
}
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java Wed Dec 20 09:14:06 2017 -0800
@@ -48,6 +48,7 @@
1.8 to 1.8.X 52,0
1.9 to 1.9.X 53,0
1.10 to 1.10.X 54,0
+ 1.11 to 1.11.X 55,0
*/
public static final Package.Version JAVA_MIN_CLASS_VERSION =
@@ -71,6 +72,9 @@
public static final Package.Version JAVA10_MAX_CLASS_VERSION =
Package.Version.of(54, 00);
+ public static final Package.Version JAVA11_MAX_CLASS_VERSION =
+ Package.Version.of(55, 00);
+
public static final int JAVA_PACKAGE_MAGIC = 0xCAFED00D;
public static final Package.Version JAVA5_PACKAGE_VERSION =
@@ -87,7 +91,7 @@
// upper limit, should point to the latest class version
public static final Package.Version JAVA_MAX_CLASS_VERSION =
- JAVA10_MAX_CLASS_VERSION;
+ JAVA11_MAX_CLASS_VERSION;
// upper limit should point to the latest package version, for version info!.
public static final Package.Version MAX_PACKAGE_VERSION =
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java Wed Dec 20 09:14:06 2017 -0800
@@ -64,7 +64,7 @@
public final class ModuleInfo {
private final int JAVA_MIN_SUPPORTED_VERSION = 53;
- private final int JAVA_MAX_SUPPORTED_VERSION = 54;
+ private final int JAVA_MAX_SUPPORTED_VERSION = 55;
private static final JavaLangModuleAccess JLMA
= SharedSecrets.getJavaLangModuleAccess();
--- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java Wed Dec 20 09:14:06 2017 -0800
@@ -185,7 +185,7 @@
public ClassReader(final byte[] b, final int off, final int len) {
this.b = b;
// checks the class version
- if (readShort(off + 6) > Opcodes.V10) {
+ if (readShort(off + 6) > Opcodes.V11) {
throw new IllegalArgumentException();
}
// parses the constant pool
--- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java Wed Dec 20 09:14:06 2017 -0800
@@ -90,6 +90,7 @@
int V1_8 = 0 << 16 | 52;
int V9 = 0 << 16 | 53;
int V10 = 0 << 16 | 54;
+ int V11 = 0 << 16 | 55;
// access flags
--- a/src/java.base/share/native/include/classfile_constants.h Wed Dec 20 17:36:50 2017 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,581 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef CLASSFILE_CONSTANTS_H
-#define CLASSFILE_CONSTANTS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Classfile version number for this information */
-#define JVM_CLASSFILE_MAJOR_VERSION 54
-#define JVM_CLASSFILE_MINOR_VERSION 0
-
-/* Flags */
-
-enum {
- JVM_ACC_PUBLIC = 0x0001,
- JVM_ACC_PRIVATE = 0x0002,
- JVM_ACC_PROTECTED = 0x0004,
- JVM_ACC_STATIC = 0x0008,
- JVM_ACC_FINAL = 0x0010,
- JVM_ACC_SYNCHRONIZED = 0x0020,
- JVM_ACC_SUPER = 0x0020,
- JVM_ACC_VOLATILE = 0x0040,
- JVM_ACC_BRIDGE = 0x0040,
- JVM_ACC_TRANSIENT = 0x0080,
- JVM_ACC_VARARGS = 0x0080,
- JVM_ACC_NATIVE = 0x0100,
- JVM_ACC_INTERFACE = 0x0200,
- JVM_ACC_ABSTRACT = 0x0400,
- JVM_ACC_STRICT = 0x0800,
- JVM_ACC_SYNTHETIC = 0x1000,
- JVM_ACC_ANNOTATION = 0x2000,
- JVM_ACC_ENUM = 0x4000,
- JVM_ACC_MODULE = 0x8000
-};
-
-#define JVM_ACC_PUBLIC_BIT 0
-#define JVM_ACC_PRIVATE_BIT 1
-#define JVM_ACC_PROTECTED_BIT 2
-#define JVM_ACC_STATIC_BIT 3
-#define JVM_ACC_FINAL_BIT 4
-#define JVM_ACC_SYNCHRONIZED_BIT 5
-#define JVM_ACC_SUPER_BIT 5
-#define JVM_ACC_VOLATILE_BIT 6
-#define JVM_ACC_BRIDGE_BIT 6
-#define JVM_ACC_TRANSIENT_BIT 7
-#define JVM_ACC_VARARGS_BIT 7
-#define JVM_ACC_NATIVE_BIT 8
-#define JVM_ACC_INTERFACE_BIT 9
-#define JVM_ACC_ABSTRACT_BIT 10
-#define JVM_ACC_STRICT_BIT 11
-#define JVM_ACC_SYNTHETIC_BIT 12
-#define JVM_ACC_ANNOTATION_BIT 13
-#define JVM_ACC_ENUM_BIT 14
-
-/* Used in newarray instruction. */
-
-enum {
- JVM_T_BOOLEAN = 4,
- JVM_T_CHAR = 5,
- JVM_T_FLOAT = 6,
- JVM_T_DOUBLE = 7,
- JVM_T_BYTE = 8,
- JVM_T_SHORT = 9,
- JVM_T_INT = 10,
- JVM_T_LONG = 11
-};
-
-/* Constant Pool Entries */
-
-enum {
- JVM_CONSTANT_Utf8 = 1,
- JVM_CONSTANT_Unicode = 2, /* unused */
- JVM_CONSTANT_Integer = 3,
- JVM_CONSTANT_Float = 4,
- JVM_CONSTANT_Long = 5,
- JVM_CONSTANT_Double = 6,
- JVM_CONSTANT_Class = 7,
- JVM_CONSTANT_String = 8,
- JVM_CONSTANT_Fieldref = 9,
- JVM_CONSTANT_Methodref = 10,
- JVM_CONSTANT_InterfaceMethodref = 11,
- JVM_CONSTANT_NameAndType = 12,
- JVM_CONSTANT_MethodHandle = 15, // JSR 292
- JVM_CONSTANT_MethodType = 16, // JSR 292
- JVM_CONSTANT_InvokeDynamic = 18,
- JVM_CONSTANT_ExternalMax = 18
-};
-
-/* JVM_CONSTANT_MethodHandle subtypes */
-enum {
- JVM_REF_getField = 1,
- JVM_REF_getStatic = 2,
- JVM_REF_putField = 3,
- JVM_REF_putStatic = 4,
- JVM_REF_invokeVirtual = 5,
- JVM_REF_invokeStatic = 6,
- JVM_REF_invokeSpecial = 7,
- JVM_REF_newInvokeSpecial = 8,
- JVM_REF_invokeInterface = 9
-};
-
-/* StackMapTable type item numbers */
-
-enum {
- JVM_ITEM_Top = 0,
- JVM_ITEM_Integer = 1,
- JVM_ITEM_Float = 2,
- JVM_ITEM_Double = 3,
- JVM_ITEM_Long = 4,
- JVM_ITEM_Null = 5,
- JVM_ITEM_UninitializedThis = 6,
- JVM_ITEM_Object = 7,
- JVM_ITEM_Uninitialized = 8
-};
-
-/* Type signatures */
-
-enum {
- JVM_SIGNATURE_ARRAY = '[',
- JVM_SIGNATURE_BYTE = 'B',
- JVM_SIGNATURE_CHAR = 'C',
- JVM_SIGNATURE_CLASS = 'L',
- JVM_SIGNATURE_ENDCLASS = ';',
- JVM_SIGNATURE_ENUM = 'E',
- JVM_SIGNATURE_FLOAT = 'F',
- JVM_SIGNATURE_DOUBLE = 'D',
- JVM_SIGNATURE_FUNC = '(',
- JVM_SIGNATURE_ENDFUNC = ')',
- JVM_SIGNATURE_INT = 'I',
- JVM_SIGNATURE_LONG = 'J',
- JVM_SIGNATURE_SHORT = 'S',
- JVM_SIGNATURE_VOID = 'V',
- JVM_SIGNATURE_BOOLEAN = 'Z'
-};
-
-/* Opcodes */
-
-enum {
- JVM_OPC_nop = 0,
- JVM_OPC_aconst_null = 1,
- JVM_OPC_iconst_m1 = 2,
- JVM_OPC_iconst_0 = 3,
- JVM_OPC_iconst_1 = 4,
- JVM_OPC_iconst_2 = 5,
- JVM_OPC_iconst_3 = 6,
- JVM_OPC_iconst_4 = 7,
- JVM_OPC_iconst_5 = 8,
- JVM_OPC_lconst_0 = 9,
- JVM_OPC_lconst_1 = 10,
- JVM_OPC_fconst_0 = 11,
- JVM_OPC_fconst_1 = 12,
- JVM_OPC_fconst_2 = 13,
- JVM_OPC_dconst_0 = 14,
- JVM_OPC_dconst_1 = 15,
- JVM_OPC_bipush = 16,
- JVM_OPC_sipush = 17,
- JVM_OPC_ldc = 18,
- JVM_OPC_ldc_w = 19,
- JVM_OPC_ldc2_w = 20,
- JVM_OPC_iload = 21,
- JVM_OPC_lload = 22,
- JVM_OPC_fload = 23,
- JVM_OPC_dload = 24,
- JVM_OPC_aload = 25,
- JVM_OPC_iload_0 = 26,
- JVM_OPC_iload_1 = 27,
- JVM_OPC_iload_2 = 28,
- JVM_OPC_iload_3 = 29,
- JVM_OPC_lload_0 = 30,
- JVM_OPC_lload_1 = 31,
- JVM_OPC_lload_2 = 32,
- JVM_OPC_lload_3 = 33,
- JVM_OPC_fload_0 = 34,
- JVM_OPC_fload_1 = 35,
- JVM_OPC_fload_2 = 36,
- JVM_OPC_fload_3 = 37,
- JVM_OPC_dload_0 = 38,
- JVM_OPC_dload_1 = 39,
- JVM_OPC_dload_2 = 40,
- JVM_OPC_dload_3 = 41,
- JVM_OPC_aload_0 = 42,
- JVM_OPC_aload_1 = 43,
- JVM_OPC_aload_2 = 44,
- JVM_OPC_aload_3 = 45,
- JVM_OPC_iaload = 46,
- JVM_OPC_laload = 47,
- JVM_OPC_faload = 48,
- JVM_OPC_daload = 49,
- JVM_OPC_aaload = 50,
- JVM_OPC_baload = 51,
- JVM_OPC_caload = 52,
- JVM_OPC_saload = 53,
- JVM_OPC_istore = 54,
- JVM_OPC_lstore = 55,
- JVM_OPC_fstore = 56,
- JVM_OPC_dstore = 57,
- JVM_OPC_astore = 58,
- JVM_OPC_istore_0 = 59,
- JVM_OPC_istore_1 = 60,
- JVM_OPC_istore_2 = 61,
- JVM_OPC_istore_3 = 62,
- JVM_OPC_lstore_0 = 63,
- JVM_OPC_lstore_1 = 64,
- JVM_OPC_lstore_2 = 65,
- JVM_OPC_lstore_3 = 66,
- JVM_OPC_fstore_0 = 67,
- JVM_OPC_fstore_1 = 68,
- JVM_OPC_fstore_2 = 69,
- JVM_OPC_fstore_3 = 70,
- JVM_OPC_dstore_0 = 71,
- JVM_OPC_dstore_1 = 72,
- JVM_OPC_dstore_2 = 73,
- JVM_OPC_dstore_3 = 74,
- JVM_OPC_astore_0 = 75,
- JVM_OPC_astore_1 = 76,
- JVM_OPC_astore_2 = 77,
- JVM_OPC_astore_3 = 78,
- JVM_OPC_iastore = 79,
- JVM_OPC_lastore = 80,
- JVM_OPC_fastore = 81,
- JVM_OPC_dastore = 82,
- JVM_OPC_aastore = 83,
- JVM_OPC_bastore = 84,
- JVM_OPC_castore = 85,
- JVM_OPC_sastore = 86,
- JVM_OPC_pop = 87,
- JVM_OPC_pop2 = 88,
- JVM_OPC_dup = 89,
- JVM_OPC_dup_x1 = 90,
- JVM_OPC_dup_x2 = 91,
- JVM_OPC_dup2 = 92,
- JVM_OPC_dup2_x1 = 93,
- JVM_OPC_dup2_x2 = 94,
- JVM_OPC_swap = 95,
- JVM_OPC_iadd = 96,
- JVM_OPC_ladd = 97,
- JVM_OPC_fadd = 98,
- JVM_OPC_dadd = 99,
- JVM_OPC_isub = 100,
- JVM_OPC_lsub = 101,
- JVM_OPC_fsub = 102,
- JVM_OPC_dsub = 103,
- JVM_OPC_imul = 104,
- JVM_OPC_lmul = 105,
- JVM_OPC_fmul = 106,
- JVM_OPC_dmul = 107,
- JVM_OPC_idiv = 108,
- JVM_OPC_ldiv = 109,
- JVM_OPC_fdiv = 110,
- JVM_OPC_ddiv = 111,
- JVM_OPC_irem = 112,
- JVM_OPC_lrem = 113,
- JVM_OPC_frem = 114,
- JVM_OPC_drem = 115,
- JVM_OPC_ineg = 116,
- JVM_OPC_lneg = 117,
- JVM_OPC_fneg = 118,
- JVM_OPC_dneg = 119,
- JVM_OPC_ishl = 120,
- JVM_OPC_lshl = 121,
- JVM_OPC_ishr = 122,
- JVM_OPC_lshr = 123,
- JVM_OPC_iushr = 124,
- JVM_OPC_lushr = 125,
- JVM_OPC_iand = 126,
- JVM_OPC_land = 127,
- JVM_OPC_ior = 128,
- JVM_OPC_lor = 129,
- JVM_OPC_ixor = 130,
- JVM_OPC_lxor = 131,
- JVM_OPC_iinc = 132,
- JVM_OPC_i2l = 133,
- JVM_OPC_i2f = 134,
- JVM_OPC_i2d = 135,
- JVM_OPC_l2i = 136,
- JVM_OPC_l2f = 137,
- JVM_OPC_l2d = 138,
- JVM_OPC_f2i = 139,
- JVM_OPC_f2l = 140,
- JVM_OPC_f2d = 141,
- JVM_OPC_d2i = 142,
- JVM_OPC_d2l = 143,
- JVM_OPC_d2f = 144,
- JVM_OPC_i2b = 145,
- JVM_OPC_i2c = 146,
- JVM_OPC_i2s = 147,
- JVM_OPC_lcmp = 148,
- JVM_OPC_fcmpl = 149,
- JVM_OPC_fcmpg = 150,
- JVM_OPC_dcmpl = 151,
- JVM_OPC_dcmpg = 152,
- JVM_OPC_ifeq = 153,
- JVM_OPC_ifne = 154,
- JVM_OPC_iflt = 155,
- JVM_OPC_ifge = 156,
- JVM_OPC_ifgt = 157,
- JVM_OPC_ifle = 158,
- JVM_OPC_if_icmpeq = 159,
- JVM_OPC_if_icmpne = 160,
- JVM_OPC_if_icmplt = 161,
- JVM_OPC_if_icmpge = 162,
- JVM_OPC_if_icmpgt = 163,
- JVM_OPC_if_icmple = 164,
- JVM_OPC_if_acmpeq = 165,
- JVM_OPC_if_acmpne = 166,
- JVM_OPC_goto = 167,
- JVM_OPC_jsr = 168,
- JVM_OPC_ret = 169,
- JVM_OPC_tableswitch = 170,
- JVM_OPC_lookupswitch = 171,
- JVM_OPC_ireturn = 172,
- JVM_OPC_lreturn = 173,
- JVM_OPC_freturn = 174,
- JVM_OPC_dreturn = 175,
- JVM_OPC_areturn = 176,
- JVM_OPC_return = 177,
- JVM_OPC_getstatic = 178,
- JVM_OPC_putstatic = 179,
- JVM_OPC_getfield = 180,
- JVM_OPC_putfield = 181,
- JVM_OPC_invokevirtual = 182,
- JVM_OPC_invokespecial = 183,
- JVM_OPC_invokestatic = 184,
- JVM_OPC_invokeinterface = 185,
- JVM_OPC_invokedynamic = 186,
- JVM_OPC_new = 187,
- JVM_OPC_newarray = 188,
- JVM_OPC_anewarray = 189,
- JVM_OPC_arraylength = 190,
- JVM_OPC_athrow = 191,
- JVM_OPC_checkcast = 192,
- JVM_OPC_instanceof = 193,
- JVM_OPC_monitorenter = 194,
- JVM_OPC_monitorexit = 195,
- JVM_OPC_wide = 196,
- JVM_OPC_multianewarray = 197,
- JVM_OPC_ifnull = 198,
- JVM_OPC_ifnonnull = 199,
- JVM_OPC_goto_w = 200,
- JVM_OPC_jsr_w = 201,
- JVM_OPC_MAX = 201
-};
-
-/* Opcode length initializer, use with something like:
- * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
- */
-#define JVM_OPCODE_LENGTH_INITIALIZER { \
- 1, /* nop */ \
- 1, /* aconst_null */ \
- 1, /* iconst_m1 */ \
- 1, /* iconst_0 */ \
- 1, /* iconst_1 */ \
- 1, /* iconst_2 */ \
- 1, /* iconst_3 */ \
- 1, /* iconst_4 */ \
- 1, /* iconst_5 */ \
- 1, /* lconst_0 */ \
- 1, /* lconst_1 */ \
- 1, /* fconst_0 */ \
- 1, /* fconst_1 */ \
- 1, /* fconst_2 */ \
- 1, /* dconst_0 */ \
- 1, /* dconst_1 */ \
- 2, /* bipush */ \
- 3, /* sipush */ \
- 2, /* ldc */ \
- 3, /* ldc_w */ \
- 3, /* ldc2_w */ \
- 2, /* iload */ \
- 2, /* lload */ \
- 2, /* fload */ \
- 2, /* dload */ \
- 2, /* aload */ \
- 1, /* iload_0 */ \
- 1, /* iload_1 */ \
- 1, /* iload_2 */ \
- 1, /* iload_3 */ \
- 1, /* lload_0 */ \
- 1, /* lload_1 */ \
- 1, /* lload_2 */ \
- 1, /* lload_3 */ \
- 1, /* fload_0 */ \
- 1, /* fload_1 */ \
- 1, /* fload_2 */ \
- 1, /* fload_3 */ \
- 1, /* dload_0 */ \
- 1, /* dload_1 */ \
- 1, /* dload_2 */ \
- 1, /* dload_3 */ \
- 1, /* aload_0 */ \
- 1, /* aload_1 */ \
- 1, /* aload_2 */ \
- 1, /* aload_3 */ \
- 1, /* iaload */ \
- 1, /* laload */ \
- 1, /* faload */ \
- 1, /* daload */ \
- 1, /* aaload */ \
- 1, /* baload */ \
- 1, /* caload */ \
- 1, /* saload */ \
- 2, /* istore */ \
- 2, /* lstore */ \
- 2, /* fstore */ \
- 2, /* dstore */ \
- 2, /* astore */ \
- 1, /* istore_0 */ \
- 1, /* istore_1 */ \
- 1, /* istore_2 */ \
- 1, /* istore_3 */ \
- 1, /* lstore_0 */ \
- 1, /* lstore_1 */ \
- 1, /* lstore_2 */ \
- 1, /* lstore_3 */ \
- 1, /* fstore_0 */ \
- 1, /* fstore_1 */ \
- 1, /* fstore_2 */ \
- 1, /* fstore_3 */ \
- 1, /* dstore_0 */ \
- 1, /* dstore_1 */ \
- 1, /* dstore_2 */ \
- 1, /* dstore_3 */ \
- 1, /* astore_0 */ \
- 1, /* astore_1 */ \
- 1, /* astore_2 */ \
- 1, /* astore_3 */ \
- 1, /* iastore */ \
- 1, /* lastore */ \
- 1, /* fastore */ \
- 1, /* dastore */ \
- 1, /* aastore */ \
- 1, /* bastore */ \
- 1, /* castore */ \
- 1, /* sastore */ \
- 1, /* pop */ \
- 1, /* pop2 */ \
- 1, /* dup */ \
- 1, /* dup_x1 */ \
- 1, /* dup_x2 */ \
- 1, /* dup2 */ \
- 1, /* dup2_x1 */ \
- 1, /* dup2_x2 */ \
- 1, /* swap */ \
- 1, /* iadd */ \
- 1, /* ladd */ \
- 1, /* fadd */ \
- 1, /* dadd */ \
- 1, /* isub */ \
- 1, /* lsub */ \
- 1, /* fsub */ \
- 1, /* dsub */ \
- 1, /* imul */ \
- 1, /* lmul */ \
- 1, /* fmul */ \
- 1, /* dmul */ \
- 1, /* idiv */ \
- 1, /* ldiv */ \
- 1, /* fdiv */ \
- 1, /* ddiv */ \
- 1, /* irem */ \
- 1, /* lrem */ \
- 1, /* frem */ \
- 1, /* drem */ \
- 1, /* ineg */ \
- 1, /* lneg */ \
- 1, /* fneg */ \
- 1, /* dneg */ \
- 1, /* ishl */ \
- 1, /* lshl */ \
- 1, /* ishr */ \
- 1, /* lshr */ \
- 1, /* iushr */ \
- 1, /* lushr */ \
- 1, /* iand */ \
- 1, /* land */ \
- 1, /* ior */ \
- 1, /* lor */ \
- 1, /* ixor */ \
- 1, /* lxor */ \
- 3, /* iinc */ \
- 1, /* i2l */ \
- 1, /* i2f */ \
- 1, /* i2d */ \
- 1, /* l2i */ \
- 1, /* l2f */ \
- 1, /* l2d */ \
- 1, /* f2i */ \
- 1, /* f2l */ \
- 1, /* f2d */ \
- 1, /* d2i */ \
- 1, /* d2l */ \
- 1, /* d2f */ \
- 1, /* i2b */ \
- 1, /* i2c */ \
- 1, /* i2s */ \
- 1, /* lcmp */ \
- 1, /* fcmpl */ \
- 1, /* fcmpg */ \
- 1, /* dcmpl */ \
- 1, /* dcmpg */ \
- 3, /* ifeq */ \
- 3, /* ifne */ \
- 3, /* iflt */ \
- 3, /* ifge */ \
- 3, /* ifgt */ \
- 3, /* ifle */ \
- 3, /* if_icmpeq */ \
- 3, /* if_icmpne */ \
- 3, /* if_icmplt */ \
- 3, /* if_icmpge */ \
- 3, /* if_icmpgt */ \
- 3, /* if_icmple */ \
- 3, /* if_acmpeq */ \
- 3, /* if_acmpne */ \
- 3, /* goto */ \
- 3, /* jsr */ \
- 2, /* ret */ \
- 99, /* tableswitch */ \
- 99, /* lookupswitch */ \
- 1, /* ireturn */ \
- 1, /* lreturn */ \
- 1, /* freturn */ \
- 1, /* dreturn */ \
- 1, /* areturn */ \
- 1, /* return */ \
- 3, /* getstatic */ \
- 3, /* putstatic */ \
- 3, /* getfield */ \
- 3, /* putfield */ \
- 3, /* invokevirtual */ \
- 3, /* invokespecial */ \
- 3, /* invokestatic */ \
- 5, /* invokeinterface */ \
- 5, /* invokedynamic */ \
- 3, /* new */ \
- 2, /* newarray */ \
- 3, /* anewarray */ \
- 1, /* arraylength */ \
- 1, /* athrow */ \
- 3, /* checkcast */ \
- 3, /* instanceof */ \
- 1, /* monitorenter */ \
- 1, /* monitorexit */ \
- 0, /* wide */ \
- 4, /* multianewarray */ \
- 3, /* ifnull */ \
- 3, /* ifnonnull */ \
- 5, /* goto_w */ \
- 5 /* jsr_w */ \
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* CLASSFILE_CONSTANTS */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/native/include/classfile_constants.h.template Wed Dec 20 09:14:06 2017 -0800
@@ -0,0 +1,581 @@
+/*
+ * Copyright (c) 2004, 2017, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef CLASSFILE_CONSTANTS_H
+#define CLASSFILE_CONSTANTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Classfile version number for this information */
+#define JVM_CLASSFILE_MAJOR_VERSION @@VERSION_CLASSFILE_MAJOR@@
+#define JVM_CLASSFILE_MINOR_VERSION @@VERSION_CLASSFILE_MINOR@@
+
+/* Flags */
+
+enum {
+ JVM_ACC_PUBLIC = 0x0001,
+ JVM_ACC_PRIVATE = 0x0002,
+ JVM_ACC_PROTECTED = 0x0004,
+ JVM_ACC_STATIC = 0x0008,
+ JVM_ACC_FINAL = 0x0010,
+ JVM_ACC_SYNCHRONIZED = 0x0020,
+ JVM_ACC_SUPER = 0x0020,
+ JVM_ACC_VOLATILE = 0x0040,
+ JVM_ACC_BRIDGE = 0x0040,
+ JVM_ACC_TRANSIENT = 0x0080,
+ JVM_ACC_VARARGS = 0x0080,
+ JVM_ACC_NATIVE = 0x0100,
+ JVM_ACC_INTERFACE = 0x0200,
+ JVM_ACC_ABSTRACT = 0x0400,
+ JVM_ACC_STRICT = 0x0800,
+ JVM_ACC_SYNTHETIC = 0x1000,
+ JVM_ACC_ANNOTATION = 0x2000,
+ JVM_ACC_ENUM = 0x4000,
+ JVM_ACC_MODULE = 0x8000
+};
+
+#define JVM_ACC_PUBLIC_BIT 0
+#define JVM_ACC_PRIVATE_BIT 1
+#define JVM_ACC_PROTECTED_BIT 2
+#define JVM_ACC_STATIC_BIT 3
+#define JVM_ACC_FINAL_BIT 4
+#define JVM_ACC_SYNCHRONIZED_BIT 5
+#define JVM_ACC_SUPER_BIT 5
+#define JVM_ACC_VOLATILE_BIT 6
+#define JVM_ACC_BRIDGE_BIT 6
+#define JVM_ACC_TRANSIENT_BIT 7
+#define JVM_ACC_VARARGS_BIT 7
+#define JVM_ACC_NATIVE_BIT 8
+#define JVM_ACC_INTERFACE_BIT 9
+#define JVM_ACC_ABSTRACT_BIT 10
+#define JVM_ACC_STRICT_BIT 11
+#define JVM_ACC_SYNTHETIC_BIT 12
+#define JVM_ACC_ANNOTATION_BIT 13
+#define JVM_ACC_ENUM_BIT 14
+
+/* Used in newarray instruction. */
+
+enum {
+ JVM_T_BOOLEAN = 4,
+ JVM_T_CHAR = 5,
+ JVM_T_FLOAT = 6,
+ JVM_T_DOUBLE = 7,
+ JVM_T_BYTE = 8,
+ JVM_T_SHORT = 9,
+ JVM_T_INT = 10,
+ JVM_T_LONG = 11
+};
+
+/* Constant Pool Entries */
+
+enum {
+ JVM_CONSTANT_Utf8 = 1,
+ JVM_CONSTANT_Unicode = 2, /* unused */
+ JVM_CONSTANT_Integer = 3,
+ JVM_CONSTANT_Float = 4,
+ JVM_CONSTANT_Long = 5,
+ JVM_CONSTANT_Double = 6,
+ JVM_CONSTANT_Class = 7,
+ JVM_CONSTANT_String = 8,
+ JVM_CONSTANT_Fieldref = 9,
+ JVM_CONSTANT_Methodref = 10,
+ JVM_CONSTANT_InterfaceMethodref = 11,
+ JVM_CONSTANT_NameAndType = 12,
+ JVM_CONSTANT_MethodHandle = 15, // JSR 292
+ JVM_CONSTANT_MethodType = 16, // JSR 292
+ JVM_CONSTANT_InvokeDynamic = 18,
+ JVM_CONSTANT_ExternalMax = 18
+};
+
+/* JVM_CONSTANT_MethodHandle subtypes */
+enum {
+ JVM_REF_getField = 1,
+ JVM_REF_getStatic = 2,
+ JVM_REF_putField = 3,
+ JVM_REF_putStatic = 4,
+ JVM_REF_invokeVirtual = 5,
+ JVM_REF_invokeStatic = 6,
+ JVM_REF_invokeSpecial = 7,
+ JVM_REF_newInvokeSpecial = 8,
+ JVM_REF_invokeInterface = 9
+};
+
+/* StackMapTable type item numbers */
+
+enum {
+ JVM_ITEM_Top = 0,
+ JVM_ITEM_Integer = 1,
+ JVM_ITEM_Float = 2,
+ JVM_ITEM_Double = 3,
+ JVM_ITEM_Long = 4,
+ JVM_ITEM_Null = 5,
+ JVM_ITEM_UninitializedThis = 6,
+ JVM_ITEM_Object = 7,
+ JVM_ITEM_Uninitialized = 8
+};
+
+/* Type signatures */
+
+enum {
+ JVM_SIGNATURE_ARRAY = '[',
+ JVM_SIGNATURE_BYTE = 'B',
+ JVM_SIGNATURE_CHAR = 'C',
+ JVM_SIGNATURE_CLASS = 'L',
+ JVM_SIGNATURE_ENDCLASS = ';',
+ JVM_SIGNATURE_ENUM = 'E',
+ JVM_SIGNATURE_FLOAT = 'F',
+ JVM_SIGNATURE_DOUBLE = 'D',
+ JVM_SIGNATURE_FUNC = '(',
+ JVM_SIGNATURE_ENDFUNC = ')',
+ JVM_SIGNATURE_INT = 'I',
+ JVM_SIGNATURE_LONG = 'J',
+ JVM_SIGNATURE_SHORT = 'S',
+ JVM_SIGNATURE_VOID = 'V',
+ JVM_SIGNATURE_BOOLEAN = 'Z'
+};
+
+/* Opcodes */
+
+enum {
+ JVM_OPC_nop = 0,
+ JVM_OPC_aconst_null = 1,
+ JVM_OPC_iconst_m1 = 2,
+ JVM_OPC_iconst_0 = 3,
+ JVM_OPC_iconst_1 = 4,
+ JVM_OPC_iconst_2 = 5,
+ JVM_OPC_iconst_3 = 6,
+ JVM_OPC_iconst_4 = 7,
+ JVM_OPC_iconst_5 = 8,
+ JVM_OPC_lconst_0 = 9,
+ JVM_OPC_lconst_1 = 10,
+ JVM_OPC_fconst_0 = 11,
+ JVM_OPC_fconst_1 = 12,
+ JVM_OPC_fconst_2 = 13,
+ JVM_OPC_dconst_0 = 14,
+ JVM_OPC_dconst_1 = 15,
+ JVM_OPC_bipush = 16,
+ JVM_OPC_sipush = 17,
+ JVM_OPC_ldc = 18,
+ JVM_OPC_ldc_w = 19,
+ JVM_OPC_ldc2_w = 20,
+ JVM_OPC_iload = 21,
+ JVM_OPC_lload = 22,
+ JVM_OPC_fload = 23,
+ JVM_OPC_dload = 24,
+ JVM_OPC_aload = 25,
+ JVM_OPC_iload_0 = 26,
+ JVM_OPC_iload_1 = 27,
+ JVM_OPC_iload_2 = 28,
+ JVM_OPC_iload_3 = 29,
+ JVM_OPC_lload_0 = 30,
+ JVM_OPC_lload_1 = 31,
+ JVM_OPC_lload_2 = 32,
+ JVM_OPC_lload_3 = 33,
+ JVM_OPC_fload_0 = 34,
+ JVM_OPC_fload_1 = 35,
+ JVM_OPC_fload_2 = 36,
+ JVM_OPC_fload_3 = 37,
+ JVM_OPC_dload_0 = 38,
+ JVM_OPC_dload_1 = 39,
+ JVM_OPC_dload_2 = 40,
+ JVM_OPC_dload_3 = 41,
+ JVM_OPC_aload_0 = 42,
+ JVM_OPC_aload_1 = 43,
+ JVM_OPC_aload_2 = 44,
+ JVM_OPC_aload_3 = 45,
+ JVM_OPC_iaload = 46,
+ JVM_OPC_laload = 47,
+ JVM_OPC_faload = 48,
+ JVM_OPC_daload = 49,
+ JVM_OPC_aaload = 50,
+ JVM_OPC_baload = 51,
+ JVM_OPC_caload = 52,
+ JVM_OPC_saload = 53,
+ JVM_OPC_istore = 54,
+ JVM_OPC_lstore = 55,
+ JVM_OPC_fstore = 56,
+ JVM_OPC_dstore = 57,
+ JVM_OPC_astore = 58,
+ JVM_OPC_istore_0 = 59,
+ JVM_OPC_istore_1 = 60,
+ JVM_OPC_istore_2 = 61,
+ JVM_OPC_istore_3 = 62,
+ JVM_OPC_lstore_0 = 63,
+ JVM_OPC_lstore_1 = 64,
+ JVM_OPC_lstore_2 = 65,
+ JVM_OPC_lstore_3 = 66,
+ JVM_OPC_fstore_0 = 67,
+ JVM_OPC_fstore_1 = 68,
+ JVM_OPC_fstore_2 = 69,
+ JVM_OPC_fstore_3 = 70,
+ JVM_OPC_dstore_0 = 71,
+ JVM_OPC_dstore_1 = 72,
+ JVM_OPC_dstore_2 = 73,
+ JVM_OPC_dstore_3 = 74,
+ JVM_OPC_astore_0 = 75,
+ JVM_OPC_astore_1 = 76,
+ JVM_OPC_astore_2 = 77,
+ JVM_OPC_astore_3 = 78,
+ JVM_OPC_iastore = 79,
+ JVM_OPC_lastore = 80,
+ JVM_OPC_fastore = 81,
+ JVM_OPC_dastore = 82,
+ JVM_OPC_aastore = 83,
+ JVM_OPC_bastore = 84,
+ JVM_OPC_castore = 85,
+ JVM_OPC_sastore = 86,
+ JVM_OPC_pop = 87,
+ JVM_OPC_pop2 = 88,
+ JVM_OPC_dup = 89,
+ JVM_OPC_dup_x1 = 90,
+ JVM_OPC_dup_x2 = 91,
+ JVM_OPC_dup2 = 92,
+ JVM_OPC_dup2_x1 = 93,
+ JVM_OPC_dup2_x2 = 94,
+ JVM_OPC_swap = 95,
+ JVM_OPC_iadd = 96,
+ JVM_OPC_ladd = 97,
+ JVM_OPC_fadd = 98,
+ JVM_OPC_dadd = 99,
+ JVM_OPC_isub = 100,
+ JVM_OPC_lsub = 101,
+ JVM_OPC_fsub = 102,
+ JVM_OPC_dsub = 103,
+ JVM_OPC_imul = 104,
+ JVM_OPC_lmul = 105,
+ JVM_OPC_fmul = 106,
+ JVM_OPC_dmul = 107,
+ JVM_OPC_idiv = 108,
+ JVM_OPC_ldiv = 109,
+ JVM_OPC_fdiv = 110,
+ JVM_OPC_ddiv = 111,
+ JVM_OPC_irem = 112,
+ JVM_OPC_lrem = 113,
+ JVM_OPC_frem = 114,
+ JVM_OPC_drem = 115,
+ JVM_OPC_ineg = 116,
+ JVM_OPC_lneg = 117,
+ JVM_OPC_fneg = 118,
+ JVM_OPC_dneg = 119,
+ JVM_OPC_ishl = 120,
+ JVM_OPC_lshl = 121,
+ JVM_OPC_ishr = 122,
+ JVM_OPC_lshr = 123,
+ JVM_OPC_iushr = 124,
+ JVM_OPC_lushr = 125,
+ JVM_OPC_iand = 126,
+ JVM_OPC_land = 127,
+ JVM_OPC_ior = 128,
+ JVM_OPC_lor = 129,
+ JVM_OPC_ixor = 130,
+ JVM_OPC_lxor = 131,
+ JVM_OPC_iinc = 132,
+ JVM_OPC_i2l = 133,
+ JVM_OPC_i2f = 134,
+ JVM_OPC_i2d = 135,
+ JVM_OPC_l2i = 136,
+ JVM_OPC_l2f = 137,
+ JVM_OPC_l2d = 138,
+ JVM_OPC_f2i = 139,
+ JVM_OPC_f2l = 140,
+ JVM_OPC_f2d = 141,
+ JVM_OPC_d2i = 142,
+ JVM_OPC_d2l = 143,
+ JVM_OPC_d2f = 144,
+ JVM_OPC_i2b = 145,
+ JVM_OPC_i2c = 146,
+ JVM_OPC_i2s = 147,
+ JVM_OPC_lcmp = 148,
+ JVM_OPC_fcmpl = 149,
+ JVM_OPC_fcmpg = 150,
+ JVM_OPC_dcmpl = 151,
+ JVM_OPC_dcmpg = 152,
+ JVM_OPC_ifeq = 153,
+ JVM_OPC_ifne = 154,
+ JVM_OPC_iflt = 155,
+ JVM_OPC_ifge = 156,
+ JVM_OPC_ifgt = 157,
+ JVM_OPC_ifle = 158,
+ JVM_OPC_if_icmpeq = 159,
+ JVM_OPC_if_icmpne = 160,
+ JVM_OPC_if_icmplt = 161,
+ JVM_OPC_if_icmpge = 162,
+ JVM_OPC_if_icmpgt = 163,
+ JVM_OPC_if_icmple = 164,
+ JVM_OPC_if_acmpeq = 165,
+ JVM_OPC_if_acmpne = 166,
+ JVM_OPC_goto = 167,
+ JVM_OPC_jsr = 168,
+ JVM_OPC_ret = 169,
+ JVM_OPC_tableswitch = 170,
+ JVM_OPC_lookupswitch = 171,
+ JVM_OPC_ireturn = 172,
+ JVM_OPC_lreturn = 173,
+ JVM_OPC_freturn = 174,
+ JVM_OPC_dreturn = 175,
+ JVM_OPC_areturn = 176,
+ JVM_OPC_return = 177,
+ JVM_OPC_getstatic = 178,
+ JVM_OPC_putstatic = 179,
+ JVM_OPC_getfield = 180,
+ JVM_OPC_putfield = 181,
+ JVM_OPC_invokevirtual = 182,
+ JVM_OPC_invokespecial = 183,
+ JVM_OPC_invokestatic = 184,
+ JVM_OPC_invokeinterface = 185,
+ JVM_OPC_invokedynamic = 186,
+ JVM_OPC_new = 187,
+ JVM_OPC_newarray = 188,
+ JVM_OPC_anewarray = 189,
+ JVM_OPC_arraylength = 190,
+ JVM_OPC_athrow = 191,
+ JVM_OPC_checkcast = 192,
+ JVM_OPC_instanceof = 193,
+ JVM_OPC_monitorenter = 194,
+ JVM_OPC_monitorexit = 195,
+ JVM_OPC_wide = 196,
+ JVM_OPC_multianewarray = 197,
+ JVM_OPC_ifnull = 198,
+ JVM_OPC_ifnonnull = 199,
+ JVM_OPC_goto_w = 200,
+ JVM_OPC_jsr_w = 201,
+ JVM_OPC_MAX = 201
+};
+
+/* Opcode length initializer, use with something like:
+ * unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
+ */
+#define JVM_OPCODE_LENGTH_INITIALIZER { \
+ 1, /* nop */ \
+ 1, /* aconst_null */ \
+ 1, /* iconst_m1 */ \
+ 1, /* iconst_0 */ \
+ 1, /* iconst_1 */ \
+ 1, /* iconst_2 */ \
+ 1, /* iconst_3 */ \
+ 1, /* iconst_4 */ \
+ 1, /* iconst_5 */ \
+ 1, /* lconst_0 */ \
+ 1, /* lconst_1 */ \
+ 1, /* fconst_0 */ \
+ 1, /* fconst_1 */ \
+ 1, /* fconst_2 */ \
+ 1, /* dconst_0 */ \
+ 1, /* dconst_1 */ \
+ 2, /* bipush */ \
+ 3, /* sipush */ \
+ 2, /* ldc */ \
+ 3, /* ldc_w */ \
+ 3, /* ldc2_w */ \
+ 2, /* iload */ \
+ 2, /* lload */ \
+ 2, /* fload */ \
+ 2, /* dload */ \
+ 2, /* aload */ \
+ 1, /* iload_0 */ \
+ 1, /* iload_1 */ \
+ 1, /* iload_2 */ \
+ 1, /* iload_3 */ \
+ 1, /* lload_0 */ \
+ 1, /* lload_1 */ \
+ 1, /* lload_2 */ \
+ 1, /* lload_3 */ \
+ 1, /* fload_0 */ \
+ 1, /* fload_1 */ \
+ 1, /* fload_2 */ \
+ 1, /* fload_3 */ \
+ 1, /* dload_0 */ \
+ 1, /* dload_1 */ \
+ 1, /* dload_2 */ \
+ 1, /* dload_3 */ \
+ 1, /* aload_0 */ \
+ 1, /* aload_1 */ \
+ 1, /* aload_2 */ \
+ 1, /* aload_3 */ \
+ 1, /* iaload */ \
+ 1, /* laload */ \
+ 1, /* faload */ \
+ 1, /* daload */ \
+ 1, /* aaload */ \
+ 1, /* baload */ \
+ 1, /* caload */ \
+ 1, /* saload */ \
+ 2, /* istore */ \
+ 2, /* lstore */ \
+ 2, /* fstore */ \
+ 2, /* dstore */ \
+ 2, /* astore */ \
+ 1, /* istore_0 */ \
+ 1, /* istore_1 */ \
+ 1, /* istore_2 */ \
+ 1, /* istore_3 */ \
+ 1, /* lstore_0 */ \
+ 1, /* lstore_1 */ \
+ 1, /* lstore_2 */ \
+ 1, /* lstore_3 */ \
+ 1, /* fstore_0 */ \
+ 1, /* fstore_1 */ \
+ 1, /* fstore_2 */ \
+ 1, /* fstore_3 */ \
+ 1, /* dstore_0 */ \
+ 1, /* dstore_1 */ \
+ 1, /* dstore_2 */ \
+ 1, /* dstore_3 */ \
+ 1, /* astore_0 */ \
+ 1, /* astore_1 */ \
+ 1, /* astore_2 */ \
+ 1, /* astore_3 */ \
+ 1, /* iastore */ \
+ 1, /* lastore */ \
+ 1, /* fastore */ \
+ 1, /* dastore */ \
+ 1, /* aastore */ \
+ 1, /* bastore */ \
+ 1, /* castore */ \
+ 1, /* sastore */ \
+ 1, /* pop */ \
+ 1, /* pop2 */ \
+ 1, /* dup */ \
+ 1, /* dup_x1 */ \
+ 1, /* dup_x2 */ \
+ 1, /* dup2 */ \
+ 1, /* dup2_x1 */ \
+ 1, /* dup2_x2 */ \
+ 1, /* swap */ \
+ 1, /* iadd */ \
+ 1, /* ladd */ \
+ 1, /* fadd */ \
+ 1, /* dadd */ \
+ 1, /* isub */ \
+ 1, /* lsub */ \
+ 1, /* fsub */ \
+ 1, /* dsub */ \
+ 1, /* imul */ \
+ 1, /* lmul */ \
+ 1, /* fmul */ \
+ 1, /* dmul */ \
+ 1, /* idiv */ \
+ 1, /* ldiv */ \
+ 1, /* fdiv */ \
+ 1, /* ddiv */ \
+ 1, /* irem */ \
+ 1, /* lrem */ \
+ 1, /* frem */ \
+ 1, /* drem */ \
+ 1, /* ineg */ \
+ 1, /* lneg */ \
+ 1, /* fneg */ \
+ 1, /* dneg */ \
+ 1, /* ishl */ \
+ 1, /* lshl */ \
+ 1, /* ishr */ \
+ 1, /* lshr */ \
+ 1, /* iushr */ \
+ 1, /* lushr */ \
+ 1, /* iand */ \
+ 1, /* land */ \
+ 1, /* ior */ \
+ 1, /* lor */ \
+ 1, /* ixor */ \
+ 1, /* lxor */ \
+ 3, /* iinc */ \
+ 1, /* i2l */ \
+ 1, /* i2f */ \
+ 1, /* i2d */ \
+ 1, /* l2i */ \
+ 1, /* l2f */ \
+ 1, /* l2d */ \
+ 1, /* f2i */ \
+ 1, /* f2l */ \
+ 1, /* f2d */ \
+ 1, /* d2i */ \
+ 1, /* d2l */ \
+ 1, /* d2f */ \
+ 1, /* i2b */ \
+ 1, /* i2c */ \
+ 1, /* i2s */ \
+ 1, /* lcmp */ \
+ 1, /* fcmpl */ \
+ 1, /* fcmpg */ \
+ 1, /* dcmpl */ \
+ 1, /* dcmpg */ \
+ 3, /* ifeq */ \
+ 3, /* ifne */ \
+ 3, /* iflt */ \
+ 3, /* ifge */ \
+ 3, /* ifgt */ \
+ 3, /* ifle */ \
+ 3, /* if_icmpeq */ \
+ 3, /* if_icmpne */ \
+ 3, /* if_icmplt */ \
+ 3, /* if_icmpge */ \
+ 3, /* if_icmpgt */ \
+ 3, /* if_icmple */ \
+ 3, /* if_acmpeq */ \
+ 3, /* if_acmpne */ \
+ 3, /* goto */ \
+ 3, /* jsr */ \
+ 2, /* ret */ \
+ 99, /* tableswitch */ \
+ 99, /* lookupswitch */ \
+ 1, /* ireturn */ \
+ 1, /* lreturn */ \
+ 1, /* freturn */ \
+ 1, /* dreturn */ \
+ 1, /* areturn */ \
+ 1, /* return */ \
+ 3, /* getstatic */ \
+ 3, /* putstatic */ \
+ 3, /* getfield */ \
+ 3, /* putfield */ \
+ 3, /* invokevirtual */ \
+ 3, /* invokespecial */ \
+ 3, /* invokestatic */ \
+ 5, /* invokeinterface */ \
+ 5, /* invokedynamic */ \
+ 3, /* new */ \
+ 2, /* newarray */ \
+ 3, /* anewarray */ \
+ 1, /* arraylength */ \
+ 1, /* athrow */ \
+ 3, /* checkcast */ \
+ 3, /* instanceof */ \
+ 1, /* monitorenter */ \
+ 1, /* monitorexit */ \
+ 0, /* wide */ \
+ 4, /* multianewarray */ \
+ 3, /* ifnull */ \
+ 3, /* ifnonnull */ \
+ 5, /* goto_w */ \
+ 5 /* jsr_w */ \
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* CLASSFILE_CONSTANTS */
--- a/src/java.base/share/native/libjava/System.c Wed Dec 20 17:36:50 2017 +0100
+++ b/src/java.base/share/native/libjava/System.c Wed Dec 20 09:14:06 2017 -0800
@@ -114,9 +114,6 @@
#define VENDOR_URL_BUG "http://bugreport.java.com/bugreport/"
#endif
-#define JAVA_MAX_SUPPORTED_VERSION 54
-#define JAVA_MAX_SUPPORTED_MINOR_VERSION 0
-
#ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */
#error "ERROR: No override of JAVA_SPECIFICATION_VENDOR is allowed"
#else
@@ -219,8 +216,8 @@
PUTPROP(props, "java.vendor.url", VENDOR_URL);
PUTPROP(props, "java.vendor.url.bug", VENDOR_URL_BUG);
- jio_snprintf(buf, sizeof(buf), "%d.%d", JAVA_MAX_SUPPORTED_VERSION,
- JAVA_MAX_SUPPORTED_MINOR_VERSION);
+ jio_snprintf(buf, sizeof(buf), "%d.%d", JVM_CLASSFILE_MAJOR_VERSION,
+ JVM_CLASSFILE_MINOR_VERSION);
PUTPROP(props, "java.class.version", buf);
if (sprops->awt_toolkit) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java Wed Dec 20 09:14:06 2017 -0800
@@ -111,7 +111,8 @@
V51(51, 0), // JDK 1.7
V52(52, 0), // JDK 1.8: lambda, type annos, param names
V53(53, 0), // JDK 1.9: modules, indy string concat
- V54(54, 0); // JDK 10
+ V54(54, 0), // JDK 10
+ V55(55, 0); // JDK 11: constant dynamic
Version(int major, int minor) {
this.major = major;
this.minor = minor;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java Wed Dec 20 09:14:06 2017 -0800
@@ -67,7 +67,7 @@
JDK1_10("1.10", 54, 0),
/** JDK 11. */
- JDK1_11("11", 54, 0); // Initially an alias for JDK_10
+ JDK1_11("11", 55, 0);
private static final Context.Key<Target> targetKey = new Context.Key<>();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java Wed Dec 20 09:14:06 2017 -0800
@@ -47,7 +47,7 @@
private final List<ClassfileBytecode> codeAttributes;
private static final int MAJOR_VERSION_JAVA_MIN = 51;
- private static final int MAJOR_VERSION_JAVA_MAX = 54;
+ private static final int MAJOR_VERSION_JAVA_MAX = 55;
private static final int MAGIC = 0xCAFEBABE;
/**
--- a/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java Wed Dec 20 17:36:50 2017 +0100
+++ b/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java Wed Dec 20 09:14:06 2017 -0800
@@ -67,7 +67,7 @@
/* Class File Constants */
int JAVA_MAGIC = 0xcafebabe;
int JAVA_MIN_SUPPORTED_VERSION = 45;
- int JAVA_MAX_SUPPORTED_VERSION = 54;
+ int JAVA_MAX_SUPPORTED_VERSION = 55;
int JAVA_MAX_SUPPORTED_MINOR_VERSION = 0;
/* Generate class file version for 1.1 by default */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/classFileParserBug/Class55.jasm Wed Dec 20 09:14:06 2017 -0800
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2017, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8173382
+ * @summary Check that the JVM accepts class files with version 55
+ * @run main Class55
+ */
+
+super public class Class55 version 55:0 {
+
+ public Method "<init>":"()V" stack 1 locals 1 {
+ aload_0;
+ invokespecial Method java/lang/Object."<init>":"()V";
+ return;
+ }
+
+ public static Method main:"([Ljava/lang/String;)V" stack 0 locals 1 {
+ return;
+ }
+
+} // end Class Class55
--- a/test/jdk/java/lang/module/ClassFileVersionsTest.java Wed Dec 20 17:36:50 2017 +0100
+++ b/test/jdk/java/lang/module/ClassFileVersionsTest.java Wed Dec 20 09:14:06 2017 -0800
@@ -54,6 +54,8 @@
{ 53, 0, Set.of(STATIC, TRANSITIVE) },
{ 54, 0, Set.of() }, // JDK 10
+
+ { 55, 0, Set.of()}, // JDK 11
};
}
@@ -69,7 +71,11 @@
{ 54, 0, Set.of(TRANSITIVE) },
{ 54, 0, Set.of(STATIC, TRANSITIVE) },
- { 55, 0, Set.of()}, // JDK 11
+ { 55, 0, Set.of(STATIC) }, // JDK 11
+ { 55, 0, Set.of(TRANSITIVE) },
+ { 55, 0, Set.of(STATIC, TRANSITIVE) },
+
+ { 56, 0, Set.of()}, // JDK 12
};
}
--- a/test/langtools/tools/javac/6330997/T6330997.java Wed Dec 20 17:36:50 2017 +0100
+++ b/test/langtools/tools/javac/6330997/T6330997.java Wed Dec 20 09:14:06 2017 -0800
@@ -32,8 +32,8 @@
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.util
* @clean T1 T2
- * @compile -source 10 -target 10 T1.java
- * @compile -source 10 -target 10 T2.java
+ * @compile -source 10 -target 11 T1.java
+ * @compile -source 10 -target 11 T2.java
* @run main/othervm T6330997
*/
--- a/test/langtools/tools/javac/classfiles/ClassVersionChecker.java Wed Dec 20 17:36:50 2017 +0100
+++ b/test/langtools/tools/javac/classfiles/ClassVersionChecker.java Wed Dec 20 09:14:06 2017 -0800
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 7157626 8001112 8188870
+ * @bug 7157626 8001112 8188870 8173382
* @summary Test major version for all legal combinations for -source and -target
* @author sgoel
*
@@ -38,7 +38,7 @@
public class ClassVersionChecker {
int errors;
- String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "1.10"};
+ String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "1.10", "11"};
File javaFile = null;
public static void main(String[] args) throws Throwable {
@@ -58,11 +58,12 @@
* -1 => invalid combinations
*/
int[][] ver =
- {{54, -1, -1, -1, -1, -1},
- {54, 50, 51, 52, 53, 54},
- {54, -1, 51, 52, 53, 54},
- {54, -1, -1, 52, 53, 54},
- {54, -1, -1, -1, 53, 54}};
+ {{55, -1, -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},
+ {55, -1, -1, -1, -1, 54, 55}};
// Loop to run all possible combinations of source/target values
for (int i = 0; i< ver.length; i++) {
--- a/test/langtools/tools/javac/versions/Versions.java Wed Dec 20 17:36:50 2017 +0100
+++ b/test/langtools/tools/javac/versions/Versions.java Wed Dec 20 09:14:06 2017 -0800
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8188870 8173382
+ * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8188870 8173382 8173382
* @summary Check interpretation of -target and -source options
* @modules java.compiler
* jdk.compiler
@@ -64,13 +64,13 @@
String TC = "";
System.out.println("Version.java: Starting");
- check("54.0");
- check("54.0", "-source 1.6");
- check("54.0", "-source 1.7");
- check("54.0", "-source 1.8");
- check("54.0", "-source 1.9");
- check("54.0", "-source 1.10");
- check("54.0", "-source 11");
+ check("55.0");
+ check("55.0", "-source 1.6");
+ check("55.0", "-source 1.7");
+ check("55.0", "-source 1.8");
+ check("55.0", "-source 1.9");
+ check("55.0", "-source 1.10");
+ check("55.0", "-source 11");
check_source_target(true, "50.0", "6", "6");
check_source_target(true, "51.0", "6", "7");
@@ -87,7 +87,12 @@
check_source_target(true, "54.0", "8", "10");
check_source_target(true, "54.0", "9", "10");
check_source_target(true, "54.0", "10", "10");
- check_source_target(false, "54.0", "11", "11");
+ check_source_target(false, "55.0", "6", "11");
+ check_source_target(false, "55.0", "7", "11");
+ check_source_target(false, "55.0", "8", "11");
+ check_source_target(false, "55.0", "9", "11");
+ check_source_target(false, "55.0", "10", "11");
+ check_source_target(false, "55.0", "11", "11");
checksrc16("-source 1.6");
checksrc16("-source 6");