Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
a780c2bf
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看板
提交
a780c2bf
编写于
2月 28, 2011
作者:
R
rottenha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
4f052ffa
c92a30bd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
44 addition
and
1 deletion
+44
-1
src/share/vm/classfile/stackMapFrame.cpp
src/share/vm/classfile/stackMapFrame.cpp
+41
-1
src/share/vm/classfile/stackMapFrame.hpp
src/share/vm/classfile/stackMapFrame.hpp
+2
-0
src/share/vm/classfile/verificationType.hpp
src/share/vm/classfile/verificationType.hpp
+1
-0
未找到文件。
src/share/vm/classfile/stackMapFrame.cpp
浏览文件 @
a780c2bf
...
...
@@ -170,6 +170,44 @@ bool StackMapFrame::is_assignable_to(
return
true
;
}
bool
StackMapFrame
::
has_flag_match_exception
(
const
StackMapFrame
*
target
)
const
{
// We allow flags of {UninitThis} to assign to {} if-and-only-if the
// target frame does not depend upon the current type.
// This is slightly too strict, as we need only enforce that the
// slots that were initialized by the <init> (the things that were
// UninitializedThis before initialize_object() converted them) are unused.
// However we didn't save that information so we'll enforce this upon
// anything that might have been initialized. This is a rare situation
// and javac never generates code that would end up here, but some profilers
// (such as NetBeans) might, when adding exception handlers in <init>
// methods to cover the invokespecial instruction. See 7020118.
assert
(
max_locals
()
==
target
->
max_locals
()
&&
stack_size
()
==
target
->
stack_size
(),
"StackMap sizes must match"
);
VerificationType
top
=
VerificationType
::
top_type
();
VerificationType
this_type
=
verifier
()
->
current_type
();
if
(
!
flag_this_uninit
()
||
target
->
flags
()
!=
0
)
{
return
false
;
}
for
(
int
i
=
0
;
i
<
target
->
locals_size
();
++
i
)
{
if
(
locals
()[
i
]
==
this_type
&&
target
->
locals
()[
i
]
!=
top
)
{
return
false
;
}
}
for
(
int
i
=
0
;
i
<
target
->
stack_size
();
++
i
)
{
if
(
stack
()[
i
]
==
this_type
&&
target
->
stack
()[
i
]
!=
top
)
{
return
false
;
}
}
return
true
;
}
bool
StackMapFrame
::
is_assignable_to
(
const
StackMapFrame
*
target
,
TRAPS
)
const
{
if
(
_max_locals
!=
target
->
max_locals
()
||
_stack_size
!=
target
->
stack_size
())
{
return
false
;
...
...
@@ -182,7 +220,9 @@ bool StackMapFrame::is_assignable_to(const StackMapFrame* target, TRAPS) const {
bool
match_stack
=
is_assignable_to
(
_stack
,
target
->
stack
(),
_stack_size
,
CHECK_false
);
bool
match_flags
=
(
_flags
|
target
->
flags
())
==
target
->
flags
();
return
(
match_locals
&&
match_stack
&&
match_flags
);
return
match_locals
&&
match_stack
&&
(
match_flags
||
has_flag_match_exception
(
target
));
}
VerificationType
StackMapFrame
::
pop_stack_ex
(
VerificationType
type
,
TRAPS
)
{
...
...
src/share/vm/classfile/stackMapFrame.hpp
浏览文件 @
a780c2bf
...
...
@@ -228,6 +228,8 @@ class StackMapFrame : public ResourceObj {
bool
is_assignable_to
(
VerificationType
*
src
,
VerificationType
*
target
,
int32_t
len
,
TRAPS
)
const
;
bool
has_flag_match_exception
(
const
StackMapFrame
*
target
)
const
;
// Debugging
void
print
()
const
PRODUCT_RETURN
;
};
...
...
src/share/vm/classfile/verificationType.hpp
浏览文件 @
a780c2bf
...
...
@@ -128,6 +128,7 @@ class VerificationType VALUE_OBJ_CLASS_SPEC {
// Create verification types
static
VerificationType
bogus_type
()
{
return
VerificationType
(
Bogus
);
}
static
VerificationType
top_type
()
{
return
bogus_type
();
}
// alias
static
VerificationType
null_type
()
{
return
VerificationType
(
Null
);
}
static
VerificationType
integer_type
()
{
return
VerificationType
(
Integer
);
}
static
VerificationType
float_type
()
{
return
VerificationType
(
Float
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录