Merge
This commit is contained in:
commit
58042e4651
@ -135,6 +135,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
@ -156,6 +157,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
@ -135,6 +135,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
@ -156,6 +157,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
@ -131,6 +131,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
@ -152,6 +153,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
@ -131,6 +131,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
@ -152,6 +153,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
@ -131,6 +131,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetEnclosingMethodInfo;
|
JVM_GetEnclosingMethodInfo;
|
||||||
JVM_GetFieldAnnotations;
|
JVM_GetFieldAnnotations;
|
||||||
JVM_GetFieldIxModifiers;
|
JVM_GetFieldIxModifiers;
|
||||||
|
JVM_GetFieldTypeAnnotations;
|
||||||
JVM_GetHostName;
|
JVM_GetHostName;
|
||||||
JVM_GetInheritedAccessControlContext;
|
JVM_GetInheritedAccessControlContext;
|
||||||
JVM_GetInterfaceVersion;
|
JVM_GetInterfaceVersion;
|
||||||
@ -152,6 +153,7 @@ SUNWprivate_1.1 {
|
|||||||
JVM_GetMethodIxSignatureUTF;
|
JVM_GetMethodIxSignatureUTF;
|
||||||
JVM_GetMethodParameterAnnotations;
|
JVM_GetMethodParameterAnnotations;
|
||||||
JVM_GetMethodParameters;
|
JVM_GetMethodParameters;
|
||||||
|
JVM_GetMethodTypeAnnotations;
|
||||||
JVM_GetPrimitiveArrayElement;
|
JVM_GetPrimitiveArrayElement;
|
||||||
JVM_GetProtectionDomain;
|
JVM_GetProtectionDomain;
|
||||||
JVM_GetSockName;
|
JVM_GetSockName;
|
||||||
|
@ -110,8 +110,6 @@ VARIANT_TEXT=Server
|
|||||||
!endif
|
!endif
|
||||||
!elseif "$(Variant)" == "tiered"
|
!elseif "$(Variant)" == "tiered"
|
||||||
VARIANT_TEXT=Tiered
|
VARIANT_TEXT=Tiered
|
||||||
!elseif "$(Variant)" == "kernel"
|
|
||||||
VARIANT_TEXT=Kernel
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
@ -305,9 +303,9 @@ $(variantDir)\local.make: checks
|
|||||||
checks: checkVariant checkWorkSpace checkSA
|
checks: checkVariant checkWorkSpace checkSA
|
||||||
|
|
||||||
checkVariant:
|
checkVariant:
|
||||||
@ if "$(Variant)"=="" 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 "kernel" if "$(Variant)" NEQ "core" \
|
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "core" \
|
||||||
echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
|
echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
|
||||||
|
|
||||||
checkWorkSpace:
|
checkWorkSpace:
|
||||||
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
|
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
|
||||||
|
@ -148,7 +148,7 @@ echo HotSpotJDKDist=%HotSpotJDKDist%
|
|||||||
|
|
||||||
REM This is now safe to do.
|
REM This is now safe to do.
|
||||||
:copyfiles
|
: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
|
if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated
|
||||||
copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
|
copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL
|
||||||
)
|
)
|
||||||
@ -156,7 +156,7 @@ copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\
|
|||||||
REM force regneration of ProjectFile
|
REM force regneration of ProjectFile
|
||||||
if exist %ProjectFile% del %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 -- %%i --
|
||||||
echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
|
echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make
|
||||||
echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
|
echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make
|
||||||
|
@ -221,13 +221,6 @@ LD_FLAGS = /SAFESEH $(LD_FLAGS)
|
|||||||
!endif
|
!endif
|
||||||
!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
|
# If NO_OPTIMIZATIONS is defined in the environment, turn everything off
|
||||||
!ifdef NO_OPTIMIZATIONS
|
!ifdef NO_OPTIMIZATIONS
|
||||||
PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
|
PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
|
||||||
|
@ -51,13 +51,6 @@ HS_BUILD_ID=$(HS_BUILD_VER)
|
|||||||
# Force resources to be rebuilt every time
|
# Force resources to be rebuilt every time
|
||||||
$(Res_Files): FORCE
|
$(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)
|
vm.def: $(Obj_Files)
|
||||||
sh $(WorkSpace)/make/windows/build_vm_def.sh
|
sh $(WorkSpace)/make/windows/build_vm_def.sh
|
||||||
|
|
||||||
@ -65,7 +58,6 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
|||||||
$(LD) @<<
|
$(LD) @<<
|
||||||
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||||
<<
|
<<
|
||||||
!endif
|
|
||||||
!if "$(MT)" != ""
|
!if "$(MT)" != ""
|
||||||
# The previous link command created a .manifest file that we want to
|
# 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
|
# insert into the linked artifact so we do not need to track it
|
||||||
|
@ -89,12 +89,8 @@ STACK_SIZE=
|
|||||||
# AsyncGetCallTrace is not supported on IA64 yet
|
# AsyncGetCallTrace is not supported on IA64 yet
|
||||||
AGCT_EXPORT=
|
AGCT_EXPORT=
|
||||||
!else
|
!else
|
||||||
!if "$(Variant)" == "kernel"
|
|
||||||
AGCT_EXPORT=
|
|
||||||
!else
|
|
||||||
AGCT_EXPORT=/export:AsyncGetCallTrace
|
AGCT_EXPORT=/export:AsyncGetCallTrace
|
||||||
!endif
|
!endif
|
||||||
!endif
|
|
||||||
|
|
||||||
# If you modify exports below please do the corresponding changes in
|
# If you modify exports below please do the corresponding changes in
|
||||||
# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
|
# src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
|
||||||
|
@ -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
|
|
@ -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).
|
|
||||||
;
|
|
@ -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>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
@ -568,36 +568,6 @@ class CoreProductConfig extends ProductConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 class CompilerInterface {
|
||||||
abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
|
abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
|
||||||
|
@ -564,12 +564,6 @@ public abstract class WinGammaPlatform {
|
|||||||
allConfigs.add(new CoreFastDebugConfig());
|
allConfigs.add(new CoreFastDebugConfig());
|
||||||
allConfigs.add(new CoreProductConfig());
|
allConfigs.add(new CoreProductConfig());
|
||||||
|
|
||||||
if (platform.equals("Win32")) {
|
|
||||||
allConfigs.add(new KernelDebugConfig());
|
|
||||||
allConfigs.add(new KernelFastDebugConfig());
|
|
||||||
allConfigs.add(new KernelProductConfig());
|
|
||||||
}
|
|
||||||
|
|
||||||
return allConfigs;
|
return allConfigs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2196,8 +2196,7 @@ methodHandle ClassFileParser::parse_method(bool is_interface,
|
|||||||
true, // is LVTT
|
true, // is LVTT
|
||||||
CHECK_(nullHandle));
|
CHECK_(nullHandle));
|
||||||
lvtt_cnt++;
|
lvtt_cnt++;
|
||||||
} else if (UseSplitVerifier &&
|
} else if (_major_version >= Verifier::STACKMAP_ATTRIBUTE_MAJOR_VERSION &&
|
||||||
_major_version >= Verifier::STACKMAP_ATTRIBUTE_MAJOR_VERSION &&
|
|
||||||
_cp->symbol_at(code_attribute_name_index) == vmSymbols::tag_stack_map_table()) {
|
_cp->symbol_at(code_attribute_name_index) == vmSymbols::tag_stack_map_table()) {
|
||||||
// Stack map is only needed by the new verifier in JDK1.5.
|
// Stack map is only needed by the new verifier in JDK1.5.
|
||||||
if (parsed_stackmap_attribute) {
|
if (parsed_stackmap_attribute) {
|
||||||
|
@ -127,8 +127,7 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul
|
|||||||
if (TraceClassInitialization) {
|
if (TraceClassInitialization) {
|
||||||
tty->print_cr("Start class verification for: %s", klassName);
|
tty->print_cr("Start class verification for: %s", klassName);
|
||||||
}
|
}
|
||||||
if (UseSplitVerifier &&
|
if (klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
|
||||||
klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
|
|
||||||
ClassVerifier split_verifier(klass, THREAD);
|
ClassVerifier split_verifier(klass, THREAD);
|
||||||
split_verifier.verify_class(THREAD);
|
split_verifier.verify_class(THREAD);
|
||||||
exception_name = split_verifier.result();
|
exception_name = split_verifier.result();
|
||||||
|
@ -1457,7 +1457,7 @@ JVM_END
|
|||||||
JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
|
JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
|
||||||
assert (cls != NULL, "illegal class");
|
assert (cls != NULL, "illegal class");
|
||||||
JVMWrapper("JVM_GetClassAnnotations");
|
JVMWrapper("JVM_GetClassAnnotations");
|
||||||
ResourceMark rm(THREAD);
|
|
||||||
// Return null for arrays and primitives
|
// Return null for arrays and primitives
|
||||||
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
|
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
|
||||||
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
|
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
|
||||||
@ -1470,20 +1470,15 @@ JVM_ENTRY(jbyteArray, JVM_GetClassAnnotations(JNIEnv *env, jclass cls))
|
|||||||
JVM_END
|
JVM_END
|
||||||
|
|
||||||
|
|
||||||
JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
|
static bool jvm_get_field_common(jobject field, fieldDescriptor& fd, TRAPS) {
|
||||||
assert(field != NULL, "illegal field");
|
|
||||||
JVMWrapper("JVM_GetFieldAnnotations");
|
|
||||||
|
|
||||||
// some of this code was adapted from from jni_FromReflectedField
|
// 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 reflected = JNIHandles::resolve_non_null(field);
|
||||||
oop mirror = java_lang_reflect_Field::clazz(reflected);
|
oop mirror = java_lang_reflect_Field::clazz(reflected);
|
||||||
Klass* k = java_lang_Class::as_Klass(mirror);
|
Klass* k = java_lang_Class::as_Klass(mirror);
|
||||||
int slot = java_lang_reflect_Field::slot(reflected);
|
int slot = java_lang_reflect_Field::slot(reflected);
|
||||||
int modifiers = java_lang_reflect_Field::modifiers(reflected);
|
int modifiers = java_lang_reflect_Field::modifiers(reflected);
|
||||||
|
|
||||||
fieldDescriptor fd;
|
|
||||||
KlassHandle kh(THREAD, k);
|
KlassHandle kh(THREAD, k);
|
||||||
intptr_t offset = InstanceKlass::cast(kh())->field_offset(slot);
|
intptr_t offset = InstanceKlass::cast(kh())->field_offset(slot);
|
||||||
|
|
||||||
@ -1491,16 +1486,29 @@ JVM_ENTRY(jbyteArray, JVM_GetFieldAnnotations(JNIEnv *env, jobject field))
|
|||||||
// for static fields we only look in the current class
|
// for static fields we only look in the current class
|
||||||
if (!InstanceKlass::cast(kh())->find_local_field_from_offset(offset, true, &fd)) {
|
if (!InstanceKlass::cast(kh())->find_local_field_from_offset(offset, true, &fd)) {
|
||||||
assert(false, "cannot find static field");
|
assert(false, "cannot find static field");
|
||||||
return NULL; // robustness
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// for instance fields we start with the current class and work
|
// for instance fields we start with the current class and work
|
||||||
// our way up through the superclass chain
|
// our way up through the superclass chain
|
||||||
if (!InstanceKlass::cast(kh())->find_field_from_offset(offset, false, &fd)) {
|
if (!InstanceKlass::cast(kh())->find_field_from_offset(offset, false, &fd)) {
|
||||||
assert(false, "cannot find instance field");
|
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));
|
return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.annotations(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
@ -1525,12 +1533,8 @@ static Method* jvm_get_method_common(jobject method) {
|
|||||||
Klass* k = java_lang_Class::as_Klass(mirror);
|
Klass* k = java_lang_Class::as_Klass(mirror);
|
||||||
|
|
||||||
Method* m = InstanceKlass::cast(k)->method_with_idnum(slot);
|
Method* m = InstanceKlass::cast(k)->method_with_idnum(slot);
|
||||||
if (m == NULL) {
|
assert(m != NULL, "cannot find method");
|
||||||
assert(false, "cannot find method");
|
return m; // caller has to deal with NULL in product mode
|
||||||
return NULL; // robustness
|
|
||||||
}
|
|
||||||
|
|
||||||
return m;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1539,6 +1543,10 @@ JVM_ENTRY(jbyteArray, JVM_GetMethodAnnotations(JNIEnv *env, jobject method))
|
|||||||
|
|
||||||
// method is a handle to a java.lang.reflect.Method object
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
Method* m = jvm_get_method_common(method);
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env,
|
return (jbyteArray) JNIHandles::make_local(env,
|
||||||
Annotations::make_java_array(m->annotations(), THREAD));
|
Annotations::make_java_array(m->annotations(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
@ -1549,6 +1557,10 @@ JVM_ENTRY(jbyteArray, JVM_GetMethodDefaultAnnotationValue(JNIEnv *env, jobject m
|
|||||||
|
|
||||||
// method is a handle to a java.lang.reflect.Method object
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
Method* m = jvm_get_method_common(method);
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env,
|
return (jbyteArray) JNIHandles::make_local(env,
|
||||||
Annotations::make_java_array(m->annotation_default(), THREAD));
|
Annotations::make_java_array(m->annotation_default(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
@ -1559,6 +1571,10 @@ JVM_ENTRY(jbyteArray, JVM_GetMethodParameterAnnotations(JNIEnv *env, jobject met
|
|||||||
|
|
||||||
// method is a handle to a java.lang.reflect.Method object
|
// method is a handle to a java.lang.reflect.Method object
|
||||||
Method* m = jvm_get_method_common(method);
|
Method* m = jvm_get_method_common(method);
|
||||||
|
if (m == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (jbyteArray) JNIHandles::make_local(env,
|
return (jbyteArray) JNIHandles::make_local(env,
|
||||||
Annotations::make_java_array(m->parameter_annotations(), THREAD));
|
Annotations::make_java_array(m->parameter_annotations(), THREAD));
|
||||||
JVM_END
|
JVM_END
|
||||||
@ -1583,6 +1599,38 @@ JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
|
|||||||
return NULL;
|
return NULL;
|
||||||
JVM_END
|
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) {
|
static void bounds_check(constantPoolHandle cp, jint index, TRAPS) {
|
||||||
if (!cp->is_within_bounds(index)) {
|
if (!cp->is_within_bounds(index)) {
|
||||||
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
|
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
|
||||||
|
@ -523,6 +523,14 @@ JVM_GetMethodParameterAnnotations(JNIEnv *env, jobject method);
|
|||||||
JNIEXPORT jbyteArray JNICALL
|
JNIEXPORT jbyteArray JNICALL
|
||||||
JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls);
|
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
|
* New (JDK 1.4) reflection implementation
|
||||||
*/
|
*/
|
||||||
|
@ -260,6 +260,7 @@ static ObsoleteFlag obsolete_jvm_flags[] = {
|
|||||||
{ "CMSRevisitStackSize", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
{ "CMSRevisitStackSize", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
{ "PrintRevisitStats", 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) },
|
{ "UseVectoredExceptions", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
|
{ "UseSplitVerifier", JDK_Version::jdk(8), JDK_Version::jdk(9) },
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
{ "DesiredMethodLimit",
|
{ "DesiredMethodLimit",
|
||||||
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
|
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
|
||||||
|
@ -679,9 +679,6 @@ class CommandLineFlags {
|
|||||||
product(bool, UseCompilerSafepoints, true, \
|
product(bool, UseCompilerSafepoints, true, \
|
||||||
"Stop at safepoints in compiled code") \
|
"Stop at safepoints in compiled code") \
|
||||||
\
|
\
|
||||||
product(bool, UseSplitVerifier, true, \
|
|
||||||
"use split verifier with StackMapTable attributes") \
|
|
||||||
\
|
|
||||||
product(bool, FailOverToOldVerifier, true, \
|
product(bool, FailOverToOldVerifier, true, \
|
||||||
"fail over to old verifier when split verifier fails") \
|
"fail over to old verifier when split verifier fails") \
|
||||||
\
|
\
|
||||||
|
Loading…
Reference in New Issue
Block a user