Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
666e209e
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看板
提交
666e209e
编写于
10月 11, 2012
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8000740: remove LinkWellKnownClasses
Reviewed-by: kvn, jrose
上级
b0ba57bf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
57 addition
and
155 deletion
+57
-155
src/share/vm/classfile/classFileParser.cpp
src/share/vm/classfile/classFileParser.cpp
+1
-6
src/share/vm/classfile/classFileParser.hpp
src/share/vm/classfile/classFileParser.hpp
+1
-1
src/share/vm/classfile/systemDictionary.cpp
src/share/vm/classfile/systemDictionary.cpp
+0
-76
src/share/vm/classfile/systemDictionary.hpp
src/share/vm/classfile/systemDictionary.hpp
+55
-60
src/share/vm/prims/methodHandles.cpp
src/share/vm/prims/methodHandles.cpp
+0
-9
src/share/vm/runtime/globals.hpp
src/share/vm/runtime/globals.hpp
+0
-3
未找到文件。
src/share/vm/classfile/classFileParser.cpp
浏览文件 @
666e209e
...
@@ -816,9 +816,6 @@ Array<Klass*>* ClassFileParser::parse_interfaces(constantPoolHandle cp,
...
@@ -816,9 +816,6 @@ Array<Klass*>* ClassFileParser::parse_interfaces(constantPoolHandle cp,
unresolved_klass
,
class_loader
,
protection_domain
,
unresolved_klass
,
class_loader
,
protection_domain
,
false
,
CHECK_NULL
);
false
,
CHECK_NULL
);
interf
=
KlassHandle
(
THREAD
,
k
);
interf
=
KlassHandle
(
THREAD
,
k
);
if
(
LinkWellKnownClasses
)
// my super type is well known to me
cp
->
klass_at_put
(
interface_index
,
interf
());
// eagerly resolve
}
}
if
(
!
Klass
::
cast
(
interf
())
->
is_interface
())
{
if
(
!
Klass
::
cast
(
interf
())
->
is_interface
())
{
...
@@ -3197,8 +3194,6 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
...
@@ -3197,8 +3194,6 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
KlassHandle
kh
(
THREAD
,
k
);
KlassHandle
kh
(
THREAD
,
k
);
super_klass
=
instanceKlassHandle
(
THREAD
,
kh
());
super_klass
=
instanceKlassHandle
(
THREAD
,
kh
());
if
(
LinkWellKnownClasses
)
// my super class is well known to me
cp
->
klass_at_put
(
super_class_index
,
super_klass
());
// eagerly resolve
}
}
if
(
super_klass
.
not_null
())
{
if
(
super_klass
.
not_null
())
{
if
(
super_klass
->
is_interface
())
{
if
(
super_klass
->
is_interface
())
{
...
@@ -3644,7 +3639,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
...
@@ -3644,7 +3639,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
// has to be changed accordingly.
// has to be changed accordingly.
this_klass
->
set_initial_method_idnum
(
methods
->
length
());
this_klass
->
set_initial_method_idnum
(
methods
->
length
());
this_klass
->
set_name
(
cp
->
klass_name_at
(
this_class_index
));
this_klass
->
set_name
(
cp
->
klass_name_at
(
this_class_index
));
if
(
LinkWellKnownClasses
||
is_anonymous
())
// I am well known to myself
if
(
is_anonymous
())
// I am well known to myself
cp
->
klass_at_put
(
this_class_index
,
this_klass
());
// eagerly resolve
cp
->
klass_at_put
(
this_class_index
,
this_klass
());
// eagerly resolve
if
(
fields_annotations
!=
NULL
||
if
(
fields_annotations
!=
NULL
||
...
...
src/share/vm/classfile/classFileParser.hpp
浏览文件 @
666e209e
...
@@ -344,7 +344,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
...
@@ -344,7 +344,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
// constant pool construction, but in later versions they can.
// constant pool construction, but in later versions they can.
// %%% Let's phase out the old is_klass_reference.
// %%% Let's phase out the old is_klass_reference.
bool
is_klass_reference
(
constantPoolHandle
cp
,
int
index
)
{
bool
is_klass_reference
(
constantPoolHandle
cp
,
int
index
)
{
return
(
(
LinkWellKnownClasses
||
EnableInvokeDynamic
)
return
(
EnableInvokeDynamic
?
cp
->
tag_at
(
index
).
is_klass_or_reference
()
?
cp
->
tag_at
(
index
).
is_klass_or_reference
()
:
cp
->
tag_at
(
index
).
is_klass_reference
());
:
cp
->
tag_at
(
index
).
is_klass_reference
());
}
}
...
...
src/share/vm/classfile/systemDictionary.cpp
浏览文件 @
666e209e
...
@@ -291,16 +291,6 @@ Klass* SystemDictionary::resolve_super_or_fail(Symbol* child_name,
...
@@ -291,16 +291,6 @@ Klass* SystemDictionary::resolve_super_or_fail(Symbol* child_name,
Handle
protection_domain
,
Handle
protection_domain
,
bool
is_superclass
,
bool
is_superclass
,
TRAPS
)
{
TRAPS
)
{
// Try to get one of the well-known klasses.
// They are trusted, and do not participate in circularities.
if
(
LinkWellKnownClasses
)
{
Klass
*
k
=
find_well_known_klass
(
class_name
);
if
(
k
!=
NULL
)
{
return
k
;
}
}
// Double-check, if child class is already loaded, just return super-class,interface
// Double-check, if child class is already loaded, just return super-class,interface
// Don't add a placedholder if already loaded, i.e. already in system dictionary
// Don't add a placedholder if already loaded, i.e. already in system dictionary
// Make sure there's a placeholder for the *child* before resolving.
// Make sure there's a placeholder for the *child* before resolving.
...
@@ -926,14 +916,6 @@ Klass* SystemDictionary::find_instance_or_array_klass(Symbol* class_name,
...
@@ -926,14 +916,6 @@ Klass* SystemDictionary::find_instance_or_array_klass(Symbol* class_name,
Klass
*
k
=
NULL
;
Klass
*
k
=
NULL
;
assert
(
class_name
!=
NULL
,
"class name must be non NULL"
);
assert
(
class_name
!=
NULL
,
"class name must be non NULL"
);
// Try to get one of the well-known klasses.
if
(
LinkWellKnownClasses
)
{
k
=
find_well_known_klass
(
class_name
);
if
(
k
!=
NULL
)
{
return
k
;
}
}
if
(
FieldType
::
is_array
(
class_name
))
{
if
(
FieldType
::
is_array
(
class_name
))
{
// The name refers to an array. Parse the name.
// The name refers to an array. Parse the name.
// dimension and object_key in FieldArrayInfo are assigned as a
// dimension and object_key in FieldArrayInfo are assigned as a
...
@@ -954,41 +936,6 @@ Klass* SystemDictionary::find_instance_or_array_klass(Symbol* class_name,
...
@@ -954,41 +936,6 @@ Klass* SystemDictionary::find_instance_or_array_klass(Symbol* class_name,
return
k
;
return
k
;
}
}
// Quick range check for names of well-known classes:
static
Symbol
*
wk_klass_name_limits
[
2
]
=
{
NULL
,
NULL
};
#ifndef PRODUCT
static
int
find_wkk_calls
,
find_wkk_probes
,
find_wkk_wins
;
// counts for "hello world": 3983, 1616, 1075
// => 60% hit after limit guard, 25% total win rate
#endif
Klass
*
SystemDictionary
::
find_well_known_klass
(
Symbol
*
class_name
)
{
// A bounds-check on class_name will quickly get a negative result.
NOT_PRODUCT
(
find_wkk_calls
++
);
if
(
class_name
>=
wk_klass_name_limits
[
0
]
&&
class_name
<=
wk_klass_name_limits
[
1
])
{
NOT_PRODUCT
(
find_wkk_probes
++
);
vmSymbols
::
SID
sid
=
vmSymbols
::
find_sid
(
class_name
);
if
(
sid
!=
vmSymbols
::
NO_SID
)
{
Klass
*
k
=
NULL
;
switch
(
sid
)
{
#define WK_KLASS_CASE(name, symbol, option) \
case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \
if (option == Pre_Link) { \
k = WK_KLASS(name); \
} \
break;
WK_KLASSES_DO
(
WK_KLASS_CASE
)
#undef WK_KLASS_CASE
}
NOT_PRODUCT
(
if
(
k
!=
NULL
)
find_wkk_wins
++
);
return
k
;
}
}
return
NULL
;
}
// Note: this method is much like resolve_from_stream, but
// Note: this method is much like resolve_from_stream, but
// updates no supplemental data structures.
// updates no supplemental data structures.
// TODO consolidate the two methods with a helper routine?
// TODO consolidate the two methods with a helper routine?
...
@@ -1942,33 +1889,12 @@ void SystemDictionary::initialize_wk_klasses_until(WKID limit_id, WKID &start_id
...
@@ -1942,33 +1889,12 @@ void SystemDictionary::initialize_wk_klasses_until(WKID limit_id, WKID &start_id
int
opt
=
(
info
&
right_n_bits
(
CEIL_LG_OPTION_LIMIT
));
int
opt
=
(
info
&
right_n_bits
(
CEIL_LG_OPTION_LIMIT
));
initialize_wk_klass
((
WKID
)
id
,
opt
,
CHECK
);
initialize_wk_klass
((
WKID
)
id
,
opt
,
CHECK
);
// Update limits, so find_well_known_klass can be very fast:
Symbol
*
s
=
vmSymbols
::
symbol_at
((
vmSymbols
::
SID
)
sid
);
if
(
wk_klass_name_limits
[
1
]
==
NULL
)
{
wk_klass_name_limits
[
0
]
=
wk_klass_name_limits
[
1
]
=
s
;
}
else
if
(
wk_klass_name_limits
[
1
]
<
s
)
{
wk_klass_name_limits
[
1
]
=
s
;
}
else
if
(
wk_klass_name_limits
[
0
]
>
s
)
{
wk_klass_name_limits
[
0
]
=
s
;
}
}
}
// move the starting value forward to the limit:
// move the starting value forward to the limit:
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"
);
// Preload commonly used klasses
// Preload commonly used klasses
...
@@ -2023,8 +1949,6 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
...
@@ -2023,8 +1949,6 @@ 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
浏览文件 @
666e209e
...
@@ -94,45 +94,45 @@ class SymbolPropertyTable;
...
@@ -94,45 +94,45 @@ class SymbolPropertyTable;
#define WK_KLASSES_DO(do_klass) \
#define WK_KLASSES_DO(do_klass) \
/* well-known classes */
\
/* well-known classes */
\
do_klass(Object_klass, java_lang_Object, Pre
_Link
) \
do_klass(Object_klass, java_lang_Object, Pre
) \
do_klass(String_klass, java_lang_String, Pre
_Link
) \
do_klass(String_klass, java_lang_String, Pre
) \
do_klass(Class_klass, java_lang_Class, Pre
_Link
) \
do_klass(Class_klass, java_lang_Class, Pre
) \
do_klass(Cloneable_klass, java_lang_Cloneable, Pre
_Link
) \
do_klass(Cloneable_klass, java_lang_Cloneable, Pre
) \
do_klass(ClassLoader_klass, java_lang_ClassLoader, Pre
_Link
) \
do_klass(ClassLoader_klass, java_lang_ClassLoader, Pre
) \
do_klass(Serializable_klass, java_io_Serializable, Pre
_Link
) \
do_klass(Serializable_klass, java_io_Serializable, Pre
) \
do_klass(System_klass, java_lang_System, Pre
_Link
) \
do_klass(System_klass, java_lang_System, Pre
) \
do_klass(Throwable_klass, java_lang_Throwable, Pre
_Link
) \
do_klass(Throwable_klass, java_lang_Throwable, Pre
) \
do_klass(Error_klass, java_lang_Error, Pre
_Link
) \
do_klass(Error_klass, java_lang_Error, Pre
) \
do_klass(ThreadDeath_klass, java_lang_ThreadDeath, Pre
_Link
) \
do_klass(ThreadDeath_klass, java_lang_ThreadDeath, Pre
) \
do_klass(Exception_klass, java_lang_Exception, Pre
_Link
) \
do_klass(Exception_klass, java_lang_Exception, Pre
) \
do_klass(RuntimeException_klass, java_lang_RuntimeException, Pre
_Link
) \
do_klass(RuntimeException_klass, java_lang_RuntimeException, Pre
) \
do_klass(ProtectionDomain_klass, java_security_ProtectionDomain, Pre
_Link
) \
do_klass(ProtectionDomain_klass, java_security_ProtectionDomain, Pre
) \
do_klass(AccessControlContext_klass, java_security_AccessControlContext, Pre
_Link
) \
do_klass(AccessControlContext_klass, java_security_AccessControlContext, Pre
) \
do_klass(ClassNotFoundException_klass, java_lang_ClassNotFoundException, Pre
_Link
) \
do_klass(ClassNotFoundException_klass, java_lang_ClassNotFoundException, Pre
) \
do_klass(NoClassDefFoundError_klass, java_lang_NoClassDefFoundError, Pre
_Link
) \
do_klass(NoClassDefFoundError_klass, java_lang_NoClassDefFoundError, Pre
) \
do_klass(LinkageError_klass, java_lang_LinkageError, Pre
_Link
) \
do_klass(LinkageError_klass, java_lang_LinkageError, Pre
) \
do_klass(ClassCastException_klass, java_lang_ClassCastException, Pre
_Link
) \
do_klass(ClassCastException_klass, java_lang_ClassCastException, Pre
) \
do_klass(ArrayStoreException_klass, java_lang_ArrayStoreException, Pre
_Link
) \
do_klass(ArrayStoreException_klass, java_lang_ArrayStoreException, Pre
) \
do_klass(VirtualMachineError_klass, java_lang_VirtualMachineError, Pre
_Link
) \
do_klass(VirtualMachineError_klass, java_lang_VirtualMachineError, Pre
) \
do_klass(OutOfMemoryError_klass, java_lang_OutOfMemoryError, Pre
_Link
) \
do_klass(OutOfMemoryError_klass, java_lang_OutOfMemoryError, Pre
) \
do_klass(StackOverflowError_klass, java_lang_StackOverflowError, Pre
_Link
) \
do_klass(StackOverflowError_klass, java_lang_StackOverflowError, Pre
) \
do_klass(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre
_Link
) \
do_klass(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre
) \
do_klass(Reference_klass, java_lang_ref_Reference, Pre
_Link
) \
do_klass(Reference_klass, java_lang_ref_Reference, Pre
) \
\
\
/* Preload ref klasses and set reference types */
\
/* Preload ref klasses and set reference types */
\
do_klass(SoftReference_klass, java_lang_ref_SoftReference, Pre
_Link
) \
do_klass(SoftReference_klass, java_lang_ref_SoftReference, Pre
) \
do_klass(WeakReference_klass, java_lang_ref_WeakReference, Pre
_Link
) \
do_klass(WeakReference_klass, java_lang_ref_WeakReference, Pre
) \
do_klass(FinalReference_klass, java_lang_ref_FinalReference, Pre ) \
do_klass(FinalReference_klass, java_lang_ref_FinalReference, Pre ) \
do_klass(PhantomReference_klass, java_lang_ref_PhantomReference, Pre
_Link
) \
do_klass(PhantomReference_klass, java_lang_ref_PhantomReference, Pre
) \
do_klass(Finalizer_klass, java_lang_ref_Finalizer, Pre ) \
do_klass(Finalizer_klass, java_lang_ref_Finalizer, Pre ) \
\
\
do_klass(Thread_klass, java_lang_Thread, Pre
_Link
) \
do_klass(Thread_klass, java_lang_Thread, Pre
) \
do_klass(ThreadGroup_klass, java_lang_ThreadGroup, Pre
_Link
) \
do_klass(ThreadGroup_klass, java_lang_ThreadGroup, Pre
) \
do_klass(Properties_klass, java_util_Properties, Pre
_Link
) \
do_klass(Properties_klass, java_util_Properties, Pre
) \
do_klass(reflect_AccessibleObject_klass, java_lang_reflect_AccessibleObject, Pre
_Link
) \
do_klass(reflect_AccessibleObject_klass, java_lang_reflect_AccessibleObject, Pre
) \
do_klass(reflect_Field_klass, java_lang_reflect_Field, Pre
_Link
) \
do_klass(reflect_Field_klass, java_lang_reflect_Field, Pre
) \
do_klass(reflect_Method_klass, java_lang_reflect_Method, Pre
_Link
) \
do_klass(reflect_Method_klass, java_lang_reflect_Method, Pre
) \
do_klass(reflect_Constructor_klass, java_lang_reflect_Constructor, Pre
_Link
) \
do_klass(reflect_Constructor_klass, java_lang_reflect_Constructor, Pre
) \
\
\
/* 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. */
\
...
@@ -145,20 +145,20 @@ class SymbolPropertyTable;
...
@@ -145,20 +145,20 @@ class SymbolPropertyTable;
do_klass(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 */
\
do_klass(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_
Link
) \
do_klass(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_
JSR292
) \
do_klass(MemberName_klass, java_lang_invoke_MemberName, Pre
) \
do_klass(MemberName_klass, java_lang_invoke_MemberName, Pre
_JSR292
) \
do_klass(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre
) \
do_klass(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre
_JSR292
) \
do_klass(LambdaForm_klass, java_lang_invoke_LambdaForm, Opt ) \
do_klass(LambdaForm_klass, java_lang_invoke_LambdaForm, Opt ) \
do_klass(MethodType_klass, java_lang_invoke_MethodType, Pre_
Link
) \
do_klass(MethodType_klass, java_lang_invoke_MethodType, Pre_
JSR292
) \
do_klass(BootstrapMethodError_klass, java_lang_BootstrapMethodError, Pre_
Link
) \
do_klass(BootstrapMethodError_klass, java_lang_BootstrapMethodError, Pre_
JSR292
) \
do_klass(CallSite_klass, java_lang_invoke_CallSite, Pre_
Link
) \
do_klass(CallSite_klass, java_lang_invoke_CallSite, Pre_
JSR292
) \
do_klass(ConstantCallSite_klass, java_lang_invoke_ConstantCallSite, Pre_
Link
) \
do_klass(ConstantCallSite_klass, java_lang_invoke_ConstantCallSite, Pre_
JSR292
) \
do_klass(MutableCallSite_klass, java_lang_invoke_MutableCallSite, Pre_
Link
) \
do_klass(MutableCallSite_klass, java_lang_invoke_MutableCallSite, Pre_
JSR292
) \
do_klass(VolatileCallSite_klass, java_lang_invoke_VolatileCallSite, Pre_
Link
) \
do_klass(VolatileCallSite_klass, java_lang_invoke_VolatileCallSite, Pre_
JSR292
) \
/* Note: MethodHandle must be first, and VolatileCallSite last in group */
\
/* Note: MethodHandle must be first, and VolatileCallSite last in group */
\
\
\
do_klass(StringBuffer_klass, java_lang_StringBuffer, Pre
_Link
) \
do_klass(StringBuffer_klass, java_lang_StringBuffer, Pre
) \
do_klass(StringBuilder_klass, java_lang_StringBuilder, Pre
_Link
) \
do_klass(StringBuilder_klass, java_lang_StringBuilder, Pre
) \
\
\
/* It's NULL in non-1.4 JDKs. */
\
/* It's NULL in non-1.4 JDKs. */
\
do_klass(StackTraceElement_klass, java_lang_StackTraceElement, Opt ) \
do_klass(StackTraceElement_klass, java_lang_StackTraceElement, Opt ) \
...
@@ -171,14 +171,14 @@ class SymbolPropertyTable;
...
@@ -171,14 +171,14 @@ class SymbolPropertyTable;
do_klass(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt ) \
do_klass(PostVMInitHook_klass, sun_misc_PostVMInitHook, Opt ) \
\
\
/* Preload boxing klasses */
\
/* Preload boxing klasses */
\
do_klass(Boolean_klass, java_lang_Boolean, Pre
_Link
) \
do_klass(Boolean_klass, java_lang_Boolean, Pre
) \
do_klass(Character_klass, java_lang_Character, Pre
_Link
) \
do_klass(Character_klass, java_lang_Character, Pre
) \
do_klass(Float_klass, java_lang_Float, Pre
_Link
) \
do_klass(Float_klass, java_lang_Float, Pre
) \
do_klass(Double_klass, java_lang_Double, Pre
_Link
) \
do_klass(Double_klass, java_lang_Double, Pre
) \
do_klass(Byte_klass, java_lang_Byte, Pre
_Link
) \
do_klass(Byte_klass, java_lang_Byte, Pre
) \
do_klass(Short_klass, java_lang_Short, Pre
_Link
) \
do_klass(Short_klass, java_lang_Short, Pre
) \
do_klass(Integer_klass, java_lang_Integer, Pre
_Link
) \
do_klass(Integer_klass, java_lang_Integer, Pre
) \
do_klass(Long_klass, java_lang_Long, Pre
_Link
) \
do_klass(Long_klass, java_lang_Long, Pre
) \
/*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_
Link
,
// preloaded; error if not present; link as well-known
Pre_
JSR292
,
// preloaded if EnableInvokeDynamic
// 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.
...
@@ -280,9 +280,6 @@ public:
...
@@ -280,9 +280,6 @@ public:
Handle
protection_domain
,
Handle
protection_domain
,
TRAPS
);
TRAPS
);
// If the given name is known to vmSymbols, return the well-know klass:
static
Klass
*
find_well_known_klass
(
Symbol
*
class_name
);
// Lookup an instance or array class that has already been loaded
// Lookup an instance or array class that has already been loaded
// either into the given class loader, or else into another class
// either into the given class loader, or else into another class
// loader that is constrained (via loader constraints) to produce
// loader that is constrained (via loader constraints) to produce
...
@@ -393,7 +390,7 @@ public:
...
@@ -393,7 +390,7 @@ public:
}
}
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_
Link
(
Klass
*
k
)
{
return
check_klass
(
k
)
;
}
static
Klass
*
check_klass_Pre_
JSR292
(
Klass
*
k
)
{
return
EnableInvokeDynamic
?
check_klass
(
k
)
:
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
)
{
...
@@ -413,8 +410,6 @@ public:
...
@@ -413,8 +410,6 @@ 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/prims/methodHandles.cpp
浏览文件 @
666e209e
...
@@ -563,15 +563,6 @@ static oop field_signature_type_or_null(Symbol* s) {
...
@@ -563,15 +563,6 @@ static oop field_signature_type_or_null(Symbol* s) {
return
Klass
::
cast
(
SystemDictionary
::
Class_klass
())
->
java_mirror
();
return
Klass
::
cast
(
SystemDictionary
::
Class_klass
())
->
java_mirror
();
}
else
if
(
s
==
vmSymbols
::
string_signature
())
{
}
else
if
(
s
==
vmSymbols
::
string_signature
())
{
return
Klass
::
cast
(
SystemDictionary
::
String_klass
())
->
java_mirror
();
return
Klass
::
cast
(
SystemDictionary
::
String_klass
())
->
java_mirror
();
}
else
{
int
len
=
s
->
utf8_length
();
if
(
s
->
byte_at
(
0
)
==
'L'
&&
s
->
byte_at
(
len
-
1
)
==
';'
)
{
TempNewSymbol
cname
=
SymbolTable
::
probe
((
const
char
*
)
&
s
->
bytes
()[
1
],
len
-
2
);
if
(
cname
==
NULL
)
return
NULL
;
Klass
*
wkk
=
SystemDictionary
::
find_well_known_klass
(
cname
);
if
(
wkk
==
NULL
)
return
NULL
;
return
Klass
::
cast
(
wkk
)
->
java_mirror
();
}
}
}
}
}
return
NULL
;
return
NULL
;
...
...
src/share/vm/runtime/globals.hpp
浏览文件 @
666e209e
...
@@ -1000,9 +1000,6 @@ class CommandLineFlags {
...
@@ -1000,9 +1000,6 @@ class CommandLineFlags {
product(bool, ClassUnloading, true, \
product(bool, ClassUnloading, true, \
"Do unloading of classes") \
"Do unloading of classes") \
\
\
diagnostic(bool, LinkWellKnownClasses, true, \
"Resolve a well known class as soon as its name is seen") \
\
develop(bool, DisableStartThread, false, \
develop(bool, DisableStartThread, false, \
"Disable starting of additional Java threads " \
"Disable starting of additional Java threads " \
"(for debugging only)") \
"(for debugging only)") \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录