Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
a627b6a7
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看板
提交
a627b6a7
编写于
4月 04, 2013
作者:
N
neliasso
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8006014: Memory leak in hotspot/src/share/vm/adlc/dfa.cpp
Reviewed-by: kvn, roland Contributed-by: niclas.adlertz@oracle.com
上级
76c2a9ec
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
14 deletion
+27
-14
src/share/vm/adlc/dfa.cpp
src/share/vm/adlc/dfa.cpp
+27
-14
未找到文件。
src/share/vm/adlc/dfa.cpp
浏览文件 @
a627b6a7
...
...
@@ -191,12 +191,19 @@ static void cost_check(FILE *fp, const char *spaces,
// Macro equivalent to: _kids[0]->valid(FOO) && _kids[1]->valid(BAR)
//
static
void
child_test
(
FILE
*
fp
,
MatchList
&
mList
)
{
if
(
mList
.
_lchild
)
// If left child, check it
fprintf
(
fp
,
"STATE__VALID_CHILD(_kids[0], %s)"
,
ArchDesc
::
getMachOperEnum
(
mList
.
_lchild
));
if
(
mList
.
_lchild
&&
mList
.
_rchild
)
// If both, add the "&&"
fprintf
(
fp
,
" && "
);
if
(
mList
.
_rchild
)
// If right child, check it
fprintf
(
fp
,
"STATE__VALID_CHILD(_kids[1], %s)"
,
ArchDesc
::
getMachOperEnum
(
mList
.
_rchild
));
if
(
mList
.
_lchild
)
{
// If left child, check it
const
char
*
lchild_to_upper
=
ArchDesc
::
getMachOperEnum
(
mList
.
_lchild
);
fprintf
(
fp
,
"STATE__VALID_CHILD(_kids[0], %s)"
,
lchild_to_upper
);
delete
[]
lchild_to_upper
;
}
if
(
mList
.
_lchild
&&
mList
.
_rchild
)
{
// If both, add the "&&"
fprintf
(
fp
,
" && "
);
}
if
(
mList
.
_rchild
)
{
// If right child, check it
const
char
*
rchild_to_upper
=
ArchDesc
::
getMachOperEnum
(
mList
.
_rchild
);
fprintf
(
fp
,
"STATE__VALID_CHILD(_kids[1], %s)"
,
rchild_to_upper
);
delete
[]
rchild_to_upper
;
}
}
//---------------------------calc_cost-----------------------------------------
...
...
@@ -206,13 +213,17 @@ static void child_test(FILE *fp, MatchList &mList) {
Expr
*
ArchDesc
::
calc_cost
(
FILE
*
fp
,
const
char
*
spaces
,
MatchList
&
mList
,
ProductionState
&
status
)
{
fprintf
(
fp
,
"%sunsigned int c = "
,
spaces
);
Expr
*
c
=
new
Expr
(
"0"
);
if
(
mList
.
_lchild
)
{
// If left child, add it in
sprintf
(
Expr
::
buffer
(),
"_kids[0]->_cost[%s]"
,
ArchDesc
::
getMachOperEnum
(
mList
.
_lchild
));
if
(
mList
.
_lchild
)
{
// If left child, add it in
const
char
*
lchild_to_upper
=
ArchDesc
::
getMachOperEnum
(
mList
.
_lchild
);
sprintf
(
Expr
::
buffer
(),
"_kids[0]->_cost[%s]"
,
lchild_to_upper
);
c
->
add
(
Expr
::
buffer
());
delete
[]
lchild_to_upper
;
}
if
(
mList
.
_rchild
)
{
// If right child, add it in
sprintf
(
Expr
::
buffer
(),
"_kids[1]->_cost[%s]"
,
ArchDesc
::
getMachOperEnum
(
mList
.
_rchild
));
if
(
mList
.
_rchild
)
{
// If right child, add it in
const
char
*
rchild_to_upper
=
ArchDesc
::
getMachOperEnum
(
mList
.
_rchild
);
sprintf
(
Expr
::
buffer
(),
"_kids[1]->_cost[%s]"
,
rchild_to_upper
);
c
->
add
(
Expr
::
buffer
());
delete
[]
rchild_to_upper
;
}
// Add in cost of this rule
const
char
*
mList_cost
=
mList
.
get_cost
();
...
...
@@ -232,15 +243,17 @@ void ArchDesc::gen_match(FILE *fp, MatchList &mList, ProductionState &status, Di
fprintf
(
fp
,
"%s"
,
spaces4
);
// Only generate child tests if this is not a leaf node
bool
has_child_constraints
=
mList
.
_lchild
||
mList
.
_rchild
;
const
char
*
predicate_test
=
mList
.
get_pred
();
if
(
has_child_constraints
||
predicate_test
)
{
const
char
*
predicate_test
=
mList
.
get_pred
();
if
(
has_child_constraints
||
predicate_test
)
{
// Open the child-and-predicate-test braces
fprintf
(
fp
,
"if( "
);
status
.
set_constraint
(
hasConstraint
);
child_test
(
fp
,
mList
);
// Only generate predicate test if one exists for this match
if
(
predicate_test
)
{
if
(
has_child_constraints
)
{
fprintf
(
fp
,
" &&
\n
"
);
}
if
(
predicate_test
)
{
if
(
has_child_constraints
)
{
fprintf
(
fp
,
" &&
\n
"
);
}
fprintf
(
fp
,
"%s %s"
,
spaces6
,
predicate_test
);
}
// End of outer tests
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录