Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
63a362e0
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看板
提交
63a362e0
编写于
10月 22, 2012
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8000821: JSR 292: C1 fails to call virtual method (JRUBY-6920)
Reviewed-by: kvn
上级
03ed0bf9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
16 deletion
+25
-16
src/share/vm/c1/c1_GraphBuilder.cpp
src/share/vm/c1/c1_GraphBuilder.cpp
+25
-16
未找到文件。
src/share/vm/c1/c1_GraphBuilder.cpp
浏览文件 @
63a362e0
...
@@ -1844,17 +1844,12 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
...
@@ -1844,17 +1844,12 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
code
==
Bytecodes
::
_invokevirtual
&&
target
->
is_final_method
()
||
code
==
Bytecodes
::
_invokevirtual
&&
target
->
is_final_method
()
||
code
==
Bytecodes
::
_invokedynamic
)
{
code
==
Bytecodes
::
_invokedynamic
)
{
ciMethod
*
inline_target
=
(
cha_monomorphic_target
!=
NULL
)
?
cha_monomorphic_target
:
target
;
ciMethod
*
inline_target
=
(
cha_monomorphic_target
!=
NULL
)
?
cha_monomorphic_target
:
target
;
bool
success
=
false
;
// static binding => check if callee is ok
if
(
target
->
is_method_handle_intrinsic
())
{
bool
success
=
try_inline
(
inline_target
,
(
cha_monomorphic_target
!=
NULL
)
||
(
exact_target
!=
NULL
),
code
,
better_receiver
);
// method handle invokes
success
=
try_method_handle_inline
(
target
);
}
else
{
// static binding => check if callee is ok
success
=
try_inline
(
inline_target
,
(
cha_monomorphic_target
!=
NULL
)
||
(
exact_target
!=
NULL
),
code
,
better_receiver
);
}
CHECK_BAILOUT
();
CHECK_BAILOUT
();
clear_inline_bailout
();
clear_inline_bailout
();
if
(
success
)
{
if
(
success
)
{
// Register dependence if JVMTI has either breakpoint
// Register dependence if JVMTI has either breakpoint
// setting or hotswapping of methods capabilities since they may
// setting or hotswapping of methods capabilities since they may
...
@@ -3201,6 +3196,11 @@ bool GraphBuilder::try_inline(ciMethod* callee, bool holder_known, Bytecodes::Co
...
@@ -3201,6 +3196,11 @@ bool GraphBuilder::try_inline(ciMethod* callee, bool holder_known, Bytecodes::Co
return
false
;
return
false
;
}
}
// method handle invokes
if
(
callee
->
is_method_handle_intrinsic
())
{
return
try_method_handle_inline
(
callee
);
}
// handle intrinsics
// handle intrinsics
if
(
callee
->
intrinsic_id
()
!=
vmIntrinsics
::
_none
)
{
if
(
callee
->
intrinsic_id
()
!=
vmIntrinsics
::
_none
)
{
if
(
try_inline_intrinsics
(
callee
))
{
if
(
try_inline_intrinsics
(
callee
))
{
...
@@ -3885,10 +3885,14 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee) {
...
@@ -3885,10 +3885,14 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee) {
ValueType
*
type
=
state
()
->
stack_at
(
args_base
)
->
type
();
ValueType
*
type
=
state
()
->
stack_at
(
args_base
)
->
type
();
if
(
type
->
is_constant
())
{
if
(
type
->
is_constant
())
{
ciMethod
*
target
=
type
->
as_ObjectType
()
->
constant_value
()
->
as_method_handle
()
->
get_vmtarget
();
ciMethod
*
target
=
type
->
as_ObjectType
()
->
constant_value
()
->
as_method_handle
()
->
get_vmtarget
();
guarantee
(
!
target
->
is_method_handle_intrinsic
(),
"should not happen"
);
// XXX remove
// We don't do CHA here so only inline static and statically bindable methods.
Bytecodes
::
Code
bc
=
target
->
is_static
()
?
Bytecodes
::
_invokestatic
:
Bytecodes
::
_invokevirtual
;
if
(
target
->
is_static
()
||
target
->
can_be_statically_bound
())
{
if
(
try_inline
(
target
,
/*holder_known*/
true
,
bc
))
{
Bytecodes
::
Code
bc
=
target
->
is_static
()
?
Bytecodes
::
_invokestatic
:
Bytecodes
::
_invokevirtual
;
return
true
;
if
(
try_inline
(
target
,
/*holder_known*/
true
,
bc
))
{
return
true
;
}
}
else
{
print_inlining
(
target
,
"not static or statically bindable"
,
/*success*/
false
);
}
}
}
else
{
}
else
{
print_inlining
(
callee
,
"receiver not constant"
,
/*success*/
false
);
print_inlining
(
callee
,
"receiver not constant"
,
/*success*/
false
);
...
@@ -3941,9 +3945,14 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee) {
...
@@ -3941,9 +3945,14 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee) {
}
}
j
+=
t
->
size
();
// long and double take two slots
j
+=
t
->
size
();
// long and double take two slots
}
}
Bytecodes
::
Code
bc
=
target
->
is_static
()
?
Bytecodes
::
_invokestatic
:
Bytecodes
::
_invokevirtual
;
// We don't do CHA here so only inline static and statically bindable methods.
if
(
try_inline
(
target
,
/*holder_known*/
true
,
bc
))
{
if
(
target
->
is_static
()
||
target
->
can_be_statically_bound
())
{
return
true
;
Bytecodes
::
Code
bc
=
target
->
is_static
()
?
Bytecodes
::
_invokestatic
:
Bytecodes
::
_invokevirtual
;
if
(
try_inline
(
target
,
/*holder_known*/
true
,
bc
))
{
return
true
;
}
}
else
{
print_inlining
(
target
,
"not static or statically bindable"
,
/*success*/
false
);
}
}
}
}
}
else
{
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录