Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_nashorn
提交
5489a8db
D
dragonwell8_nashorn
项目概览
openanolis
/
dragonwell8_nashorn
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_nashorn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5489a8db
编写于
12月 05, 2013
作者:
K
kizune
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
fa89939e
59aa50b3
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
386 addition
and
208 deletion
+386
-208
.hgtags
.hgtags
+1
-0
make/BuildNashorn.gmk
make/BuildNashorn.gmk
+0
-0
make/Makefile
make/Makefile
+23
-33
makefiles/Makefile
makefiles/Makefile
+0
-49
src/jdk/nashorn/internal/codegen/CodeGenerator.java
src/jdk/nashorn/internal/codegen/CodeGenerator.java
+3
-3
src/jdk/nashorn/internal/ir/debug/PrintVisitor.java
src/jdk/nashorn/internal/ir/debug/PrintVisitor.java
+7
-3
src/jdk/nashorn/internal/objects/NativeArguments.java
src/jdk/nashorn/internal/objects/NativeArguments.java
+4
-2
src/jdk/nashorn/internal/objects/NativeObject.java
src/jdk/nashorn/internal/objects/NativeObject.java
+4
-2
src/jdk/nashorn/internal/objects/NativeString.java
src/jdk/nashorn/internal/objects/NativeString.java
+15
-10
src/jdk/nashorn/internal/parser/Parser.java
src/jdk/nashorn/internal/parser/Parser.java
+18
-10
src/jdk/nashorn/internal/runtime/ScriptObject.java
src/jdk/nashorn/internal/runtime/ScriptObject.java
+96
-88
src/jdk/nashorn/internal/runtime/arrays/ArrayIndex.java
src/jdk/nashorn/internal/runtime/arrays/ArrayIndex.java
+34
-7
test/script/basic/JDK-8028210.js
test/script/basic/JDK-8028210.js
+83
-0
test/script/basic/JDK-8028210.js.EXPECTED
test/script/basic/JDK-8028210.js.EXPECTED
+38
-0
test/script/basic/JDK-8028434.js
test/script/basic/JDK-8028434.js
+58
-0
test/script/basic/JDK-8028434.js.EXPECTED
test/script/basic/JDK-8028434.js.EXPECTED
+1
-0
test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
+1
-1
未找到文件。
.hgtags
浏览文件 @
5489a8db
...
...
@@ -228,3 +228,4 @@ f0d3ac2474ee755b1180ec71bcdfa190845b17eb jdk8-b115
0fb1a427fbf6e04c77cebbbf99b6631c664ed793 jdk8-b116
1db3d4e4d18913e853d7bebf86816e87fda00a71 jdk8-b117
8d014b039b44c23fa520ce20c2c27f7aa91441e9 jdk8-b118
c3343930c73c58a22c1d58719bb988aeb25a871f jdk8-b119
make
files
/BuildNashorn.gmk
→
make/BuildNashorn.gmk
浏览文件 @
5489a8db
文件已移动
make/Makefile
浏览文件 @
5489a8db
#
# Copyright (c) 201
0, 2013
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 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
...
...
@@ -23,37 +23,27 @@
# questions.
#
#
# On Solaris, the standard 'make' utility will not work with these makefiles.
# This little rule is only understood by Solaris make, and is harmless
# when seen by the GNU make tool. If using Solaris make, this causes the
# make command to fail.
#
SUN_MAKE_TEST
:
sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
# Locate this Makefile
ifeq
($(filter /%, $(lastword $(MAKEFILE_LIST))), )
makefile_path
:=
$(CURDIR)
/
$(
lastword
$(MAKEFILE_LIST)
)
else
makefile_path
:=
$(
lastword
$(MAKEFILE_LIST)
)
endif
repo_dir
:=
$(
patsubst
%/make/Makefile, %,
$(makefile_path)
)
# What is the name of this subsystem (langtools, corba, etc)?
subsystem_name
:=
$(
notdir
$(repo_dir)
)
# Try to locate top-level makefile
top_level_makefile
:=
$(repo_dir)
/../Makefile
ifneq
($(wildcard $(top_level_makefile)), )
$(info
Will
run
$(subsystem_name)
target
on
top-level
Makefile)
$(info WARNING
:
This is a non-recommended way of building!)
$(info
===================================================)
else
$(info
Cannot
locate
top-level
Makefile.
Is
this
repo
not
checked
out
as
part
of
a
complete
forest?)
$(error
Build
from
top-level
Makefile
instead)
endif
# Default target and expected 'do everything' target
all
:
echo
Nashorn can only be built with
NEWBUILD
=
true
# Standard make clobber target
clobber
:
#-------------------------------------------------------------------
#
# Targets for Oracle's internal JPRT build system
CD
=
cd
ZIP
=
zip
JPRT_ARCHIVE_BUNDLE
=
$(ABS_OUTPUTDIR)
/
$(JPRT_BUILD_FLAVOR)
-bundle
.zip
jprt_build_product jprt_build_debug jprt_build_fastdebug
:
all
(
$(CD)
$(OUTPUTDIR)
&&
\
$(ZIP)
-q
-r
$(JPRT_ARCHIVE_BUNDLE)
build dist
)
#-------------------------------------------------------------------
# Declare these phony (not filenames)
.PHONY
:
$(ANT_TARGETS) all clobber
\
jprt_build_product jprt_build_debug jprt_build_fastdebug
@
$(MAKE)
-f
$(top_level_makefile)
$(subsystem_name)
makefiles/Makefile
已删除
100644 → 0
浏览文件 @
fa89939e
#
# Copyright (c) 2012, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Locate this Makefile
ifeq
($(filter /%, $(lastword $(MAKEFILE_LIST))), )
makefile_path
:=
$(CURDIR)
/
$(
lastword
$(MAKEFILE_LIST)
)
else
makefile_path
:=
$(
lastword
$(MAKEFILE_LIST)
)
endif
repo_dir
:=
$(
patsubst
%/makefiles/Makefile, %,
$(makefile_path)
)
# What is the name of this subsystem (langtools, corba, etc)?
subsystem_name
:=
$(
notdir
$(repo_dir)
)
# Try to locate top-level makefile
top_level_makefile
:=
$(repo_dir)
/../common/makefiles/Makefile
ifneq
($(wildcard $(top_level_makefile)), )
$(info
Will
run
$(subsystem_name)
target
on
top-level
Makefile)
$(info WARNING
:
This is a non-recommended way of building!)
$(info
===================================================)
else
$(info
Cannot
locate
top-level
Makefile.
Is
this
repo
not
checked
out
as
part
of
a
complete
forest?)
$(error
Build
from
top-level
Makefile
instead)
endif
all
:
@
$(MAKE)
-f
$(top_level_makefile)
$(subsystem_name)
src/jdk/nashorn/internal/codegen/CodeGenerator.java
浏览文件 @
5489a8db
...
...
@@ -2186,15 +2186,14 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public
boolean
enterWhileNode
(
final
WhileNode
whileNode
)
{
lineNumber
(
whileNode
);
final
Expression
test
=
whileNode
.
getTest
();
final
Block
body
=
whileNode
.
getBody
();
final
Label
breakLabel
=
whileNode
.
getBreakLabel
();
final
Label
continueLabel
=
whileNode
.
getContinueLabel
();
final
boolean
isDoWhile
=
whileNode
.
isDoWhile
();
final
Label
loopLabel
=
new
Label
(
"loop"
);
if
(!
whileNode
.
isDoWhile
()
)
{
if
(!
isDoWhile
)
{
method
.
_goto
(
continueLabel
);
}
...
...
@@ -2202,6 +2201,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
body
.
accept
(
this
);
if
(!
whileNode
.
isTerminal
())
{
method
.
label
(
continueLabel
);
lineNumber
(
whileNode
);
new
BranchOptimizer
(
this
,
method
).
execute
(
test
,
loopLabel
,
true
);
method
.
label
(
breakLabel
);
}
...
...
src/jdk/nashorn/internal/ir/debug/PrintVisitor.java
浏览文件 @
5489a8db
...
...
@@ -28,6 +28,7 @@ package jdk.nashorn.internal.ir.debug;
import
java.util.List
;
import
jdk.nashorn.internal.ir.BinaryNode
;
import
jdk.nashorn.internal.ir.Block
;
import
jdk.nashorn.internal.ir.BlockStatement
;
import
jdk.nashorn.internal.ir.CaseNode
;
import
jdk.nashorn.internal.ir.CatchNode
;
import
jdk.nashorn.internal.ir.ExpressionStatement
;
...
...
@@ -141,7 +142,6 @@ public final class PrintVisitor extends NodeVisitor<LexicalContext> {
@Override
public
boolean
enterBlock
(
final
Block
block
)
{
sb
.
append
(
' '
);
//sb.append(Debug.id(block));
sb
.
append
(
'{'
);
indent
+=
TABWIDTH
;
...
...
@@ -190,11 +190,16 @@ public final class PrintVisitor extends NodeVisitor<LexicalContext> {
sb
.
append
(
EOLN
);
indent
();
sb
.
append
(
'}'
);
// sb.append(Debug.id(block));
return
false
;
}
@Override
public
boolean
enterBlockStatement
(
final
BlockStatement
statement
)
{
statement
.
getBlock
().
accept
(
this
);
return
false
;
}
@Override
public
boolean
enterBinaryNode
(
final
BinaryNode
binaryNode
)
{
binaryNode
.
lhs
().
accept
(
this
);
...
...
@@ -233,7 +238,6 @@ public final class PrintVisitor extends NodeVisitor<LexicalContext> {
public
boolean
enterFunctionNode
(
final
FunctionNode
functionNode
)
{
functionNode
.
toString
(
sb
);
enterBlock
(
functionNode
.
getBody
());
//sb.append(EOLN);
return
false
;
}
...
...
src/jdk/nashorn/internal/objects/NativeArguments.java
浏览文件 @
5489a8db
...
...
@@ -35,6 +35,7 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.BitSet
;
import
jdk.nashorn.internal.runtime.AccessorProperty
;
import
jdk.nashorn.internal.runtime.JSType
;
import
jdk.nashorn.internal.runtime.Property
;
import
jdk.nashorn.internal.runtime.PropertyDescriptor
;
import
jdk.nashorn.internal.runtime.PropertyMap
;
...
...
@@ -140,8 +141,9 @@ public final class NativeArguments extends ScriptObject {
@Override
public
boolean
delete
(
final
Object
key
,
final
boolean
strict
)
{
final
int
index
=
ArrayIndex
.
getArrayIndex
(
key
);
return
isMapped
(
index
)
?
deleteMapped
(
index
,
strict
)
:
super
.
delete
(
key
,
strict
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
primitiveKey
);
return
isMapped
(
index
)
?
deleteMapped
(
index
,
strict
)
:
super
.
delete
(
primitiveKey
,
strict
);
}
/**
...
...
src/jdk/nashorn/internal/objects/NativeObject.java
浏览文件 @
5489a8db
...
...
@@ -484,10 +484,12 @@ public final class NativeObject {
*/
@Function
(
attributes
=
Attribute
.
NOT_ENUMERABLE
)
public
static
Object
hasOwnProperty
(
final
Object
self
,
final
Object
v
)
{
final
String
str
=
JSType
.
toString
(
v
);
// Convert ScriptObjects to primitive with String.class hint
// but no need to convert other primitives to string.
final
Object
key
=
JSType
.
toPrimitive
(
v
,
String
.
class
);
final
Object
obj
=
Global
.
toObject
(
self
);
return
(
obj
instanceof
ScriptObject
)
&&
((
ScriptObject
)
obj
).
hasOwnProperty
(
str
);
return
(
obj
instanceof
ScriptObject
)
&&
((
ScriptObject
)
obj
).
hasOwnProperty
(
key
);
}
/**
...
...
src/jdk/nashorn/internal/objects/NativeString.java
浏览文件 @
5489a8db
...
...
@@ -167,11 +167,12 @@ public final class NativeString extends ScriptObject {
@SuppressWarnings
(
"unused"
)
private
static
Object
get
(
final
Object
self
,
final
Object
key
)
{
final
CharSequence
cs
=
JSType
.
toCharSequence
(
self
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
primitiveKey
);
if
(
index
>=
0
&&
index
<
cs
.
length
())
{
return
String
.
valueOf
(
cs
.
charAt
(
index
));
}
return
((
ScriptObject
)
Global
.
toObject
(
self
)).
get
(
k
ey
);
return
((
ScriptObject
)
Global
.
toObject
(
self
)).
get
(
primitiveK
ey
);
}
@SuppressWarnings
(
"unused"
)
...
...
@@ -202,11 +203,12 @@ public final class NativeString extends ScriptObject {
// String characters can be accessed with array-like indexing..
@Override
public
Object
get
(
final
Object
key
)
{
final
int
index
=
ArrayIndex
.
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
primitiveKey
);
if
(
index
>=
0
&&
index
<
value
.
length
())
{
return
String
.
valueOf
(
value
.
charAt
(
index
));
}
return
super
.
get
(
k
ey
);
return
super
.
get
(
primitiveK
ey
);
}
@Override
...
...
@@ -295,8 +297,9 @@ public final class NativeString extends ScriptObject {
@Override
public
boolean
has
(
final
Object
key
)
{
final
int
index
=
ArrayIndex
.
getArrayIndex
(
key
);
return
isValid
(
index
)
||
super
.
has
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
primitiveKey
);
return
isValid
(
index
)
||
super
.
has
(
primitiveKey
);
}
@Override
...
...
@@ -318,8 +321,9 @@ public final class NativeString extends ScriptObject {
@Override
public
boolean
hasOwnProperty
(
final
Object
key
)
{
final
int
index
=
ArrayIndex
.
getArrayIndex
(
key
);
return
isValid
(
index
)
||
super
.
hasOwnProperty
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
primitiveKey
);
return
isValid
(
index
)
||
super
.
hasOwnProperty
(
primitiveKey
);
}
@Override
...
...
@@ -358,8 +362,9 @@ public final class NativeString extends ScriptObject {
@Override
public
boolean
delete
(
final
Object
key
,
final
boolean
strict
)
{
final
int
index
=
ArrayIndex
.
getArrayIndex
(
key
);
return
checkDeleteIndex
(
index
,
strict
)?
false
:
super
.
delete
(
key
,
strict
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
ArrayIndex
.
getArrayIndex
(
primitiveKey
);
return
checkDeleteIndex
(
index
,
strict
)?
false
:
super
.
delete
(
primitiveKey
,
strict
);
}
private
boolean
checkDeleteIndex
(
final
int
index
,
final
boolean
strict
)
{
...
...
src/jdk/nashorn/internal/parser/Parser.java
浏览文件 @
5489a8db
...
...
@@ -1210,21 +1210,24 @@ loop:
*/
private
void
whileStatement
()
{
// Capture WHILE token.
final
int
whileLine
=
line
;
final
long
whileToken
=
token
;
// WHILE tested in caller.
next
();
// Construct WHILE node.
WhileNode
whileNode
=
new
WhileNode
(
whileL
ine
,
whileToken
,
Token
.
descPosition
(
whileToken
),
false
);
WhileNode
whileNode
=
new
WhileNode
(
l
ine
,
whileToken
,
Token
.
descPosition
(
whileToken
),
false
);
lc
.
push
(
whileNode
);
try
{
expect
(
LPAREN
);
whileNode
=
whileNode
.
setTest
(
lc
,
expression
());
final
int
whileLine
=
line
;
final
Expression
test
=
expression
();
expect
(
RPAREN
);
whileNode
=
whileNode
.
setBody
(
lc
,
getStatement
());
appendStatement
(
whileNode
);
final
Block
body
=
getStatement
();
appendStatement
(
whileNode
=
new
WhileNode
(
whileLine
,
whileToken
,
finish
,
false
).
setTest
(
lc
,
test
).
setBody
(
lc
,
body
));
}
finally
{
lc
.
pop
(
whileNode
);
}
...
...
@@ -1242,28 +1245,33 @@ loop:
*/
private
void
doStatement
()
{
// Capture DO token.
final
int
doLine
=
line
;
final
long
doToken
=
token
;
// DO tested in the caller.
next
();
WhileNode
doWhileNode
=
new
WhileNode
(
doLine
,
doToken
,
Token
.
descPosition
(
doToken
),
true
);
WhileNode
doWhileNode
=
new
WhileNode
(
-
1
,
doToken
,
Token
.
descPosition
(
doToken
),
true
);
lc
.
push
(
doWhileNode
);
try
{
// Get DO body.
doWhileNode
=
doWhileNode
.
setBody
(
lc
,
getStatement
()
);
final
Block
body
=
getStatement
(
);
expect
(
WHILE
);
expect
(
LPAREN
);
doWhileNode
=
doWhileNode
.
setTest
(
lc
,
expression
());
final
int
doLine
=
line
;
final
Expression
test
=
expression
();
expect
(
RPAREN
);
if
(
type
==
SEMICOLON
)
{
endOfLine
();
}
doWhileNode
.
setFinish
(
finish
);
appendStatement
(
doWhileNode
);
//line number is last
appendStatement
(
doWhileNode
=
new
WhileNode
(
doLine
,
doToken
,
finish
,
true
).
setBody
(
lc
,
body
).
setTest
(
lc
,
test
));
}
finally
{
lc
.
pop
(
doWhileNode
);
}
...
...
src/jdk/nashorn/internal/runtime/ScriptObject.java
浏览文件 @
5489a8db
...
...
@@ -2373,11 +2373,13 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
private
int
getInt
(
final
int
index
,
final
String
key
)
{
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
object
=
this
;
;
)
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
for
(
ScriptObject
object
=
this
;
;
)
{
if
(
object
.
getMap
().
containsArrayKeys
())
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
find
!=
null
)
{
return
getIntValue
(
find
);
if
(
find
!=
null
)
{
return
getIntValue
(
find
);
}
}
if
((
object
=
object
.
getProto
())
==
null
)
{
...
...
@@ -2389,7 +2391,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
if
(
array
.
has
(
index
))
{
return
array
.
getInt
(
index
);
}
}
}
}
else
{
final
FindProperty
find
=
findProperty
(
key
,
true
);
...
...
@@ -2403,14 +2405,15 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
int
getInt
(
final
Object
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
index
))
{
return
array
.
getInt
(
index
);
}
return
getInt
(
index
,
JSType
.
toString
(
k
ey
));
return
getInt
(
index
,
JSType
.
toString
(
primitiveK
ey
));
}
@Override
...
...
@@ -2439,22 +2442,25 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
int
getInt
(
final
int
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
key
))
{
return
array
.
getInt
(
key
);
if
(
array
.
has
(
index
))
{
return
array
.
getInt
(
index
);
}
return
getInt
(
key
,
JSType
.
toString
(
key
));
return
getInt
(
index
,
JSType
.
toString
(
key
));
}
private
long
getLong
(
final
int
index
,
final
String
key
)
{
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
object
=
this
;
;
)
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
object
.
getMap
().
containsArrayKeys
())
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
find
!=
null
)
{
return
getLongValue
(
find
);
if
(
find
!=
null
)
{
return
getLongValue
(
find
);
}
}
if
((
object
=
object
.
getProto
())
==
null
)
{
...
...
@@ -2466,7 +2472,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
if
(
array
.
has
(
index
))
{
return
array
.
getLong
(
index
);
}
}
}
}
else
{
final
FindProperty
find
=
findProperty
(
key
,
true
);
...
...
@@ -2480,14 +2486,15 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
long
getLong
(
final
Object
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
index
))
{
return
array
.
getLong
(
index
);
}
return
getLong
(
index
,
JSType
.
toString
(
k
ey
));
return
getLong
(
index
,
JSType
.
toString
(
primitiveK
ey
));
}
@Override
...
...
@@ -2516,22 +2523,25 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
long
getLong
(
final
int
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
key
))
{
return
array
.
getLong
(
key
);
if
(
array
.
has
(
index
))
{
return
array
.
getLong
(
index
);
}
return
getLong
(
key
,
JSType
.
toString
(
key
));
return
getLong
(
index
,
JSType
.
toString
(
key
));
}
private
double
getDouble
(
final
int
index
,
final
String
key
)
{
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
object
=
this
;
;
)
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
object
.
getMap
().
containsArrayKeys
())
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
find
!=
null
)
{
return
getDoubleValue
(
find
);
if
(
find
!=
null
)
{
return
getDoubleValue
(
find
);
}
}
if
((
object
=
object
.
getProto
())
==
null
)
{
...
...
@@ -2543,7 +2553,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
if
(
array
.
has
(
index
))
{
return
array
.
getDouble
(
index
);
}
}
}
}
else
{
final
FindProperty
find
=
findProperty
(
key
,
true
);
...
...
@@ -2557,14 +2567,15 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
double
getDouble
(
final
Object
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
index
))
{
return
array
.
getDouble
(
index
);
}
return
getDouble
(
index
,
JSType
.
toString
(
k
ey
));
return
getDouble
(
index
,
JSType
.
toString
(
primitiveK
ey
));
}
@Override
...
...
@@ -2593,22 +2604,25 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
double
getDouble
(
final
int
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
key
))
{
return
array
.
getDouble
(
key
);
if
(
array
.
has
(
index
))
{
return
array
.
getDouble
(
index
);
}
return
getDouble
(
key
,
JSType
.
toString
(
key
));
return
getDouble
(
index
,
JSType
.
toString
(
key
));
}
private
Object
get
(
final
int
index
,
final
String
key
)
{
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
object
=
this
;
;
)
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
object
.
getMap
().
containsArrayKeys
())
{
final
FindProperty
find
=
object
.
findProperty
(
key
,
false
,
false
,
this
);
if
(
find
!=
null
)
{
return
getObjectValue
(
find
);
if
(
find
!=
null
)
{
return
getObjectValue
(
find
);
}
}
if
((
object
=
object
.
getProto
())
==
null
)
{
...
...
@@ -2634,14 +2648,15 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
Object
get
(
final
Object
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
index
))
{
return
array
.
getObject
(
index
);
}
return
get
(
index
,
JSType
.
toString
(
k
ey
));
return
get
(
index
,
JSType
.
toString
(
primitiveK
ey
));
}
@Override
...
...
@@ -2670,13 +2685,14 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
Object
get
(
final
int
key
)
{
final
int
index
=
getArrayIndex
(
key
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
key
))
{
return
array
.
getObject
(
key
);
if
(
array
.
has
(
index
))
{
return
array
.
getObject
(
index
);
}
return
get
(
key
,
JSType
.
toString
(
key
));
return
get
(
index
,
JSType
.
toString
(
key
));
}
/**
...
...
@@ -2688,7 +2704,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
*/
private
void
doesNotHave
(
final
int
index
,
final
Object
value
,
final
boolean
strict
)
{
final
long
oldLength
=
getArray
().
length
();
final
long
longIndex
=
index
&
JSType
.
MAX_UINT
;
final
long
longIndex
=
ArrayIndex
.
toLongIndex
(
index
)
;
if
(
getMap
().
containsArrayKeys
())
{
final
String
key
=
JSType
.
toString
(
longIndex
);
...
...
@@ -2774,7 +2790,8 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
void
set
(
final
Object
key
,
final
int
value
,
final
boolean
strict
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
if
(
isValidArrayIndex
(
index
))
{
if
(
getArray
().
has
(
index
))
{
...
...
@@ -2786,13 +2803,14 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
return
;
}
final
String
propName
=
JSType
.
toString
(
k
ey
);
final
String
propName
=
JSType
.
toString
(
primitiveK
ey
);
setObject
(
findProperty
(
propName
,
true
),
strict
,
propName
,
JSType
.
toObject
(
value
));
}
@Override
public
void
set
(
final
Object
key
,
final
long
value
,
final
boolean
strict
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
if
(
isValidArrayIndex
(
index
))
{
if
(
getArray
().
has
(
index
))
{
...
...
@@ -2804,13 +2822,14 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
return
;
}
final
String
propName
=
JSType
.
toString
(
k
ey
);
final
String
propName
=
JSType
.
toString
(
primitiveK
ey
);
setObject
(
findProperty
(
propName
,
true
),
strict
,
propName
,
JSType
.
toObject
(
value
));
}
@Override
public
void
set
(
final
Object
key
,
final
double
value
,
final
boolean
strict
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
if
(
isValidArrayIndex
(
index
))
{
if
(
getArray
().
has
(
index
))
{
...
...
@@ -2822,13 +2841,14 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
return
;
}
final
String
propName
=
JSType
.
toString
(
k
ey
);
final
String
propName
=
JSType
.
toString
(
primitiveK
ey
);
setObject
(
findProperty
(
propName
,
true
),
strict
,
propName
,
JSType
.
toObject
(
value
));
}
@Override
public
void
set
(
final
Object
key
,
final
Object
value
,
final
boolean
strict
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
if
(
isValidArrayIndex
(
index
))
{
if
(
getArray
().
has
(
index
))
{
...
...
@@ -2840,7 +2860,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
return
;
}
final
String
propName
=
JSType
.
toString
(
k
ey
);
final
String
propName
=
JSType
.
toString
(
primitiveK
ey
);
setObject
(
findProperty
(
propName
,
true
),
strict
,
propName
,
value
);
}
...
...
@@ -3062,82 +3082,69 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
boolean
has
(
final
Object
key
)
{
final
int
index
=
getArrayIndex
(
key
);
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
self
=
this
;
self
!=
null
;
self
=
self
.
getProto
())
{
if
(
self
.
getArray
().
has
(
index
))
{
return
true
;
}
}
}
return
hasProperty
(
JSType
.
toString
(
key
),
true
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
return
isValidArrayIndex
(
index
)
?
hasArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
primitiveKey
),
true
);
}
@Override
public
boolean
has
(
final
double
key
)
{
final
int
index
=
getArrayIndex
(
key
);
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
self
=
this
;
self
!=
null
;
self
=
self
.
getProto
())
{
if
(
self
.
getArray
().
has
(
index
))
{
return
true
;
}
}
}
return
hasProperty
(
JSType
.
toString
(
key
),
true
);
return
isValidArrayIndex
(
index
)
?
hasArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
key
),
true
);
}
@Override
public
boolean
has
(
final
long
key
)
{
final
int
index
=
getArrayIndex
(
key
);
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
self
=
this
;
self
!=
null
;
self
=
self
.
getProto
())
{
if
(
self
.
getArray
().
has
(
index
))
{
return
true
;
}
}
}
return
hasProperty
(
JSType
.
toString
(
key
),
true
);
return
isValidArrayIndex
(
index
)
?
hasArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
key
),
true
);
}
@Override
public
boolean
has
(
final
int
key
)
{
final
int
index
=
getArrayIndex
(
key
);
return
isValidArrayIndex
(
index
)
?
hasArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
key
),
true
);
}
if
(
isValidArrayIndex
(
index
))
{
for
(
ScriptObject
self
=
this
;
self
!=
null
;
self
=
self
.
getProto
())
{
if
(
self
.
getArray
().
has
(
index
))
{
return
true
;
}
private
boolean
hasArrayProperty
(
final
int
index
)
{
boolean
hasArrayKeys
=
false
;
for
(
ScriptObject
self
=
this
;
self
!=
null
;
self
=
self
.
getProto
())
{
if
(
self
.
getArray
().
has
(
index
))
{
return
true
;
}
hasArrayKeys
=
hasArrayKeys
||
self
.
getMap
().
containsArrayKeys
();
}
return
has
Property
(
JSType
.
toString
(
key
),
true
);
return
has
ArrayKeys
&&
hasProperty
(
ArrayIndex
.
toKey
(
index
),
true
);
}
@Override
public
boolean
hasOwnProperty
(
final
Object
key
)
{
return
getArray
().
has
(
getArrayIndex
(
key
))
||
hasProperty
(
JSType
.
toString
(
key
),
false
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
return
isValidArrayIndex
(
index
)
?
hasOwnArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
primitiveKey
),
false
);
}
@Override
public
boolean
hasOwnProperty
(
final
int
key
)
{
return
getArray
().
has
(
getArrayIndex
(
key
))
||
hasProperty
(
JSType
.
toString
(
key
),
false
);
final
int
index
=
getArrayIndex
(
key
);
return
isValidArrayIndex
(
index
)
?
hasOwnArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
key
),
false
);
}
@Override
public
boolean
hasOwnProperty
(
final
long
key
)
{
return
getArray
().
has
(
getArrayIndex
(
key
))
||
hasProperty
(
JSType
.
toString
(
key
),
false
);
final
int
index
=
getArrayIndex
(
key
);
return
isValidArrayIndex
(
index
)
?
hasOwnArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
key
),
false
);
}
@Override
public
boolean
hasOwnProperty
(
final
double
key
)
{
return
getArray
().
has
(
getArrayIndex
(
key
))
||
hasProperty
(
JSType
.
toString
(
key
),
false
);
final
int
index
=
getArrayIndex
(
key
);
return
isValidArrayIndex
(
index
)
?
hasOwnArrayProperty
(
index
)
:
hasProperty
(
JSType
.
toString
(
key
),
false
);
}
private
boolean
hasOwnArrayProperty
(
final
int
index
)
{
return
getArray
().
has
(
index
)
||
(
getMap
().
containsArrayKeys
()
&&
hasProperty
(
ArrayIndex
.
toKey
(
index
),
false
));
}
@Override
...
...
@@ -3190,7 +3197,8 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
@Override
public
boolean
delete
(
final
Object
key
,
final
boolean
strict
)
{
final
int
index
=
getArrayIndex
(
key
);
final
Object
primitiveKey
=
JSType
.
toPrimitive
(
key
,
String
.
class
);
final
int
index
=
getArrayIndex
(
primitiveKey
);
final
ArrayData
array
=
getArray
();
if
(
array
.
has
(
index
))
{
...
...
@@ -3201,7 +3209,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
return
false
;
}
return
deleteObject
(
k
ey
,
strict
);
return
deleteObject
(
primitiveK
ey
,
strict
);
}
private
boolean
deleteObject
(
final
Object
key
,
final
boolean
strict
)
{
...
...
src/jdk/nashorn/internal/runtime/arrays/ArrayIndex.java
浏览文件 @
5489a8db
...
...
@@ -27,6 +27,7 @@ package jdk.nashorn.internal.runtime.arrays;
import
jdk.nashorn.internal.runtime.ConsString
;
import
jdk.nashorn.internal.runtime.JSType
;
import
jdk.nashorn.internal.runtime.ScriptObject
;
/**
* Array index computation helpers. that both throw exceptions or return
...
...
@@ -80,7 +81,12 @@ public final class ArrayIndex {
* Returns a valid array index in an int, if the object represents one. This
* routine needs to perform quickly since all keys are tested with it.
*
* @param key key to check for array index
* <p>The {@code key} parameter must be a JavaScript primitive type, i.e. one of
* {@code String}, {@code Number}, {@code Boolean}, {@code null}, or {@code undefined}.
* {@code ScriptObject} instances should be converted to primitive with
* {@code String.class} hint before being passed to this method.</p>
*
* @param key key to check for array index.
* @return the array index, or {@code -1} if {@code key} does not represent a valid index.
* Note that negative return values other than {@code -1} are considered valid and can be converted to
* the actual index using {@link #toLongIndex(int)}.
...
...
@@ -88,17 +94,30 @@ public final class ArrayIndex {
public
static
int
getArrayIndex
(
final
Object
key
)
{
if
(
key
instanceof
Integer
)
{
return
getArrayIndex
(((
Integer
)
key
).
intValue
());
}
else
if
(
key
instanceof
Number
)
{
return
getArrayIndex
(((
Number
)
key
).
doubleValue
());
}
else
if
(
key
instanceof
Double
)
{
return
getArrayIndex
(((
Double
)
key
).
doubleValue
());
}
else
if
(
key
instanceof
String
)
{
return
(
int
)
fromString
((
String
)
key
);
}
else
if
(
key
instanceof
Long
)
{
return
getArrayIndex
(((
Long
)
key
).
longValue
());
}
else
if
(
key
instanceof
ConsString
)
{
return
(
int
)
fromString
(
key
.
toString
());
}
assert
!(
key
instanceof
ScriptObject
);
return
INVALID_ARRAY_INDEX
;
}
/**
* Returns a valid array index in an int, if {@code key} represents one.
*
* @param key key to check
* @return the array index, or {@code -1} if {@code key} is not a valid array index.
*/
public
static
int
getArrayIndex
(
final
int
key
)
{
return
(
key
>=
0
)
?
key
:
INVALID_ARRAY_INDEX
;
}
/**
* Returns a valid array index in an int, if the long represents one.
*
...
...
@@ -129,10 +148,7 @@ public final class ArrayIndex {
*/
public
static
int
getArrayIndex
(
final
double
key
)
{
if
(
JSType
.
isRepresentableAsInt
(
key
))
{
final
int
intKey
=
(
int
)
key
;
if
(
intKey
>=
0
)
{
return
intKey
;
}
return
getArrayIndex
((
int
)
key
);
}
else
if
(
JSType
.
isRepresentableAsLong
(
key
))
{
return
getArrayIndex
((
long
)
key
);
}
...
...
@@ -177,5 +193,16 @@ public final class ArrayIndex {
return
index
&
JSType
.
MAX_UINT
;
}
/**
* Convert an index to a key string. This is the same as calling {@link #toLongIndex(int)}
* and converting the result to String.
*
* @param index index to convert
* @return index as string
*/
public
static
String
toKey
(
final
int
index
)
{
return
Long
.
toString
(
index
&
JSType
.
MAX_UINT
);
}
}
test/script/basic/JDK-8028210.js
0 → 100644
浏览文件 @
5489a8db
/*
* Copyright (c) 2010, 2013, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* JDK-8028210: Missing conversions on array index expression
*
* @test
* @run
*/
var
array
=
[
1
,
2
];
var
key1
=
[[[
0
]]];
var
key2
=
new
String
(
"
1
"
);
var
key3
=
{
toString
:
function
()
{
print
(
"
toString called
"
);
return
"
2
"
;
}
};
print
(
array
[
key1
]);
print
(
array
[
key2
]);
array
[
key3
]
=
3
;
print
(
array
[
key3
]);
print
(
key3
in
array
);
print
(
array
.
hasOwnProperty
(
key3
));
print
(
delete
array
[
key3
]);
print
(
array
[
key3
]);
// string access
print
(
"
abc
"
[
key1
]);
print
(
"
abc
"
[
key2
]);
print
(
"
abc
"
[
key3
]);
// arguments object
(
function
(
a
,
b
,
c
)
{
print
(
arguments
[
key3
]);
delete
arguments
[
key3
];
print
(
arguments
[
key3
],
c
);
})(
1
,
2
,
3
);
// int keys
array
=
[];
array
[
4294967294
]
=
1
;
print
(
array
[
-
2
]);
print
(
array
[
4294967294
]);
print
(
-
2
in
array
);
print
(
4294967294
in
array
);
print
(
delete
(
array
[
-
2
]));
print
(
array
[
4294967294
]);
print
(
delete
(
array
[
4294967294
]));
print
(
array
[
4294967294
]);
array
=
[];
array
[
-
2
]
=
1
;
print
(
array
[
-
2
]);
print
(
array
[
4294967294
]);
print
(
-
2
in
array
);
print
(
4294967294
in
array
);
print
(
delete
(
array
[
4294967294
]));
print
(
array
[
-
2
]);
print
(
delete
(
array
[
-
2
]));
print
(
array
[
-
2
]);
test/script/basic/JDK-8028210.js.EXPECTED
0 → 100644
浏览文件 @
5489a8db
1
2
toString called
toString called
3
toString called
true
toString called
true
toString called
true
toString called
undefined
a
b
toString called
c
toString called
3
toString called
toString called
undefined 3
undefined
1
false
true
true
1
true
undefined
1
undefined
true
false
true
1
true
undefined
test/script/basic/JDK-8028434.js
0 → 100644
浏览文件 @
5489a8db
/*
* Copyright (c) 2010, 2013, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* JDK-8028434: Check that the line number of the tests in while and do while loops
* is correct. It needs to correspond to the line with the test expression.
*
* @test
* @run
*/
try
{
while
(
test
.
apa
<
0
)
{
print
(
"
x
"
);
}
}
catch
(
e
)
{
var
st
=
e
.
getStackTrace
();
if
(
st
.
length
!=
1
)
{
print
(
"
erroneous stacktrace length
"
+
s
.
length
);
}
if
(
st
[
0
].
lineNumber
!==
33
)
{
print
(
"
erroneous stacktrace element, lineNumber=
"
+
st
[
0
].
lineNumber
+
"
elem=
"
+
st
);
}
}
try
{
do
{
print
(
"
x
"
);
}
while
(
test
.
apa
<
0
);
}
catch
(
e
)
{
var
st
=
e
.
getStackTrace
();
if
(
st
.
length
!=
1
)
{
print
(
"
erroneous stacktrace length
"
+
s
.
length
);
}
if
(
st
[
0
].
lineNumber
!==
49
)
{
print
(
"
erroneous stacktrace element, lineNumber=
"
+
st
[
0
].
lineNumber
+
"
elem=
"
+
st
);
}
}
test/script/basic/JDK-8028434.js.EXPECTED
0 → 100644
浏览文件 @
5489a8db
x
test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
浏览文件 @
5489a8db
...
...
@@ -50,7 +50,7 @@ import org.testng.annotations.Test;
*
* @test
* @build jdk.nashorn.api.scripting.Window jdk.nashorn.api.scripting.WindowEventHandler jdk.nashorn.api.scripting.VariableArityTestInterface jdk.nashorn.api.scripting.ScriptEngineTest
* @run testng jdk.nashorn.api.scripting.ScriptEngineTest
* @run testng
/othervm
jdk.nashorn.api.scripting.ScriptEngineTest
*/
public
class
ScriptEngineTest
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录