Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3c387a77
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看板
You need to sign in or sign up before continuing.
提交
3c387a77
编写于
12月 03, 2013
作者:
S
sspitsyn
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
491540d9
0faaca5a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
6 deletion
+30
-6
src/share/vm/classfile/defaultMethods.cpp
src/share/vm/classfile/defaultMethods.cpp
+3
-3
src/share/vm/interpreter/linkResolver.cpp
src/share/vm/interpreter/linkResolver.cpp
+2
-2
src/share/vm/oops/instanceKlass.cpp
src/share/vm/oops/instanceKlass.cpp
+11
-0
src/share/vm/oops/instanceKlass.hpp
src/share/vm/oops/instanceKlass.hpp
+1
-0
src/share/vm/oops/klassVtable.cpp
src/share/vm/oops/klassVtable.cpp
+13
-1
未找到文件。
src/share/vm/classfile/defaultMethods.cpp
浏览文件 @
3c387a77
...
...
@@ -625,13 +625,13 @@ static GrowableArray<EmptyVtableSlot*>* find_empty_vtable_slots(
while
(
super
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
super
->
methods
()
->
length
();
++
i
)
{
Method
*
m
=
super
->
methods
()
->
at
(
i
);
if
(
m
->
is_overpass
())
{
if
(
m
->
is_overpass
()
||
m
->
is_static
()
)
{
// m is a method that would have been a miranda if not for the
// default method processing that occurred on behalf of our superclass,
// so it's a method we want to re-examine in this new context. That is,
// unless we have a real implementation of it in the current class.
Method
*
impl
=
klass
->
lookup_method
(
m
->
name
(),
m
->
signature
());
if
(
impl
==
NULL
||
impl
->
is_overpass
())
{
if
(
impl
==
NULL
||
impl
->
is_overpass
()
||
impl
->
is_static
()
)
{
if
(
!
already_in_vtable_slots
(
slots
,
m
))
{
slots
->
append
(
new
EmptyVtableSlot
(
m
));
}
...
...
@@ -648,7 +648,7 @@ static GrowableArray<EmptyVtableSlot*>* find_empty_vtable_slots(
// so it's a method we want to re-examine in this new context. That is,
// unless we have a real implementation of it in the current class.
Method
*
impl
=
klass
->
lookup_method
(
m
->
name
(),
m
->
signature
());
if
(
impl
==
NULL
||
impl
->
is_overpass
())
{
if
(
impl
==
NULL
||
impl
->
is_overpass
()
||
impl
->
is_static
()
)
{
if
(
!
already_in_vtable_slots
(
slots
,
m
))
{
slots
->
append
(
new
EmptyVtableSlot
(
m
));
}
...
...
src/share/vm/interpreter/linkResolver.cpp
浏览文件 @
3c387a77
...
...
@@ -267,8 +267,8 @@ void LinkResolver::lookup_instance_method_in_klasses(methodHandle& result, Klass
Method
*
result_oop
=
klass
->
uncached_lookup_method
(
name
,
signature
);
result
=
methodHandle
(
THREAD
,
result_oop
);
while
(
!
result
.
is_null
()
&&
result
->
is_static
()
&&
result
->
method_holder
()
->
super
()
!=
NULL
)
{
klass
=
KlassHandle
(
THREAD
,
result
->
method_holder
()
->
super
());
result
=
methodHandle
(
THREAD
,
klass
->
uncached_lookup_method
(
name
,
signature
));
KlassHandle
super_
klass
=
KlassHandle
(
THREAD
,
result
->
method_holder
()
->
super
());
result
=
methodHandle
(
THREAD
,
super_
klass
->
uncached_lookup_method
(
name
,
signature
));
}
if
(
result
.
is_null
())
{
...
...
src/share/vm/oops/instanceKlass.cpp
浏览文件 @
3c387a77
...
...
@@ -1427,6 +1427,17 @@ Method* InstanceKlass::find_method(Symbol* name, Symbol* signature) const {
return
InstanceKlass
::
find_method
(
methods
(),
name
,
signature
);
}
// find_instance_method looks up the name/signature in the local methods array
// and skips over static methods
Method
*
InstanceKlass
::
find_instance_method
(
Array
<
Method
*>*
methods
,
Symbol
*
name
,
Symbol
*
signature
)
{
Method
*
meth
=
InstanceKlass
::
find_method
(
methods
,
name
,
signature
);
if
(
meth
!=
NULL
&&
meth
->
is_static
())
{
meth
=
NULL
;
}
return
meth
;
}
// find_method looks up the name/signature in the local methods array
Method
*
InstanceKlass
::
find_method
(
Array
<
Method
*>*
methods
,
Symbol
*
name
,
Symbol
*
signature
)
{
...
...
src/share/vm/oops/instanceKlass.hpp
浏览文件 @
3c387a77
...
...
@@ -515,6 +515,7 @@ class InstanceKlass: public Klass {
// find a local method (returns NULL if not found)
Method
*
find_method
(
Symbol
*
name
,
Symbol
*
signature
)
const
;
static
Method
*
find_method
(
Array
<
Method
*>*
methods
,
Symbol
*
name
,
Symbol
*
signature
);
static
Method
*
find_instance_method
(
Array
<
Method
*>*
methods
,
Symbol
*
name
,
Symbol
*
signature
);
// find a local method index in default_methods (returns -1 if not found)
static
int
find_method_index
(
Array
<
Method
*>*
methods
,
Symbol
*
name
,
Symbol
*
signature
);
...
...
src/share/vm/oops/klassVtable.cpp
浏览文件 @
3c387a77
...
...
@@ -665,6 +665,11 @@ bool klassVtable::is_miranda_entry_at(int i) {
// check if a method is a miranda method, given a class's methods table,
// its default_method table and its super
// Miranda methods are calculated twice:
// first: before vtable size calculation: including abstract and default
// This is seen by default method creation
// Second: recalculated during vtable initialization: only abstract
// This is seen by link resolution and selection.
// "miranda" means not static, not defined by this class.
// private methods in interfaces do not belong in the miranda list.
// the caller must make sure that the method belongs to an interface implemented by the class
...
...
@@ -678,7 +683,8 @@ bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods,
}
Symbol
*
name
=
m
->
name
();
Symbol
*
signature
=
m
->
signature
();
if
(
InstanceKlass
::
find_method
(
class_methods
,
name
,
signature
)
==
NULL
)
{
if
(
InstanceKlass
::
find_instance_method
(
class_methods
,
name
,
signature
)
==
NULL
)
{
// did not find it in the method table of the current class
if
((
default_methods
==
NULL
)
||
InstanceKlass
::
find_method
(
default_methods
,
name
,
signature
)
==
NULL
)
{
...
...
@@ -688,6 +694,12 @@ bool klassVtable::is_miranda(Method* m, Array<Method*>* class_methods,
}
Method
*
mo
=
InstanceKlass
::
cast
(
super
)
->
lookup_method
(
name
,
signature
);
while
(
mo
!=
NULL
&&
mo
->
access_flags
().
is_static
()
&&
mo
->
method_holder
()
!=
NULL
&&
mo
->
method_holder
()
->
super
()
!=
NULL
)
{
mo
=
mo
->
method_holder
()
->
super
()
->
uncached_lookup_method
(
name
,
signature
);
}
if
(
mo
==
NULL
||
mo
->
access_flags
().
is_private
()
)
{
// super class hierarchy does not implement it or protection is different
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录