--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug Wed Mar 27 13:07:41 2013 -0700
@@ -135,6 +135,7 @@
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
+ JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
@@ -156,6 +157,7 @@
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
+ JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
--- a/hotspot/make/bsd/makefiles/mapfile-vers-product Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-product Wed Mar 27 13:07:41 2013 -0700
@@ -135,6 +135,7 @@
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
+ JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
@@ -156,6 +157,7 @@
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
+ JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug Wed Mar 27 13:07:41 2013 -0700
@@ -131,6 +131,7 @@
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
+ JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
@@ -152,6 +153,7 @@
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
+ JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
--- a/hotspot/make/linux/makefiles/mapfile-vers-product Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product Wed Mar 27 13:07:41 2013 -0700
@@ -131,6 +131,7 @@
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
+ JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
@@ -152,6 +153,7 @@
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
+ JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
--- a/hotspot/make/solaris/makefiles/mapfile-vers Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/solaris/makefiles/mapfile-vers Wed Mar 27 13:07:41 2013 -0700
@@ -131,6 +131,7 @@
JVM_GetEnclosingMethodInfo;
JVM_GetFieldAnnotations;
JVM_GetFieldIxModifiers;
+ JVM_GetFieldTypeAnnotations;
JVM_GetHostName;
JVM_GetInheritedAccessControlContext;
JVM_GetInterfaceVersion;
@@ -152,6 +153,7 @@
JVM_GetMethodIxSignatureUTF;
JVM_GetMethodParameterAnnotations;
JVM_GetMethodParameters;
+ JVM_GetMethodTypeAnnotations;
JVM_GetPrimitiveArrayElement;
JVM_GetProtectionDomain;
JVM_GetSockName;
--- a/hotspot/make/windows/build.make Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/windows/build.make Wed Mar 27 13:07:41 2013 -0700
@@ -110,8 +110,6 @@
!endif
!elseif "$(Variant)" == "tiered"
VARIANT_TEXT=Tiered
-!elseif "$(Variant)" == "kernel"
-VARIANT_TEXT=Kernel
!endif
#########################################################################
@@ -305,9 +303,9 @@
checks: checkVariant checkWorkSpace checkSA
checkVariant:
- @ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
- @ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \
- echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
+ @ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
+ @ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "core" \
+ echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
checkWorkSpace:
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
--- a/hotspot/make/windows/create.bat Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/windows/create.bat Wed Mar 27 13:07:41 2013 -0700
@@ -148,7 +148,7 @@
REM This is now safe to do.
:copyfiles
-for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
+for /D %%i in (compiler1, compiler2, tiered, core) do (
if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
)
@@ -156,7 +156,7 @@
REM force regneration of ProjectFile
if exist %ProjectFile% del %ProjectFile%
-for /D %%i in (compiler1, compiler2, tiered, core, kernel) do (
+for /D %%i in (compiler1, compiler2, tiered, core) do (
echo -- %%i --
echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
--- a/hotspot/make/windows/makefiles/compile.make Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/windows/makefiles/compile.make Wed Mar 27 13:07:41 2013 -0700
@@ -221,13 +221,6 @@
!endif
!endif
-# Compile for space above time.
-!if "$(Variant)" == "kernel"
-PRODUCT_OPT_OPTION = /O1 /Oy-
-FASTDEBUG_OPT_OPTION = /O1 /Oy-
-DEBUG_OPT_OPTION = /Od
-!endif
-
# If NO_OPTIMIZATIONS is defined in the environment, turn everything off
!ifdef NO_OPTIMIZATIONS
PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
--- a/hotspot/make/windows/makefiles/product.make Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/windows/makefiles/product.make Wed Mar 27 13:07:41 2013 -0700
@@ -51,13 +51,6 @@
# Force resources to be rebuilt every time
$(Res_Files): FORCE
-# Kernel doesn't need exported vtbl symbols.
-!if "$(Variant)" == "kernel"
-$(AOUT): $(Res_Files) $(Obj_Files)
- $(LD) @<<
- $(LD_FLAGS) /out:$@ /implib:$*.lib $(Obj_Files) $(Res_Files)
-<<
-!else
vm.def: $(Obj_Files)
sh $(WorkSpace)/make/windows/build_vm_def.sh
@@ -65,7 +58,6 @@
$(LD) @<<
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
<<
-!endif
!if "$(MT)" != ""
# The previous link command created a .manifest file that we want to
# insert into the linked artifact so we do not need to track it
--- a/hotspot/make/windows/makefiles/vm.make Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/make/windows/makefiles/vm.make Wed Mar 27 13:07:41 2013 -0700
@@ -89,12 +89,8 @@
# AsyncGetCallTrace is not supported on IA64 yet
AGCT_EXPORT=
!else
-!if "$(Variant)" == "kernel"
-AGCT_EXPORT=
-!else
AGCT_EXPORT=/export:AsyncGetCallTrace
!endif
-!endif
# If you modify exports below please do the corresponding changes in
# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
--- a/hotspot/make/windows/projectfiles/kernel/Makefile Wed Mar 27 15:41:53 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2007, 2010, 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.
-#
-#
-
-!include ../local.make
-
-!include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile
--- a/hotspot/make/windows/projectfiles/kernel/vm.def Wed Mar 27 15:41:53 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-;
-; This .DEF file is a placeholder for one which is automatically
-; generated during the build process. See
-; make\windows\build_vm_def.sh and
-; make\windows\makefiles\projectcreator.make (esp. the "-prelink"
-; options).
-;
--- a/hotspot/make/windows/projectfiles/kernel/vm.dsw Wed Mar 27 15:41:53 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "vm"=.\vm.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
--- a/hotspot/src/share/tools/ProjectCreator/BuildConfig.java Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/tools/ProjectCreator/BuildConfig.java Wed Mar 27 13:07:41 2013 -0700
@@ -568,36 +568,6 @@
}
}
-class KernelDebugConfig extends GenericDebugConfig {
- String getOptFlag() {
- return getCI().getNoOptFlag();
- }
-
- KernelDebugConfig() {
- initNames("kernel", "debug", "jvm.dll");
- init(getIncludes(), getDefines());
- }
-}
-
-
-class KernelFastDebugConfig extends GenericDebugConfig {
- String getOptFlag() {
- return getCI().getOptFlag();
- }
-
- KernelFastDebugConfig() {
- initNames("kernel", "fastdebug", "jvm.dll");
- init(getIncludes(), getDefines());
- }
-}
-
-
-class KernelProductConfig extends ProductConfig {
- KernelProductConfig() {
- initNames("kernel", "product", "jvm.dll");
- init(getIncludes(), getDefines());
- }
-}
abstract class CompilerInterface {
abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
--- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatform.java Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatform.java Wed Mar 27 13:07:41 2013 -0700
@@ -564,12 +564,6 @@
allConfigs.add(new CoreFastDebugConfig());
allConfigs.add(new CoreProductConfig());
- if (platform.equals("Win32")) {
- allConfigs.add(new KernelDebugConfig());
- allConfigs.add(new KernelFastDebugConfig());
- allConfigs.add(new KernelProductConfig());
- }
-
return allConfigs;
}
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp Wed Mar 27 13:07:41 2013 -0700
@@ -2196,8 +2196,7 @@
true, // is LVTT
CHECK_(nullHandle));
lvtt_cnt++;
- } else if (UseSplitVerifier &&
- _major_version >= Verifier::STACKMAP_ATTRIBUTE_MAJOR_VERSION &&
+ } else if (_major_version >= Verifier::STACKMAP_ATTRIBUTE_MAJOR_VERSION &&
_cp->symbol_at(code_attribute_name_index) == vmSymbols::tag_stack_map_table()) {
// Stack map is only needed by the new verifier in JDK1.5.
if (parsed_stackmap_attribute) {
--- a/hotspot/src/share/vm/classfile/verifier.cpp Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Wed Mar 27 13:07:41 2013 -0700
@@ -127,8 +127,7 @@
if (TraceClassInitialization) {
tty->print_cr("Start class verification for: %s", klassName);
}
- if (UseSplitVerifier &&
- klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
+ if (klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
ClassVerifier split_verifier(klass, THREAD);
split_verifier.verify_class(THREAD);
exception_name = split_verifier.result();
--- a/hotspot/src/share/vm/prims/jvm.cpp Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/vm/prims/jvm.cpp Wed Mar 27 13:07:41 2013 -0700
@@ -1457,7 +1457,7 @@
JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
assert (cls != NULL, "illegal class");
JVMWrapper("JVM_GetClassAnnotations");
- ResourceMark rm(THREAD);
+
// Return null for arrays and primitives
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
@@ -1470,20 +1470,15 @@
JVM_END
-JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
- assert(field != NULL, "illegal field");
- JVMWrapper("JVM_GetFieldAnnotations");
-
+static bool jvm_get_field_common(jobject field, fieldDescriptor& fd, TRAPS) {
// some of this code was adapted from from jni_FromReflectedField
- // field is a handle to a java.lang.reflect.Field object
oop reflected = JNIHandles::resolve_non_null(field);
oop mirror = java_lang_reflect_Field::clazz(reflected);
Klass* k = java_lang_Class::as_Klass(mirror);
int slot = java_lang_reflect_Field::slot(reflected);
int modifiers = java_lang_reflect_Field::modifiers(reflected);
- fieldDescriptor fd;
KlassHandle kh(THREAD, k);
intptr_t offset = InstanceKlass::cast(kh())->field_offset(slot);
@@ -1491,16 +1486,29 @@
// for static fields we only look in the current class
if (!InstanceKlass::cast(kh())->find_local_field_from_offset(offset, true, &fd)) {
assert(false, "cannot find static field");
- return NULL; // robustness
+ return false;
}
} else {
// for instance fields we start with the current class and work
// our way up through the superclass chain
if (!InstanceKlass::cast(kh())->find_field_from_offset(offset, false, &fd)) {
assert(false, "cannot find instance field");
- return NULL; // robustness
+ return false;
}
}
+ return true;
+}
+
+JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
+ // field is a handle to a java.lang.reflect.Field object
+ assert(field != NULL, "illegal field");
+ JVMWrapper("JVM_GetFieldAnnotations");
+
+ fieldDescriptor fd;
+ bool gotFd = jvm_get_field_common(field, fd, CHECK_NULL);
+ if (!gotFd) {
+ return NULL;
+ }
return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.annotations(), THREAD));
JVM_END
@@ -1525,12 +1533,8 @@
Klass* k = java_lang_Class::as_Klass(mirror);
Method* m = InstanceKlass::cast(k)->method_with_idnum(slot);
- if (m == NULL) {
- assert(false, "cannot find method");
- return NULL; // robustness
- }
-
- return m;
+ assert(m != NULL, "cannot find method");
+ return m; // caller has to deal with NULL in product mode
}
@@ -1539,6 +1543,10 @@
// method is a handle to a java.lang.reflect.Method object
Method* m = jvm_get_method_common(method);
+ if (m == NULL) {
+ return NULL;
+ }
+
return (jbyteArray) JNIHandles::make_local(env,
Annotations::make_java_array(m->annotations(), THREAD));
JVM_END
@@ -1549,6 +1557,10 @@
// method is a handle to a java.lang.reflect.Method object
Method* m = jvm_get_method_common(method);
+ if (m == NULL) {
+ return NULL;
+ }
+
return (jbyteArray) JNIHandles::make_local(env,
Annotations::make_java_array(m->annotation_default(), THREAD));
JVM_END
@@ -1559,6 +1571,10 @@
// method is a handle to a java.lang.reflect.Method object
Method* m = jvm_get_method_common(method);
+ if (m == NULL) {
+ return NULL;
+ }
+
return (jbyteArray) JNIHandles::make_local(env,
Annotations::make_java_array(m->parameter_annotations(), THREAD));
JVM_END
@@ -1583,6 +1599,38 @@
return NULL;
JVM_END
+JVM_ENTRY(jbyteArray, JVM_GetMethodTypeAnnotations(JNIEnv *env, jobject method))
+ assert (method != NULL, "illegal method");
+ JVMWrapper("JVM_GetMethodTypeAnnotations");
+
+ // method is a handle to a java.lang.reflect.Method object
+ Method* m = jvm_get_method_common(method);
+ if (m == NULL) {
+ return NULL;
+ }
+
+ AnnotationArray* type_annotations = m->type_annotations();
+ if (type_annotations != NULL) {
+ typeArrayOop a = Annotations::make_java_array(type_annotations, CHECK_NULL);
+ return (jbyteArray) JNIHandles::make_local(env, a);
+ }
+
+ return NULL;
+JVM_END
+
+JVM_ENTRY(jbyteArray, JVM_GetFieldTypeAnnotations(JNIEnv *env, jobject field))
+ assert (field != NULL, "illegal field");
+ JVMWrapper("JVM_GetFieldTypeAnnotations");
+
+ fieldDescriptor fd;
+ bool gotFd = jvm_get_field_common(field, fd, CHECK_NULL);
+ if (!gotFd) {
+ return NULL;
+ }
+
+ return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.type_annotations(), THREAD));
+JVM_END
+
static void bounds_check(constantPoolHandle cp, jint index, TRAPS) {
if (!cp->is_within_bounds(index)) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
--- a/hotspot/src/share/vm/prims/jvm.h Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/vm/prims/jvm.h Wed Mar 27 13:07:41 2013 -0700
@@ -523,6 +523,14 @@
JNIEXPORT jbyteArray JNICALL
JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls);
+// field is a handle to a java.lang.reflect.Field object
+JNIEXPORT jbyteArray JNICALL
+JVM_GetFieldTypeAnnotations(JNIEnv *env, jobject field);
+
+// method is a handle to a java.lang.reflect.Method object
+JNIEXPORT jbyteArray JNICALL
+JVM_GetMethodTypeAnnotations(JNIEnv *env, jobject method);
+
/*
* New (JDK 1.4) reflection implementation
*/
--- a/hotspot/src/share/vm/runtime/arguments.cpp Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Wed Mar 27 13:07:41 2013 -0700
@@ -260,6 +260,7 @@
{ "CMSRevisitStackSize", JDK_Version::jdk(8), JDK_Version::jdk(9) },
{ "PrintRevisitStats", JDK_Version::jdk(8), JDK_Version::jdk(9) },
{ "UseVectoredExceptions", JDK_Version::jdk(8), JDK_Version::jdk(9) },
+ { "UseSplitVerifier", JDK_Version::jdk(8), JDK_Version::jdk(9) },
#ifdef PRODUCT
{ "DesiredMethodLimit",
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
--- a/hotspot/src/share/vm/runtime/globals.hpp Wed Mar 27 15:41:53 2013 -0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp Wed Mar 27 13:07:41 2013 -0700
@@ -679,9 +679,6 @@
product(bool, UseCompilerSafepoints, true, \
"Stop at safepoints in compiled code") \
\
- product(bool, UseSplitVerifier, true, \
- "use split verifier with StackMapTable attributes") \
- \
product(bool, FailOverToOldVerifier, true, \
"fail over to old verifier when split verifier fails") \
\