Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
f221e543
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看板
提交
f221e543
编写于
9月 10, 2008
作者:
K
kvn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6746907: Improve implicit null check generation
Summary: add missing implicit null check cases. Reviewed-by: never
上级
d1e185b7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
0 deletion
+9
-0
src/share/vm/opto/graphKit.cpp
src/share/vm/opto/graphKit.cpp
+2
-0
src/share/vm/opto/lcm.cpp
src/share/vm/opto/lcm.cpp
+7
-0
未找到文件。
src/share/vm/opto/graphKit.cpp
浏览文件 @
f221e543
...
@@ -1212,6 +1212,7 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
...
@@ -1212,6 +1212,7 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
Deoptimization
::
Action_make_not_entrant
,
Deoptimization
::
Action_make_not_entrant
,
NULL
,
"assert_null"
);
NULL
,
"assert_null"
);
}
else
{
}
else
{
replace_in_map
(
value
,
zerocon
(
type
));
builtin_throw
(
reason
);
builtin_throw
(
reason
);
}
}
}
}
...
@@ -1960,6 +1961,7 @@ Node* GraphKit::null_check_oop(Node* value, Node* *null_control,
...
@@ -1960,6 +1961,7 @@ Node* GraphKit::null_check_oop(Node* value, Node* *null_control,
// method will be compiled to handle NULLs.
// method will be compiled to handle NULLs.
PreserveJVMState
pjvms
(
this
);
PreserveJVMState
pjvms
(
this
);
set_control
(
*
null_control
);
set_control
(
*
null_control
);
replace_in_map
(
value
,
null
());
uncommon_trap
(
Deoptimization
::
Reason_null_check
,
uncommon_trap
(
Deoptimization
::
Reason_null_check
,
Deoptimization
::
Action_make_not_entrant
);
Deoptimization
::
Action_make_not_entrant
);
(
*
null_control
)
=
top
();
// NULL path is dead
(
*
null_control
)
=
top
();
// NULL path is dead
...
...
src/share/vm/opto/lcm.cpp
浏览文件 @
f221e543
...
@@ -58,6 +58,9 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
...
@@ -58,6 +58,9 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
not_null_block
=
_succs
[
0
];
not_null_block
=
_succs
[
0
];
null_block
=
_succs
[
1
];
null_block
=
_succs
[
1
];
}
}
while
(
null_block
->
is_Empty
()
==
Block
::
empty_with_goto
)
{
null_block
=
null_block
->
_succs
[
0
];
}
// Search the exception block for an uncommon trap.
// Search the exception block for an uncommon trap.
// (See Parse::do_if and Parse::do_ifnull for the reason
// (See Parse::do_if and Parse::do_ifnull for the reason
...
@@ -149,6 +152,10 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
...
@@ -149,6 +152,10 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
const
TypePtr
*
adr_type
=
NULL
;
// Do not need this return value here
const
TypePtr
*
adr_type
=
NULL
;
// Do not need this return value here
const
Node
*
base
=
mach
->
get_base_and_disp
(
offset
,
adr_type
);
const
Node
*
base
=
mach
->
get_base_and_disp
(
offset
,
adr_type
);
if
(
base
==
NULL
||
base
==
NodeSentinel
)
{
if
(
base
==
NULL
||
base
==
NodeSentinel
)
{
// Narrow oop address doesn't have base, only index
if
(
val
->
bottom_type
()
->
isa_narrowoop
()
&&
MacroAssembler
::
needs_explicit_null_check
(
offset
)
)
continue
;
// Give up if offset is beyond page size
// cannot reason about it; is probably not implicit null exception
// cannot reason about it; is probably not implicit null exception
}
else
{
}
else
{
const
TypePtr
*
tptr
=
base
->
bottom_type
()
->
is_ptr
();
const
TypePtr
*
tptr
=
base
->
bottom_type
()
->
is_ptr
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录