Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3a91e593
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3a91e593
编写于
10月 08, 2012
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8000263: JSR 292: signature types may appear to be unloaded
Reviewed-by: kvn, jrose
上级
1e0a5288
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
136 addition
and
171 deletion
+136
-171
src/cpu/sparc/vm/methodHandles_sparc.cpp
src/cpu/sparc/vm/methodHandles_sparc.cpp
+1
-24
src/cpu/sparc/vm/methodHandles_sparc.hpp
src/cpu/sparc/vm/methodHandles_sparc.hpp
+0
-2
src/cpu/x86/vm/methodHandles_x86.cpp
src/cpu/x86/vm/methodHandles_x86.cpp
+1
-27
src/cpu/x86/vm/methodHandles_x86.hpp
src/cpu/x86/vm/methodHandles_x86.hpp
+0
-2
src/share/vm/classfile/systemDictionary.cpp
src/share/vm/classfile/systemDictionary.cpp
+17
-2
src/share/vm/classfile/systemDictionary.hpp
src/share/vm/classfile/systemDictionary.hpp
+90
-88
src/share/vm/classfile/vmSymbols.cpp
src/share/vm/classfile/vmSymbols.cpp
+0
-18
src/share/vm/classfile/vmSymbols.hpp
src/share/vm/classfile/vmSymbols.hpp
+0
-3
src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
+5
-3
src/share/vm/prims/methodHandles.hpp
src/share/vm/prims/methodHandles.hpp
+21
-1
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+1
-1
未找到文件。
src/cpu/sparc/vm/methodHandles_sparc.cpp
浏览文件 @
3a91e593
...
@@ -208,8 +208,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
...
@@ -208,8 +208,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
Register
O1_scratch
=
O1
;
Register
O1_scratch
=
O1
;
Register
O4_param_size
=
O4
;
// size of parameters
Register
O4_param_size
=
O4
;
// size of parameters
address
code_start
=
__
pc
();
// here's where control starts out:
// here's where control starts out:
__
align
(
CodeEntryAlignment
);
__
align
(
CodeEntryAlignment
);
address
entry_point
=
__
pc
();
address
entry_point
=
__
pc
();
...
@@ -252,22 +250,9 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
...
@@ -252,22 +250,9 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
// O4_first_arg_addr is live!
// O4_first_arg_addr is live!
if
(
TraceMethodHandles
)
{
if
(
TraceMethodHandles
)
{
const
char
*
name
=
vmIntrinsics
::
name_at
(
iid
);
if
(
*
name
==
'_'
)
name
+=
1
;
const
size_t
len
=
strlen
(
name
)
+
50
;
char
*
qname
=
NEW_C_HEAP_ARRAY
(
char
,
len
,
mtInternal
);
const
char
*
suffix
=
""
;
if
(
vmIntrinsics
::
method_for
(
iid
)
==
NULL
||
!
vmIntrinsics
::
method_for
(
iid
)
->
access_flags
().
is_public
())
{
if
(
is_signature_polymorphic_static
(
iid
))
suffix
=
"/static"
;
else
suffix
=
"/private"
;
}
jio_snprintf
(
qname
,
len
,
"MethodHandle::interpreter_entry::%s%s"
,
name
,
suffix
);
if
(
O0_mh
!=
noreg
)
if
(
O0_mh
!=
noreg
)
__
mov
(
O0_mh
,
G3_method_handle
);
// make stub happy
__
mov
(
O0_mh
,
G3_method_handle
);
// make stub happy
trace_method_handle
(
_masm
,
qname
);
trace_method_handle
_interpreter_entry
(
_masm
,
iid
);
}
}
if
(
iid
==
vmIntrinsics
::
_invokeBasic
)
{
if
(
iid
==
vmIntrinsics
::
_invokeBasic
)
{
...
@@ -287,14 +272,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
...
@@ -287,14 +272,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
generate_method_handle_dispatch
(
_masm
,
iid
,
O0_recv
,
G5_member
,
not_for_compiler_entry
);
generate_method_handle_dispatch
(
_masm
,
iid
,
O0_recv
,
G5_member
,
not_for_compiler_entry
);
}
}
if
(
PrintMethodHandleStubs
)
{
address
code_end
=
__
pc
();
tty
->
print_cr
(
"--------"
);
tty
->
print_cr
(
"method handle interpreter entry for %s"
,
vmIntrinsics
::
name_at
(
iid
));
Disassembler
::
decode
(
code_start
,
code_end
);
tty
->
cr
();
}
return
entry_point
;
return
entry_point
;
}
}
...
...
src/cpu/sparc/vm/methodHandles_sparc.hpp
浏览文件 @
3a91e593
...
@@ -58,5 +58,3 @@ public:
...
@@ -58,5 +58,3 @@ public:
Register
recv
,
Register
method_temp
,
Register
recv
,
Register
method_temp
,
Register
temp2
,
Register
temp3
,
Register
temp2
,
Register
temp3
,
bool
for_compiler_entry
);
bool
for_compiler_entry
);
static
void
trace_method_handle
(
MacroAssembler
*
_masm
,
const
char
*
adaptername
)
PRODUCT_RETURN
;
src/cpu/x86/vm/methodHandles_x86.cpp
浏览文件 @
3a91e593
...
@@ -209,8 +209,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
...
@@ -209,8 +209,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
Register
rcx_mh
=
rcx
;
// MH receiver; dies quickly and is recycled
Register
rcx_mh
=
rcx
;
// MH receiver; dies quickly and is recycled
Register
rbx_method
=
rbx
;
// eventual target of this invocation
Register
rbx_method
=
rbx
;
// eventual target of this invocation
address
code_start
=
__
pc
();
// here's where control starts out:
// here's where control starts out:
__
align
(
CodeEntryAlignment
);
__
align
(
CodeEntryAlignment
);
address
entry_point
=
__
pc
();
address
entry_point
=
__
pc
();
...
@@ -251,23 +249,7 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
...
@@ -251,23 +249,7 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
// rdx_first_arg_addr is live!
// rdx_first_arg_addr is live!
if
(
TraceMethodHandles
)
{
trace_method_handle_interpreter_entry
(
_masm
,
iid
);
const
char
*
name
=
vmIntrinsics
::
name_at
(
iid
);
if
(
*
name
==
'_'
)
name
+=
1
;
const
size_t
len
=
strlen
(
name
)
+
50
;
char
*
qname
=
NEW_C_HEAP_ARRAY
(
char
,
len
,
mtInternal
);
const
char
*
suffix
=
""
;
if
(
vmIntrinsics
::
method_for
(
iid
)
==
NULL
||
!
vmIntrinsics
::
method_for
(
iid
)
->
access_flags
().
is_public
())
{
if
(
is_signature_polymorphic_static
(
iid
))
suffix
=
"/static"
;
else
suffix
=
"/private"
;
}
jio_snprintf
(
qname
,
len
,
"MethodHandle::interpreter_entry::%s%s"
,
name
,
suffix
);
// note: stub look for mh in rcx
trace_method_handle
(
_masm
,
qname
);
}
if
(
iid
==
vmIntrinsics
::
_invokeBasic
)
{
if
(
iid
==
vmIntrinsics
::
_invokeBasic
)
{
generate_method_handle_dispatch
(
_masm
,
iid
,
rcx_mh
,
noreg
,
not_for_compiler_entry
);
generate_method_handle_dispatch
(
_masm
,
iid
,
rcx_mh
,
noreg
,
not_for_compiler_entry
);
...
@@ -287,14 +269,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
...
@@ -287,14 +269,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
generate_method_handle_dispatch
(
_masm
,
iid
,
rcx_recv
,
rbx_member
,
not_for_compiler_entry
);
generate_method_handle_dispatch
(
_masm
,
iid
,
rcx_recv
,
rbx_member
,
not_for_compiler_entry
);
}
}
if
(
PrintMethodHandleStubs
)
{
address
code_end
=
__
pc
();
tty
->
print_cr
(
"--------"
);
tty
->
print_cr
(
"method handle interpreter entry for %s"
,
vmIntrinsics
::
name_at
(
iid
));
Disassembler
::
decode
(
code_start
,
code_end
);
tty
->
cr
();
}
return
entry_point
;
return
entry_point
;
}
}
...
...
src/cpu/x86/vm/methodHandles_x86.hpp
浏览文件 @
3a91e593
...
@@ -55,8 +55,6 @@ public:
...
@@ -55,8 +55,6 @@ public:
Register
temp2
,
Register
temp2
,
bool
for_compiler_entry
);
bool
for_compiler_entry
);
static
void
trace_method_handle
(
MacroAssembler
*
_masm
,
const
char
*
adaptername
)
PRODUCT_RETURN
;
static
Register
saved_last_sp_register
()
{
static
Register
saved_last_sp_register
()
{
// Should be in sharedRuntime, not here.
// Should be in sharedRuntime, not here.
return
LP64_ONLY
(
r13
)
NOT_LP64
(
rsi
);
return
LP64_ONLY
(
r13
)
NOT_LP64
(
rsi
);
...
...
src/share/vm/classfile/systemDictionary.cpp
浏览文件 @
3a91e593
...
@@ -973,9 +973,12 @@ Klass* SystemDictionary::find_well_known_klass(Symbol* class_name) {
...
@@ -973,9 +973,12 @@ Klass* SystemDictionary::find_well_known_klass(Symbol* class_name) {
if
(
sid
!=
vmSymbols
::
NO_SID
)
{
if
(
sid
!=
vmSymbols
::
NO_SID
)
{
Klass
*
k
=
NULL
;
Klass
*
k
=
NULL
;
switch
(
sid
)
{
switch
(
sid
)
{
#define WK_KLASS_CASE(name, symbol,
ignore_
option) \
#define WK_KLASS_CASE(name, symbol, option) \
case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \
case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \
k = WK_KLASS(name); break;
if (option == Pre_Link) { \
k = WK_KLASS(name); \
} \
break;
WK_KLASSES_DO
(
WK_KLASS_CASE
)
WK_KLASSES_DO
(
WK_KLASS_CASE
)
#undef WK_KLASS_CASE
#undef WK_KLASS_CASE
}
}
...
@@ -1955,6 +1958,16 @@ void SystemDictionary::initialize_wk_klasses_until(WKID limit_id, WKID &start_id
...
@@ -1955,6 +1958,16 @@ void SystemDictionary::initialize_wk_klasses_until(WKID limit_id, WKID &start_id
start_id
=
limit_id
;
start_id
=
limit_id
;
}
}
#ifdef ASSERT
void
SystemDictionary
::
check_wk_pre_link_klasses
()
{
#define WK_KLASS_CHECK(name, symbol, option) \
if (option == Pre_Link) { \
assert(name()->is_public(), ""); \
}
WK_KLASSES_DO
(
WK_KLASS_CHECK
);
#undef WK_KLASS_CHECK
}
#endif
void
SystemDictionary
::
initialize_preloaded_classes
(
TRAPS
)
{
void
SystemDictionary
::
initialize_preloaded_classes
(
TRAPS
)
{
assert
(
WK_KLASS
(
Object_klass
)
==
NULL
,
"preloaded classes should only be initialized once"
);
assert
(
WK_KLASS
(
Object_klass
)
==
NULL
,
"preloaded classes should only be initialized once"
);
...
@@ -2010,6 +2023,8 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
...
@@ -2010,6 +2023,8 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
initialize_wk_klasses_until
(
WKID_LIMIT
,
scan
,
CHECK
);
initialize_wk_klasses_until
(
WKID_LIMIT
,
scan
,
CHECK
);
check_wk_pre_link_klasses
();
_box_klasses
[
T_BOOLEAN
]
=
WK_KLASS
(
Boolean_klass
);
_box_klasses
[
T_BOOLEAN
]
=
WK_KLASS
(
Boolean_klass
);
_box_klasses
[
T_CHAR
]
=
WK_KLASS
(
Character_klass
);
_box_klasses
[
T_CHAR
]
=
WK_KLASS
(
Character_klass
);
_box_klasses
[
T_FLOAT
]
=
WK_KLASS
(
Float_klass
);
_box_klasses
[
T_FLOAT
]
=
WK_KLASS
(
Float_klass
);
...
...
src/share/vm/classfile/systemDictionary.hpp
浏览文件 @
3a91e593
...
@@ -92,93 +92,93 @@ class SymbolPropertyTable;
...
@@ -92,93 +92,93 @@ class SymbolPropertyTable;
// The order of these definitions is significant; it is the order in which
// The order of these definitions is significant; it is the order in which
// preloading is actually performed by initialize_preloaded_classes.
// preloading is actually performed by initialize_preloaded_classes.
#define WK_KLASSES_DO(
template)
\
#define WK_KLASSES_DO(
do_klass)
\
/* well-known classes */
\
/* well-known classes */
\
template(Object_klass, java_lang_Object, Pre
) \
do_klass(Object_klass, java_lang_Object, Pre_Link
) \
template(String_klass, java_lang_String, Pre
) \
do_klass(String_klass, java_lang_String, Pre_Link
) \
template(Class_klass, java_lang_Class, Pre
) \
do_klass(Class_klass, java_lang_Class, Pre_Link
) \
template(Cloneable_klass, java_lang_Cloneable, Pre
) \
do_klass(Cloneable_klass, java_lang_Cloneable, Pre_Link
) \
template(ClassLoader_klass, java_lang_ClassLoader, Pre
) \
do_klass(ClassLoader_klass, java_lang_ClassLoader, Pre_Link
) \
template(Serializable_klass, java_io_Serializable, Pre
) \
do_klass(Serializable_klass, java_io_Serializable, Pre_Link
) \
template(System_klass, java_lang_System, Pre
) \
do_klass(System_klass, java_lang_System, Pre_Link
) \
template(Throwable_klass, java_lang_Throwable, Pre
) \
do_klass(Throwable_klass, java_lang_Throwable, Pre_Link
) \
template(Error_klass, java_lang_Error, Pre
) \
do_klass(Error_klass, java_lang_Error, Pre_Link
) \
template(ThreadDeath_klass, java_lang_ThreadDeath, Pre
) \
do_klass(ThreadDeath_klass, java_lang_ThreadDeath, Pre_Link
) \
template(Exception_klass, java_lang_Exception, Pre
) \
do_klass(Exception_klass, java_lang_Exception, Pre_Link
) \
template(RuntimeException_klass, java_lang_RuntimeException, Pre
) \
do_klass(RuntimeException_klass, java_lang_RuntimeException, Pre_Link
) \
template(ProtectionDomain_klass, java_security_ProtectionDomain, Pre
) \
do_klass(ProtectionDomain_klass, java_security_ProtectionDomain, Pre_Link
) \
template(AccessControlContext_klass, java_security_AccessControlContext, Pre
) \
do_klass(AccessControlContext_klass, java_security_AccessControlContext, Pre_Link
) \
template(ClassNotFoundException_klass, java_lang_ClassNotFoundException, Pre
) \
do_klass(ClassNotFoundException_klass, java_lang_ClassNotFoundException, Pre_Link
) \
template(NoClassDefFoundError_klass, java_lang_NoClassDefFoundError, Pre
) \
do_klass(NoClassDefFoundError_klass, java_lang_NoClassDefFoundError, Pre_Link
) \
template(LinkageError_klass, java_lang_LinkageError, Pre
) \
do_klass(LinkageError_klass, java_lang_LinkageError, Pre_Link
) \
template(ClassCastException_klass, java_lang_ClassCastException, Pre
) \
do_klass(ClassCastException_klass, java_lang_ClassCastException, Pre_Link
) \
template(ArrayStoreException_klass, java_lang_ArrayStoreException, Pre
) \
do_klass(ArrayStoreException_klass, java_lang_ArrayStoreException, Pre_Link
) \
template(VirtualMachineError_klass, java_lang_VirtualMachineError, Pre
) \
do_klass(VirtualMachineError_klass, java_lang_VirtualMachineError, Pre_Link
) \
template(OutOfMemoryError_klass, java_lang_OutOfMemoryError, Pre
) \
do_klass(OutOfMemoryError_klass, java_lang_OutOfMemoryError, Pre_Link
) \
template(StackOverflowError_klass, java_lang_StackOverflowError, Pre
) \
do_klass(StackOverflowError_klass, java_lang_StackOverflowError, Pre_Link
) \
template(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre
) \
do_klass(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre_Link
) \
template(Reference_klass, java_lang_ref_Reference, Pre
) \
do_klass(Reference_klass, java_lang_ref_Reference, Pre_Link
) \
\
\
/* Preload ref klasses and set reference types */
\
/* Preload ref klasses and set reference types */
\
template(SoftReference_klass, java_lang_ref_SoftReference, Pre
) \
do_klass(SoftReference_klass, java_lang_ref_SoftReference, Pre_Link
) \
template(WeakReference_klass, java_lang_ref_WeakReference, Pre
) \
do_klass(WeakReference_klass, java_lang_ref_WeakReference, Pre_Link
) \
template(FinalReference_klass, java_lang_ref_FinalReference, Pre
) \
do_klass(FinalReference_klass, java_lang_ref_FinalReference, Pre
) \
template(PhantomReference_klass, java_lang_ref_PhantomReference, Pre
) \
do_klass(PhantomReference_klass, java_lang_ref_PhantomReference, Pre_Link
) \
template(Finalizer_klass, java_lang_ref_Finalizer, Pre
) \
do_klass(Finalizer_klass, java_lang_ref_Finalizer, Pre
) \
\
\
template(Thread_klass, java_lang_Thread, Pre
) \
do_klass(Thread_klass, java_lang_Thread, Pre_Link
) \
template(ThreadGroup_klass, java_lang_ThreadGroup, Pre
) \
do_klass(ThreadGroup_klass, java_lang_ThreadGroup, Pre_Link
) \
template(Properties_klass, java_util_Properties, Pre
) \
do_klass(Properties_klass, java_util_Properties, Pre_Link
) \
template(reflect_AccessibleObject_klass, java_lang_reflect_AccessibleObject, Pre
) \
do_klass(reflect_AccessibleObject_klass, java_lang_reflect_AccessibleObject, Pre_Link
) \
template(reflect_Field_klass, java_lang_reflect_Field, Pre
) \
do_klass(reflect_Field_klass, java_lang_reflect_Field, Pre_Link
) \
template(reflect_Method_klass, java_lang_reflect_Method, Pre
) \
do_klass(reflect_Method_klass, java_lang_reflect_Method, Pre_Link
) \
template(reflect_Constructor_klass, java_lang_reflect_Constructor, Pre
) \
do_klass(reflect_Constructor_klass, java_lang_reflect_Constructor, Pre_Link
) \
\
\
/* NOTE: needed too early in bootstrapping process to have checks based on JDK version */
\
/* NOTE: needed too early in bootstrapping process to have checks based on JDK version */
\
/* Universe::is_gte_jdk14x_version() is not set up by this point. */
\
/* Universe::is_gte_jdk14x_version() is not set up by this point. */
\
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */
\
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */
\
template(reflect_MagicAccessorImpl_klass, sun_reflect_MagicAccessorImpl, Opt)
\
do_klass(reflect_MagicAccessorImpl_klass, sun_reflect_MagicAccessorImpl, Opt )
\
template
(reflect_MethodAccessorImpl_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \
do_klass
(reflect_MethodAccessorImpl_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \
template
(reflect_ConstructorAccessorImpl_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \
do_klass
(reflect_ConstructorAccessorImpl_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \
template(reflect_DelegatingClassLoader_klass, sun_reflect_DelegatingClassLoader, Opt)
\
do_klass(reflect_DelegatingClassLoader_klass, sun_reflect_DelegatingClassLoader, Opt )
\
template(reflect_ConstantPool_klass, sun_reflect_ConstantPool, Opt_Only_JDK15)
\
do_klass(reflect_ConstantPool_klass, sun_reflect_ConstantPool, Opt_Only_JDK15 )
\
template(reflect_UnsafeStaticFieldAccessorImpl_klass, sun_reflect_UnsafeStaticFieldAccessorImpl, Opt_Only_JDK15)
\
do_klass(reflect_UnsafeStaticFieldAccessorImpl_klass, sun_reflect_UnsafeStaticFieldAccessorImpl, Opt_Only_JDK15 )
\
\
\
/* support for dynamic typing; it's OK if these are NULL in earlier JDKs */
\
/* support for dynamic typing; it's OK if these are NULL in earlier JDKs */
\
template(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_JSR292
) \
do_klass(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_Link
) \
template(MemberName_klass, java_lang_invoke_MemberName, Pre_JSR292
) \
do_klass(MemberName_klass, java_lang_invoke_MemberName, Pre
) \
template(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre_JSR292
) \
do_klass(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre
) \
template(LambdaForm_klass, java_lang_invoke_LambdaForm, Opt)
\
do_klass(LambdaForm_klass, java_lang_invoke_LambdaForm, Opt )
\
template(MethodType_klass, java_lang_invoke_MethodType, Pre_JSR292
) \
do_klass(MethodType_klass, java_lang_invoke_MethodType, Pre_Link
) \
template(BootstrapMethodError_klass, java_lang_BootstrapMethodError, Pre_JSR292
) \
do_klass(BootstrapMethodError_klass, java_lang_BootstrapMethodError, Pre_Link
) \
template(CallSite_klass, java_lang_invoke_CallSite, Pre_JSR292
) \
do_klass(CallSite_klass, java_lang_invoke_CallSite, Pre_Link
) \
template(ConstantCallSite_klass, java_lang_invoke_ConstantCallSite, Pre_JSR292
) \
do_klass(ConstantCallSite_klass, java_lang_invoke_ConstantCallSite, Pre_Link
) \
template(MutableCallSite_klass, java_lang_invoke_MutableCallSite, Pre_JSR292
) \
do_klass(MutableCallSite_klass, java_lang_invoke_MutableCallSite, Pre_Link
) \
template(VolatileCallSite_klass, java_lang_invoke_VolatileCallSite, Pre_JSR292
) \
do_klass(VolatileCallSite_klass, java_lang_invoke_VolatileCallSite, Pre_Link
) \
/* Note: MethodHandle must be first, and VolatileCallSite last in group */
\
/* Note: MethodHandle must be first, and VolatileCallSite last in group */
\
\
\
template(StringBuffer_klass, java_lang_StringBuffer, Pre
) \
do_klass(StringBuffer_klass, java_lang_StringBuffer, Pre_Link
) \
template(StringBuilder_klass, java_lang_StringBuilder, Pre
) \
do_klass(StringBuilder_klass, java_lang_StringBuilder, Pre_Link
) \
\
\
/* It's NULL in non-1.4 JDKs. */
\
/* It's NULL in non-1.4 JDKs. */
\
template(StackTraceElement_klass, java_lang_StackTraceElement, Opt
) \
do_klass(StackTraceElement_klass, java_lang_StackTraceElement, Opt
) \
/* Universe::is_gte_jdk14x_version() is not set up by this point. */
\
/* Universe::is_gte_jdk14x_version() is not set up by this point. */
\
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */
\
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */
\
template(nio_Buffer_klass, java_nio_Buffer, Opt
) \
do_klass(nio_Buffer_klass, java_nio_Buffer, Opt
) \
\
\
template(DownloadManager_klass, sun_jkernel_DownloadManager, Opt_Kernel
) \
do_klass(DownloadManager_klass, sun_jkernel_DownloadManager, Opt_Kernel
) \
\
\
template(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt)
\
do_klass(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt )
\
\
\
/* Preload boxing klasses */
\
/* Preload boxing klasses */
\
template(Boolean_klass, java_lang_Boolean, Pre
) \
do_klass(Boolean_klass, java_lang_Boolean, Pre_Link
) \
template(Character_klass, java_lang_Character, Pre
) \
do_klass(Character_klass, java_lang_Character, Pre_Link
) \
template(Float_klass, java_lang_Float, Pre
) \
do_klass(Float_klass, java_lang_Float, Pre_Link
) \
template(Double_klass, java_lang_Double, Pre
) \
do_klass(Double_klass, java_lang_Double, Pre_Link
) \
template(Byte_klass, java_lang_Byte, Pre
) \
do_klass(Byte_klass, java_lang_Byte, Pre_Link
) \
template(Short_klass, java_lang_Short, Pre
) \
do_klass(Short_klass, java_lang_Short, Pre_Link
) \
template(Integer_klass, java_lang_Integer, Pre
) \
do_klass(Integer_klass, java_lang_Integer, Pre_Link
) \
template(Long_klass, java_lang_Long, Pre
) \
do_klass(Long_klass, java_lang_Long, Pre_Link
) \
/*end*/
/*end*/
...
@@ -201,7 +201,7 @@ class SystemDictionary : AllStatic {
...
@@ -201,7 +201,7 @@ class SystemDictionary : AllStatic {
enum
InitOption
{
enum
InitOption
{
Pre
,
// preloaded; error if not present
Pre
,
// preloaded; error if not present
Pre_
JSR292
,
// preloaded if EnableInvokeDynamic
Pre_
Link
,
// preloaded; error if not present; link as well-known
// Order is significant. Options before this point require resolve_or_fail.
// Order is significant. Options before this point require resolve_or_fail.
// Options after this point will use resolve_or_null instead.
// Options after this point will use resolve_or_null instead.
...
@@ -392,9 +392,9 @@ public:
...
@@ -392,9 +392,9 @@ public:
return
k
;
return
k
;
}
}
static
Klass
*
check_klass_Pre
(
Klass
*
k
)
{
return
check_klass
(
k
);
}
static
Klass
*
check_klass_Pre
(
Klass
*
k
)
{
return
check_klass
(
k
);
}
static
Klass
*
check_klass_Pre_
JSR292
(
Klass
*
k
)
{
return
EnableInvokeDynamic
?
check_klass
(
k
)
:
k
;
}
static
Klass
*
check_klass_Pre_
Link
(
Klass
*
k
)
{
return
check_klass
(
k
)
;
}
static
Klass
*
check_klass_Opt
(
Klass
*
k
)
{
return
k
;
}
static
Klass
*
check_klass_Opt
(
Klass
*
k
)
{
return
k
;
}
static
Klass
*
check_klass_Opt_Kernel
(
Klass
*
k
)
{
return
k
;
}
//== Opt
static
Klass
*
check_klass_Opt_Kernel
(
Klass
*
k
)
{
return
k
;
}
//== Opt
static
Klass
*
check_klass_Opt_Only_JDK15
(
Klass
*
k
)
{
static
Klass
*
check_klass_Opt_Only_JDK15
(
Klass
*
k
)
{
assert
(
JDK_Version
::
is_gte_jdk15x_version
(),
"JDK 1.5 only"
);
assert
(
JDK_Version
::
is_gte_jdk15x_version
(),
"JDK 1.5 only"
);
...
@@ -413,6 +413,8 @@ public:
...
@@ -413,6 +413,8 @@ public:
initialize_wk_klasses_until
((
WKID
)
limit
,
start_id
,
THREAD
);
initialize_wk_klasses_until
((
WKID
)
limit
,
start_id
,
THREAD
);
}
}
static
void
check_wk_pre_link_klasses
()
NOT_DEBUG_RETURN
;
public:
public:
#define WK_KLASS_DECLARE(name, symbol, option) \
#define WK_KLASS_DECLARE(name, symbol, option) \
static Klass* name() { return check_klass_##option(_well_known_klasses[WK_KLASS_ENUM_NAME(name)]); } \
static Klass* name() { return check_klass_##option(_well_known_klasses[WK_KLASS_ENUM_NAME(name)]); } \
...
...
src/share/vm/classfile/vmSymbols.cpp
浏览文件 @
3a91e593
...
@@ -324,24 +324,6 @@ vmIntrinsics::ID vmIntrinsics::for_raw_conversion(BasicType src, BasicType dest)
...
@@ -324,24 +324,6 @@ vmIntrinsics::ID vmIntrinsics::for_raw_conversion(BasicType src, BasicType dest)
return
vmIntrinsics
::
_none
;
return
vmIntrinsics
::
_none
;
}
}
Method
*
vmIntrinsics
::
method_for
(
vmIntrinsics
::
ID
id
)
{
if
(
id
==
_none
)
return
NULL
;
Symbol
*
cname
=
vmSymbols
::
symbol_at
(
class_for
(
id
));
Symbol
*
mname
=
vmSymbols
::
symbol_at
(
name_for
(
id
));
Symbol
*
msig
=
vmSymbols
::
symbol_at
(
signature_for
(
id
));
if
(
cname
==
NULL
||
mname
==
NULL
||
msig
==
NULL
)
return
NULL
;
Klass
*
k
=
SystemDictionary
::
find_well_known_klass
(
cname
);
if
(
k
==
NULL
)
return
NULL
;
Method
*
m
=
InstanceKlass
::
cast
(
k
)
->
find_method
(
mname
,
msig
);
if
(
m
==
NULL
&&
cname
==
vmSymbols
::
java_lang_invoke_MethodHandle
()
&&
msig
==
vmSymbols
::
star_name
())
{
// Any signature polymorphic method is represented by a fixed concrete signature:
m
=
InstanceKlass
::
cast
(
k
)
->
find_method
(
mname
,
vmSymbols
::
object_array_object_signature
());
}
return
m
;
}
#define VM_INTRINSIC_INITIALIZE(id, klass, name, sig, flags) #id "\0"
#define VM_INTRINSIC_INITIALIZE(id, klass, name, sig, flags) #id "\0"
static
const
char
*
vm_intrinsic_name_bodies
=
static
const
char
*
vm_intrinsic_name_bodies
=
...
...
src/share/vm/classfile/vmSymbols.hpp
浏览文件 @
3a91e593
...
@@ -1138,9 +1138,6 @@ public:
...
@@ -1138,9 +1138,6 @@ public:
static
const
char
*
short_name_as_C_string
(
ID
id
,
char
*
buf
,
int
size
);
static
const
char
*
short_name_as_C_string
(
ID
id
,
char
*
buf
,
int
size
);
// Access to intrinsic methods:
static
Method
*
method_for
(
ID
id
);
// Wrapper object methods:
// Wrapper object methods:
static
ID
for_boxing
(
BasicType
type
);
static
ID
for_boxing
(
BasicType
type
);
static
ID
for_unboxing
(
BasicType
type
);
static
ID
for_unboxing
(
BasicType
type
);
...
...
src/share/vm/opto/library_call.cpp
浏览文件 @
3a91e593
...
@@ -2378,7 +2378,9 @@ const TypeOopPtr* LibraryCallKit::sharpen_unsafe_type(Compile::AliasType* alias_
...
@@ -2378,7 +2378,9 @@ const TypeOopPtr* LibraryCallKit::sharpen_unsafe_type(Compile::AliasType* alias_
}
}
}
}
if
(
sharpened_klass
!=
NULL
)
{
// The sharpened class might be unloaded if there is no class loader
// contraint in place.
if
(
sharpened_klass
!=
NULL
&&
sharpened_klass
->
is_loaded
())
{
const
TypeOopPtr
*
tjp
=
TypeOopPtr
::
make_from_klass
(
sharpened_klass
);
const
TypeOopPtr
*
tjp
=
TypeOopPtr
::
make_from_klass
(
sharpened_klass
);
#ifndef PRODUCT
#ifndef PRODUCT
...
...
src/share/vm/prims/methodHandles.hpp
浏览文件 @
3a91e593
...
@@ -196,7 +196,27 @@ public:
...
@@ -196,7 +196,27 @@ public:
# include "methodHandles_ppc.hpp"
# include "methodHandles_ppc.hpp"
#endif
#endif
// Tracing
static
void
trace_method_handle
(
MacroAssembler
*
_masm
,
const
char
*
adaptername
)
PRODUCT_RETURN
;
static
void
trace_method_handle_interpreter_entry
(
MacroAssembler
*
_masm
,
vmIntrinsics
::
ID
iid
)
{
if
(
TraceMethodHandles
)
{
const
char
*
name
=
vmIntrinsics
::
name_at
(
iid
);
if
(
*
name
==
'_'
)
name
+=
1
;
const
size_t
len
=
strlen
(
name
)
+
50
;
char
*
qname
=
NEW_C_HEAP_ARRAY
(
char
,
len
,
mtInternal
);
const
char
*
suffix
=
""
;
if
(
is_signature_polymorphic
(
iid
))
{
if
(
is_signature_polymorphic_static
(
iid
))
suffix
=
"/static"
;
else
suffix
=
"/private"
;
}
jio_snprintf
(
qname
,
len
,
"MethodHandle::interpreter_entry::%s%s"
,
name
,
suffix
);
trace_method_handle
(
_masm
,
qname
);
// Note: Don't free the allocated char array because it's used
// during runtime.
}
}
};
};
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
3a91e593
...
@@ -1000,7 +1000,7 @@ class CommandLineFlags {
...
@@ -1000,7 +1000,7 @@ class CommandLineFlags {
product(bool, ClassUnloading, true, \
product(bool, ClassUnloading, true, \
"Do unloading of classes") \
"Do unloading of classes") \
\
\
diagnostic(bool, LinkWellKnownClasses,
false,
\
diagnostic(bool, LinkWellKnownClasses,
true,
\
"Resolve a well known class as soon as its name is seen") \
"Resolve a well known class as soon as its name is seen") \
\
\
develop(bool, DisableStartThread, false, \
develop(bool, DisableStartThread, false, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录