Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_nashorn
提交
8e0e9c43
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,发现更多精彩内容 >>
提交
8e0e9c43
编写于
9月 10, 2015
作者:
S
sundar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8130888: Typos in nashorn sources
Reviewed-by: hannesw, mhaupt
上级
24005ae6
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
30 addition
and
30 deletion
+30
-30
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
...k/nashorn/internal/tools/nasgen/ConstructorGenerator.java
+2
-2
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java
...gen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java
+2
-2
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
...jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
+3
-3
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java
...rc/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java
+2
-2
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfoCollector.java
...shorn/internal/tools/nasgen/ScriptClassInfoCollector.java
+3
-3
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
...ashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
+1
-2
src/jdk/nashorn/api/scripting/AbstractJSObject.java
src/jdk/nashorn/api/scripting/AbstractJSObject.java
+1
-1
src/jdk/nashorn/api/scripting/JSObject.java
src/jdk/nashorn/api/scripting/JSObject.java
+1
-1
src/jdk/nashorn/internal/objects/NativeDataView.java
src/jdk/nashorn/internal/objects/NativeDataView.java
+1
-0
src/jdk/nashorn/internal/objects/NativeFunction.java
src/jdk/nashorn/internal/objects/NativeFunction.java
+1
-1
src/jdk/nashorn/internal/runtime/GlobalFunctions.java
src/jdk/nashorn/internal/runtime/GlobalFunctions.java
+2
-2
src/jdk/nashorn/internal/runtime/ScriptObject.java
src/jdk/nashorn/internal/runtime/ScriptObject.java
+4
-4
src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
+2
-2
src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java
...internal/runtime/linker/JavaAdapterBytecodeGenerator.java
+1
-1
src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
+1
-1
src/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java
...k/nashorn/internal/runtime/linker/NashornBeansLinker.java
+1
-1
src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
...rn/internal/runtime/linker/NashornCallSiteDescriptor.java
+1
-1
src/jdk/nashorn/internal/runtime/options/OptionTemplate.java
src/jdk/nashorn/internal/runtime/options/OptionTemplate.java
+1
-1
未找到文件。
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
浏览文件 @
8e0e9c43
...
...
@@ -55,7 +55,7 @@ import java.util.List;
import
jdk.internal.org.objectweb.asm.Handle
;
/**
* This class generates constructor class for a @
ClassInfo
annotated class.
* This class generates constructor class for a @
ScriptClass
annotated class.
*
*/
public
class
ConstructorGenerator
extends
ClassGenerator
{
...
...
@@ -75,7 +75,7 @@ public class ConstructorGenerator extends ClassGenerator {
}
byte
[]
getClassBytes
()
{
// new class exten
s
ing from ScriptObject
// new class exten
d
ing from ScriptObject
final
String
superClass
=
(
constructor
!=
null
)?
SCRIPTFUNCTIONIMPL_TYPE
:
SCRIPTOBJECT_TYPE
;
cw
.
visit
(
V1_7
,
ACC_FINAL
,
className
,
null
,
superClass
,
null
);
if
(
memberCount
>
0
)
{
...
...
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java
浏览文件 @
8e0e9c43
...
...
@@ -161,7 +161,7 @@ public final class MemberInfo implements Cloneable {
}
/**
* Tag something as optimitic builtin or not
* Tag something as optimi
s
tic builtin or not
* @param isOptimistic boolean, true if builtin constructor
*/
public
void
setIsOptimistic
(
final
boolean
isOptimistic
)
{
...
...
@@ -178,7 +178,7 @@ public final class MemberInfo implements Cloneable {
}
/**
* Set th
r
e SpecializedFunction link logic class for specializations, i.e. optimistic
* Set the SpecializedFunction link logic class for specializations, i.e. optimistic
* builtins
* @param linkLogicClass link logic class
*/
...
...
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
浏览文件 @
8e0e9c43
...
...
@@ -42,7 +42,7 @@ import java.io.FileOutputStream;
import
java.io.IOException
;
/**
* This class generates prototype class for a @
ClassInfo
annotated class.
* This class generates prototype class for a @
ScriptClass
annotated class.
*
*/
public
class
PrototypeGenerator
extends
ClassGenerator
{
...
...
@@ -57,7 +57,7 @@ public class PrototypeGenerator extends ClassGenerator {
}
byte
[]
getClassBytes
()
{
// new class exten
s
ing from ScriptObject
// new class exten
d
ing from ScriptObject
cw
.
visit
(
V1_7
,
ACC_FINAL
|
ACC_SUPER
,
className
,
null
,
PROTOTYPEOBJECT_TYPE
,
null
);
if
(
memberCount
>
0
)
{
// add fields
...
...
@@ -155,7 +155,7 @@ public class PrototypeGenerator extends ClassGenerator {
*/
public
static
void
main
(
final
String
[]
args
)
throws
IOException
{
if
(
args
.
length
!=
1
)
{
System
.
err
.
println
(
"Usage: "
+
Constructor
Generator
.
class
.
getName
()
+
" <class>"
);
System
.
err
.
println
(
"Usage: "
+
Prototype
Generator
.
class
.
getName
()
+
" <class>"
);
System
.
exit
(
1
);
}
...
...
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java
浏览文件 @
8e0e9c43
...
...
@@ -48,7 +48,7 @@ import jdk.nashorn.internal.tools.nasgen.MemberInfo.Kind;
*
*/
public
final
class
ScriptClassInfo
{
// descripto
t
s for various annotations
// descripto
r
s for various annotations
static
final
String
SCRIPT_CLASS_ANNO_DESC
=
Type
.
getDescriptor
(
ScriptClass
.
class
);
static
final
String
CONSTRUCTOR_ANNO_DESC
=
Type
.
getDescriptor
(
Constructor
.
class
);
static
final
String
FUNCTION_ANNO_DESC
=
Type
.
getDescriptor
(
Function
.
class
);
...
...
@@ -140,7 +140,7 @@ public final class ScriptClassInfo {
}
boolean
isPrototypeNeeded
()
{
// Prototype class generation is needed if we have atleast one
// Prototype class generation is needed if we have at
least one
// prototype property or @Constructor defined in the class.
for
(
final
MemberInfo
memInfo
:
members
)
{
if
(
memInfo
.
getWhere
()
==
Where
.
PROTOTYPE
||
memInfo
.
isConstructor
())
{
...
...
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfoCollector.java
浏览文件 @
8e0e9c43
...
...
@@ -118,7 +118,7 @@ public class ScriptClassInfoCollector extends ClassVisitor {
addScriptMember
(
memInfo
);
return
new
AnnotationVisitor
(
Opcodes
.
ASM4
,
delegateAV
)
{
// These could be "null" if values are not supp
il
ed,
// These could be "null" if values are not supp
li
ed,
// in which case we have to use the default values.
private
String
name
;
private
Integer
attributes
;
...
...
@@ -194,7 +194,7 @@ public class ScriptClassInfoCollector extends ClassVisitor {
final
MemberInfo
memInfo
=
new
MemberInfo
();
//
annokind == e.g.
GETTER or SPECIALIZED_FUNCTION
//
annoKind ==
GETTER or SPECIALIZED_FUNCTION
memInfo
.
setKind
(
annoKind
);
memInfo
.
setJavaName
(
methodName
);
memInfo
.
setJavaDesc
(
methodDesc
);
...
...
@@ -203,7 +203,7 @@ public class ScriptClassInfoCollector extends ClassVisitor {
addScriptMember
(
memInfo
);
return
new
AnnotationVisitor
(
Opcodes
.
ASM4
,
delegateAV
)
{
// These could be "null" if values are not supp
il
ed,
// These could be "null" if values are not supp
li
ed,
// in which case we have to use the default values.
private
String
name
;
private
Integer
attributes
;
...
...
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
浏览文件 @
8e0e9c43
...
...
@@ -65,7 +65,6 @@ import jdk.nashorn.internal.tools.nasgen.MemberInfo.Kind;
* 2) add "Map" type static field named "$map".
* 3) add static initializer block to initialize map.
*/
public
class
ScriptClassInstrumentor
extends
ClassVisitor
{
private
final
ScriptClassInfo
scriptClassInfo
;
private
final
int
memberCount
;
...
...
@@ -267,7 +266,7 @@ public class ScriptClassInstrumentor extends ClassVisitor {
*/
public
static
void
main
(
final
String
[]
args
)
throws
IOException
{
if
(
args
.
length
!=
1
)
{
System
.
err
.
println
(
"Usage: "
+
ScriptClassIn
foCollec
tor
.
class
.
getName
()
+
" <class>"
);
System
.
err
.
println
(
"Usage: "
+
ScriptClassIn
strumen
tor
.
class
.
getName
()
+
" <class>"
);
System
.
exit
(
1
);
}
...
...
src/jdk/nashorn/api/scripting/AbstractJSObject.java
浏览文件 @
8e0e9c43
...
...
@@ -182,7 +182,7 @@ public abstract class AbstractJSObject implements JSObject {
/**
* Checking whether the given object is an instance of 'this' object.
*
* @param instance instace to check
* @param instance insta
n
ce to check
* @return true if the given 'instance' is an instance of this 'function' object
*/
@Override
...
...
src/jdk/nashorn/api/scripting/JSObject.java
浏览文件 @
8e0e9c43
...
...
@@ -141,7 +141,7 @@ public interface JSObject {
/**
* Checking whether the given object is an instance of 'this' object.
*
* @param instance instace to check
* @param instance insta
n
ce to check
* @return true if the given 'instance' is an instance of this 'function' object
*/
public
boolean
isInstance
(
final
Object
instance
);
...
...
src/jdk/nashorn/internal/objects/NativeDataView.java
浏览文件 @
8e0e9c43
...
...
@@ -22,6 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
jdk.nashorn.internal.objects
;
import
static
jdk
.
nashorn
.
internal
.
runtime
.
ECMAErrors
.
rangeError
;
...
...
src/jdk/nashorn/internal/objects/NativeFunction.java
浏览文件 @
8e0e9c43
...
...
@@ -108,7 +108,7 @@ public final class NativeFunction {
throw
new
AssertionError
(
"Should not reach here"
);
}
/**
/**
* Given an array-like object, converts it into a Java object array suitable for invocation of ScriptRuntime.apply
* or for direct invocation of the applied function.
* @param array the array-like object. Can be null in which case a zero-length array is created.
...
...
src/jdk/nashorn/internal/runtime/GlobalFunctions.java
浏览文件 @
8e0e9c43
...
...
@@ -187,14 +187,14 @@ public final class GlobalFunctions {
double
result
=
0.0
;
int
digit
;
// we should see atleast one valid digit
// we should see at
least one valid digit
boolean
entered
=
false
;
while
(
idx
<
length
)
{
digit
=
fastDigit
(
str
.
charAt
(
idx
++),
radix
);
if
(
digit
<
0
)
{
break
;
}
// we have seen atleast one valid digit in the specified radix
// we have seen at
least one valid digit in the specified radix
entered
=
true
;
result
*=
radix
;
result
+=
digit
;
...
...
src/jdk/nashorn/internal/runtime/ScriptObject.java
浏览文件 @
8e0e9c43
...
...
@@ -224,7 +224,7 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable {
* same combination of prototype and property map.
*
* @param proto the prototype object
* @param map intial {@link PropertyMap}
* @param map in
i
tial {@link PropertyMap}
*/
protected
ScriptObject
(
final
ScriptObject
proto
,
final
PropertyMap
map
)
{
this
(
map
);
...
...
@@ -1257,7 +1257,7 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable {
if
(
oldProto
!=
newProto
)
{
proto
=
newProto
;
// Let current listeners know that the protot
ot
ype has changed and set our map
// Let current listeners know that the prototype has changed and set our map
final
PropertyListeners
listeners
=
getMap
().
getListeners
();
if
(
listeners
!=
null
)
{
listeners
.
protoChanged
();
...
...
@@ -1452,7 +1452,7 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable {
* in {@link ScriptFunction} for hasInstance implementation, walks
* the proto chain
*
* @param instance instace to check
* @param instance insta
n
ce to check
* @return true if 'instance' is an instance of this object
*/
public
boolean
isInstance
(
final
ScriptObject
instance
)
{
...
...
@@ -1869,7 +1869,7 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable {
* @param desc the call site descriptor.
* @param request the link request
*
* @return GuardedInvocation to be invoed at call site.
* @return GuardedInvocation to be invo
k
ed at call site.
*/
protected
GuardedInvocation
findCallMethod
(
final
CallSiteDescriptor
desc
,
final
LinkRequest
request
)
{
return
notAFunction
(
desc
);
...
...
src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
浏览文件 @
8e0e9c43
...
...
@@ -70,7 +70,7 @@ public final class Bootstrap {
private
static
final
MethodHandle
VOID_TO_OBJECT
=
MH
.
constant
(
Object
.
class
,
ScriptRuntime
.
UNDEFINED
);
/**
* The default dynalink relink threshold for megamorphis
is
m is 8. In the case
* The default dynalink relink threshold for megamorphism is 8. In the case
* of object fields only, it is fine. However, with dual fields, in order to get
* performance on benchmarks with a lot of object instantiation and then field
* reassignment, it can take slightly more relinks to become stable with type
...
...
@@ -214,7 +214,7 @@ public final class Bootstrap {
* @param type method type
* @param programPoint program point to bind to callsite
*
* @return callsite for a math in
strin
ic node
* @return callsite for a math in
trins
ic node
*/
public
static
CallSite
mathBootstrap
(
final
MethodHandles
.
Lookup
lookup
,
final
String
name
,
final
MethodType
type
,
final
int
programPoint
)
{
final
MethodHandle
mh
;
...
...
src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java
浏览文件 @
8e0e9c43
...
...
@@ -571,7 +571,7 @@ final class JavaAdapterBytecodeGenerator {
mv
.
visitVarInsn
(
ALOAD
,
0
);
if
(
fromFunction
&&
!
mi
.
getName
().
equals
(
samName
))
{
// Constructors initializing from a ScriptFunction only initialize methods with the SAM name.
// NOTE: if there's a concrete overloaded method sharing the SAM name, it'll be overriden too. This
// NOTE: if there's a concrete overloaded method sharing the SAM name, it'll be overrid
d
en too. This
// is a deliberate design choice. All other method handles are initialized to null.
mv
.
visitInsn
(
ACONST_NULL
);
}
else
{
...
...
src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
浏览文件 @
8e0e9c43
...
...
@@ -500,7 +500,7 @@ public class LinkerCallSite extends ChainedCallSite {
* @param desc callsite descriptor string
* @param args arguments to function
*
* @throws Throwable if invocation fail
e
s or throws exception/error
* @throws Throwable if invocation fails or throws exception/error
*/
@SuppressWarnings
(
"unused"
)
public
void
traceMiss
(
final
String
desc
,
final
Object
...
args
)
throws
Throwable
{
...
...
src/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java
浏览文件 @
8e0e9c43
...
...
@@ -171,7 +171,7 @@ public class NashornBeansLinker implements GuardingDynamicLinker {
}
for
(
final
Class
<?>
iface
:
clazz
.
getInterfaces
())
{
// check accessiblity up-front
// check accessib
i
lity up-front
if
(!
Context
.
isAccessibleClass
(
iface
))
{
continue
;
}
...
...
src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
浏览文件 @
8e0e9c43
...
...
@@ -323,7 +323,7 @@ public final class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor
* {@code NashornCallSiteDescriptor}. This allows for graceful interoperability when linking Nashorn with code
* generated outside of Nashorn.
* @param flag the tested flag
* @return true if the flag is set, false otherwise (it will be false if the decriptor is not a Nashorn call site
* @return true if the flag is set, false otherwise (it will be false if the de
s
criptor is not a Nashorn call site
* descriptor).
*/
private
static
boolean
isFlag
(
final
CallSiteDescriptor
desc
,
final
int
flag
)
{
...
...
src/jdk/nashorn/internal/runtime/options/OptionTemplate.java
浏览文件 @
8e0e9c43
...
...
@@ -163,7 +163,7 @@ public final class OptionTemplate implements Comparable<OptionTemplate> {
/**
* Does this option automatically enable another option, i.e. a dependency.
* @return the depende
cy or null if non
exists
* @return the depende
ncy or null if none
exists
*/
public
String
getDependency
()
{
return
this
.
dependency
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录