Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
99179e62
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
99179e62
编写于
7月 16, 2010
作者:
J
jrose
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6969574: invokedynamic call sites deoptimize instead of executing
Reviewed-by: kvn
上级
8c86f1bb
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
28 addition
and
23 deletion
+28
-23
src/share/vm/ci/ciEnv.cpp
src/share/vm/ci/ciEnv.cpp
+2
-2
src/share/vm/ci/ciMethod.cpp
src/share/vm/ci/ciMethod.cpp
+7
-16
src/share/vm/oops/cpCacheOop.cpp
src/share/vm/oops/cpCacheOop.cpp
+1
-1
src/share/vm/oops/cpCacheOop.hpp
src/share/vm/oops/cpCacheOop.hpp
+1
-0
src/share/vm/oops/methodOop.cpp
src/share/vm/oops/methodOop.cpp
+9
-3
src/share/vm/prims/methodHandleWalk.cpp
src/share/vm/prims/methodHandleWalk.cpp
+8
-1
未找到文件。
src/share/vm/ci/ciEnv.cpp
浏览文件 @
99179e62
...
...
@@ -728,8 +728,8 @@ ciMethod* ciEnv::get_fake_invokedynamic_method_impl(constantPoolHandle cpool,
}
// Get the invoker methodOop from the constant pool.
intptr_t
f2_value
=
cpool
->
cache
()
->
main_entry_at
(
index
)
->
f2
();
methodOop
signature_invoker
=
methodOop
(
f
2
_value
);
oop
f1_value
=
cpool
->
cache
()
->
main_entry_at
(
index
)
->
f1
();
methodOop
signature_invoker
=
methodOop
(
f
1
_value
);
assert
(
signature_invoker
!=
NULL
&&
signature_invoker
->
is_method
()
&&
signature_invoker
->
is_method_handle_invoke
(),
"correct result from LinkResolver::resolve_invokedynamic"
);
...
...
src/share/vm/ci/ciMethod.cpp
浏览文件 @
99179e62
...
...
@@ -694,30 +694,21 @@ int ciMethod::scale_count(int count, float prof_factor) {
// ------------------------------------------------------------------
// ciMethod::is_method_handle_invoke
//
// Return true if the method is a MethodHandle target.
// Return true if the method is an instance of one of the two
// signature-polymorphic MethodHandle methods, invokeExact or invokeGeneric.
bool
ciMethod
::
is_method_handle_invoke
()
const
{
bool
flag
=
(
holder
()
->
name
()
==
ciSymbol
::
java_dyn_MethodHandle
()
&&
methodOopDesc
::
is_method_handle_invoke_name
(
name
()
->
sid
()));
#ifdef ASSERT
if
(
is_loaded
())
{
bool
flag2
=
((
flags
().
as_int
()
&
JVM_MH_INVOKE_BITS
)
==
JVM_MH_INVOKE_BITS
);
{
if
(
!
is_loaded
())
return
false
;
VM_ENTRY_MARK
;
bool
flag3
=
get_methodOop
()
->
is_method_handle_invoke
();
assert
(
flag2
==
flag3
,
"consistent"
);
assert
(
flag
==
flag3
,
"consistent"
);
}
}
#endif //ASSERT
return
flag
;
return
get_methodOop
()
->
is_method_handle_invoke
();
}
// ------------------------------------------------------------------
// ciMethod::is_method_handle_adapter
//
// Return true if the method is a generated MethodHandle adapter.
// These are built by MethodHandleCompiler.
bool
ciMethod
::
is_method_handle_adapter
()
const
{
check_is_loaded
()
;
if
(
!
is_loaded
())
return
false
;
VM_ENTRY_MARK
;
return
get_methodOop
()
->
is_method_handle_adapter
();
}
...
...
src/share/vm/oops/cpCacheOop.cpp
浏览文件 @
99179e62
...
...
@@ -168,7 +168,7 @@ void ConstantPoolCacheEntry::set_method(Bytecodes::Code invoke_code,
set_f1
(
method
());
needs_vfinal_flag
=
false
;
// _f2 is not an oop
assert
(
!
is_vfinal
(),
"f2 not an oop"
);
byte_no
=
1
;
//
just a formality
byte_no
=
1
;
//
coordinate this with bytecode_number & is_resolved
break
;
case
Bytecodes
::
_invokespecial
:
...
...
src/share/vm/oops/cpCacheOop.hpp
浏览文件 @
99179e62
...
...
@@ -211,6 +211,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
case
Bytecodes
::
_getfield
:
// fall through
case
Bytecodes
::
_invokespecial
:
// fall through
case
Bytecodes
::
_invokestatic
:
// fall through
case
Bytecodes
::
_invokedynamic
:
// fall through
case
Bytecodes
::
_invokeinterface
:
return
1
;
case
Bytecodes
::
_putstatic
:
// fall through
case
Bytecodes
::
_putfield
:
// fall through
...
...
src/share/vm/oops/methodOop.cpp
浏览文件 @
99179e62
...
...
@@ -851,9 +851,15 @@ jint* methodOopDesc::method_type_offsets_chain() {
// MethodHandleCompiler.
// Must be consistent with MethodHandleCompiler::get_method_oop().
bool
methodOopDesc
::
is_method_handle_adapter
()
const
{
return
(
is_method_handle_invoke_name
(
name
())
&&
is_synthetic
()
&&
MethodHandleCompiler
::
klass_is_method_handle_adapter_holder
(
method_holder
()));
if
(
is_synthetic
()
&&
!
is_native
()
&&
// has code from MethodHandleCompiler
is_method_handle_invoke_name
(
name
())
&&
MethodHandleCompiler
::
klass_is_method_handle_adapter_holder
(
method_holder
()))
{
assert
(
!
is_method_handle_invoke
(),
"disjoint"
);
return
true
;
}
else
{
return
false
;
}
}
methodHandle
methodOopDesc
::
make_invoke_method
(
KlassHandle
holder
,
...
...
src/share/vm/prims/methodHandleWalk.cpp
浏览文件 @
99179e62
...
...
@@ -738,6 +738,12 @@ void MethodHandleCompiler::emit_bc(Bytecodes::Code op, int index) {
// bi
case
Bytecodes
::
_ldc
:
assert
(
Bytecodes
::
format_bits
(
op
,
false
)
==
(
Bytecodes
::
_fmt_b
|
Bytecodes
::
_fmt_has_k
),
"wrong bytecode format"
);
assert
((
char
)
index
==
index
,
"index does not fit in 8-bit"
);
_bytecode
.
push
(
op
);
_bytecode
.
push
(
index
);
break
;
case
Bytecodes
::
_iload
:
case
Bytecodes
::
_lload
:
case
Bytecodes
::
_fload
:
...
...
@@ -754,7 +760,8 @@ void MethodHandleCompiler::emit_bc(Bytecodes::Code op, int index) {
_bytecode
.
push
(
index
);
break
;
// bii
// bkk
case
Bytecodes
::
_ldc_w
:
case
Bytecodes
::
_ldc2_w
:
case
Bytecodes
::
_checkcast
:
assert
(
Bytecodes
::
format_bits
(
op
,
false
)
==
Bytecodes
::
_fmt_bkk
,
"wrong bytecode format"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录