Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_nashorn
提交
25f094b1
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,发现更多精彩内容 >>
提交
25f094b1
编写于
8月 23, 2013
作者:
L
lagergren
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8023550: -d option was broken for any dir but '.'. Fixed Java warnings.
Reviewed-by: jlaskey, sundar
上级
1e5a0a50
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
71 addition
and
60 deletion
+71
-60
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
...k/nashorn/internal/tools/nasgen/ConstructorGenerator.java
+0
-1
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
...ashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
+0
-1
src/jdk/internal/dynalink/ChainedCallSite.java
src/jdk/internal/dynalink/ChainedCallSite.java
+0
-1
src/jdk/internal/dynalink/DefaultBootstrapper.java
src/jdk/internal/dynalink/DefaultBootstrapper.java
+1
-1
src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
+1
-0
src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
+1
-0
src/jdk/nashorn/api/scripting/NashornScriptEngine.java
src/jdk/nashorn/api/scripting/NashornScriptEngine.java
+2
-2
src/jdk/nashorn/internal/codegen/CompilationPhase.java
src/jdk/nashorn/internal/codegen/CompilationPhase.java
+23
-19
src/jdk/nashorn/internal/objects/NativeArray.java
src/jdk/nashorn/internal/objects/NativeArray.java
+2
-0
src/jdk/nashorn/internal/objects/NativeRegExp.java
src/jdk/nashorn/internal/objects/NativeRegExp.java
+1
-2
src/jdk/nashorn/internal/runtime/Context.java
src/jdk/nashorn/internal/runtime/Context.java
+0
-1
src/jdk/nashorn/internal/runtime/DebuggerSupport.java
src/jdk/nashorn/internal/runtime/DebuggerSupport.java
+4
-5
src/jdk/nashorn/internal/runtime/ScriptObject.java
src/jdk/nashorn/internal/runtime/ScriptObject.java
+6
-4
src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java
...k/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java
+3
-1
src/jdk/nashorn/internal/runtime/regexp/joni/BitSet.java
src/jdk/nashorn/internal/runtime/regexp/joni/BitSet.java
+1
-0
src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java
...nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java
+1
-7
src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java
...nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java
+1
-0
src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java
src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java
+1
-0
src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java
src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java
+0
-2
src/jdk/nashorn/internal/runtime/regexp/joni/Region.java
src/jdk/nashorn/internal/runtime/regexp/joni/Region.java
+1
-0
src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java
.../nashorn/internal/runtime/regexp/joni/ScannerSupport.java
+0
-3
src/jdk/nashorn/internal/runtime/regexp/joni/SearchAlgorithm.java
...nashorn/internal/runtime/regexp/joni/SearchAlgorithm.java
+16
-1
src/jdk/nashorn/internal/runtime/regexp/joni/StackMachine.java
...dk/nashorn/internal/runtime/regexp/joni/StackMachine.java
+1
-1
src/jdk/nashorn/internal/runtime/regexp/joni/WarnCallback.java
...dk/nashorn/internal/runtime/regexp/joni/WarnCallback.java
+1
-0
src/jdk/nashorn/internal/runtime/regexp/joni/ast/EncloseNode.java
...nashorn/internal/runtime/regexp/joni/ast/EncloseNode.java
+0
-1
src/jdk/nashorn/internal/runtime/regexp/joni/ast/Node.java
src/jdk/nashorn/internal/runtime/regexp/joni/ast/Node.java
+2
-1
src/jdk/nashorn/internal/runtime/regexp/joni/ast/QuantifierNode.java
...horn/internal/runtime/regexp/joni/ast/QuantifierNode.java
+1
-0
src/jdk/nashorn/internal/runtime/regexp/joni/exception/ErrorMessages.java
...internal/runtime/regexp/joni/exception/ErrorMessages.java
+0
-2
tools/fxshell/jdk/nashorn/tools/FXShell.java
tools/fxshell/jdk/nashorn/tools/FXShell.java
+1
-4
未找到文件。
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
浏览文件 @
25f094b1
...
...
@@ -27,7 +27,6 @@ package jdk.nashorn.internal.tools.nasgen;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
ACC_FINAL
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
ACC_PUBLIC
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
ACC_SUPER
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
H_INVOKESTATIC
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
V1_7
;
import
static
jdk
.
nashorn
.
internal
.
tools
.
nasgen
.
StringConstants
.
CONSTRUCTOR_SUFFIX
;
...
...
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
浏览文件 @
25f094b1
...
...
@@ -27,7 +27,6 @@ package jdk.nashorn.internal.tools.nasgen;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
ALOAD
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
DUP
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
GETSTATIC
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
INVOKESPECIAL
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
INVOKESTATIC
;
import
static
jdk
.
internal
.
org
.
objectweb
.
asm
.
Opcodes
.
NEW
;
...
...
src/jdk/internal/dynalink/ChainedCallSite.java
浏览文件 @
25f094b1
...
...
@@ -121,7 +121,6 @@ public class ChainedCallSite extends AbstractRelinkableCallSite {
* to change the value. If your override returns a value less than 1, the code will break.
* @return the maximum number of method handles in the chain.
*/
@SuppressWarnings
(
"static-method"
)
protected
int
getMaxChainLength
()
{
return
8
;
}
...
...
src/jdk/internal/dynalink/DefaultBootstrapper.java
浏览文件 @
25f094b1
...
...
@@ -133,7 +133,7 @@ public class DefaultBootstrapper {
* @param type the method signature at the call site
* @return a new {@link MonomorphicCallSite} linked with the default dynamic linker.
*/
public
static
CallSite
publicBootstrap
(
@SuppressWarnings
(
"unused"
)
MethodHandles
.
Lookup
caller
,
String
name
,
MethodType
type
)
{
public
static
CallSite
publicBootstrap
(
MethodHandles
.
Lookup
caller
,
String
name
,
MethodType
type
)
{
return
bootstrapInternal
(
MethodHandles
.
publicLookup
(),
name
,
type
);
}
...
...
src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
浏览文件 @
25f094b1
...
...
@@ -97,6 +97,7 @@ import java.util.Collections;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
jdk.internal.dynalink.CallSiteDescriptor
;
import
jdk.internal.dynalink.beans.GuardedInvocationComponent.ValidationType
;
import
jdk.internal.dynalink.linker.GuardedInvocation
;
...
...
src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
浏览文件 @
25f094b1
...
...
@@ -148,6 +148,7 @@ class OverloadedDynamicMethod extends DynamicMethod {
}
}
@SuppressWarnings
(
"fallthrough"
)
@Override
public
MethodHandle
getInvocation
(
final
CallSiteDescriptor
callSiteDescriptor
,
final
LinkerServices
linkerServices
)
{
final
MethodType
callSiteType
=
callSiteDescriptor
.
getMethodType
();
...
...
src/jdk/nashorn/api/scripting/NashornScriptEngine.java
浏览文件 @
25f094b1
...
...
@@ -124,6 +124,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C
}
// load engine.js and return content as a char[]
@SuppressWarnings
(
"resource"
)
private
static
char
[]
loadEngineJSSource
()
{
final
String
script
=
"resources/engine.js"
;
try
{
...
...
@@ -212,9 +213,8 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C
// just create normal SimpleBindings.
// We use same 'global' for all Bindings.
return
new
SimpleBindings
();
}
else
{
return
createGlobalMirror
(
null
);
}
return
createGlobalMirror
(
null
);
}
// Compilable methods
...
...
src/jdk/nashorn/internal/codegen/CompilationPhase.java
浏览文件 @
25f094b1
...
...
@@ -414,30 +414,34 @@ enum CompilationPhase {
compiler
.
getCodeInstaller
().
verify
(
bytecode
);
}
// should code be dumped to disk - only valid in compile_only
// mode?
// should code be dumped to disk - only valid in compile_only mode?
if
(
env
.
_dest_dir
!=
null
&&
env
.
_compile_only
)
{
final
String
fileName
=
className
.
replace
(
'.'
,
File
.
separatorChar
)
+
".class"
;
final
int
index
=
fileName
.
lastIndexOf
(
File
.
separatorChar
);
final
int
index
=
fileName
.
lastIndexOf
(
File
.
separatorChar
);
final
File
dir
;
if
(
index
!=
-
1
)
{
final
File
dir
=
new
File
(
fileName
.
substring
(
0
,
index
));
try
{
if
(!
dir
.
exists
()
&&
!
dir
.
mkdirs
())
{
throw
new
IOException
(
dir
.
toString
());
}
final
File
file
=
new
File
(
env
.
_dest_dir
,
fileName
);
try
(
final
FileOutputStream
fos
=
new
FileOutputStream
(
file
))
{
fos
.
write
(
bytecode
);
}
}
catch
(
final
IOException
e
)
{
Compiler
.
LOG
.
warning
(
"Skipping class dump for "
,
className
,
": "
,
ECMAErrors
.
getMessage
(
"io.error.cant.write"
,
dir
.
toString
()));
dir
=
new
File
(
env
.
_dest_dir
,
fileName
.
substring
(
0
,
index
));
}
else
{
dir
=
new
File
(
env
.
_dest_dir
);
}
try
{
if
(!
dir
.
exists
()
&&
!
dir
.
mkdirs
())
{
throw
new
IOException
(
dir
.
toString
());
}
final
File
file
=
new
File
(
env
.
_dest_dir
,
fileName
);
try
(
final
FileOutputStream
fos
=
new
FileOutputStream
(
file
))
{
fos
.
write
(
bytecode
);
}
Compiler
.
LOG
.
info
(
"Wrote class to '"
+
file
.
getAbsolutePath
()
+
'\''
);
}
catch
(
final
IOException
e
)
{
Compiler
.
LOG
.
warning
(
"Skipping class dump for "
,
className
,
": "
,
ECMAErrors
.
getMessage
(
"io.error.cant.write"
,
dir
.
toString
()));
}
}
}
...
...
src/jdk/nashorn/internal/objects/NativeArray.java
浏览文件 @
25f094b1
...
...
@@ -40,6 +40,7 @@ import java.util.Comparator;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.concurrent.Callable
;
import
jdk.nashorn.api.scripting.ScriptObjectMirror
;
import
jdk.nashorn.internal.objects.annotations.Attribute
;
import
jdk.nashorn.internal.objects.annotations.Constructor
;
...
...
@@ -632,6 +633,7 @@ public final class NativeArray extends ScriptObject {
return
new
NativeArray
(
list
.
toArray
());
}
@SuppressWarnings
(
"null"
)
private
static
void
concatToList
(
final
ArrayList
<
Object
>
list
,
final
Object
obj
)
{
final
boolean
isScriptArray
=
isArray
(
obj
);
final
boolean
isScriptObject
=
isScriptArray
||
obj
instanceof
ScriptObject
;
...
...
src/jdk/nashorn/internal/objects/NativeRegExp.java
浏览文件 @
25f094b1
...
...
@@ -65,10 +65,9 @@ public final class NativeRegExp extends ScriptObject {
private
RegExp
regexp
;
// Reference to global object needed to support static RegExp properties
private
Global
globalObject
;
private
final
Global
globalObject
;
// initialized by nasgen
@SuppressWarnings
(
"unused"
)
private
static
PropertyMap
$nasgenmap
$
;
static
PropertyMap
getInitialMap
()
{
...
...
src/jdk/nashorn/internal/runtime/Context.java
浏览文件 @
25f094b1
...
...
@@ -894,7 +894,6 @@ public final class Context {
return
script
;
}
@SuppressWarnings
(
"static-method"
)
private
ScriptLoader
createNewLoader
()
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
ScriptLoader
>()
{
...
...
src/jdk/nashorn/internal/runtime/DebuggerSupport.java
浏览文件 @
25f094b1
...
...
@@ -44,6 +44,7 @@ final class DebuggerSupport {
* Hook to force the loading of the DebuggerValueDesc class so that it is
* available to external debuggers.
*/
@SuppressWarnings
(
"unused"
)
DebuggerValueDesc
forceLoad
=
new
DebuggerValueDesc
(
null
,
false
,
null
,
null
);
}
...
...
@@ -111,9 +112,8 @@ final class DebuggerSupport {
if
(
value
instanceof
ScriptObject
&&
!(
value
instanceof
ScriptFunction
))
{
final
ScriptObject
object
=
(
ScriptObject
)
value
;
return
new
DebuggerValueDesc
(
name
,
!
object
.
isEmpty
(),
value
,
objectAsString
(
object
,
all
,
duplicates
));
}
else
{
return
new
DebuggerValueDesc
(
name
,
false
,
value
,
valueAsString
(
value
));
}
return
new
DebuggerValueDesc
(
name
,
false
,
value
,
valueAsString
(
value
));
}
/**
...
...
@@ -199,7 +199,7 @@ final class DebuggerSupport {
final
String
valueAsString
=
descs
[
i
].
valueAsString
;
sb
.
append
(
descs
[
i
].
key
);
sb
.
append
(
": "
);
sb
.
append
(
descs
[
i
].
valueAsString
);
sb
.
append
(
valueAsString
);
}
}
...
...
@@ -239,9 +239,8 @@ final class DebuggerSupport {
case
FUNCTION:
if
(
value
instanceof
ScriptFunction
)
{
return
((
ScriptFunction
)
value
).
toSource
();
}
else
{
return
value
.
toString
();
}
return
value
.
toString
();
default
:
return
value
.
toString
();
...
...
src/jdk/nashorn/internal/runtime/ScriptObject.java
浏览文件 @
25f094b1
...
...
@@ -52,6 +52,7 @@ import java.util.LinkedHashSet;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
jdk.internal.dynalink.CallSiteDescriptor
;
import
jdk.internal.dynalink.linker.GuardedInvocation
;
import
jdk.internal.dynalink.linker.LinkRequest
;
...
...
@@ -1149,12 +1150,12 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
if
(
newProto
==
null
||
newProto
instanceof
ScriptObject
)
{
// check for circularity
ScriptObject
p
roto
=
(
ScriptObject
)
newProto
;
while
(
p
roto
!=
null
)
{
if
(
p
roto
==
this
)
{
ScriptObject
p
=
(
ScriptObject
)
newProto
;
while
(
p
!=
null
)
{
if
(
p
==
this
)
{
throw
typeError
(
"circular.__proto__.set"
,
ScriptRuntime
.
safeToString
(
this
));
}
p
roto
=
proto
.
getProto
();
p
=
p
.
getProto
();
}
setProto
((
ScriptObject
)
newProto
);
}
else
{
...
...
@@ -2017,6 +2018,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
* @param request the link request
* @return GuardedInvocation to be invoked at call site.
*/
@SuppressWarnings
(
"null"
)
public
GuardedInvocation
noSuchProperty
(
final
CallSiteDescriptor
desc
,
final
LinkRequest
request
)
{
final
String
name
=
desc
.
getNameToken
(
CallSiteDescriptor
.
NAME_OPERAND
);
final
FindProperty
find
=
findProperty
(
NO_SUCH_PROPERTY_NAME
,
true
);
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java
浏览文件 @
25f094b1
...
...
@@ -39,7 +39,6 @@ import jdk.nashorn.internal.runtime.regexp.joni.constants.NodeType;
import
jdk.nashorn.internal.runtime.regexp.joni.constants.OPCode
;
import
jdk.nashorn.internal.runtime.regexp.joni.constants.OPSize
;
import
jdk.nashorn.internal.runtime.regexp.joni.constants.TargetInfo
;
import
jdk.nashorn.internal.runtime.regexp.joni.encoding.CharacterType
;
final
class
ArrayCompiler
extends
Compiler
{
private
int
[]
code
;
...
...
@@ -345,6 +344,7 @@ final class ArrayCompiler extends Compiler {
private
static
final
int
QUANTIFIER_EXPAND_LIMIT_SIZE
=
50
;
// was 50
@SuppressWarnings
(
"unused"
)
private
static
boolean
cknOn
(
int
ckn
)
{
return
ckn
>
0
;
}
...
...
@@ -879,6 +879,7 @@ final class ArrayCompiler extends Compiler {
}
}
@SuppressWarnings
(
"unused"
)
private
void
addStateCheckNum
(
int
num
)
{
addInt
(
num
);
}
...
...
@@ -887,6 +888,7 @@ final class ArrayCompiler extends Compiler {
addInt
(
addr
);
}
@SuppressWarnings
(
"unused"
)
private
void
addAbsAddr
(
int
addr
)
{
addInt
(
addr
);
}
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/BitSet.java
浏览文件 @
25f094b1
...
...
@@ -29,6 +29,7 @@ public final class BitSet {
final
int
[]
bits
=
new
int
[
BITSET_SIZE
];
private
static
final
int
BITS_TO_STRING_WRAP
=
4
;
@Override
public
String
toString
()
{
StringBuilder
buffer
=
new
StringBuilder
();
buffer
.
append
(
"BitSet"
);
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java
浏览文件 @
25f094b1
...
...
@@ -96,6 +96,7 @@ class ByteCodeMachine extends StackMachine {
}
}
@Override
protected
final
int
matchAt
(
int
range
,
int
sstart
,
int
sprev
)
{
this
.
range
=
range
;
this
.
sstart
=
sstart
;
...
...
@@ -731,8 +732,6 @@ class ByteCodeMachine extends StackMachine {
// STRING_CMP
while
(
n
--
>
0
)
if
(
chars
[
pstart
++]
!=
chars
[
s
++])
{
opFail
();
return
;}
int
len
;
// beyond string check
if
(
sprev
<
range
)
{
while
(
sprev
+
1
<
s
)
sprev
++;
...
...
@@ -768,7 +767,6 @@ class ByteCodeMachine extends StackMachine {
if
(!
stringCmpIC
(
regex
.
caseFoldFlag
,
pstart
,
this
,
n
,
end
))
{
opFail
();
return
;}
s
=
value
;
int
len
;
// if (sprev < chars.length)
while
(
sprev
+
1
<
s
)
sprev
++;
}
...
...
@@ -796,8 +794,6 @@ class ByteCodeMachine extends StackMachine {
s
=
swork
;
int
len
;
// beyond string check
if
(
sprev
<
range
)
{
while
(
sprev
+
1
<
s
)
sprev
++;
...
...
@@ -829,7 +825,6 @@ class ByteCodeMachine extends StackMachine {
if
(!
stringCmpIC
(
regex
.
caseFoldFlag
,
pstart
,
this
,
n
,
end
))
continue
loop
;
// STRING_CMP_VALUE_IC
s
=
value
;
int
len
;
// if (sprev < chars.length)
while
(
sprev
+
1
<
s
)
sprev
++;
...
...
@@ -902,7 +897,6 @@ class ByteCodeMachine extends StackMachine {
sprev
=
s
;
if
(
backrefMatchAtNestedLevel
(
ic
!=
0
,
regex
.
caseFoldFlag
,
level
,
tlen
,
ip
))
{
// (s) and (end) implicit
int
len
;
while
(
sprev
+
1
<
s
)
sprev
++;
ip
+=
tlen
;
// * SIZE_MEMNUM
}
else
{
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java
浏览文件 @
25f094b1
...
...
@@ -58,6 +58,7 @@ public final class CodeRangeBuffer implements Cloneable {
used
=
orig
.
used
;
}
@Override
public
String
toString
()
{
StringBuilder
buf
=
new
StringBuilder
();
buf
.
append
(
"CodeRange"
);
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java
浏览文件 @
25f094b1
...
...
@@ -139,6 +139,7 @@ class Lexer extends ScannerSupport {
}
}
@SuppressWarnings
(
"fallthrough"
)
/* \M-, \C-, \c, or \... */
private
int
fetchEscapedValue
()
{
if
(!
left
())
{
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java
浏览文件 @
25f094b1
...
...
@@ -297,8 +297,6 @@ class Parser extends Lexer {
throw
new
SyntaxException
(
ERR_END_PATTERN_IN_GROUP
);
}
boolean
listCapture
=
false
;
fetch
();
switch
(
c
)
{
case
':'
:
/* (?:...) grouping only */
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/Region.java
浏览文件 @
25f094b1
...
...
@@ -32,6 +32,7 @@ public final class Region {
this
.
end
=
new
int
[
num
];
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"Region: \n"
);
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java
浏览文件 @
25f094b1
...
...
@@ -21,9 +21,6 @@ package jdk.nashorn.internal.runtime.regexp.joni;
import
jdk.nashorn.internal.runtime.regexp.joni.encoding.IntHolder
;
import
jdk.nashorn.internal.runtime.regexp.joni.exception.ErrorMessages
;
import
jdk.nashorn.internal.runtime.regexp.joni.exception.InternalException
;
import
jdk.nashorn.internal.runtime.regexp.joni.exception.SyntaxException
;
import
jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException
;
abstract
class
ScannerSupport
extends
IntHolder
implements
ErrorMessages
{
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/SearchAlgorithm.java
浏览文件 @
25f094b1
...
...
@@ -28,14 +28,17 @@ public abstract class SearchAlgorithm {
public
static
final
SearchAlgorithm
NONE
=
new
SearchAlgorithm
()
{
@Override
public
final
String
getName
()
{
return
"NONE"
;
}
@Override
public
final
int
search
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
textEnd
,
int
textRange
)
{
return
textP
;
}
@Override
public
final
int
searchBackward
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
adjustText
,
int
textEnd
,
int
textStart
,
int
s_
,
int
range_
)
{
return
textP
;
}
...
...
@@ -44,10 +47,12 @@ public abstract class SearchAlgorithm {
public
static
final
SearchAlgorithm
SLOW
=
new
SearchAlgorithm
()
{
@Override
public
final
String
getName
()
{
return
"EXACT"
;
}
@Override
public
final
int
search
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
textEnd
,
int
textRange
)
{
char
[]
target
=
regex
.
exact
;
int
targetP
=
regex
.
exactP
;
...
...
@@ -78,6 +83,7 @@ public abstract class SearchAlgorithm {
return
-
1
;
}
@Override
public
final
int
searchBackward
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
adjustText
,
int
textEnd
,
int
textStart
,
int
s_
,
int
range_
)
{
char
[]
target
=
regex
.
exact
;
int
targetP
=
regex
.
exactP
;
...
...
@@ -114,10 +120,12 @@ public abstract class SearchAlgorithm {
this
.
caseFoldFlag
=
regex
.
caseFoldFlag
;
}
@Override
public
final
String
getName
()
{
return
"EXACT_IC"
;
}
@Override
public
final
int
search
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
textEnd
,
int
textRange
)
{
char
[]
target
=
regex
.
exact
;
int
targetP
=
regex
.
exactP
;
...
...
@@ -136,6 +144,7 @@ public abstract class SearchAlgorithm {
return
-
1
;
}
@Override
public
final
int
searchBackward
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
adjustText
,
int
textEnd
,
int
textStart
,
int
s_
,
int
range_
)
{
char
[]
target
=
regex
.
exact
;
int
targetP
=
regex
.
exactP
;
...
...
@@ -163,14 +172,16 @@ public abstract class SearchAlgorithm {
}
return
true
;
}
}
;
}
public
static
final
SearchAlgorithm
BM
=
new
SearchAlgorithm
()
{
@Override
public
final
String
getName
()
{
return
"EXACT_BM"
;
}
@Override
public
final
int
search
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
textEnd
,
int
textRange
)
{
char
[]
target
=
regex
.
exact
;
int
targetP
=
regex
.
exactP
;
...
...
@@ -212,6 +223,7 @@ public abstract class SearchAlgorithm {
private
static
final
int
BM_BACKWARD_SEARCH_LENGTH_THRESHOLD
=
100
;
@Override
public
final
int
searchBackward
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
adjustText
,
int
textEnd
,
int
textStart
,
int
s_
,
int
range_
)
{
char
[]
target
=
regex
.
exact
;
int
targetP
=
regex
.
exactP
;
...
...
@@ -263,10 +275,12 @@ public abstract class SearchAlgorithm {
public
static
final
SearchAlgorithm
MAP
=
new
SearchAlgorithm
()
{
@Override
public
final
String
getName
()
{
return
"MAP"
;
}
@Override
public
final
int
search
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
textEnd
,
int
textRange
)
{
byte
[]
map
=
regex
.
map
;
int
s
=
textP
;
...
...
@@ -278,6 +292,7 @@ public abstract class SearchAlgorithm {
return
-
1
;
}
@Override
public
final
int
searchBackward
(
Regex
regex
,
char
[]
text
,
int
textP
,
int
adjustText
,
int
textEnd
,
int
textStart
,
int
s_
,
int
range_
)
{
byte
[]
map
=
regex
.
map
;
int
s
=
textStart
;
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/StackMachine.java
浏览文件 @
25f094b1
...
...
@@ -458,7 +458,7 @@ abstract class StackMachine extends Matcher implements StackType {
isNull
=
0
;
break
;
}
else
if
(
endp
!=
s
)
{
isNull
=
-
1
;
;
/* empty, but position changed */
isNull
=
-
1
;
/* empty, but position changed */
}
}
k
++;
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/WarnCallback.java
浏览文件 @
25f094b1
...
...
@@ -24,6 +24,7 @@ package jdk.nashorn.internal.runtime.regexp.joni;
*/
public
interface
WarnCallback
{
WarnCallback
DEFAULT
=
new
WarnCallback
()
{
@Override
public
void
warn
(
String
message
)
{
System
.
err
.
println
(
message
);
}
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/ast/EncloseNode.java
浏览文件 @
25f094b1
...
...
@@ -19,7 +19,6 @@
*/
package
jdk.nashorn.internal.runtime.regexp.joni.ast
;
import
jdk.nashorn.internal.runtime.regexp.joni.Config
;
import
jdk.nashorn.internal.runtime.regexp.joni.Option
;
import
jdk.nashorn.internal.runtime.regexp.joni.constants.EncloseType
;
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/ast/Node.java
浏览文件 @
25f094b1
...
...
@@ -35,7 +35,7 @@ public abstract class Node implements NodeType {
}
protected
void
setChild
(
Node
tgt
){}
// default definition
protected
Node
getChild
(){
return
null
;}
;
// default definition
protected
Node
getChild
(){
return
null
;}
// default definition
public
void
swap
(
Node
with
)
{
Node
tmp
;
...
...
@@ -74,6 +74,7 @@ public abstract class Node implements NodeType {
return
getName
()
+
":0x"
+
Integer
.
toHexString
(
System
.
identityHashCode
(
this
));
}
@Override
public
final
String
toString
()
{
StringBuilder
s
=
new
StringBuilder
();
s
.
append
(
"<"
+
getAddressName
()
+
" ("
+
(
parent
==
null
?
"NULL"
:
parent
.
getAddressName
())
+
")>"
);
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/ast/QuantifierNode.java
浏览文件 @
25f094b1
...
...
@@ -223,6 +223,7 @@ public final class QuantifierNode extends StateNode {
other
.
target
=
null
;
// remove target from reduced quantifier
}
@SuppressWarnings
(
"fallthrough"
)
public
int
setQuantifier
(
Node
tgt
,
boolean
group
,
ScanEnvironment
env
,
char
[]
chars
,
int
p
,
int
end
)
{
if
(
lower
==
1
&&
upper
==
1
)
return
1
;
...
...
src/jdk/nashorn/internal/runtime/regexp/joni/exception/ErrorMessages.java
浏览文件 @
25f094b1
...
...
@@ -19,8 +19,6 @@
*/
package
jdk.nashorn.internal.runtime.regexp.joni.exception
;
import
jdk.nashorn.internal.runtime.regexp.joni.Config
;
public
interface
ErrorMessages
{
/* from jcodings */
...
...
tools/fxshell/jdk/nashorn/tools/FXShell.java
浏览文件 @
25f094b1
...
...
@@ -32,13 +32,9 @@ import java.io.UnsupportedEncodingException;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
javafx.application.Application
;
import
javafx.stage.Stage
;
import
javax.script.Invocable
;
import
javax.script.ScriptContext
;
import
javax.script.ScriptEngine
;
import
javax.script.ScriptEngineFactory
;
import
javax.script.ScriptEngineManager
;
...
...
@@ -180,6 +176,7 @@ public class FXShell extends Application {
*
* @return Last evaluation result (discarded.)
*/
@SuppressWarnings
(
"resource"
)
private
Object
load
(
String
path
)
{
try
{
FileInputStream
file
=
new
FileInputStream
(
path
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录