Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
f3a99c53
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看板
提交
f3a99c53
编写于
9月 21, 2013
作者:
C
coleenp
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
970260d6
8017e248
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
18 deletion
+9
-18
src/share/vm/oops/constantPool.cpp
src/share/vm/oops/constantPool.cpp
+9
-17
src/share/vm/oops/constantPool.hpp
src/share/vm/oops/constantPool.hpp
+0
-1
未找到文件。
src/share/vm/oops/constantPool.cpp
浏览文件 @
f3a99c53
...
...
@@ -108,16 +108,16 @@ objArrayOop ConstantPool::resolved_references() const {
void
ConstantPool
::
initialize_resolved_references
(
ClassLoaderData
*
loader_data
,
intStack
reference_map
,
int
constant_pool_map_length
,
TRAPS
)
{
TRAPS
)
{
// Initialized the resolved object cache.
int
map_length
=
reference_map
.
length
();
if
(
map_length
>
0
)
{
// Only need mapping back to constant pool entries. The map isn't used for
// invokedynamic resolved_reference entries.
The constant pool cache index
//
has the mapping back to both the constant pool and to the resolved
// reference index.
// invokedynamic resolved_reference entries.
For invokedynamic entries,
//
the constant pool cache index has the mapping back to both the constant
//
pool and to the resolved
reference index.
if
(
constant_pool_map_length
>
0
)
{
Array
<
u2
>*
om
=
MetadataFactory
::
new_array
<
u2
>
(
loader_data
,
map_length
,
CHECK
);
Array
<
u2
>*
om
=
MetadataFactory
::
new_array
<
u2
>
(
loader_data
,
constant_pool_
map_length
,
CHECK
);
for
(
int
i
=
0
;
i
<
constant_pool_map_length
;
i
++
)
{
int
x
=
reference_map
.
at
(
i
);
...
...
@@ -182,16 +182,9 @@ oop ConstantPool::lock() {
int
ConstantPool
::
cp_to_object_index
(
int
cp_index
)
{
// this is harder don't do this so much.
for
(
int
i
=
0
;
i
<
reference_map
()
->
length
();
i
++
)
{
if
(
reference_map
()
->
at
(
i
)
==
cp_index
)
return
i
;
// Zero entry is divider between constant pool indices for strings,
// method handles and method types. After that the index is a constant
// pool cache index for invokedynamic. Stop when zero (which can never
// be a constant pool index)
if
(
reference_map
()
->
at
(
i
)
==
0
)
break
;
}
// We might not find the index.
return
_no_index_sentinel
;
int
i
=
reference_map
()
->
find
(
cp_index
);
// We might not find the index for jsr292 call.
return
(
i
<
0
)
?
_no_index_sentinel
:
i
;
}
Klass
*
ConstantPool
::
klass_at_impl
(
constantPoolHandle
this_oop
,
int
which
,
TRAPS
)
{
...
...
@@ -866,8 +859,7 @@ oop ConstantPool::string_at_impl(constantPoolHandle this_oop, int which, int obj
// If the string has already been interned, this entry will be non-null
oop
str
=
this_oop
->
resolved_references
()
->
obj_at
(
obj_index
);
if
(
str
!=
NULL
)
return
str
;
Symbol
*
sym
=
this_oop
->
unresolved_string_at
(
which
);
Symbol
*
sym
=
this_oop
->
unresolved_string_at
(
which
);
str
=
StringTable
::
intern
(
sym
,
CHECK_
(
NULL
));
this_oop
->
string_at_put
(
which
,
obj_index
,
str
);
assert
(
java_lang_String
::
is_instance
(
str
),
"must be string"
);
...
...
src/share/vm/oops/constantPool.hpp
浏览文件 @
f3a99c53
...
...
@@ -231,7 +231,6 @@ class ConstantPool : public Metadata {
static
int
cache_offset_in_bytes
()
{
return
offset_of
(
ConstantPool
,
_cache
);
}
static
int
pool_holder_offset_in_bytes
()
{
return
offset_of
(
ConstantPool
,
_pool_holder
);
}
static
int
resolved_references_offset_in_bytes
()
{
return
offset_of
(
ConstantPool
,
_resolved_references
);
}
static
int
reference_map_offset_in_bytes
()
{
return
offset_of
(
ConstantPool
,
_reference_map
);
}
// Storing constants
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录