Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
aeaf5991
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看板
提交
aeaf5991
编写于
1月 10, 2011
作者:
T
twisti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7010180: JSR 292 InvokeDynamicPrintArgs fails with: assert(_adapter == NULL) failed: init'd to NULL
Reviewed-by: never
上级
bd2fda97
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
22 deletion
+29
-22
src/cpu/sparc/vm/methodHandles_sparc.cpp
src/cpu/sparc/vm/methodHandles_sparc.cpp
+5
-4
src/cpu/x86/vm/methodHandles_x86.cpp
src/cpu/x86/vm/methodHandles_x86.cpp
+5
-4
src/share/vm/prims/methodHandles.cpp
src/share/vm/prims/methodHandles.cpp
+15
-10
src/share/vm/prims/methodHandles.hpp
src/share/vm/prims/methodHandles.hpp
+4
-4
未找到文件。
src/cpu/sparc/vm/methodHandles_sparc.cpp
浏览文件 @
aeaf5991
/*
* Copyright (c) 2008, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
1
, 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
...
...
@@ -395,7 +395,7 @@ int MethodHandles::adapter_conversion_ops_supported_mask() {
//
// Generate an "entry" field for a method handle.
// This determines how the method handle will respond to calls.
void
MethodHandles
::
generate_method_handle_stub
(
MacroAssembler
*
_masm
,
MethodHandles
::
EntryKind
ek
,
TRAPS
)
{
void
MethodHandles
::
generate_method_handle_stub
(
MacroAssembler
*
_masm
,
MethodHandles
::
EntryKind
ek
)
{
// Here is the register state during an interpreted call,
// as set up by generate_method_handle_interpreter_entry():
// - G5: garbage temp (was MethodHandle.invoke methodOop, unused)
...
...
@@ -447,8 +447,9 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan
// exception. Since we use a C2I adapter to set up the
// interpreter state, arguments are expected in compiler
// argument registers.
methodHandle
mh
(
raise_exception_method
());
address
c2i_entry
=
methodOopDesc
::
make_adapters
(
mh
,
CATCH
);
assert
(
raise_exception_method
(),
"must be set"
);
address
c2i_entry
=
raise_exception_method
()
->
get_c2i_entry
();
assert
(
c2i_entry
,
"method must be linked"
);
__
mov
(
O5_savedSP
,
SP
);
// Cut the stack back to where the caller started.
...
...
src/cpu/x86/vm/methodHandles_x86.cpp
浏览文件 @
aeaf5991
/*
* Copyright (c) 1997, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
1
, 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
...
...
@@ -390,7 +390,7 @@ int MethodHandles::adapter_conversion_ops_supported_mask() {
//
// Generate an "entry" field for a method handle.
// This determines how the method handle will respond to calls.
void
MethodHandles
::
generate_method_handle_stub
(
MacroAssembler
*
_masm
,
MethodHandles
::
EntryKind
ek
,
TRAPS
)
{
void
MethodHandles
::
generate_method_handle_stub
(
MacroAssembler
*
_masm
,
MethodHandles
::
EntryKind
ek
)
{
// Here is the register state during an interpreted call,
// as set up by generate_method_handle_interpreter_entry():
// - rbx: garbage temp (was MethodHandle.invoke methodOop, unused)
...
...
@@ -451,8 +451,9 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan
// exception. Since we use a C2I adapter to set up the
// interpreter state, arguments are expected in compiler
// argument registers.
methodHandle
mh
(
raise_exception_method
());
address
c2i_entry
=
methodOopDesc
::
make_adapters
(
mh
,
CHECK
);
assert
(
raise_exception_method
(),
"must be set"
);
address
c2i_entry
=
raise_exception_method
()
->
get_c2i_entry
();
assert
(
c2i_entry
,
"method must be linked"
);
const
Register
rdi_pc
=
rax
;
__
pop
(
rdi_pc
);
// caller PC
...
...
src/share/vm/prims/methodHandles.cpp
浏览文件 @
aeaf5991
/*
* Copyright (c) 2008, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
1
, 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
...
...
@@ -111,7 +111,7 @@ bool MethodHandles::spot_check_entry_names() {
//------------------------------------------------------------------------------
// MethodHandles::generate_adapters
//
void
MethodHandles
::
generate_adapters
(
TRAPS
)
{
void
MethodHandles
::
generate_adapters
()
{
if
(
!
EnableMethodHandles
||
SystemDictionary
::
MethodHandle_klass
()
==
NULL
)
return
;
assert
(
_adapter_code
==
NULL
,
"generate only once"
);
...
...
@@ -123,20 +123,20 @@ void MethodHandles::generate_adapters(TRAPS) {
vm_exit_out_of_memory
(
_adapter_code_size
,
"CodeCache: no room for MethodHandles adapters"
);
CodeBuffer
code
(
_adapter_code
);
MethodHandlesAdapterGenerator
g
(
&
code
);
g
.
generate
(
CHECK
);
g
.
generate
();
}
//------------------------------------------------------------------------------
// MethodHandlesAdapterGenerator::generate
//
void
MethodHandlesAdapterGenerator
::
generate
(
TRAPS
)
{
void
MethodHandlesAdapterGenerator
::
generate
()
{
// Generate generic method handle adapters.
for
(
MethodHandles
::
EntryKind
ek
=
MethodHandles
::
_EK_FIRST
;
ek
<
MethodHandles
::
_EK_LIMIT
;
ek
=
MethodHandles
::
EntryKind
(
1
+
(
int
)
ek
))
{
StubCodeMark
mark
(
this
,
"MethodHandle"
,
MethodHandles
::
entry_name
(
ek
));
MethodHandles
::
generate_method_handle_stub
(
_masm
,
ek
,
CHECK
);
MethodHandles
::
generate_method_handle_stub
(
_masm
,
ek
);
}
}
...
...
@@ -2621,10 +2621,20 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class))
warning
(
"JSR 292 method handle code is mismatched to this JVM. Disabling support."
);
enable_MH
=
false
;
}
}
else
{
enable_MH
=
false
;
}
}
if
(
enable_MH
)
{
// We need to link the MethodHandleImpl klass before we generate
// the method handle adapters as the _raise_exception adapter uses
// one of its methods (and its c2i-adapter).
KlassHandle
k
=
SystemDictionaryHandles
::
MethodHandleImpl_klass
();
instanceKlass
*
ik
=
instanceKlass
::
cast
(
k
());
ik
->
link_class
(
CHECK
);
MethodHandles
::
generate_adapters
();
MethodHandles
::
set_enabled
(
true
);
}
...
...
@@ -2645,10 +2655,5 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class))
MethodHandles
::
set_enabled
(
true
);
}
}
// Generate method handles adapters if enabled.
if
(
MethodHandles
::
enabled
())
{
MethodHandles
::
generate_adapters
(
CHECK
);
}
}
JVM_END
src/share/vm/prims/methodHandles.hpp
浏览文件 @
aeaf5991
/*
* Copyright (c) 2008, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
1
, 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
...
...
@@ -294,11 +294,11 @@ class MethodHandles: AllStatic {
enum
{
_suppress_defc
=
1
,
_suppress_name
=
2
,
_suppress_type
=
4
};
// Generate MethodHandles adapters.
static
void
generate_adapters
(
TRAPS
);
static
void
generate_adapters
();
// Called from InterpreterGenerator and MethodHandlesAdapterGenerator.
static
address
generate_method_handle_interpreter_entry
(
MacroAssembler
*
_masm
);
static
void
generate_method_handle_stub
(
MacroAssembler
*
_masm
,
EntryKind
ek
,
TRAPS
);
static
void
generate_method_handle_stub
(
MacroAssembler
*
_masm
,
EntryKind
ek
);
// argument list parsing
static
int
argument_slot
(
oop
method_type
,
int
arg
);
...
...
@@ -530,7 +530,7 @@ class MethodHandlesAdapterGenerator : public StubCodeGenerator {
public:
MethodHandlesAdapterGenerator
(
CodeBuffer
*
code
)
:
StubCodeGenerator
(
code
)
{}
void
generate
(
TRAPS
);
void
generate
();
};
#endif // SHARE_VM_PRIMS_METHODHANDLES_HPP
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录