Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
57a2db44
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
57a2db44
编写于
6月 03, 2013
作者:
J
jlaskey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8015796: Race condition in RuntimeCallsites
Reviewed-by: lagergren, attila Contributed-by: james.laskey@oracle.com
上级
30d50e8f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
13 deletion
+4
-13
nashorn/src/jdk/nashorn/internal/codegen/RuntimeCallSite.java
...orn/src/jdk/nashorn/internal/codegen/RuntimeCallSite.java
+4
-13
未找到文件。
nashorn/src/jdk/nashorn/internal/codegen/RuntimeCallSite.java
浏览文件 @
57a2db44
...
@@ -59,12 +59,10 @@ import jdk.nashorn.internal.lookup.MethodHandleFactory;
...
@@ -59,12 +59,10 @@ import jdk.nashorn.internal.lookup.MethodHandleFactory;
public
final
class
RuntimeCallSite
extends
MutableCallSite
{
public
final
class
RuntimeCallSite
extends
MutableCallSite
{
static
final
Call
BOOTSTRAP
=
staticCallNoLookup
(
Bootstrap
.
class
,
"runtimeBootstrap"
,
CallSite
.
class
,
MethodHandles
.
Lookup
.
class
,
String
.
class
,
MethodType
.
class
);
static
final
Call
BOOTSTRAP
=
staticCallNoLookup
(
Bootstrap
.
class
,
"runtimeBootstrap"
,
CallSite
.
class
,
MethodHandles
.
Lookup
.
class
,
String
.
class
,
MethodType
.
class
);
private
static
final
MethodHandle
NEXT
=
findOwnMH
(
"next"
,
MethodHandle
.
class
);
private
static
final
MethodHandle
NEXT
=
findOwnMH
(
"next"
,
MethodHandle
.
class
,
String
.
class
);
private
final
RuntimeNode
.
Request
request
;
private
final
RuntimeNode
.
Request
request
;
private
String
name
;
/**
/**
* A specialized runtime node, i.e. on where we know at least one more specific type than object
* A specialized runtime node, i.e. on where we know at least one more specific type than object
*/
*/
...
@@ -203,7 +201,6 @@ public final class RuntimeCallSite extends MutableCallSite {
...
@@ -203,7 +201,6 @@ public final class RuntimeCallSite extends MutableCallSite {
*/
*/
public
RuntimeCallSite
(
final
MethodType
type
,
final
String
name
)
{
public
RuntimeCallSite
(
final
MethodType
type
,
final
String
name
)
{
super
(
type
);
super
(
type
);
this
.
name
=
name
;
this
.
request
=
Request
.
valueOf
(
name
.
substring
(
0
,
name
.
indexOf
(
SpecializedRuntimeNode
.
REQUEST_SEPARATOR
)));
this
.
request
=
Request
.
valueOf
(
name
.
substring
(
0
,
name
.
indexOf
(
SpecializedRuntimeNode
.
REQUEST_SEPARATOR
)));
setTarget
(
makeMethod
(
name
));
setTarget
(
makeMethod
(
name
));
}
}
...
@@ -292,7 +289,7 @@ public final class RuntimeCallSite extends MutableCallSite {
...
@@ -292,7 +289,7 @@ public final class RuntimeCallSite extends MutableCallSite {
mh
=
MH
.
explicitCastArguments
(
mh
,
type
());
mh
=
MH
.
explicitCastArguments
(
mh
,
type
());
}
}
final
MethodHandle
fallback
=
MH
.
foldArguments
(
MethodHandles
.
exactInvoker
(
type
()),
MH
.
bindTo
(
NEXT
,
this
));
final
MethodHandle
fallback
=
MH
.
foldArguments
(
MethodHandles
.
exactInvoker
(
type
()),
MH
.
insertArguments
(
NEXT
,
0
,
this
,
requestName
));
MethodHandle
guard
;
MethodHandle
guard
;
if
(
type
().
parameterType
(
0
).
isPrimitive
())
{
if
(
type
().
parameterType
(
0
).
isPrimitive
())
{
...
@@ -338,18 +335,12 @@ public final class RuntimeCallSite extends MutableCallSite {
...
@@ -338,18 +335,12 @@ public final class RuntimeCallSite extends MutableCallSite {
*
*
* @return next wider specialization method for this RuntimeCallSite
* @return next wider specialization method for this RuntimeCallSite
*/
*/
public
MethodHandle
next
()
{
public
MethodHandle
next
(
final
String
name
)
{
this
.
name
=
nextName
(
name
);
final
MethodHandle
next
=
makeMethod
(
nextName
(
name
));
final
MethodHandle
next
=
makeMethod
(
name
);
setTarget
(
next
);
setTarget
(
next
);
return
next
;
return
next
;
}
}
@Override
public
String
toString
()
{
return
super
.
toString
()
+
" "
+
name
;
}
/** Method cache */
/** Method cache */
private
static
final
Map
<
String
,
MethodHandle
>
METHODS
;
private
static
final
Map
<
String
,
MethodHandle
>
METHODS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录