Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4dc1ce35
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看板
提交
4dc1ce35
编写于
4月 04, 2012
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7152811: Issues in client compiler
Reviewed-by: kvn, jrose
上级
9b22e5ef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
9 deletion
+32
-9
src/share/vm/ci/ciField.cpp
src/share/vm/ci/ciField.cpp
+29
-7
src/share/vm/ci/ciField.hpp
src/share/vm/ci/ciField.hpp
+3
-2
未找到文件。
src/share/vm/ci/ciField.cpp
浏览文件 @
4dc1ce35
/*
* 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
...
...
@@ -67,7 +67,7 @@
// ------------------------------------------------------------------
// ciField::ciField
ciField
::
ciField
(
ciInstanceKlass
*
klass
,
int
index
)
:
_known_to_link_with
(
NULL
)
{
ciField
::
ciField
(
ciInstanceKlass
*
klass
,
int
index
)
:
_known_to_link_with
_put
(
NULL
),
_known_to_link_with_get
(
NULL
)
{
ASSERT_IN_VM
;
CompilerThread
*
thread
=
CompilerThread
::
current
();
...
...
@@ -143,7 +143,7 @@ ciField::ciField(ciInstanceKlass* klass, int index): _known_to_link_with(NULL) {
initialize_from
(
&
field_desc
);
}
ciField
::
ciField
(
fieldDescriptor
*
fd
)
:
_known_to_link_with
(
NULL
)
{
ciField
::
ciField
(
fieldDescriptor
*
fd
)
:
_known_to_link_with
_put
(
NULL
),
_known_to_link_with_get
(
NULL
)
{
ASSERT_IN_VM
;
_cp_index
=
-
1
;
...
...
@@ -315,6 +315,10 @@ ciType* ciField::compute_type_impl() {
bool
ciField
::
will_link
(
ciInstanceKlass
*
accessing_klass
,
Bytecodes
::
Code
bc
)
{
VM_ENTRY_MARK
;
assert
(
bc
==
Bytecodes
::
_getstatic
||
bc
==
Bytecodes
::
_putstatic
||
bc
==
Bytecodes
::
_getfield
||
bc
==
Bytecodes
::
_putfield
,
"unexpected bytecode"
);
if
(
_offset
==
-
1
)
{
// at creation we couldn't link to our holder so we need to
// maintain that stance, otherwise there's no safe way to use this
...
...
@@ -322,8 +326,21 @@ bool ciField::will_link(ciInstanceKlass* accessing_klass,
return
false
;
}
if
(
_known_to_link_with
==
accessing_klass
)
{
return
true
;
// Check for static/nonstatic mismatch
bool
is_static
=
(
bc
==
Bytecodes
::
_getstatic
||
bc
==
Bytecodes
::
_putstatic
);
if
(
is_static
!=
this
->
is_static
())
{
return
false
;
}
// Get and put can have different accessibility rules
bool
is_put
=
(
bc
==
Bytecodes
::
_putfield
||
bc
==
Bytecodes
::
_putstatic
);
if
(
is_put
)
{
if
(
_known_to_link_with_put
==
accessing_klass
)
{
return
true
;
}
if
(
_known_to_link_with_get
==
accessing_klass
)
{
return
true
;
}
}
FieldAccessInfo
result
;
...
...
@@ -334,8 +351,13 @@ bool ciField::will_link(ciInstanceKlass* accessing_klass,
true
,
false
,
KILL_COMPILE_ON_FATAL_
(
false
));
// update the hit-cache, unless there is a problem with memory scoping:
if
(
accessing_klass
->
is_shared
()
||
!
is_shared
())
_known_to_link_with
=
accessing_klass
;
if
(
accessing_klass
->
is_shared
()
||
!
is_shared
())
{
if
(
is_put
)
{
_known_to_link_with_put
=
accessing_klass
;
}
else
{
_known_to_link_with_get
=
accessing_klass
;
}
}
return
true
;
}
...
...
src/share/vm/ci/ciField.hpp
浏览文件 @
4dc1ce35
/*
* 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
...
...
@@ -49,7 +49,8 @@ private:
ciType
*
_type
;
int
_offset
;
bool
_is_constant
;
ciInstanceKlass
*
_known_to_link_with
;
ciInstanceKlass
*
_known_to_link_with_put
;
ciInstanceKlass
*
_known_to_link_with_get
;
ciConstant
_constant_value
;
// Used for will_link
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录