Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c56e2833
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看板
提交
c56e2833
编写于
10月 08, 2019
作者:
M
mbalao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8225261: Better method resolutions
Reviewed-by: andrew Contributed-by: lois.foltan@oracle.com
上级
3c494420
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
5 deletion
+8
-5
src/share/vm/oops/klassVtable.cpp
src/share/vm/oops/klassVtable.cpp
+8
-5
未找到文件。
src/share/vm/oops/klassVtable.cpp
浏览文件 @
c56e2833
...
@@ -289,22 +289,25 @@ InstanceKlass* klassVtable::find_transitive_override(InstanceKlass* initialsuper
...
@@ -289,22 +289,25 @@ InstanceKlass* klassVtable::find_transitive_override(InstanceKlass* initialsuper
int
vtable_index
,
Handle
target_loader
,
Symbol
*
target_classname
,
Thread
*
THREAD
)
{
int
vtable_index
,
Handle
target_loader
,
Symbol
*
target_classname
,
Thread
*
THREAD
)
{
InstanceKlass
*
superk
=
initialsuper
;
InstanceKlass
*
superk
=
initialsuper
;
while
(
superk
!=
NULL
&&
superk
->
super
()
!=
NULL
)
{
while
(
superk
!=
NULL
&&
superk
->
super
()
!=
NULL
)
{
InstanceKlass
*
supersuperklass
=
InstanceKlass
::
cast
(
superk
->
super
());
klassVtable
*
ssVtable
=
(
superk
->
super
())
->
vtable
();
klassVtable
*
ssVtable
=
supersuperklass
->
vtable
();
if
(
vtable_index
<
ssVtable
->
length
())
{
if
(
vtable_index
<
ssVtable
->
length
())
{
Method
*
super_method
=
ssVtable
->
method_at
(
vtable_index
);
Method
*
super_method
=
ssVtable
->
method_at
(
vtable_index
);
// get the class holding the matching method
// make sure you use that class for is_override
InstanceKlass
*
supermethodholder
=
super_method
->
method_holder
();
#ifndef PRODUCT
#ifndef PRODUCT
Symbol
*
name
=
target_method
()
->
name
();
Symbol
*
name
=
target_method
()
->
name
();
Symbol
*
signature
=
target_method
()
->
signature
();
Symbol
*
signature
=
target_method
()
->
signature
();
assert
(
super_method
->
name
()
==
name
&&
super_method
->
signature
()
==
signature
,
"vtable entry name/sig mismatch"
);
assert
(
super_method
->
name
()
==
name
&&
super_method
->
signature
()
==
signature
,
"vtable entry name/sig mismatch"
);
#endif
#endif
if
(
supersuperklass
->
is_override
(
super_method
,
target_loader
,
target_classname
,
THREAD
))
{
if
(
supermethodholder
->
is_override
(
super_method
,
target_loader
,
target_classname
,
THREAD
))
{
#ifndef PRODUCT
#ifndef PRODUCT
if
(
PrintVtables
&&
Verbose
)
{
if
(
PrintVtables
&&
Verbose
)
{
ResourceMark
rm
(
THREAD
);
ResourceMark
rm
(
THREAD
);
char
*
sig
=
target_method
()
->
name_and_sig_as_C_string
();
char
*
sig
=
target_method
()
->
name_and_sig_as_C_string
();
tty
->
print
(
"transitive overriding superclass %s with %s::%s index %d, original flags: "
,
tty
->
print
(
"transitive overriding superclass %s with %s::%s index %d, original flags: "
,
super
superklass
->
internal_name
(),
super
methodholder
->
internal_name
(),
_klass
->
internal_name
(),
sig
,
vtable_index
);
_klass
->
internal_name
(),
sig
,
vtable_index
);
super_method
->
access_flags
().
print_on
(
tty
);
super_method
->
access_flags
().
print_on
(
tty
);
if
(
super_method
->
is_default_method
())
{
if
(
super_method
->
is_default_method
())
{
...
@@ -656,7 +659,7 @@ bool klassVtable::needs_new_vtable_entry(methodHandle target_method,
...
@@ -656,7 +659,7 @@ bool klassVtable::needs_new_vtable_entry(methodHandle target_method,
// search through the super class hierarchy to see if we need
// search through the super class hierarchy to see if we need
// a new entry
// a new entry
ResourceMark
rm
;
ResourceMark
rm
(
THREAD
)
;
Symbol
*
name
=
target_method
()
->
name
();
Symbol
*
name
=
target_method
()
->
name
();
Symbol
*
signature
=
target_method
()
->
signature
();
Symbol
*
signature
=
target_method
()
->
signature
();
Klass
*
k
=
super
;
Klass
*
k
=
super
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录