Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c17f76e1
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看板
提交
c17f76e1
编写于
1月 31, 2012
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7132180: JSR 292: C1 JVM crash with ClassValue/MethodHandle
Reviewed-by: never
上级
4fc92aab
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
54 addition
and
49 deletion
+54
-49
src/share/vm/c1/c1_GraphBuilder.cpp
src/share/vm/c1/c1_GraphBuilder.cpp
+54
-49
未找到文件。
src/share/vm/c1/c1_GraphBuilder.cpp
浏览文件 @
c17f76e1
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -3683,56 +3683,61 @@ bool GraphBuilder::for_method_handle_inline(ciMethod* callee) {
// Get the two MethodHandle inputs from the Phi.
Value
op1
=
phi
->
operand_at
(
0
);
Value
op2
=
phi
->
operand_at
(
1
);
ciMethodHandle
*
mh1
=
op1
->
type
()
->
as_ObjectType
()
->
constant_value
()
->
as_method_handle
();
ciMethodHandle
*
mh2
=
op2
->
type
()
->
as_ObjectType
()
->
constant_value
()
->
as_method_handle
();
// Set the callee to have access to the class and signature in
// the MethodHandleCompiler.
mh1
->
set_callee
(
callee
);
mh1
->
set_caller
(
method
());
mh2
->
set_callee
(
callee
);
mh2
->
set_caller
(
method
());
// Get adapters for the MethodHandles.
ciMethod
*
mh1_adapter
=
mh1
->
get_method_handle_adapter
();
ciMethod
*
mh2_adapter
=
mh2
->
get_method_handle_adapter
();
if
(
mh1_adapter
!=
NULL
&&
mh2_adapter
!=
NULL
)
{
set_inline_cleanup_info
();
// Build the If guard
BlockBegin
*
one
=
new
BlockBegin
(
next_bci
());
BlockBegin
*
two
=
new
BlockBegin
(
next_bci
());
BlockBegin
*
end
=
new
BlockBegin
(
next_bci
());
Instruction
*
iff
=
append
(
new
If
(
phi
,
If
::
eql
,
false
,
op1
,
one
,
two
,
NULL
,
false
));
block
()
->
set_end
(
iff
->
as_BlockEnd
());
// Connect up the states
one
->
merge
(
block
()
->
end
()
->
state
());
two
->
merge
(
block
()
->
end
()
->
state
());
// Save the state for the second inlinee
ValueStack
*
state_before
=
copy_state_before
();
// Parse first adapter
_last
=
_block
=
one
;
if
(
!
try_inline_full
(
mh1_adapter
,
/*holder_known=*/
true
,
end
))
{
restore_inline_cleanup_info
();
block
()
->
clear_end
();
// remove appended iff
return
false
;
}
ObjectType
*
op1type
=
op1
->
type
()
->
as_ObjectType
();
ObjectType
*
op2type
=
op2
->
type
()
->
as_ObjectType
();
if
(
op1type
->
is_constant
()
&&
op2type
->
is_constant
())
{
ciMethodHandle
*
mh1
=
op1type
->
constant_value
()
->
as_method_handle
();
ciMethodHandle
*
mh2
=
op2type
->
constant_value
()
->
as_method_handle
();
// Set the callee to have access to the class and signature in
// the MethodHandleCompiler.
mh1
->
set_callee
(
callee
);
mh1
->
set_caller
(
method
());
mh2
->
set_callee
(
callee
);
mh2
->
set_caller
(
method
());
// Get adapters for the MethodHandles.
ciMethod
*
mh1_adapter
=
mh1
->
get_method_handle_adapter
();
ciMethod
*
mh2_adapter
=
mh2
->
get_method_handle_adapter
();
if
(
mh1_adapter
!=
NULL
&&
mh2_adapter
!=
NULL
)
{
set_inline_cleanup_info
();
// Build the If guard
BlockBegin
*
one
=
new
BlockBegin
(
next_bci
());
BlockBegin
*
two
=
new
BlockBegin
(
next_bci
());
BlockBegin
*
end
=
new
BlockBegin
(
next_bci
());
Instruction
*
iff
=
append
(
new
If
(
phi
,
If
::
eql
,
false
,
op1
,
one
,
two
,
NULL
,
false
));
block
()
->
set_end
(
iff
->
as_BlockEnd
());
// Connect up the states
one
->
merge
(
block
()
->
end
()
->
state
());
two
->
merge
(
block
()
->
end
()
->
state
());
// Save the state for the second inlinee
ValueStack
*
state_before
=
copy_state_before
();
// Parse first adapter
_last
=
_block
=
one
;
if
(
!
try_inline_full
(
mh1_adapter
,
/*holder_known=*/
true
,
end
))
{
restore_inline_cleanup_info
();
block
()
->
clear_end
();
// remove appended iff
return
false
;
}
// Parse second adapter
_last
=
_block
=
two
;
_state
=
state_before
;
if
(
!
try_inline_full
(
mh2_adapter
,
/*holder_known=*/
true
,
end
))
{
restore_inline_cleanup_info
();
block
()
->
clear_end
();
// remove appended iff
return
false
;
}
// Parse second adapter
_last
=
_block
=
two
;
_state
=
state_before
;
if
(
!
try_inline_full
(
mh2_adapter
,
/*holder_known=*/
true
,
end
))
{
restore_inline_cleanup_info
();
block
()
->
clear_end
();
// remove appended iff
return
false
;
}
connect_to_end
(
end
);
return
true
;
connect_to_end
(
end
);
return
true
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录