aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlana <none@none>2013-07-22 17:40:26 -0700
committerlana <none@none>2013-07-22 17:40:26 -0700
commitd0aaaabebc9cb1e55bef00080c5349fb000e8993 (patch)
tree4d0a365d3f8e456dcd9ad168e1377a1864ed9f51
parent8c2d169b7972066040920e39c9cfede58e547f89 (diff)
parentd16cace3563731af26a3edf7a9024b717294ddf7 (diff)
-rw-r--r--buildtools/nasgen/build.xml3
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java89
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java18
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java5
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java19
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java14
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java96
-rw-r--r--docs/JavaScriptingProgrammersGuide.html9
-rw-r--r--make/build-nasgen.xml7
-rw-r--r--make/build.xml72
-rw-r--r--make/code_coverage.xml8
-rw-r--r--make/project.properties3
-rw-r--r--makefiles/BuildNashorn.gmk6
-rw-r--r--src/jdk/internal/dynalink/DynamicLinker.java47
-rw-r--r--src/jdk/internal/dynalink/beans/AbstractJavaLinker.java248
-rw-r--r--src/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java27
-rw-r--r--src/jdk/internal/dynalink/beans/BeansLinker.java68
-rw-r--r--src/jdk/internal/dynalink/beans/CallerSensitiveDetector.java148
-rw-r--r--src/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java158
-rw-r--r--src/jdk/internal/dynalink/beans/ClassString.java4
-rw-r--r--src/jdk/internal/dynalink/beans/DynamicMethod.java38
-rw-r--r--src/jdk/internal/dynalink/beans/DynamicMethodLinker.java13
-rw-r--r--src/jdk/internal/dynalink/beans/FacetIntrospector.java4
-rw-r--r--src/jdk/internal/dynalink/beans/MaximallySpecific.java68
-rw-r--r--src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java92
-rw-r--r--src/jdk/internal/dynalink/beans/OverloadedMethod.java4
-rw-r--r--src/jdk/internal/dynalink/beans/SimpleDynamicMethod.java136
-rw-r--r--src/jdk/internal/dynalink/beans/SingleDynamicMethod.java255
-rw-r--r--src/jdk/internal/dynalink/beans/StaticClassIntrospector.java10
-rw-r--r--src/jdk/internal/dynalink/beans/StaticClassLinker.java42
-rw-r--r--src/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java3
-rw-r--r--src/jdk/internal/dynalink/support/Lookup.java25
-rw-r--r--src/jdk/nashorn/api/scripting/NashornException.java4
-rw-r--r--src/jdk/nashorn/api/scripting/NashornScriptEngine.java15
-rw-r--r--src/jdk/nashorn/api/scripting/ScriptObjectMirror.java101
-rw-r--r--src/jdk/nashorn/internal/codegen/Attr.java173
-rw-r--r--src/jdk/nashorn/internal/codegen/BranchOptimizer.java14
-rw-r--r--src/jdk/nashorn/internal/codegen/CodeGenerator.java489
-rw-r--r--src/jdk/nashorn/internal/codegen/CompilationPhase.java34
-rw-r--r--src/jdk/nashorn/internal/codegen/Compiler.java7
-rw-r--r--src/jdk/nashorn/internal/codegen/CompilerConstants.java4
-rw-r--r--src/jdk/nashorn/internal/codegen/FieldObjectCreator.java69
-rw-r--r--src/jdk/nashorn/internal/codegen/FinalizeTypes.java98
-rw-r--r--src/jdk/nashorn/internal/codegen/FoldConstants.java8
-rw-r--r--src/jdk/nashorn/internal/codegen/FunctionSignature.java8
-rw-r--r--src/jdk/nashorn/internal/codegen/Lower.java93
-rw-r--r--src/jdk/nashorn/internal/codegen/MapCreator.java38
-rw-r--r--src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java19
-rw-r--r--src/jdk/nashorn/internal/codegen/ObjectCreator.java74
-rw-r--r--src/jdk/nashorn/internal/codegen/RangeAnalyzer.java11
-rw-r--r--src/jdk/nashorn/internal/codegen/SpillObjectCreator.java133
-rw-r--r--src/jdk/nashorn/internal/codegen/Splitter.java6
-rw-r--r--src/jdk/nashorn/internal/codegen/WeighNodes.java7
-rw-r--r--src/jdk/nashorn/internal/codegen/types/Type.java66
-rw-r--r--src/jdk/nashorn/internal/ir/AccessNode.java8
-rw-r--r--src/jdk/nashorn/internal/ir/Assignment.java4
-rw-r--r--src/jdk/nashorn/internal/ir/BaseNode.java11
-rw-r--r--src/jdk/nashorn/internal/ir/BinaryNode.java26
-rw-r--r--src/jdk/nashorn/internal/ir/Block.java36
-rw-r--r--src/jdk/nashorn/internal/ir/BlockLexicalContext.java19
-rw-r--r--src/jdk/nashorn/internal/ir/BlockStatement.java115
-rw-r--r--src/jdk/nashorn/internal/ir/BreakableNode.java47
-rw-r--r--src/jdk/nashorn/internal/ir/BreakableStatement.java91
-rw-r--r--src/jdk/nashorn/internal/ir/CallNode.java59
-rw-r--r--src/jdk/nashorn/internal/ir/CaseNode.java12
-rw-r--r--src/jdk/nashorn/internal/ir/CatchNode.java12
-rw-r--r--src/jdk/nashorn/internal/ir/Expression.java99
-rw-r--r--src/jdk/nashorn/internal/ir/ExpressionStatement.java (renamed from src/jdk/nashorn/internal/ir/ExecuteNode.java)20
-rw-r--r--src/jdk/nashorn/internal/ir/ForNode.java28
-rw-r--r--src/jdk/nashorn/internal/ir/FunctionNode.java55
-rw-r--r--src/jdk/nashorn/internal/ir/IdentNode.java3
-rw-r--r--src/jdk/nashorn/internal/ir/IfNode.java12
-rw-r--r--src/jdk/nashorn/internal/ir/IndexNode.java16
-rw-r--r--src/jdk/nashorn/internal/ir/LabelNode.java2
-rw-r--r--src/jdk/nashorn/internal/ir/LexicalContext.java37
-rw-r--r--src/jdk/nashorn/internal/ir/LexicalContextExpression.java59
-rw-r--r--src/jdk/nashorn/internal/ir/LexicalContextNode.java53
-rw-r--r--src/jdk/nashorn/internal/ir/LexicalContextStatement.java55
-rw-r--r--src/jdk/nashorn/internal/ir/LiteralNode.java78
-rw-r--r--src/jdk/nashorn/internal/ir/LoopNode.java13
-rw-r--r--src/jdk/nashorn/internal/ir/Node.java55
-rw-r--r--src/jdk/nashorn/internal/ir/ObjectNode.java2
-rw-r--r--src/jdk/nashorn/internal/ir/PropertyNode.java16
-rw-r--r--src/jdk/nashorn/internal/ir/ReturnNode.java13
-rw-r--r--src/jdk/nashorn/internal/ir/RuntimeNode.java27
-rw-r--r--src/jdk/nashorn/internal/ir/SplitNode.java7
-rw-r--r--src/jdk/nashorn/internal/ir/SwitchNode.java15
-rw-r--r--src/jdk/nashorn/internal/ir/Symbol.java3
-rw-r--r--src/jdk/nashorn/internal/ir/TemporarySymbols.java2
-rw-r--r--src/jdk/nashorn/internal/ir/TernaryNode.java120
-rw-r--r--src/jdk/nashorn/internal/ir/ThrowNode.java12
-rw-r--r--src/jdk/nashorn/internal/ir/UnaryNode.java41
-rw-r--r--src/jdk/nashorn/internal/ir/VarNode.java22
-rw-r--r--src/jdk/nashorn/internal/ir/WhileNode.java12
-rw-r--r--src/jdk/nashorn/internal/ir/WithNode.java12
-rw-r--r--src/jdk/nashorn/internal/ir/debug/ASTWriter.java22
-rw-r--r--src/jdk/nashorn/internal/ir/debug/JSONWriter.java31
-rw-r--r--src/jdk/nashorn/internal/ir/debug/PrintVisitor.java28
-rw-r--r--src/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java2
-rw-r--r--src/jdk/nashorn/internal/ir/visitor/NodeVisitor.java39
-rw-r--r--src/jdk/nashorn/internal/lookup/Lookup.java40
-rw-r--r--src/jdk/nashorn/internal/objects/AccessorPropertyDescriptor.java8
-rw-r--r--src/jdk/nashorn/internal/objects/ArrayBufferView.java24
-rw-r--r--src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java2
-rw-r--r--src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java9
-rw-r--r--src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java8
-rw-r--r--src/jdk/nashorn/internal/objects/Global.java270
-rw-r--r--src/jdk/nashorn/internal/objects/NativeArguments.java36
-rw-r--r--src/jdk/nashorn/internal/objects/NativeArray.java59
-rw-r--r--src/jdk/nashorn/internal/objects/NativeArrayBuffer.java12
-rw-r--r--src/jdk/nashorn/internal/objects/NativeBoolean.java29
-rw-r--r--src/jdk/nashorn/internal/objects/NativeDate.java26
-rw-r--r--src/jdk/nashorn/internal/objects/NativeDebug.java22
-rw-r--r--src/jdk/nashorn/internal/objects/NativeError.java28
-rw-r--r--src/jdk/nashorn/internal/objects/NativeEvalError.java17
-rw-r--r--src/jdk/nashorn/internal/objects/NativeFloat32Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeFloat64Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeFunction.java3
-rw-r--r--src/jdk/nashorn/internal/objects/NativeInt16Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeInt32Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeInt8Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeJSAdapter.java59
-rw-r--r--src/jdk/nashorn/internal/objects/NativeJSON.java6
-rw-r--r--src/jdk/nashorn/internal/objects/NativeJava.java49
-rw-r--r--src/jdk/nashorn/internal/objects/NativeJavaImporter.java16
-rw-r--r--src/jdk/nashorn/internal/objects/NativeMath.java6
-rw-r--r--src/jdk/nashorn/internal/objects/NativeNumber.java35
-rw-r--r--src/jdk/nashorn/internal/objects/NativeObject.java212
-rw-r--r--src/jdk/nashorn/internal/objects/NativeRangeError.java16
-rw-r--r--src/jdk/nashorn/internal/objects/NativeReferenceError.java16
-rw-r--r--src/jdk/nashorn/internal/objects/NativeRegExp.java34
-rw-r--r--src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java8
-rw-r--r--src/jdk/nashorn/internal/objects/NativeStrictArguments.java25
-rw-r--r--src/jdk/nashorn/internal/objects/NativeString.java33
-rw-r--r--src/jdk/nashorn/internal/objects/NativeSyntaxError.java12
-rw-r--r--src/jdk/nashorn/internal/objects/NativeTypeError.java12
-rw-r--r--src/jdk/nashorn/internal/objects/NativeURIError.java12
-rw-r--r--src/jdk/nashorn/internal/objects/NativeUint16Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeUint32Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeUint8Array.java5
-rw-r--r--src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java5
-rw-r--r--src/jdk/nashorn/internal/objects/PrototypeObject.java32
-rw-r--r--src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java103
-rw-r--r--src/jdk/nashorn/internal/parser/JSONParser.java13
-rw-r--r--src/jdk/nashorn/internal/parser/Lexer.java30
-rw-r--r--src/jdk/nashorn/internal/parser/Parser.java261
-rw-r--r--src/jdk/nashorn/internal/parser/TokenType.java2
-rw-r--r--src/jdk/nashorn/internal/runtime/AccessorProperty.java102
-rw-r--r--src/jdk/nashorn/internal/runtime/CodeInstaller.java6
-rw-r--r--src/jdk/nashorn/internal/runtime/Context.java93
-rw-r--r--src/jdk/nashorn/internal/runtime/FunctionScope.java4
-rw-r--r--src/jdk/nashorn/internal/runtime/GlobalFunctions.java3
-rw-r--r--src/jdk/nashorn/internal/runtime/GlobalObject.java9
-rw-r--r--src/jdk/nashorn/internal/runtime/JSType.java10
-rw-r--r--src/jdk/nashorn/internal/runtime/ListAdapter.java25
-rw-r--r--src/jdk/nashorn/internal/runtime/PropertyListenerManager.java10
-rw-r--r--src/jdk/nashorn/internal/runtime/PropertyMap.java148
-rw-r--r--src/jdk/nashorn/internal/runtime/ScriptEnvironment.java8
-rw-r--r--src/jdk/nashorn/internal/runtime/ScriptFunction.java28
-rw-r--r--src/jdk/nashorn/internal/runtime/ScriptObject.java63
-rw-r--r--src/jdk/nashorn/internal/runtime/ScriptRuntime.java19
-rw-r--r--src/jdk/nashorn/internal/runtime/StructureLoader.java49
-rw-r--r--src/jdk/nashorn/internal/runtime/arrays/ArrayData.java9
-rw-r--r--src/jdk/nashorn/internal/runtime/arrays/IntArrayData.java47
-rw-r--r--src/jdk/nashorn/internal/runtime/arrays/LongArrayData.java32
-rw-r--r--src/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java21
-rw-r--r--src/jdk/nashorn/internal/runtime/arrays/ObjectArrayData.java2
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/Bootstrap.java39
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethod.java51
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethodLinker.java90
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/InvokeByName.java2
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java19
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java17
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java53
-rw-r--r--src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java42
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java4
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java58
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java64
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java67
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java2
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodePrinter.java212
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java34
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java19
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java255
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java129
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/Regex.java53
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ScanEnvironment.java15
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java20
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/Token.java74
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ast/BackRefNode.java59
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ast/CClassNode.java40
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ast/StateNode.java9
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java7
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/joni/constants/OPCode.java30
-rw-r--r--src/jdk/nashorn/internal/runtime/resources/Messages.properties1
-rw-r--r--src/jdk/nashorn/internal/runtime/resources/Options.properties16
-rw-r--r--src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js7
-rw-r--r--src/jdk/nashorn/internal/scripts/JO.java18
-rw-r--r--src/jdk/nashorn/tools/Shell.java7
-rw-r--r--test/script/basic/JDK-8010946-2.js38
-rw-r--r--test/script/basic/JDK-8010946-2.js.EXPECTED3
-rw-r--r--test/script/basic/JDK-8010946-privileged.js47
-rw-r--r--test/script/basic/JDK-8010946.js51
-rw-r--r--test/script/basic/JDK-8010946.js.EXPECTED5
-rw-r--r--test/script/basic/JDK-8012191.js53
-rw-r--r--test/script/basic/JDK-8012191.js.EXPECTED6
-rw-r--r--test/script/basic/JDK-8014785.js62
-rw-r--r--test/script/basic/JDK-8014785.js.EXPECTED8
-rw-r--r--test/script/basic/JDK-8015356.js44
-rw-r--r--test/script/basic/JDK-8015356.js.EXPECTED13
-rw-r--r--test/script/basic/JDK-8016667.js20
-rw-r--r--test/script/basic/JDK-8016681.js42
-rw-r--r--test/script/basic/JDK-8016681.js.EXPECTED15
-rw-r--r--test/script/basic/JDK-8017084.js17625
-rw-r--r--test/script/basic/JDK-8017084.js.EXPECTED13
-rw-r--r--test/script/basic/JDK-8017768.js35
-rw-r--r--test/script/basic/JDK-8017768.js.EXPECTED4
-rw-r--r--test/script/basic/JDK-8019585.js34
-rw-r--r--test/script/basic/JDK-8019629.js42
-rw-r--r--test/script/basic/JDK-8019783.js55
-rw-r--r--test/script/basic/JDK-8019783.js.EXPECTED9
-rw-r--r--test/script/basic/JDK-8019791.js50
-rw-r--r--test/script/basic/JDK-8019791.js.EXPECTED6
-rw-r--r--test/script/basic/JDK-8019805.js36
-rw-r--r--test/script/basic/JDK-8019805.js.EXPECTED3
-rw-r--r--test/script/basic/JDK-8019808.js39
-rw-r--r--test/script/basic/JDK-8019809.js37
-rw-r--r--test/script/basic/JDK-8019810.js36
-rw-r--r--test/script/basic/JDK-8019810.js.EXPECTED1
-rw-r--r--test/script/basic/JDK-8019811.js47
-rw-r--r--test/script/basic/JDK-8019814.js73
-rw-r--r--test/script/basic/JDK-8019814.js.EXPECTED6
-rw-r--r--test/script/basic/JDK-8019817.js37
-rw-r--r--test/script/basic/JDK-8019819.js46
-rw-r--r--test/script/basic/JDK-8019821.js37
-rw-r--r--test/script/basic/JDK-8019822.js29
-rw-r--r--test/script/basic/JDK-8019947.js68
-rw-r--r--test/script/basic/JDK-8019947.js.EXPECTED3
-rw-r--r--test/script/basic/JDK-8019963.js66
-rw-r--r--test/script/basic/JDK-8019963.js.EXPECTED29
-rw-r--r--test/script/basic/JDK-8019983.js42
-rw-r--r--test/script/basic/JDK-8019983.js.EXPECTED1
-rw-r--r--test/script/basic/JDK-8020124.js32
-rw-r--r--test/script/basic/JDK-8020223.js71
-rw-r--r--test/script/basic/JDK-8020324.js139
-rw-r--r--test/script/basic/JDK-8020324.js.EXPECTED90
-rw-r--r--test/script/basic/JDK-8020325.js38
-rw-r--r--test/script/basic/JDK-8020325.js.EXPECTED4
-rw-r--r--test/script/basic/JDK-8020354.js43
-rw-r--r--test/script/basic/JDK-8020354.js.EXPECTED9
-rw-r--r--test/script/basic/JDK-8020357.js52
-rw-r--r--test/script/basic/JDK-8020357.js.EXPECTED1
-rw-r--r--test/script/basic/JDK-8020358.js43
-rw-r--r--test/script/basic/JDK-8020358.js.EXPECTED7
-rw-r--r--test/script/basic/JDK-8020380.js36
-rw-r--r--test/script/basic/JDK-8020437.js49
-rw-r--r--test/script/basic/JDK-8020437.js.EXPECTED5
-rw-r--r--test/script/basic/JDK-8020463.js54
-rw-r--r--test/script/basic/JDK-8020508.js37
-rw-r--r--test/script/basic/JDK-8020508.js.EXPECTED1
-rw-r--r--test/script/basic/NASHORN-759.js.EXPECTED2
-rw-r--r--test/script/basic/forin.js5
-rw-r--r--test/script/basic/forin.js.EXPECTED10
-rw-r--r--test/script/error/JDK-8020437-2.js36
-rw-r--r--test/script/error/JDK-8020437-2.js.EXPECTED3
-rw-r--r--test/script/error/JDK-8020437.js36
-rw-r--r--test/script/error/JDK-8020437.js.EXPECTED3
-rw-r--r--test/script/trusted/JDK-8006529.js (renamed from test/script/currently-failing/JDK-8006529.js)131
-rw-r--r--test/src/jdk/nashorn/api/scripting/ScriptEngineSecurityTest.java44
-rw-r--r--test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java18
-rw-r--r--test/src/jdk/nashorn/internal/runtime/TrustedScriptEngineTest.java51
-rw-r--r--test/src/jdk/nashorn/test/models/OuterClass.java4
-rw-r--r--test/src/jdk/nashorn/test/models/PropertyBind.java82
273 files changed, 25201 insertions, 3343 deletions
diff --git a/buildtools/nasgen/build.xml b/buildtools/nasgen/build.xml
index bf56c111..6243bb2f 100644
--- a/buildtools/nasgen/build.xml
+++ b/buildtools/nasgen/build.xml
@@ -42,7 +42,8 @@
destdir="${build.classes.dir}"
classpath="${javac.classpath}"
debug="${javac.debug}"
- includeantruntime="false">
+ includeantruntime="false" fork="true">
+ <compilerarg value="-J-Djava.ext.dirs="/>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:deprecation"/>
<compilerarg value="-XDignore.symbol.file"/>
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
index bc6bb4b2..3425e9fd 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
@@ -25,6 +25,7 @@
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_PRIVATE;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC;
@@ -36,14 +37,24 @@ import static jdk.nashorn.internal.tools.nasgen.StringConstants.GETTER_PREFIX;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.GET_CLASS_NAME;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.GET_CLASS_NAME_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.INIT;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.LOOKUP_NEWPROPERTY;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.LOOKUP_NEWPROPERTY_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.LOOKUP_TYPE;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_FIELD_NAME;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_NEWMAP;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_NEWMAP_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.ACCESSORPROPERTY_CREATE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.ACCESSORPROPERTY_CREATE_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.ACCESSORPROPERTY_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.LIST_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.ARRAYLIST_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.ARRAYLIST_INIT_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.COLLECTION_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.COLLECTION_ADD;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.COLLECTION_ADD_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.COLLECTIONS_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.COLLECTIONS_EMPTY_LIST;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_FIELD_NAME;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_SETISSHARED;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_SETISSHARED_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_NEWMAP;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_NEWMAP_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_TYPE;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.OBJECT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.SCRIPTFUNCTIONIMPL_MAKEFUNCTION;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.SCRIPTFUNCTIONIMPL_MAKEFUNCTION_DESC;
@@ -160,18 +171,30 @@ public class ClassGenerator {
return new MethodGenerator(mv, access, name, desc);
}
- static void emitStaticInitPrefix(final MethodGenerator mi, final String className) {
+ static void emitStaticInitPrefix(final MethodGenerator mi, final String className, final int memberCount) {
mi.visitCode();
- mi.pushNull();
- mi.putStatic(className, MAP_FIELD_NAME, MAP_DESC);
- mi.loadClass(className);
- mi.invokeStatic(MAP_TYPE, MAP_NEWMAP, MAP_NEWMAP_DESC);
- // stack: PropertyMap
+ if (memberCount > 0) {
+ // new ArrayList(int)
+ mi.newObject(ARRAYLIST_TYPE);
+ mi.dup();
+ mi.push(memberCount);
+ mi.invokeSpecial(ARRAYLIST_TYPE, INIT, ARRAYLIST_INIT_DESC);
+ // stack: ArrayList
+ } else {
+ // java.util.Collections.EMPTY_LIST
+ mi.getStatic(COLLECTIONS_TYPE, COLLECTIONS_EMPTY_LIST, LIST_DESC);
+ // stack List
+ }
}
static void emitStaticInitSuffix(final MethodGenerator mi, final String className) {
- // stack: PropertyMap
- mi.putStatic(className, MAP_FIELD_NAME, MAP_DESC);
+ // stack: Collection
+ // pmap = PropertyMap.newMap(Collection<Property>);
+ mi.invokeStatic(PROPERTYMAP_TYPE, PROPERTYMAP_NEWMAP, PROPERTYMAP_NEWMAP_DESC);
+ // pmap.setIsShared();
+ mi.invokeVirtual(PROPERTYMAP_TYPE, PROPERTYMAP_SETISSHARED, PROPERTYMAP_SETISSHARED_DESC);
+ // $nasgenmap$ = pmap;
+ mi.putStatic(className, PROPERTYMAP_FIELD_NAME, PROPERTYMAP_DESC);
mi.returnVoid();
mi.computeMaxs();
mi.visitEnd();
@@ -235,9 +258,9 @@ public class ClassGenerator {
}
static void addMapField(final ClassVisitor cv) {
- // add a MAP static field
- final FieldVisitor fv = cv.visitField(ACC_PRIVATE | ACC_STATIC,
- MAP_FIELD_NAME, MAP_DESC, null, null);
+ // add a PropertyMap static field
+ final FieldVisitor fv = cv.visitField(ACC_PRIVATE | ACC_STATIC | ACC_FINAL,
+ PROPERTYMAP_FIELD_NAME, PROPERTYMAP_DESC, null, null);
if (fv != null) {
fv.visitEnd();
}
@@ -278,7 +301,11 @@ public class ClassGenerator {
static void linkerAddGetterSetter(final MethodGenerator mi, final String className, final MemberInfo memInfo) {
final String propertyName = memInfo.getName();
- // stack: PropertyMap
+ // stack: Collection
+ // dup of Collection instance
+ mi.dup();
+
+ // property = AccessorProperty.create(key, flags, getter, setter);
mi.loadLiteral(propertyName);
// setup flags
mi.push(memInfo.getAttributes());
@@ -292,13 +319,21 @@ public class ClassGenerator {
javaName = SETTER_PREFIX + memInfo.getJavaName();
mi.visitLdcInsn(new Handle(H_INVOKEVIRTUAL, className, javaName, setterDesc(memInfo)));
}
- mi.invokeStatic(LOOKUP_TYPE, LOOKUP_NEWPROPERTY, LOOKUP_NEWPROPERTY_DESC);
- // stack: PropertyMap
+ mi.invokeStatic(ACCESSORPROPERTY_TYPE, ACCESSORPROPERTY_CREATE, ACCESSORPROPERTY_CREATE_DESC);
+ // boolean Collection.add(property)
+ mi.invokeInterface(COLLECTION_TYPE, COLLECTION_ADD, COLLECTION_ADD_DESC);
+ // pop return value of Collection.add
+ mi.pop();
+ // stack: Collection
}
static void linkerAddGetterSetter(final MethodGenerator mi, final String className, final MemberInfo getter, final MemberInfo setter) {
final String propertyName = getter.getName();
- // stack: PropertyMap
+ // stack: Collection
+ // dup of Collection instance
+ mi.dup();
+
+ // property = AccessorProperty.create(key, flags, getter, setter);
mi.loadLiteral(propertyName);
// setup flags
mi.push(getter.getAttributes());
@@ -312,8 +347,12 @@ public class ClassGenerator {
mi.visitLdcInsn(new Handle(H_INVOKESTATIC, className,
setter.getJavaName(), setter.getJavaDesc()));
}
- mi.invokeStatic(LOOKUP_TYPE, LOOKUP_NEWPROPERTY, LOOKUP_NEWPROPERTY_DESC);
- // stack: PropertyMap
+ mi.invokeStatic(ACCESSORPROPERTY_TYPE, ACCESSORPROPERTY_CREATE, ACCESSORPROPERTY_CREATE_DESC);
+ // boolean Collection.add(property)
+ mi.invokeInterface(COLLECTION_TYPE, COLLECTION_ADD, COLLECTION_ADD_DESC);
+ // pop return value of Collection.add
+ mi.pop();
+ // stack: Collection
}
static ScriptClassInfo getScriptClassInfo(final String fileName) throws IOException {
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
index 7c59f8c3..e90b53ec 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
@@ -32,11 +32,11 @@ import static jdk.internal.org.objectweb.asm.Opcodes.V1_7;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.CONSTRUCTOR_SUFFIX;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.DEFAULT_INIT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.INIT;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DUPLICATE;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DUPLICATE_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_FIELD_NAME;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DUPLICATE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DUPLICATE_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_FIELD_NAME;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_TYPE;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.OBJECT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROTOTYPEOBJECT_SETCONSTRUCTOR;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROTOTYPEOBJECT_SETCONSTRUCTOR_DESC;
@@ -129,7 +129,7 @@ public class ConstructorGenerator extends ClassGenerator {
private void emitStaticInitializer() {
final MethodGenerator mi = makeStaticInitializer();
- emitStaticInitPrefix(mi, className);
+ emitStaticInitPrefix(mi, className, memberCount);
for (final MemberInfo memInfo : scriptClassInfo.getMembers()) {
if (memInfo.isConstructorFunction() || memInfo.isConstructorProperty()) {
@@ -170,10 +170,10 @@ public class ConstructorGenerator extends ClassGenerator {
private void loadMap(final MethodGenerator mi) {
if (memberCount > 0) {
- mi.getStatic(className, MAP_FIELD_NAME, MAP_DESC);
+ mi.getStatic(className, PROPERTYMAP_FIELD_NAME, PROPERTYMAP_DESC);
// make sure we use duplicated PropertyMap so that original map
- // stays intact and so can be used for many globals in same context
- mi.invokeVirtual(MAP_TYPE, MAP_DUPLICATE, MAP_DUPLICATE_DESC);
+ // stays intact and so can be used for many globals.
+ mi.invokeVirtual(PROPERTYMAP_TYPE, PROPERTYMAP_DUPLICATE, PROPERTYMAP_DUPLICATE_DESC);
}
}
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java
index c3dfd878..475d7328 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java
@@ -57,6 +57,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.IALOAD;
import static jdk.internal.org.objectweb.asm.Opcodes.IASTORE;
import static jdk.internal.org.objectweb.asm.Opcodes.ICONST_0;
import static jdk.internal.org.objectweb.asm.Opcodes.ILOAD;
+import static jdk.internal.org.objectweb.asm.Opcodes.INVOKEINTERFACE;
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.INVOKEVIRTUAL;
@@ -347,6 +348,10 @@ public class MethodGenerator extends MethodVisitor {
}
// invokes, field get/sets
+ void invokeInterface(final String owner, final String method, final String desc) {
+ super.visitMethodInsn(INVOKEINTERFACE, owner, method, desc);
+ }
+
void invokeVirtual(final String owner, final String method, final String desc) {
super.visitMethodInsn(INVOKEVIRTUAL, owner, method, desc);
}
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
index 17750cd1..98048a29 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
@@ -30,11 +30,11 @@ import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER;
import static jdk.internal.org.objectweb.asm.Opcodes.V1_7;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.DEFAULT_INIT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.INIT;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DUPLICATE;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DUPLICATE_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_FIELD_NAME;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_TYPE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DUPLICATE;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_DUPLICATE_DESC;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_FIELD_NAME;
+import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROPERTYMAP_TYPE;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.OBJECT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROTOTYPEOBJECT_TYPE;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.PROTOTYPE_SUFFIX;
@@ -67,6 +67,7 @@ public class PrototypeGenerator extends ClassGenerator {
// add <clinit>
emitStaticInitializer();
}
+
// add <init>
emitConstructor();
@@ -106,7 +107,7 @@ public class PrototypeGenerator extends ClassGenerator {
private void emitStaticInitializer() {
final MethodGenerator mi = makeStaticInitializer();
- emitStaticInitPrefix(mi, className);
+ emitStaticInitPrefix(mi, className, memberCount);
for (final MemberInfo memInfo : scriptClassInfo.getMembers()) {
if (memInfo.isPrototypeFunction() || memInfo.isPrototypeProperty()) {
linkerAddGetterSetter(mi, className, memInfo);
@@ -124,10 +125,10 @@ public class PrototypeGenerator extends ClassGenerator {
mi.loadThis();
if (memberCount > 0) {
// call "super(map$)"
- mi.getStatic(className, MAP_FIELD_NAME, MAP_DESC);
+ mi.getStatic(className, PROPERTYMAP_FIELD_NAME, PROPERTYMAP_DESC);
// make sure we use duplicated PropertyMap so that original map
- // stays intact and so can be used for many globals in same context
- mi.invokeVirtual(MAP_TYPE, MAP_DUPLICATE, MAP_DUPLICATE_DESC);
+ // stays intact and so can be used for many global.
+ mi.invokeVirtual(PROPERTYMAP_TYPE, PROPERTYMAP_DUPLICATE, PROPERTYMAP_DUPLICATE_DESC);
mi.invokeSpecial(PROTOTYPEOBJECT_TYPE, INIT, SCRIPTOBJECT_INIT_DESC);
// initialize Function type fields
initFunctionFields(mi);
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
index ffeb90be..1622e02b 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
@@ -37,10 +37,7 @@ import static jdk.nashorn.internal.tools.nasgen.StringConstants.$CLINIT$;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.CLINIT;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.DEFAULT_INIT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.INIT;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.MAP_FIELD_NAME;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.OBJECT_DESC;
-import static jdk.nashorn.internal.tools.nasgen.StringConstants.SCRIPTOBJECT_INIT_DESC;
import static jdk.nashorn.internal.tools.nasgen.StringConstants.SCRIPTOBJECT_TYPE;
import java.io.BufferedInputStream;
@@ -159,14 +156,7 @@ public class ScriptClassInstrumentor extends ClassVisitor {
public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
if (isConstructor && opcode == INVOKESPECIAL &&
INIT.equals(name) && SCRIPTOBJECT_TYPE.equals(owner)) {
-
- // replace call to empty super-constructor with one passing PropertyMap argument
- if (DEFAULT_INIT_DESC.equals(desc)) {
- super.visitFieldInsn(GETSTATIC, scriptClassInfo.getJavaName(), MAP_FIELD_NAME, MAP_DESC);
- super.visitMethodInsn(INVOKESPECIAL, SCRIPTOBJECT_TYPE, INIT, SCRIPTOBJECT_INIT_DESC);
- } else {
- super.visitMethodInsn(opcode, owner, name, desc);
- }
+ super.visitMethodInsn(opcode, owner, name, desc);
if (memberCount > 0) {
// initialize @Property fields if needed
@@ -256,7 +246,7 @@ public class ScriptClassInstrumentor extends ClassVisitor {
}
// Now generate $clinit$
final MethodGenerator mi = ClassGenerator.makeStaticInitializer(this, $CLINIT$);
- ClassGenerator.emitStaticInitPrefix(mi, className);
+ ClassGenerator.emitStaticInitPrefix(mi, className, memberCount);
if (memberCount > 0) {
for (final MemberInfo memInfo : scriptClassInfo.getMembers()) {
if (memInfo.isInstanceProperty() || memInfo.isInstanceFunction()) {
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java
index 5a5032f9..c4c1ab8d 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java
@@ -27,10 +27,14 @@ package jdk.nashorn.internal.tools.nasgen;
import java.lang.invoke.MethodHandle;
import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
import jdk.internal.org.objectweb.asm.Type;
-import jdk.nashorn.internal.lookup.Lookup;
import jdk.nashorn.internal.objects.PrototypeObject;
import jdk.nashorn.internal.objects.ScriptFunctionImpl;
+import jdk.nashorn.internal.runtime.AccessorProperty;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
@@ -40,15 +44,41 @@ import jdk.nashorn.internal.runtime.ScriptObject;
*/
@SuppressWarnings("javadoc")
public interface StringConstants {
+ // standard jdk types, methods
static final Type TYPE_METHOD = Type.getType(Method.class);
static final Type TYPE_METHODHANDLE = Type.getType(MethodHandle.class);
static final Type TYPE_METHODHANDLE_ARRAY = Type.getType(MethodHandle[].class);
static final Type TYPE_OBJECT = Type.getType(Object.class);
static final Type TYPE_CLASS = Type.getType(Class.class);
static final Type TYPE_STRING = Type.getType(String.class);
+ static final Type TYPE_COLLECTION = Type.getType(Collection.class);
+ static final Type TYPE_COLLECTIONS = Type.getType(Collections.class);
+ static final Type TYPE_ARRAYLIST = Type.getType(ArrayList.class);
+ static final Type TYPE_LIST = Type.getType(List.class);
- // Nashorn types
- static final Type TYPE_LOOKUP = Type.getType(Lookup.class);
+ static final String CLINIT = "<clinit>";
+ static final String INIT = "<init>";
+ static final String DEFAULT_INIT_DESC = Type.getMethodDescriptor(Type.VOID_TYPE);
+
+ static final String METHODHANDLE_TYPE = TYPE_METHODHANDLE.getInternalName();
+ static final String OBJECT_TYPE = TYPE_OBJECT.getInternalName();
+ static final String OBJECT_DESC = TYPE_OBJECT.getDescriptor();
+ static final String OBJECT_ARRAY_DESC = Type.getDescriptor(Object[].class);
+ static final String ARRAYLIST_TYPE = TYPE_ARRAYLIST.getInternalName();
+ static final String COLLECTION_TYPE = TYPE_COLLECTION.getInternalName();
+ static final String COLLECTIONS_TYPE = TYPE_COLLECTIONS.getInternalName();
+
+ // java.util.Collection.add(Object)
+ static final String COLLECTION_ADD = "add";
+ static final String COLLECTION_ADD_DESC = Type.getMethodDescriptor(Type.BOOLEAN_TYPE, TYPE_OBJECT);
+ // java.util.ArrayList.<init>(int)
+ static final String ARRAYLIST_INIT_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, Type.INT_TYPE);
+ // java.util.Collections.EMPTY_LIST
+ static final String COLLECTIONS_EMPTY_LIST = "EMPTY_LIST";
+ static final String LIST_DESC = TYPE_LIST.getDescriptor();
+
+ // Nashorn types, methods
+ static final Type TYPE_ACCESSORPROPERTY = Type.getType(AccessorProperty.class);
static final Type TYPE_PROPERTYMAP = Type.getType(PropertyMap.class);
static final Type TYPE_PROTOTYPEOBJECT = Type.getType(PrototypeObject.class);
static final Type TYPE_SCRIPTFUNCTION = Type.getType(ScriptFunction.class);
@@ -57,54 +87,56 @@ public interface StringConstants {
static final String PROTOTYPE_SUFFIX = "$Prototype";
static final String CONSTRUCTOR_SUFFIX = "$Constructor";
+
// This field name is known to Nashorn runtime (Context).
// Synchronize the name change, if needed at all.
- static final String MAP_FIELD_NAME = "$nasgenmap$";
+ static final String PROPERTYMAP_FIELD_NAME = "$nasgenmap$";
static final String $CLINIT$ = "$clinit$";
- static final String CLINIT = "<clinit>";
- static final String INIT = "<init>";
- static final String DEFAULT_INIT_DESC = Type.getMethodDescriptor(Type.VOID_TYPE);
- static final String SCRIPTOBJECT_INIT_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_PROPERTYMAP);
+ // AccessorProperty
+ static final String ACCESSORPROPERTY_TYPE = TYPE_ACCESSORPROPERTY.getInternalName();
+ static final String ACCESSORPROPERTY_CREATE = "create";
+ static final String ACCESSORPROPERTY_CREATE_DESC =
+ Type.getMethodDescriptor(TYPE_ACCESSORPROPERTY, TYPE_STRING, Type.INT_TYPE, TYPE_METHODHANDLE, TYPE_METHODHANDLE);
- static final String METHODHANDLE_TYPE = TYPE_METHODHANDLE.getInternalName();
+ // PropertyMap
+ static final String PROPERTYMAP_TYPE = TYPE_PROPERTYMAP.getInternalName();
+ static final String PROPERTYMAP_DESC = TYPE_PROPERTYMAP.getDescriptor();
+ static final String PROPERTYMAP_NEWMAP = "newMap";
+ static final String PROPERTYMAP_NEWMAP_DESC = Type.getMethodDescriptor(TYPE_PROPERTYMAP, TYPE_COLLECTION);
+ static final String PROPERTYMAP_DUPLICATE = "duplicate";
+ static final String PROPERTYMAP_DUPLICATE_DESC = Type.getMethodDescriptor(TYPE_PROPERTYMAP);
+ static final String PROPERTYMAP_SETISSHARED = "setIsShared";
+ static final String PROPERTYMAP_SETISSHARED_DESC = Type.getMethodDescriptor(TYPE_PROPERTYMAP);
- static final String OBJECT_TYPE = TYPE_OBJECT.getInternalName();
- static final String OBJECT_DESC = TYPE_OBJECT.getDescriptor();
- static final String OBJECT_ARRAY_DESC = Type.getDescriptor(Object[].class);
+ // PrototypeObject
+ static final String PROTOTYPEOBJECT_TYPE = TYPE_PROTOTYPEOBJECT.getInternalName();
+ static final String PROTOTYPEOBJECT_SETCONSTRUCTOR = "setConstructor";
+ static final String PROTOTYPEOBJECT_SETCONSTRUCTOR_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_OBJECT, TYPE_OBJECT);
+ // ScriptFunction
static final String SCRIPTFUNCTION_TYPE = TYPE_SCRIPTFUNCTION.getInternalName();
+ static final String SCRIPTFUNCTION_SETARITY = "setArity";
+ static final String SCRIPTFUNCTION_SETARITY_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, Type.INT_TYPE);
+ static final String SCRIPTFUNCTION_SETPROTOTYPE = "setPrototype";
+ static final String SCRIPTFUNCTION_SETPROTOTYPE_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_OBJECT);
+
+ // ScriptFunctionImpl
static final String SCRIPTFUNCTIONIMPL_TYPE = TYPE_SCRIPTFUNCTIONIMPL.getInternalName();
static final String SCRIPTFUNCTIONIMPL_MAKEFUNCTION = "makeFunction";
static final String SCRIPTFUNCTIONIMPL_MAKEFUNCTION_DESC =
Type.getMethodDescriptor(TYPE_SCRIPTFUNCTION, TYPE_STRING, TYPE_METHODHANDLE);
static final String SCRIPTFUNCTIONIMPL_MAKEFUNCTION_SPECS_DESC =
Type.getMethodDescriptor(TYPE_SCRIPTFUNCTION, TYPE_STRING, TYPE_METHODHANDLE, TYPE_METHODHANDLE_ARRAY);
-
static final String SCRIPTFUNCTIONIMPL_INIT_DESC3 =
Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_STRING, TYPE_METHODHANDLE, TYPE_METHODHANDLE_ARRAY);
static final String SCRIPTFUNCTIONIMPL_INIT_DESC4 =
Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_STRING, TYPE_METHODHANDLE, TYPE_PROPERTYMAP, TYPE_METHODHANDLE_ARRAY);
- static final String SCRIPTFUNCTION_SETARITY = "setArity";
- static final String SCRIPTFUNCTION_SETARITY_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, Type.INT_TYPE);
- static final String SCRIPTFUNCTION_SETPROTOTYPE = "setPrototype";
- static final String SCRIPTFUNCTION_SETPROTOTYPE_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_OBJECT);
- static final String PROTOTYPEOBJECT_TYPE = TYPE_PROTOTYPEOBJECT.getInternalName();
- static final String PROTOTYPEOBJECT_SETCONSTRUCTOR = "setConstructor";
- static final String PROTOTYPEOBJECT_SETCONSTRUCTOR_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_OBJECT, TYPE_OBJECT);
+
+ // ScriptObject
static final String SCRIPTOBJECT_TYPE = TYPE_SCRIPTOBJECT.getInternalName();
- static final String MAP_TYPE = TYPE_PROPERTYMAP.getInternalName();
- static final String MAP_DESC = TYPE_PROPERTYMAP.getDescriptor();
- static final String MAP_NEWMAP = "newMap";
- static final String MAP_NEWMAP_DESC = Type.getMethodDescriptor(TYPE_PROPERTYMAP, TYPE_CLASS);
- static final String MAP_DUPLICATE = "duplicate";
- static final String MAP_DUPLICATE_DESC = Type.getMethodDescriptor(TYPE_PROPERTYMAP);
- static final String MAP_SETFLAGS = "setFlags";
- static final String LOOKUP_TYPE = TYPE_LOOKUP.getInternalName();
- static final String LOOKUP_GETMETHOD = "getMethod";
- static final String LOOKUP_NEWPROPERTY = "newProperty";
- static final String LOOKUP_NEWPROPERTY_DESC =
- Type.getMethodDescriptor(TYPE_PROPERTYMAP, TYPE_PROPERTYMAP, TYPE_STRING, Type.INT_TYPE, TYPE_METHODHANDLE, TYPE_METHODHANDLE);
+ static final String SCRIPTOBJECT_INIT_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, TYPE_PROPERTYMAP);
+
static final String GETTER_PREFIX = "G$";
static final String SETTER_PREFIX = "S$";
diff --git a/docs/JavaScriptingProgrammersGuide.html b/docs/JavaScriptingProgrammersGuide.html
index 18ae823d..dd74d749 100644
--- a/docs/JavaScriptingProgrammersGuide.html
+++ b/docs/JavaScriptingProgrammersGuide.html
@@ -501,14 +501,19 @@ or
var anArrayListWithSize = new ArrayList(16)
</code></pre>
-In the special case of inner classes, you need to use the JVM fully qualified name, meaning using $ sign in the class name:
+In the special case of inner classes, you can either use the JVM fully qualified name, meaning using the dollar sign in the class name, or you can use the dot:
<pre><code>
var ftype = Java.type("java.awt.geom.Arc2D$Float")
</code></pre>
+and
+
+<pre><code>
+ var ftype = Java.type("java.awt.geom.Arc2D.Float")
+</code></pre>
-However, once you retrieved the outer class, you can access the inner class as a property on it:
+both work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name as it is originally specified, and the internal JVM names for inner classes use the dollar sign. If you use the dot, Java.type will internally get a ClassNotFoundException and subsequently retry by changing the last dot to dollar sign. As a matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads the class or runs out of all dots in the name. This way it can correctly resolve and load even multiply nested inner classes with the dot notation. Again, this will be slower than using the dollar signs in the name. An alternative way to access the inner class is as a property of the outer class:
<pre><code>
var arctype = Java.type("java.awt.geom.Arc2D")
diff --git a/make/build-nasgen.xml b/make/build-nasgen.xml
index a50d41e0..9dca5505 100644
--- a/make/build-nasgen.xml
+++ b/make/build-nasgen.xml
@@ -42,11 +42,6 @@
<arg value="jdk.nashorn.internal.objects"/>
<arg value="${basedir}/build/classes"/>
</java>
-
- <move todir="${basedir}/build/classes/jdk/nashorn/internal/objects">
- <fileset dir="${basedir}/build/classes/jdk/nashorn/internal/objects"/>
- <mapper type="glob" from="*.class" to="*.clazz"/>
- </move>
</target>
<target name="run-nasgen-eclipse">
@@ -66,7 +61,6 @@
<fileset dir="${basedir}/build/eclipse/.nasgentmp/jdk/nashorn/internal/objects">
<include name="*.class"/>
</fileset>
- <mapper type="glob" from="*.class" to="*.clazz"/>
</move>
<delete includeemptydirs="true"><fileset dir="${basedir}/build/eclipse/.nasgentmp" includes="**"/></delete>
@@ -75,7 +69,6 @@
<fileset dir="${basedir}/build/eclipse/jdk/nashorn/internal/objects">
<include name="**/*.class"/>
</fileset>
- <mapper type="glob" from="*.class" to="*.clazz"/>
</copy>
</target>
diff --git a/make/build.xml b/make/build.xml
index 7e2d999d..2bda503f 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -100,7 +100,8 @@
target="${javac.target}"
debug="${javac.debug}"
encoding="${javac.encoding}"
- includeantruntime="false">
+ includeantruntime="false" fork="true">
+ <compilerarg value="-J-Djava.ext.dirs="/>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:deprecation"/>
<compilerarg value="-XDignore.symbol.file"/>
@@ -218,8 +219,10 @@
target="${javac.target}"
debug="${javac.debug}"
encoding="${javac.encoding}"
- includeantruntime="false">
- <compilerarg line="-extdirs &quot;&quot;"/>
+ includeantruntime="false" fork="true">
+ <compilerarg value="-J-Djava.ext.dirs="/>
+ <compilerarg value="-Xlint:unchecked"/>
+ <compilerarg value="-Xlint:deprecation"/>
</javac>
<!-- tests that check nashorn internals and internal API -->
@@ -235,44 +238,31 @@
</target>
<target name="generate-policy-file" depends="prepare">
- <!-- Generating nashorn.policy file -->
-
- <!-- nashorn internal tests jar requires AllPermission -->
- <echo message="grant codeBase &quot;file:/${basedir}/${nashorn.internal.tests.jar}&quot; {" file="${build.dir}/nashorn.policy"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message=" permission java.security.AllPermission;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="};" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
-
- <!-- TestNG framework jar needs AllPermission -->
- <echo message="grant codeBase &quot;file:/${basedir}/${file.reference.testng.jar}&quot; {" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message=" permission java.security.AllPermission;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="};" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
-
- <!-- AllPermission to test/script/trusted tests -->
- <echo message="grant codeBase &quot;file:/${basedir}/test/script/trusted/*&quot; {" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message=" permission java.security.AllPermission;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="};" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
-
- <echo message="grant codeBase &quot;file:/${basedir}/test/script/basic/*&quot; {" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <!-- test/script/basic .js scripts load other script tests -->
- <echo message=" permission java.io.FilePermission &quot;${basedir}/test/script/-&quot;, &quot;read&quot;;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message=" permission java.io.FilePermission &quot;user.dir&quot;, &quot;read&quot;;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message=" permission java.util.PropertyPermission &quot;user.dir&quot;, &quot;read&quot;;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <!-- test/script/basic .js scripts can read nashorn.test.* properties -->
- <echo message=" permission java.util.PropertyPermission &quot;nashorn.test.*&quot;, &quot;read&quot;;" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="};" file="${build.dir}/nashorn.policy" append="true"/>
- <echo message="" file="${build.dir}/nashorn.policy" append="true"/>
+ <echo file="${build.dir}/nashorn.policy">
+
+grant codeBase "file:/${basedir}/${nashorn.internal.tests.jar}" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:/${basedir}/test/script/trusted/*" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:/${basedir}/test/script/basic/*" {
+ permission java.io.FilePermission "${basedir}/test/script/-", "read";
+ permission java.io.FilePermission "$${user.dir}", "read";
+ permission java.util.PropertyPermission "user.dir", "read";
+ permission java.util.PropertyPermission "nashorn.test.*", "read";
+};
+
+grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" {
+ permission java.util.PropertyPermission "java.security.policy", "read";
+};
+ </echo>
<replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators -->
<replace file="${build.dir}/nashorn.policy"><replacetoken>//</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Unix - to avoid leading // in URLs -->
diff --git a/make/code_coverage.xml b/make/code_coverage.xml
index 3e2860f8..dea03099 100644
--- a/make/code_coverage.xml
+++ b/make/code_coverage.xml
@@ -60,16 +60,8 @@
<copy todir="${build.dir}/to_be_instrumented">
<fileset dir="${build.classes.dir}">
<include name="**/*.class"/>
- <include name="**/*.clazz"/>
</fileset>
</copy>
-
- <move todir="${build.dir}/to_be_instrumented/jdk/nashorn/internal/objects">
- <fileset dir="${build.dir}/to_be_instrumented/jdk/nashorn/internal/objects">
- <include name="**/*.clazz"/>
- </fileset>
- <mapper type="glob" from="*.clazz" to="*.class"/>
- </move>
</target>
<target name="generate-cc-template" depends="prepare-to-be-instrumented" description="Generates code coverage template for dynamic CC" if="cc.generate.template">
diff --git a/make/project.properties b/make/project.properties
index 66bbdbeb..dbd9efce 100644
--- a/make/project.properties
+++ b/make/project.properties
@@ -200,6 +200,9 @@ test262-test-sys-prop.test.failed.list.file=${build.dir}/test/failedTests
# test262 test frameworks
test262-test-sys-prop.test.js.framework=\
+ --class-cache-size=0 \
+ --no-java \
+ --no-typed-arrays \
-timezone=PST \
${test.script.dir}/test262.js \
${test262.dir}/test/harness/framework.js \
diff --git a/makefiles/BuildNashorn.gmk b/makefiles/BuildNashorn.gmk
index d08f7e8f..96bedf44 100644
--- a/makefiles/BuildNashorn.gmk
+++ b/makefiles/BuildNashorn.gmk
@@ -71,7 +71,6 @@ $(eval $(call SetupJavaCompilation,BUILD_NASGEN,\
$(BUILD_NASGEN): $(BUILD_NASHORN)
# Copy classes to final classes dir and run nasgen to modify classes in jdk.nashorn.internal.objects package
-# Finally rename classes in jdk.nashorn.internal.objects package
$(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run: $(BUILD_NASGEN)
$(ECHO) Running nasgen
$(MKDIR) -p $(@D)
@@ -80,9 +79,6 @@ $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run: $(BUILD_NASGEN)
$(FIXPATH) $(JAVA) \
-cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
- for f in `$(FIND) $(@D)/jdk/nashorn/internal/objects/ -name "*.class"`; do \
- mv "$$f" `$(ECHO) "$$f" | $(SED) "s/\.class$$/\.clazz/"`; \
- done
$(TOUCH) $@
# Version file needs to be processed with version numbers
@@ -104,7 +100,7 @@ $(eval $(call SetupArchive,BUILD_NASHORN_JAR,\
$(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run \
$(VERSION_FILE),\
SRCS:=$(NASHORN_OUTPUTDIR)/classes,\
- SUFFIXES:=.class .clazz .js .properties Factory,\
+ SUFFIXES:=.class .js .properties Factory,\
MANIFEST:=$(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF,\
EXTRA_MANIFEST_ATTR:=$(MANIFEST_ATTRIBUTES),\
SKIP_METAINF:=true,\
diff --git a/src/jdk/internal/dynalink/DynamicLinker.java b/src/jdk/internal/dynalink/DynamicLinker.java
index c0930dae..155ff309 100644
--- a/src/jdk/internal/dynalink/DynamicLinker.java
+++ b/src/jdk/internal/dynalink/DynamicLinker.java
@@ -144,6 +144,9 @@ public class DynamicLinker {
private static final String CLASS_NAME = DynamicLinker.class.getName();
private static final String RELINK_METHOD_NAME = "relink";
+ private static final String INITIAL_LINK_CLASS_NAME = "java.lang.invoke.MethodHandleNatives";
+ private static final String INITIAL_LINK_METHOD_NAME = "linkCallSite";
+
private final LinkerServices linkerServices;
private final int runtimeContextArgCount;
private final boolean syncOnRelink;
@@ -262,20 +265,54 @@ public class DynamicLinker {
}
/**
- * Returns a stack trace element describing the location of the call site currently being relinked on the current
+ * Returns a stack trace element describing the location of the call site currently being linked on the current
* thread. The operation internally creates a Throwable object and inspects its stack trace, so it's potentially
* expensive. The recommended usage for it is in writing diagnostics code.
- * @return a stack trace element describing the location of the call site currently being relinked, or null if it is
- * not invoked while a call site is being relinked.
+ * @return a stack trace element describing the location of the call site currently being linked, or null if it is
+ * not invoked while a call site is being linked.
*/
- public static StackTraceElement getRelinkedCallSiteLocation() {
+ public static StackTraceElement getLinkedCallSiteLocation() {
final StackTraceElement[] trace = new Throwable().getStackTrace();
for(int i = 0; i < trace.length - 1; ++i) {
final StackTraceElement frame = trace[i];
- if(RELINK_METHOD_NAME.equals(frame.getMethodName()) && CLASS_NAME.equals(frame.getClassName())) {
+ if(isRelinkFrame(frame) || isInitialLinkFrame(frame)) {
return trace[i + 1];
}
}
return null;
}
+
+ /**
+ * Deprecated because of not precise name.
+ * @deprecated Use {@link #getLinkedCallSiteLocation()} instead.
+ * @return see non-deprecated method
+ */
+ @Deprecated
+ public static StackTraceElement getRelinkedCallSiteLocation() {
+ return getLinkedCallSiteLocation();
+ }
+
+ /**
+ * Returns true if the frame represents {@code MethodHandleNatives.linkCallSite()}, the frame immediately on top of
+ * the call site frame when the call site is being linked for the first time.
+ * @param frame the frame
+ * @return true if this frame represents {@code MethodHandleNatives.linkCallSite()}
+ */
+ private static boolean isInitialLinkFrame(final StackTraceElement frame) {
+ return testFrame(frame, INITIAL_LINK_METHOD_NAME, INITIAL_LINK_CLASS_NAME);
+ }
+
+ /**
+ * Returns true if the frame represents {@code DynamicLinker.relink()}, the frame immediately on top of the call
+ * site frame when the call site is being relinked (linked for second and subsequent times).
+ * @param frame the frame
+ * @return true if this frame represents {@code DynamicLinker.relink()}
+ */
+ private static boolean isRelinkFrame(final StackTraceElement frame) {
+ return testFrame(frame, RELINK_METHOD_NAME, CLASS_NAME);
+ }
+
+ private static boolean testFrame(final StackTraceElement frame, final String methodName, final String className) {
+ return methodName.equals(frame.getMethodName()) && className.equals(frame.getClassName());
+ }
}
diff --git a/src/jdk/internal/dynalink/beans/AbstractJavaLinker.java b/src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
index 702c1509..0c8d3efd 100644
--- a/src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
+++ b/src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
@@ -86,9 +86,14 @@ package jdk.internal.dynalink.beans;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
+import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -109,10 +114,11 @@ import jdk.internal.dynalink.support.Lookup;
* @author Attila Szegedi
*/
abstract class AbstractJavaLinker implements GuardingDynamicLinker {
+
final Class<?> clazz;
private final MethodHandle classGuard;
private final MethodHandle assignableGuard;
- private final Map<String, AnnotatedMethodHandle> propertyGetters = new HashMap<>();
+ private final Map<String, AnnotatedDynamicMethod> propertyGetters = new HashMap<>();
private final Map<String, DynamicMethod> propertySetters = new HashMap<>();
private final Map<String, DynamicMethod> methods = new HashMap<>();
@@ -129,22 +135,19 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
// Add methods and properties
for(Method method: introspector.getMethods()) {
final String name = method.getName();
- final MethodHandle methodHandle = introspector.unreflect(method);
// Add method
- addMember(name, methodHandle, methods);
+ addMember(name, method, methods);
// Add the method as a property getter and/or setter
if(name.startsWith("get") && name.length() > 3 && method.getParameterTypes().length == 0) {
// Property getter
- setPropertyGetter(decapitalize(name.substring(3)), introspector.unreflect(
- getMostGenericGetter(method)), ValidationType.INSTANCE_OF);
+ setPropertyGetter(method, 3);
} else if(name.startsWith("is") && name.length() > 2 && method.getParameterTypes().length == 0 &&
method.getReturnType() == boolean.class) {
// Boolean property getter
- setPropertyGetter(decapitalize(name.substring(2)), introspector.unreflect(
- getMostGenericGetter(method)), ValidationType.INSTANCE_OF);
+ setPropertyGetter(method, 2);
} else if(name.startsWith("set") && name.length() > 3 && method.getParameterTypes().length == 1) {
// Property setter
- addMember(decapitalize(name.substring(3)), methodHandle, propertySetters);
+ addMember(decapitalize(name.substring(3)), method, propertySetters);
}
}
@@ -156,7 +159,8 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
setPropertyGetter(name, introspector.unreflectGetter(field), ValidationType.EXACT_CLASS);
}
if(!(Modifier.isFinal(field.getModifiers()) || propertySetters.containsKey(name))) {
- addMember(name, introspector.unreflectSetter(field), propertySetters);
+ addMember(name, new SimpleDynamicMethod(introspector.unreflectSetter(field), clazz, name),
+ propertySetters);
}
}
@@ -192,38 +196,135 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
abstract FacetIntrospector createFacetIntrospector();
+ Collection<String> getReadablePropertyNames() {
+ return getUnmodifiableKeys(propertyGetters);
+ }
+
+ Collection<String> getWritablePropertyNames() {
+ return getUnmodifiableKeys(propertySetters);
+ }
+
+ Collection<String> getMethodNames() {
+ return getUnmodifiableKeys(methods);
+ }
+
+ private static Collection<String> getUnmodifiableKeys(Map<String, ?> m) {
+ return Collections.unmodifiableCollection(m.keySet());
+ }
+
+ /**
+ * Sets the specified dynamic method to be the property getter for the specified property. Note that you can only
+ * use this when you're certain that the method handle does not belong to a caller-sensitive method. For properties
+ * that are caller-sensitive, you must use {@link #setPropertyGetter(String, SingleDynamicMethod, ValidationType)}
+ * instead.
+ * @param name name of the property
+ * @param handle the method handle that implements the property getter
+ * @param validationType the validation type for the property
+ */
+ private void setPropertyGetter(String name, SingleDynamicMethod handle, ValidationType validationType) {
+ propertyGetters.put(name, new AnnotatedDynamicMethod(handle, validationType));
+ }
+
+ /**
+ * Sets the specified reflective method to be the property getter for the specified property.
+ * @param getter the getter method
+ * @param prefixLen the getter prefix in the method name; should be 3 for getter names starting with "get" and 2 for
+ * names starting with "is".
+ */
+ private void setPropertyGetter(Method getter, int prefixLen) {
+ setPropertyGetter(decapitalize(getter.getName().substring(prefixLen)), createDynamicMethod(
+ getMostGenericGetter(getter)), ValidationType.INSTANCE_OF);
+ }
+
+ /**
+ * Sets the specified method handle to be the property getter for the specified property. Note that you can only
+ * use this when you're certain that the method handle does not belong to a caller-sensitive method. For properties
+ * that are caller-sensitive, you must use {@link #setPropertyGetter(String, SingleDynamicMethod, ValidationType)}
+ * instead.
+ * @param name name of the property
+ * @param handle the method handle that implements the property getter
+ * @param validationType the validation type for the property
+ */
void setPropertyGetter(String name, MethodHandle handle, ValidationType validationType) {
- propertyGetters.put(name, new AnnotatedMethodHandle(handle, validationType));
+ setPropertyGetter(name, new SimpleDynamicMethod(handle, clazz, name), validationType);
}
- private void addMember(String name, MethodHandle mh, Map<String, DynamicMethod> methodMap) {
+ private void addMember(String name, AccessibleObject ao, Map<String, DynamicMethod> methodMap) {
+ addMember(name, createDynamicMethod(ao), methodMap);
+ }
+
+ private void addMember(String name, SingleDynamicMethod method, Map<String, DynamicMethod> methodMap) {
final DynamicMethod existingMethod = methodMap.get(name);
- final DynamicMethod newMethod = addMember(mh, existingMethod, clazz, name);
+ final DynamicMethod newMethod = mergeMethods(method, existingMethod, clazz, name);
if(newMethod != existingMethod) {
methodMap.put(name, newMethod);
}
}
- static DynamicMethod createDynamicMethod(Iterable<MethodHandle> methodHandles, Class<?> clazz, String name) {
+ /**
+ * Given one or more reflective methods or constructors, creates a dynamic method that represents them all. The
+ * methods should represent all overloads of the same name (or all constructors of the class).
+ * @param members the reflective members
+ * @param clazz the class declaring the reflective members
+ * @param name the common name of the reflective members.
+ * @return a dynamic method representing all the specified reflective members.
+ */
+ static DynamicMethod createDynamicMethod(Iterable<? extends AccessibleObject> members, Class<?> clazz, String name) {
DynamicMethod dynMethod = null;
- for(MethodHandle methodHandle: methodHandles) {
- dynMethod = addMember(methodHandle, dynMethod, clazz, name);
+ for(AccessibleObject method: members) {
+ dynMethod = mergeMethods(createDynamicMethod(method), dynMethod, clazz, name);
}
return dynMethod;
}
- private static DynamicMethod addMember(MethodHandle mh, DynamicMethod existing, Class<?> clazz, String name) {
+ /**
+ * Given a reflective method or a constructor, creates a dynamic method that represents it. This method will
+ * distinguish between caller sensitive and ordinary methods/constructors, and create appropriate caller sensitive
+ * dynamic method when needed.
+ * @param m the reflective member
+ * @return the single dynamic method representing the reflective member
+ */
+ private static SingleDynamicMethod createDynamicMethod(AccessibleObject m) {
+ if(CallerSensitiveDetector.isCallerSensitive(m)) {
+ return new CallerSensitiveDynamicMethod(m);
+ }
+ final Member member = (Member)m;
+ return new SimpleDynamicMethod(unreflectSafely(m), member.getDeclaringClass(), member.getName());
+ }
+
+ /**
+ * Unreflects a method handle from a Method or a Constructor using safe (zero-privilege) unreflection. Should be
+ * only used for methods and constructors that are not caller sensitive. If a caller sensitive method were
+ * unreflected through this mechanism, it would not be a security issue, but would be bound to the zero-privilege
+ * unreflector as its caller, and thus completely useless.
+ * @param m the method or constructor
+ * @return the method handle
+ */
+ private static MethodHandle unreflectSafely(AccessibleObject m) {
+ if(m instanceof Method) {
+ final Method reflMethod = (Method)m;
+ final MethodHandle handle = SafeUnreflector.unreflect(reflMethod);
+ if(Modifier.isStatic(reflMethod.getModifiers())) {
+ return StaticClassIntrospector.editStaticMethodHandle(handle);
+ }
+ return handle;
+ }
+ return StaticClassIntrospector.editConstructorMethodHandle(SafeUnreflector.unreflectConstructor(
+ (Constructor<?>)m));
+ }
+
+ private static DynamicMethod mergeMethods(SingleDynamicMethod method, DynamicMethod existing, Class<?> clazz, String name) {
if(existing == null) {
- return new SimpleDynamicMethod(mh, clazz, name);
- } else if(existing.contains(mh)) {
+ return method;
+ } else if(existing.contains(method)) {
return existing;
- } else if(existing instanceof SimpleDynamicMethod) {
+ } else if(existing instanceof SingleDynamicMethod) {
final OverloadedDynamicMethod odm = new OverloadedDynamicMethod(clazz, name);
- odm.addMethod(((SimpleDynamicMethod)existing));
- odm.addMethod(mh);
+ odm.addMethod(((SingleDynamicMethod)existing));
+ odm.addMethod(method);
return odm;
} else if(existing instanceof OverloadedDynamicMethod) {
- ((OverloadedDynamicMethod)existing).addMethod(mh);
+ ((OverloadedDynamicMethod)existing).addMethod(method);
return existing;
}
throw new AssertionError();
@@ -296,7 +397,7 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
private GuardedInvocation getCallPropWithThis(CallSiteDescriptor callSiteDescriptor, LinkerServices linkerServices) {
switch(callSiteDescriptor.getNameTokenCount()) {
case 3: {
- return createGuardedDynamicMethodInvocation(callSiteDescriptor.getMethodType(), linkerServices,
+ return createGuardedDynamicMethodInvocation(callSiteDescriptor, linkerServices,
callSiteDescriptor.getNameToken(CallSiteDescriptor.NAME_OPERAND), methods);
}
default: {
@@ -305,16 +406,16 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
}
}
- private GuardedInvocation createGuardedDynamicMethodInvocation(MethodType callSiteType,
+ private GuardedInvocation createGuardedDynamicMethodInvocation(CallSiteDescriptor callSiteDescriptor,
LinkerServices linkerServices, String methodName, Map<String, DynamicMethod> methodMap){
- final MethodHandle inv = getDynamicMethodInvocation(callSiteType, linkerServices, methodName, methodMap);
- return inv == null ? null : new GuardedInvocation(inv, getClassGuard(callSiteType));
+ final MethodHandle inv = getDynamicMethodInvocation(callSiteDescriptor, linkerServices, methodName, methodMap);
+ return inv == null ? null : new GuardedInvocation(inv, getClassGuard(callSiteDescriptor.getMethodType()));
}
- private static MethodHandle getDynamicMethodInvocation(MethodType callSiteType, LinkerServices linkerServices,
- String methodName, Map<String, DynamicMethod> methodMap) {
+ private static MethodHandle getDynamicMethodInvocation(CallSiteDescriptor callSiteDescriptor,
+ LinkerServices linkerServices, String methodName, Map<String, DynamicMethod> methodMap) {
final DynamicMethod dynaMethod = getDynamicMethod(methodName, methodMap);
- return dynaMethod != null ? dynaMethod.getInvocation(callSiteType, linkerServices) : null;
+ return dynaMethod != null ? dynaMethod.getInvocation(callSiteDescriptor, linkerServices) : null;
}
private static DynamicMethod getDynamicMethod(String methodName, Map<String, DynamicMethod> methodMap) {
@@ -322,13 +423,13 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
return dynaMethod != null ? dynaMethod : getExplicitSignatureDynamicMethod(methodName, methodMap);
}
- private static SimpleDynamicMethod getExplicitSignatureDynamicMethod(String methodName,
+ private static SingleDynamicMethod getExplicitSignatureDynamicMethod(String methodName,
Map<String, DynamicMethod> methodsMap) {
// What's below is meant to support the "name(type, type, ...)" syntax that programmers can use in a method name
// to manually pin down an exact overloaded variant. This is not usually required, as the overloaded method
// resolution works correctly in almost every situation. However, in presence of many language-specific
// conversions with a radically dynamic language, most overloaded methods will end up being constantly selected
- // at invocation time, so a programmer knowledgable of the situation might choose to pin down an exact overload
+ // at invocation time, so a programmer knowledgeable of the situation might choose to pin down an exact overload
// for performance reasons.
// Is the method name lexically of the form "name(types)"?
@@ -377,8 +478,8 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
final MethodType setterType = type.dropParameterTypes(1, 2);
// Bind property setter handle to the expected setter type and linker services. Type is
// MethodHandle(Object, String, Object)
- final MethodHandle boundGetter = MethodHandles.insertArguments(getPropertySetterHandle, 0, setterType,
- linkerServices);
+ final MethodHandle boundGetter = MethodHandles.insertArguments(getPropertySetterHandle, 0,
+ CallSiteDescriptorFactory.dropParameterTypes(callSiteDescriptor, 1, 2), linkerServices);
// Cast getter to MethodHandle(O, N, V)
final MethodHandle typedGetter = linkerServices.asType(boundGetter, type.changeReturnType(
@@ -415,9 +516,8 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
case 3: {
// Must have two arguments: target object and property value
assertParameterCount(callSiteDescriptor, 2);
- final GuardedInvocation gi = createGuardedDynamicMethodInvocation(callSiteDescriptor.getMethodType(),
- linkerServices, callSiteDescriptor.getNameToken(CallSiteDescriptor.NAME_OPERAND),
- propertySetters);
+ final GuardedInvocation gi = createGuardedDynamicMethodInvocation(callSiteDescriptor, linkerServices,
+ callSiteDescriptor.getNameToken(CallSiteDescriptor.NAME_OPERAND), propertySetters);
// If we have a property setter with this name, this composite operation will always stop here
if(gi != null) {
return new GuardedInvocationComponent(gi, clazz, ValidationType.EXACT_CLASS);
@@ -435,14 +535,13 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
private static final Lookup privateLookup = new Lookup(MethodHandles.lookup());
- private static final MethodHandle IS_ANNOTATED_HANDLE_NOT_NULL = Guards.isNotNull().asType(MethodType.methodType(
- boolean.class, AnnotatedMethodHandle.class));
- private static final MethodHandle CONSTANT_NULL_DROP_ANNOTATED_HANDLE = MethodHandles.dropArguments(
- MethodHandles.constant(Object.class, null), 0, AnnotatedMethodHandle.class);
- private static final MethodHandle GET_ANNOTATED_HANDLE = privateLookup.findGetter(AnnotatedMethodHandle.class,
- "handle", MethodHandle.class);
- private static final MethodHandle GENERIC_PROPERTY_GETTER_HANDLER_INVOKER = MethodHandles.filterArguments(
- MethodHandles.invoker(MethodType.methodType(Object.class, Object.class)), 0, GET_ANNOTATED_HANDLE);
+ private static final MethodHandle IS_ANNOTATED_METHOD_NOT_NULL = Guards.isNotNull().asType(MethodType.methodType(
+ boolean.class, AnnotatedDynamicMethod.class));
+ private static final MethodHandle CONSTANT_NULL_DROP_ANNOTATED_METHOD = MethodHandles.dropArguments(
+ MethodHandles.constant(Object.class, null), 0, AnnotatedDynamicMethod.class);
+ private static final MethodHandle GET_ANNOTATED_METHOD = privateLookup.findVirtual(AnnotatedDynamicMethod.class,
+ "getTarget", MethodType.methodType(MethodHandle.class, MethodHandles.Lookup.class));
+ private static final MethodHandle GETTER_INVOKER = MethodHandles.invoker(MethodType.methodType(Object.class, Object.class));
private GuardedInvocationComponent getPropertyGetter(CallSiteDescriptor callSiteDescriptor,
LinkerServices linkerServices, List<String> ops) throws Exception {
@@ -455,16 +554,20 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
// What's below is basically:
// foldArguments(guardWithTest(isNotNull, invoke(get_handle), null|nextComponent.invocation), get_getter_handle)
// only with a bunch of method signature adjustments. Basically, retrieve method getter
- // AnnotatedMethodHandle; if it is non-null, invoke its "handle" field, otherwise either return null,
+ // AnnotatedDynamicMethod; if it is non-null, invoke its "handle" field, otherwise either return null,
// or delegate to next component's invocation.
final MethodHandle typedGetter = linkerServices.asType(getPropertyGetterHandle, type.changeReturnType(
- AnnotatedMethodHandle.class));
- // Object(AnnotatedMethodHandle, Object)->R(AnnotatedMethodHandle, T0)
- final MethodHandle invokeHandleTyped = linkerServices.asType(GENERIC_PROPERTY_GETTER_HANDLER_INVOKER,
- MethodType.methodType(type.returnType(), AnnotatedMethodHandle.class, type.parameterType(0)));
+ AnnotatedDynamicMethod.class));
+ final MethodHandle callSiteBoundMethodGetter = MethodHandles.insertArguments(
+ GET_ANNOTATED_METHOD, 1, callSiteDescriptor.getLookup());
+ final MethodHandle callSiteBoundInvoker = MethodHandles.filterArguments(GETTER_INVOKER, 0,
+ callSiteBoundMethodGetter);
+ // Object(AnnotatedDynamicMethod, Object)->R(AnnotatedDynamicMethod, T0)
+ final MethodHandle invokeHandleTyped = linkerServices.asType(callSiteBoundInvoker,
+ MethodType.methodType(type.returnType(), AnnotatedDynamicMethod.class, type.parameterType(0)));
// Since it's in the target of a fold, drop the unnecessary second argument
- // R(AnnotatedMethodHandle, T0)->R(AnnotatedMethodHandle, T0, T1)
+ // R(AnnotatedDynamicMethod, T0)->R(AnnotatedDynamicMethod, T0, T1)
final MethodHandle invokeHandleFolded = MethodHandles.dropArguments(invokeHandleTyped, 2,
type.parameterType(1));
final GuardedInvocationComponent nextComponent = getGuardedInvocationComponent(callSiteDescriptor,
@@ -472,19 +575,19 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
final MethodHandle fallbackFolded;
if(nextComponent == null) {
- // Object(AnnotatedMethodHandle)->R(AnnotatedMethodHandle, T0, T1); returns constant null
- fallbackFolded = MethodHandles.dropArguments(CONSTANT_NULL_DROP_ANNOTATED_HANDLE, 1,
- type.parameterList()).asType(type.insertParameterTypes(0, AnnotatedMethodHandle.class));
+ // Object(AnnotatedDynamicMethod)->R(AnnotatedDynamicMethod, T0, T1); returns constant null
+ fallbackFolded = MethodHandles.dropArguments(CONSTANT_NULL_DROP_ANNOTATED_METHOD, 1,
+ type.parameterList()).asType(type.insertParameterTypes(0, AnnotatedDynamicMethod.class));
} else {
- // R(T0, T1)->R(AnnotatedMethodHAndle, T0, T1); adapts the next component's invocation to drop the
+ // R(T0, T1)->R(AnnotatedDynamicMethod, T0, T1); adapts the next component's invocation to drop the
// extra argument resulting from fold
fallbackFolded = MethodHandles.dropArguments(nextComponent.getGuardedInvocation().getInvocation(),
- 0, AnnotatedMethodHandle.class);
+ 0, AnnotatedDynamicMethod.class);
}
- // fold(R(AnnotatedMethodHandle, T0, T1), AnnotatedMethodHandle(T0, T1))
+ // fold(R(AnnotatedDynamicMethod, T0, T1), AnnotatedDynamicMethod(T0, T1))
final MethodHandle compositeGetter = MethodHandles.foldArguments(MethodHandles.guardWithTest(
- IS_ANNOTATED_HANDLE_NOT_NULL, invokeHandleFolded, fallbackFolded), typedGetter);
+ IS_ANNOTATED_METHOD_NOT_NULL, invokeHandleFolded, fallbackFolded), typedGetter);
if(nextComponent == null) {
return getClassGuardedInvocationComponent(compositeGetter, type);
}
@@ -494,13 +597,13 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
// Must have exactly one argument: receiver
assertParameterCount(callSiteDescriptor, 1);
// Fixed name
- final AnnotatedMethodHandle annGetter = propertyGetters.get(callSiteDescriptor.getNameToken(
+ final AnnotatedDynamicMethod annGetter = propertyGetters.get(callSiteDescriptor.getNameToken(
CallSiteDescriptor.NAME_OPERAND));
if(annGetter == null) {
// We have no such property, always delegate to the next component operation
return getGuardedInvocationComponent(callSiteDescriptor, linkerServices, ops);
}
- final MethodHandle getter = annGetter.handle;
+ final MethodHandle getter = annGetter.getInvocation(callSiteDescriptor, linkerServices);
// NOTE: since property getters (not field getters!) are no-arg, we don't have to worry about them being
// overloaded in a subclass. Therefore, we can discover the most abstract superclass that has the
// method, and use that as the guard with Guards.isInstance() for a more stably linked call site. If
@@ -508,6 +611,7 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
// NOTE: No delegation to the next component operation if we have a property with this name, even if its
// value is null.
final ValidationType validationType = annGetter.validationType;
+ // TODO: we aren't using the type that declares the most generic getter here!
return new GuardedInvocationComponent(linkerServices.asType(getter, type), getGuard(validationType,
type), clazz, validationType);
}
@@ -623,14 +727,15 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
// args are dropped; this makes handles with first three args conform to "Object, String, Object" though, which is
// a typical property setter with variable name signature (target, name, value).
private static final MethodHandle GET_PROPERTY_SETTER_HANDLE = MethodHandles.dropArguments(MethodHandles.dropArguments(
- privateLookup.findOwnSpecial("getPropertySetterHandle", MethodHandle.class, MethodType.class,
+ privateLookup.findOwnSpecial("getPropertySetterHandle", MethodHandle.class, CallSiteDescriptor.class,
LinkerServices.class, Object.class), 3, Object.class), 5, Object.class);
// Type is MethodHandle(MethodType, LinkerServices, Object, String, Object)
private final MethodHandle getPropertySetterHandle = GET_PROPERTY_SETTER_HANDLE.bindTo(this);
@SuppressWarnings("unused")
- private MethodHandle getPropertySetterHandle(MethodType setterType, LinkerServices linkerServices, Object id) {
- return getDynamicMethodInvocation(setterType, linkerServices, String.valueOf(id), propertySetters);
+ private MethodHandle getPropertySetterHandle(CallSiteDescriptor setterDescriptor, LinkerServices linkerServices,
+ Object id) {
+ return getDynamicMethodInvocation(setterDescriptor, linkerServices, String.valueOf(id), propertySetters);
}
private static MethodHandle GET_DYNAMIC_METHOD = MethodHandles.dropArguments(privateLookup.findOwnSpecial(
@@ -689,13 +794,24 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker {
return null;
}
- private static final class AnnotatedMethodHandle {
- final MethodHandle handle;
+ private static final class AnnotatedDynamicMethod {
+ private final SingleDynamicMethod method;
/*private*/ final ValidationType validationType;
- AnnotatedMethodHandle(MethodHandle handle, ValidationType validationType) {
- this.handle = handle;
+ AnnotatedDynamicMethod(SingleDynamicMethod method, ValidationType validationType) {
+ this.method = method;
this.validationType = validationType;
}
+
+ MethodHandle getInvocation(CallSiteDescriptor callSiteDescriptor, LinkerServices linkerServices) {
+ return method.getInvocation(callSiteDescriptor, linkerServices);
+ }
+
+ @SuppressWarnings("unused")
+ MethodHandle getTarget(MethodHandles.Lookup lookup) {
+ MethodHandle inv = method.getTarget(lookup);
+ assert inv != null;
+ return inv;
+ }
}
}
diff --git a/src/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java b/src/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java
index a232caf1..39a03a8e 100644
--- a/src/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java
+++ b/src/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java
@@ -83,7 +83,6 @@
package jdk.internal.dynalink.beans;
-import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType;
import java.util.LinkedList;
import java.util.List;
@@ -95,7 +94,7 @@ import jdk.internal.dynalink.support.TypeUtilities;
* @author Attila Szegedi
*/
class ApplicableOverloadedMethods {
- private final List<MethodHandle> methods;
+ private final List<SingleDynamicMethod> methods;
private final boolean varArgs;
/**
@@ -106,10 +105,10 @@ class ApplicableOverloadedMethods {
* @param test applicability test. One of {@link #APPLICABLE_BY_SUBTYPING},
* {@link #APPLICABLE_BY_METHOD_INVOCATION_CONVERSION}, or {@link #APPLICABLE_BY_VARIABLE_ARITY}.
*/
- ApplicableOverloadedMethods(final List<MethodHandle> methods, final MethodType callSiteType,
+ ApplicableOverloadedMethods(final List<SingleDynamicMethod> methods, final MethodType callSiteType,
final ApplicabilityTest test) {
this.methods = new LinkedList<>();
- for(MethodHandle m: methods) {
+ for(SingleDynamicMethod m: methods) {
if(test.isApplicable(callSiteType, m)) {
this.methods.add(m);
}
@@ -122,7 +121,7 @@ class ApplicableOverloadedMethods {
*
* @return list of all methods.
*/
- List<MethodHandle> getMethods() {
+ List<SingleDynamicMethod> getMethods() {
return methods;
}
@@ -131,12 +130,12 @@ class ApplicableOverloadedMethods {
*
* @return a list of maximally specific methods.
*/
- List<MethodHandle> findMaximallySpecificMethods() {
+ List<SingleDynamicMethod> findMaximallySpecificMethods() {
return MaximallySpecific.getMaximallySpecificMethods(methods, varArgs);
}
abstract static class ApplicabilityTest {
- abstract boolean isApplicable(MethodType callSiteType, MethodHandle method);
+ abstract boolean isApplicable(MethodType callSiteType, SingleDynamicMethod method);
}
/**
@@ -144,8 +143,8 @@ class ApplicableOverloadedMethods {
*/
static final ApplicabilityTest APPLICABLE_BY_SUBTYPING = new ApplicabilityTest() {
@Override
- boolean isApplicable(MethodType callSiteType, MethodHandle method) {
- final MethodType methodType = method.type();
+ boolean isApplicable(MethodType callSiteType, SingleDynamicMethod method) {
+ final MethodType methodType = method.getMethodType();
final int methodArity = methodType.parameterCount();
if(methodArity != callSiteType.parameterCount()) {
return false;
@@ -166,8 +165,8 @@ class ApplicableOverloadedMethods {
*/
static final ApplicabilityTest APPLICABLE_BY_METHOD_INVOCATION_CONVERSION = new ApplicabilityTest() {
@Override
- boolean isApplicable(MethodType callSiteType, MethodHandle method) {
- final MethodType methodType = method.type();
+ boolean isApplicable(MethodType callSiteType, SingleDynamicMethod method) {
+ final MethodType methodType = method.getMethodType();
final int methodArity = methodType.parameterCount();
if(methodArity != callSiteType.parameterCount()) {
return false;
@@ -189,11 +188,11 @@ class ApplicableOverloadedMethods {
*/
static final ApplicabilityTest APPLICABLE_BY_VARIABLE_ARITY = new ApplicabilityTest() {
@Override
- boolean isApplicable(MethodType callSiteType, MethodHandle method) {
- if(!method.isVarargsCollector()) {
+ boolean isApplicable(MethodType callSiteType, SingleDynamicMethod method) {
+ if(!method.isVarArgs()) {
return false;
}
- final MethodType methodType = method.type();
+ final MethodType methodType = method.getMethodType();
final int methodArity = methodType.parameterCount();
final int fixArity = methodArity - 1;
final int callSiteArity = callSiteType.parameterCount();
diff --git a/src/jdk/internal/dynalink/beans/BeansLinker.java b/src/jdk/internal/dynalink/beans/BeansLinker.java
index 85811235..e0c14b0d 100644
--- a/src/jdk/internal/dynalink/beans/BeansLinker.java
+++ b/src/jdk/internal/dynalink/beans/BeansLinker.java
@@ -84,6 +84,8 @@
package jdk.internal.dynalink.beans;
import java.lang.invoke.MethodHandles;
+import java.util.Collection;
+import java.util.Collections;
import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.DynamicLinkerFactory;
import jdk.internal.dynalink.linker.GuardedInvocation;
@@ -166,6 +168,72 @@ public class BeansLinker implements GuardingDynamicLinker {
return obj instanceof DynamicMethod;
}
+ /**
+ * Returns a collection of names of all readable instance properties of a class.
+ * @param clazz the class
+ * @return a collection of names of all readable instance properties of a class.
+ */
+ public static Collection<String> getReadableInstancePropertyNames(Class<?> clazz) {
+ TypeBasedGuardingDynamicLinker linker = getLinkerForClass(clazz);
+ if(linker instanceof BeanLinker) {
+ return ((BeanLinker)linker).getReadablePropertyNames();
+ }
+ return Collections.emptySet();
+ }
+
+ /**
+ * Returns a collection of names of all writable instance properties of a class.
+ * @param clazz the class
+ * @return a collection of names of all writable instance properties of a class.
+ */
+ public static Collection<String> getWritableInstancePropertyNames(Class<?> clazz) {
+ TypeBasedGuardingDynamicLinker linker = getLinkerForClass(clazz);
+ if(linker instanceof BeanLinker) {
+ return ((BeanLinker)linker).getWritablePropertyNames();
+ }
+ return Collections.emptySet();
+ }
+
+ /**
+ * Returns a collection of names of all instance methods of a class.
+ * @param clazz the class
+ * @return a collection of names of all instance methods of a class.
+ */
+ public static Collection<String> getInstanceMethodNames(Class<?> clazz) {
+ TypeBasedGuardingDynamicLinker linker = getLinkerForClass(clazz);
+ if(linker instanceof BeanLinker) {
+ return ((BeanLinker)linker).getMethodNames();
+ }
+ return Collections.emptySet();
+ }
+
+ /**
+ * Returns a collection of names of all readable static properties of a class.
+ * @param clazz the class
+ * @return a collection of names of all readable static properties of a class.
+ */
+ public static Collection<String> getReadableStaticPropertyNames(Class<?> clazz) {
+ return StaticClassLinker.getReadableStaticPropertyNames(clazz);
+ }
+
+ /**
+ * Returns a collection of names of all writable static properties of a class.
+ * @param clazz the class
+ * @return a collection of names of all writable static properties of a class.
+ */
+ public static Collection<String> getWritableStaticPropertyNames(Class<?> clazz) {
+ return StaticClassLinker.getWritableStaticPropertyNames(clazz);
+ }
+
+ /**
+ * Returns a collection of names of all static methods of a class.
+ * @param clazz the class
+ * @return a collection of names of all static methods of a class.
+ */
+ public static Collection<String> getStaticMethodNames(Class<?> clazz) {
+ return StaticClassLinker.getStaticMethodNames(clazz);
+ }
+
@Override
public GuardedInvocation getGuardedInvocation(LinkRequest request, final LinkerServices linkerServices)
throws Exception {
diff --git a/src/jdk/internal/dynalink/beans/CallerSensitiveDetector.java b/src/jdk/internal/dynalink/beans/CallerSensitiveDetector.java
new file mode 100644
index 00000000..466bafe6
--- /dev/null
+++ b/src/jdk/internal/dynalink/beans/CallerSensitiveDetector.java
@@ -0,0 +1,148 @@
+/*
+ * 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. 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file, and Oracle licenses the original version of this file under the BSD
+ * license:
+ */
+/*
+ Copyright 2009-2013 Attila Szegedi
+
+ Licensed under both the Apache License, Version 2.0 (the "Apache License")
+ and the BSD License (the "BSD License"), with licensee being free to
+ choose either of the two at their discretion.
+
+ You may not use this file except in compliance with either the Apache
+ License or the BSD License.
+
+ If you choose to use this file in compliance with the Apache License, the
+ following notice applies to you:
+
+ You may obtain a copy of the Apache License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ If you choose to use this file in compliance with the BSD License, the
+ following notice applies to you:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the copyright holder nor the names of
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package jdk.internal.dynalink.beans;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AccessibleObject;
+import sun.reflect.CallerSensitive;
+
+/**
+ * Utility class that determines if a method or constructor is caller sensitive. It actually encapsulates two different
+ * strategies for determining caller sensitivity; a more robust one that works if Dynalink runs as code with access
+ * to {@code sun.reflect} package, and an unprivileged one that is used when Dynalink doesn't have access to that
+ * package. Note that even the unprivileged strategy is ordinarily robust, but it relies on the {@code toString} method
+ * of the annotation. If an attacker were to use a different annotation to spoof the string representation of the
+ * {@code CallerSensitive} annotation, they could designate their own methods as caller sensitive. This however does not
+ * escalate privileges, only causes Dynalink to never cache method handles for such methods, so all it would do would
+ * decrease the performance in linking such methods. In the opposite case when an attacker could trick Dynalink into not
+ * recognizing genuine {@code CallerSensitive} annotations, Dynalink would treat caller sensitive methods as ordinary
+ * methods, and would cache them bound to a zero-privilege delegate as the caller (just what Dynalink did before it
+ * could handle caller-sensitive methods). That would practically render caller-sensitive methods exposed through
+ * Dynalink unusable, but again, can not lead to any privilege escalations. Therefore, even the less robust unprivileged
+ * strategy is safe; the worst thing a successful attack against it can achieve is slight reduction in Dynalink-exposed
+ * functionality or performance.
+ */
+public class CallerSensitiveDetector {
+
+ private static final DetectionStrategy DETECTION_STRATEGY = getDetectionStrategy();
+
+ static boolean isCallerSensitive(AccessibleObject ao) {
+ return DETECTION_STRATEGY.isCallerSensitive(ao);
+ }
+
+ private static DetectionStrategy getDetectionStrategy() {
+ try {
+ return new PrivilegedDetectionStrategy();
+ } catch(Throwable t) {
+ return new UnprivilegedDetectionStrategy();
+ }
+ }
+
+ private abstract static class DetectionStrategy {
+ abstract boolean isCallerSensitive(AccessibleObject ao);
+ }
+
+ private static class PrivilegedDetectionStrategy extends DetectionStrategy {
+ private static final Class<? extends Annotation> CALLER_SENSITIVE_ANNOTATION_CLASS = CallerSensitive.class;
+
+ @Override
+ boolean isCallerSensitive(AccessibleObject ao) {
+ return ao.getAnnotation(CALLER_SENSITIVE_ANNOTATION_CLASS) != null;
+ }
+ }
+
+ private static class UnprivilegedDetectionStrategy extends DetectionStrategy {
+ private static final String CALLER_SENSITIVE_ANNOTATION_STRING = "@sun.reflect.CallerSensitive()";
+
+ @Override
+ boolean isCallerSensitive(AccessibleObject o) {
+ for(Annotation a: o.getAnnotations()) {
+ if(String.valueOf(a).equals(CALLER_SENSITIVE_ANNOTATION_STRING)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+}
diff --git a/src/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java b/src/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java
new file mode 100644
index 00000000..1e274d51
--- /dev/null
+++ b/src/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java
@@ -0,0 +1,158 @@
+/*
+ * 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. 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file, and Oracle licenses the original version of this file under the BSD
+ * license:
+ */
+/*
+ Copyright 2009-2013 Attila Szegedi
+
+ Licensed under both the Apache License, Version 2.0 (the "Apache License")
+ and the BSD License (the "BSD License"), with licensee being free to
+ choose either of the two at their discretion.
+
+ You may not use this file except in compliance with either the Apache
+ License or the BSD License.
+
+ If you choose to use this file in compliance with the Apache License, the
+ following notice applies to you:
+
+ You may obtain a copy of the Apache License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ If you choose to use this file in compliance with the BSD License, the
+ following notice applies to you:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the copyright holder nor the names of
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package jdk.internal.dynalink.beans;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import jdk.internal.dynalink.support.Lookup;
+
+/**
+ * A dynamic method bound to exactly one Java method or constructor that is caller sensitive. Since the target method is
+ * caller sensitive, it doesn't cache a method handle but rather uses the passed lookup object in
+ * {@link #getTarget(java.lang.invoke.MethodHandles.Lookup)} to unreflect a method handle from the reflective member on
+ * every request.
+ *
+ * @author Attila Szegedi
+ */
+class CallerSensitiveDynamicMethod extends SingleDynamicMethod {
+ // Typed as "AccessibleObject" as it can be either a method or a constructor.
+ // If we were Java8-only, we could use java.lang.reflect.Executable
+ private final AccessibleObject target;
+ private final MethodType type;
+
+ public CallerSensitiveDynamicMethod(AccessibleObject target) {
+ super(getName(target));
+ this.target = target;
+ this.type = getMethodType(target);
+ }
+
+ private static String getName(AccessibleObject target) {
+ final Member m = (Member)target;
+ return getMethodNameWithSignature(getMethodType(target), getClassAndMethodName(m.getDeclaringClass(),
+ m.getName()));
+ }
+
+ @Override
+ MethodType getMethodType() {
+ return type;
+ }
+
+ private static MethodType getMethodType(AccessibleObject ao) {
+ final boolean isMethod = ao instanceof Method;
+ final Class<?> rtype = isMethod ? ((Method)ao).getReturnType() : ((Constructor<?>)ao).getDeclaringClass();
+ final Class<?>[] ptypes = isMethod ? ((Method)ao).getParameterTypes() : ((Constructor<?>)ao).getParameterTypes();
+ final MethodType type = MethodType.methodType(rtype, ptypes);
+ final Member m = (Member)ao;
+ return type.insertParameterTypes(0,
+ isMethod ?
+ Modifier.isStatic(m.getModifiers()) ?
+ Object.class :
+ m.getDeclaringClass() :
+ StaticClass.class);
+ }
+
+ @Override
+ boolean isVarArgs() {
+ return target instanceof Method ? ((Method)target).isVarArgs() : ((Constructor<?>)target).isVarArgs();
+ }
+
+ @Override
+ MethodHandle getTarget(MethodHandles.Lookup lookup) {
+ if(target instanceof Method) {
+ final MethodHandle mh = Lookup.unreflect(lookup, (Method)target);
+ if(Modifier.isStatic(((Member)target).getModifiers())) {
+ return StaticClassIntrospector.editStaticMethodHandle(mh);
+ }
+ return mh;
+ }
+ return StaticClassIntrospector.editConstructorMethodHandle(Lookup.unreflectConstructor(lookup,
+ (Constructor<?>)target));
+ }
+}
diff --git a/src/jdk/internal/dynalink/beans/ClassString.java b/src/jdk/internal/dynalink/beans/ClassString.java
index dfcb3786..8ab45727 100644
--- a/src/jdk/internal/dynalink/beans/ClassString.java
+++ b/src/jdk/internal/dynalink/beans/ClassString.java
@@ -155,8 +155,8 @@ final class ClassString {
}
List<MethodHandle> getMaximallySpecifics(List<MethodHandle> methods, LinkerServices linkerServices, boolean varArg) {
- return MaximallySpecific.getMaximallySpecificMethods(getApplicables(methods, linkerServices, varArg), varArg,
- classes, linkerServices);
+ return MaximallySpecific.getMaximallySpecificMethodHandles(getApplicables(methods, linkerServices, varArg),
+ varArg, classes, linkerServices);
}
/**
diff --git a/src/jdk/internal/dynalink/beans/DynamicMethod.java b/src/jdk/internal/dynalink/beans/DynamicMethod.java
index aee69ff7..6beb92b1 100644
--- a/src/jdk/internal/dynalink/beans/DynamicMethod.java
+++ b/src/jdk/internal/dynalink/beans/DynamicMethod.java
@@ -84,8 +84,7 @@
package jdk.internal.dynalink.beans;
import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodType;
-import java.util.StringTokenizer;
+import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.linker.LinkerServices;
/**
@@ -116,45 +115,28 @@ abstract class DynamicMethod {
* is a variable arguments (vararg) method, it will pack the extra arguments in an array before the invocation of
* the underlying method if it is not already done.
*
- * @param callSiteType the method type at a call site
+ * @param callSiteDescriptor the descriptor of the call site
* @param linkerServices linker services. Used for language-specific type conversions.
* @return an invocation suitable for calling the method from the specified call site.
*/
- abstract MethodHandle getInvocation(MethodType callSiteType, LinkerServices linkerServices);
+ abstract MethodHandle getInvocation(CallSiteDescriptor callSiteDescriptor, LinkerServices linkerServices);
/**
- * Returns a simple dynamic method representing a single underlying Java method (possibly selected among several
+ * Returns a single dynamic method representing a single underlying Java method (possibly selected among several
* overloads) with formal parameter types exactly matching the passed signature.
* @param paramTypes the comma-separated list of requested parameter type names. The names will match both
* qualified and unqualified type names.
- * @return a simple dynamic method representing a single underlying Java method, or null if none of the Java methods
+ * @return a single dynamic method representing a single underlying Java method, or null if none of the Java methods
* behind this dynamic method exactly match the requested parameter types.
*/
- abstract SimpleDynamicMethod getMethodForExactParamTypes(String paramTypes);
+ abstract SingleDynamicMethod getMethodForExactParamTypes(String paramTypes);
/**
- * True if this dynamic method already contains a method handle with an identical signature as the passed in method
- * handle.
- * @param mh the method handle to check
- * @return true if it already contains an equivalent method handle.
+ * True if this dynamic method already contains a method with an identical signature as the passed in method.
+ * @param method the method to check
+ * @return true if it already contains an equivalent method.
*/
- abstract boolean contains(MethodHandle mh);
-
- static boolean typeMatchesDescription(String paramTypes, MethodType type) {
- final StringTokenizer tok = new StringTokenizer(paramTypes, ", ");
- for(int i = 1; i < type.parameterCount(); ++i) { // i = 1 as we ignore the receiver
- if(!(tok.hasMoreTokens() && typeNameMatches(tok.nextToken(), type.parameterType(i)))) {
- return false;
- }
- }
- return !tok.hasMoreTokens();
- }
-
- private static boolean typeNameMatches(String typeName, Class<?> type) {
- final int lastDot = typeName.lastIndexOf('.');
- final String fullTypeName = type.getCanonicalName();
- return lastDot != -1 && fullTypeName.endsWith(typeName.substring(lastDot)) || typeName.equals(fullTypeName);
- }
+ abstract boolean contains(SingleDynamicMethod method);
static String getClassAndMethodName(Class<?> clazz, String name) {
final String clazzName = clazz.getCanonicalName();
diff --git a/src/jdk/internal/dynalink/beans/DynamicMethodLinker.java b/src/jdk/internal/dynalink/beans/DynamicMethodLinker.java
index d8ceeea0..32942b9a 100644
--- a/src/jdk/internal/dynalink/beans/DynamicMethodLinker.java
+++ b/src/jdk/internal/dynalink/beans/DynamicMethodLinker.java
@@ -85,12 +85,12 @@ package jdk.internal.dynalink.beans;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
-import java.lang.invoke.MethodType;
import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.linker.GuardedInvocation;
import jdk.internal.dynalink.linker.LinkRequest;
import jdk.internal.dynalink.linker.LinkerServices;
import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
+import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
import jdk.internal.dynalink.support.Guards;
/**
@@ -110,19 +110,18 @@ class DynamicMethodLinker implements TypeBasedGuardingDynamicLinker {
return null;
}
final CallSiteDescriptor desc = linkRequest.getCallSiteDescriptor();
- if(desc.getNameTokenCount() != 2 && desc.getNameToken(CallSiteDescriptor.SCHEME) != "dyn") {
+ if(desc.getNameTokenCount() != 2 && desc.getNameToken(CallSiteDescriptor.SCHEME) != "dyn") {
return null;
}
final String operator = desc.getNameToken(CallSiteDescriptor.OPERATOR);
if(operator == "call") {
- final MethodType type = desc.getMethodType();
- final MethodHandle invocation = ((DynamicMethod)receiver).getInvocation(type.dropParameterTypes(0, 1),
- linkerServices);
+ final MethodHandle invocation = ((DynamicMethod)receiver).getInvocation(
+ CallSiteDescriptorFactory.dropParameterTypes(desc, 0, 1), linkerServices);
if(invocation == null) {
return null;
}
- return new GuardedInvocation(MethodHandles.dropArguments(invocation, 0, type.parameterType(0)),
- Guards.getIdentityGuard(receiver));
+ return new GuardedInvocation(MethodHandles.dropArguments(invocation, 0,
+ desc.getMethodType().parameterType(0)), Guards.getIdentityGuard(receiver));
}
return null;
}
diff --git a/src/jdk/internal/dynalink/beans/FacetIntrospector.java b/src/jdk/internal/dynalink/beans/FacetIntrospector.java
index f4fbd824..97e431ca 100644
--- a/src/jdk/internal/dynalink/beans/FacetIntrospector.java
+++ b/src/jdk/internal/dynalink/beans/FacetIntrospector.java
@@ -167,10 +167,6 @@ abstract class FacetIntrospector {
return editMethodHandle(SafeUnreflector.unreflectSetter(field));
}
- MethodHandle unreflect(Method method) {
- return editMethodHandle(SafeUnreflector.unreflect(method));
- }
-
/**
* Returns an edited method handle. A facet might need to edit an unreflected method handle before it is usable with
* the facet. By default, returns the passed method handle unchanged. The class' static facet will introduce a
diff --git a/src/jdk/internal/dynalink/beans/MaximallySpecific.java b/src/jdk/internal/dynalink/beans/MaximallySpecific.java
index 182fd016..3ee8e41a 100644
--- a/src/jdk/internal/dynalink/beans/MaximallySpecific.java
+++ b/src/jdk/internal/dynalink/beans/MaximallySpecific.java
@@ -105,10 +105,58 @@ class MaximallySpecific {
* @param varArgs whether to assume the methods are varargs
* @return the list of maximally specific methods.
*/
- static List<MethodHandle> getMaximallySpecificMethods(List<MethodHandle> methods, boolean varArgs) {
- return getMaximallySpecificMethods(methods, varArgs, null, null);
+ static List<SingleDynamicMethod> getMaximallySpecificMethods(List<SingleDynamicMethod> methods, boolean varArgs) {
+ return getMaximallySpecificSingleDynamicMethods(methods, varArgs, null, null);
}
+ private abstract static class MethodTypeGetter<T> {
+ abstract MethodType getMethodType(T t);
+ }
+
+ private static final MethodTypeGetter<MethodHandle> METHOD_HANDLE_TYPE_GETTER =
+ new MethodTypeGetter<MethodHandle>() {
+ @Override
+ MethodType getMethodType(MethodHandle t) {
+ return t.type();
+ }
+ };
+
+ private static final MethodTypeGetter<SingleDynamicMethod> DYNAMIC_METHOD_TYPE_GETTER =
+ new MethodTypeGetter<SingleDynamicMethod>() {
+ @Override
+ MethodType getMethodType(SingleDynamicMethod t) {
+ return t.getMethodType();
+ }
+ };
+
+ /**
+ * Given a list of methods handles, returns a list of maximally specific methods, applying language-runtime
+ * specific conversion preferences.
+ *
+ * @param methods the list of method handles
+ * @param varArgs whether to assume the method handles are varargs
+ * @param argTypes concrete argument types for the invocation
+ * @return the list of maximally specific method handles.
+ */
+ static List<MethodHandle> getMaximallySpecificMethodHandles(List<MethodHandle> methods, boolean varArgs,
+ Class<?>[] argTypes, LinkerServices ls) {
+ return getMaximallySpecificMethods(methods, varArgs, argTypes, ls, METHOD_HANDLE_TYPE_GETTER);
+ }
+
+ /**
+ * Given a list of methods, returns a list of maximally specific methods, applying language-runtime specific
+ * conversion preferences.
+ *
+ * @param methods the list of methods
+ * @param varArgs whether to assume the methods are varargs
+ * @param argTypes concrete argument types for the invocation
+ * @return the list of maximally specific methods.
+ */
+ static List<SingleDynamicMethod> getMaximallySpecificSingleDynamicMethods(List<SingleDynamicMethod> methods,
+ boolean varArgs, Class<?>[] argTypes, LinkerServices ls) {
+ return getMaximallySpecificMethods(methods, varArgs, argTypes, ls, DYNAMIC_METHOD_TYPE_GETTER);
+ }
+
/**
* Given a list of methods, returns a list of maximally specific methods, applying language-runtime specific
* conversion preferences.
@@ -118,18 +166,18 @@ class MaximallySpecific {
* @param argTypes concrete argument types for the invocation
* @return the list of maximally specific methods.
*/
- static List<MethodHandle> getMaximallySpecificMethods(List<MethodHandle> methods, boolean varArgs,
- Class<?>[] argTypes, LinkerServices ls) {
+ private static <T> List<T> getMaximallySpecificMethods(List<T> methods, boolean varArgs,
+ Class<?>[] argTypes, LinkerServices ls, MethodTypeGetter<T> methodTypeGetter) {
if(methods.size() < 2) {
return methods;
}
- final LinkedList<MethodHandle> maximals = new LinkedList<>();
- for(MethodHandle m: methods) {
- final MethodType methodType = m.type();
+ final LinkedList<T> maximals = new LinkedList<>();
+ for(T m: methods) {
+ final MethodType methodType = methodTypeGetter.getMethodType(m);
boolean lessSpecific = false;
- for(Iterator<MethodHandle> maximal = maximals.iterator(); maximal.hasNext();) {
- final MethodHandle max = maximal.next();
- switch(isMoreSpecific(methodType, max.type(), varArgs, argTypes, ls)) {
+ for(Iterator<T> maximal = maximals.iterator(); maximal.hasNext();) {
+ final T max = maximal.next();
+ switch(isMoreSpecific(methodType, methodTypeGetter.getMethodType(max), varArgs, argTypes, ls)) {
case TYPE_1_BETTER: {
maximal.remove();
break;
diff --git a/src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java b/src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
index 7873cf15..407d2b83 100644
--- a/src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
+++ b/src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
@@ -84,16 +84,21 @@
package jdk.internal.dynalink.beans;
import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.beans.ApplicableOverloadedMethods.ApplicabilityTest;
import jdk.internal.dynalink.linker.LinkerServices;
import jdk.internal.dynalink.support.TypeUtilities;
/**
- * Represents an overloaded method.
+ * Represents a group of {@link SingleDynamicMethod} objects that represents all overloads of a particular name (or all
+ * constructors) for a particular class. Correctly handles overload resolution, variable arity methods, and caller
+ * sensitive methods within the overloads.
*
* @author Attila Szegedi
*/
@@ -101,7 +106,7 @@ class OverloadedDynamicMethod extends DynamicMethod {
/**
* Holds a list of all methods.
*/
- private final LinkedList<MethodHandle> methods;
+ private final LinkedList<SingleDynamicMethod> methods;
private final ClassLoader classLoader;
/**
@@ -111,21 +116,22 @@ class OverloadedDynamicMethod extends DynamicMethod {
* @param name the name of the method
*/
OverloadedDynamicMethod(Class<?> clazz, String name) {
- this(new LinkedList<MethodHandle>(), clazz.getClassLoader(), getClassAndMethodName(clazz, name));
+ this(new LinkedList<SingleDynamicMethod>(), clazz.getClassLoader(), getClassAndMethodName(clazz, name));
}
- private OverloadedDynamicMethod(LinkedList<MethodHandle> methods, ClassLoader classLoader, String name) {
+ private OverloadedDynamicMethod(LinkedList<SingleDynamicMethod> methods, ClassLoader classLoader, String name) {
super(name);
this.methods = methods;
this.classLoader = classLoader;
}
@Override
- SimpleDynamicMethod getMethodForExactParamTypes(String paramTypes) {
- final LinkedList<MethodHandle> matchingMethods = new LinkedList<>();
- for(MethodHandle method: methods) {
- if(typeMatchesDescription(paramTypes, method.type())) {
- matchingMethods.add(method);
+ SingleDynamicMethod getMethodForExactParamTypes(String paramTypes) {
+ final LinkedList<SingleDynamicMethod> matchingMethods = new LinkedList<>();
+ for(SingleDynamicMethod method: methods) {
+ final SingleDynamicMethod matchingMethod = method.getMethodForExactParamTypes(paramTypes);
+ if(matchingMethod != null) {
+ matchingMethods.add(matchingMethod);
}
}
switch(matchingMethods.size()) {
@@ -133,8 +139,7 @@ class OverloadedDynamicMethod extends DynamicMethod {
return null;
}
case 1: {
- final MethodHandle target = matchingMethods.get(0);
- return new SimpleDynamicMethod(target, SimpleDynamicMethod.getMethodNameWithSignature(target, getName()));
+ return matchingMethods.getFirst();
}
default: {
throw new BootstrapMethodError("Can't choose among " + matchingMethods + " for argument types "
@@ -144,7 +149,8 @@ class OverloadedDynamicMethod extends DynamicMethod {
}
@Override
- public MethodHandle getInvocation(final MethodType callSiteType, final LinkerServices linkerServices) {
+ public MethodHandle getInvocation(final CallSiteDescriptor callSiteDescriptor, final LinkerServices linkerServices) {
+ final MethodType callSiteType = callSiteDescriptor.getMethodType();
// First, find all methods applicable to the call site by subtyping (JLS 15.12.2.2)
final ApplicableOverloadedMethods subtypingApplicables = getApplicables(callSiteType,
ApplicableOverloadedMethods.APPLICABLE_BY_SUBTYPING);
@@ -156,7 +162,7 @@ class OverloadedDynamicMethod extends DynamicMethod {
ApplicableOverloadedMethods.APPLICABLE_BY_VARIABLE_ARITY);
// Find the methods that are maximally specific based on the call site signature
- List<MethodHandle> maximallySpecifics = subtypingApplicables.findMaximallySpecificMethods();
+ List<SingleDynamicMethod> maximallySpecifics = subtypingApplicables.findMaximallySpecificMethods();
if(maximallySpecifics.isEmpty()) {
maximallySpecifics = methodInvocationApplicables.findMaximallySpecificMethods();
if(maximallySpecifics.isEmpty()) {
@@ -171,12 +177,12 @@ class OverloadedDynamicMethod extends DynamicMethod {
// (Object, Object), and we have a method whose parameter types are (String, int). None of the JLS applicability
// rules will trigger, but we must consider the method, as it can be the right match for a concrete invocation.
@SuppressWarnings({ "unchecked", "rawtypes" })
- final List<MethodHandle> invokables = (List)methods.clone();
+ final List<SingleDynamicMethod> invokables = (List)methods.clone();
invokables.removeAll(subtypingApplicables.getMethods());
invokables.removeAll(methodInvocationApplicables.getMethods());
invokables.removeAll(variableArityApplicables.getMethods());
- for(final Iterator<MethodHandle> it = invokables.iterator(); it.hasNext();) {
- final MethodHandle m = it.next();
+ for(final Iterator<SingleDynamicMethod> it = invokables.iterator(); it.hasNext();) {
+ final SingleDynamicMethod m = it.next();
if(!isApplicableDynamically(linkerServices, callSiteType, m)) {
it.remove();
}
@@ -199,54 +205,45 @@ class OverloadedDynamicMethod extends DynamicMethod {
}
case 1: {
// Very lucky, we ended up with a single candidate method handle based on the call site signature; we
- // can link it very simply by delegating to a SimpleDynamicMethod.
- final MethodHandle mh = invokables.iterator().next();
- return new SimpleDynamicMethod(mh).getInvocation(callSiteType, linkerServices);
+ // can link it very simply by delegating to the SingleDynamicMethod.
+ invokables.iterator().next().getInvocation(callSiteDescriptor, linkerServices);
}
default: {
// We have more than one candidate. We have no choice but to link to a method that resolves overloads on
// every invocation (alternatively, we could opportunistically link the one method that resolves for the
// current arguments, but we'd need to install a fairly complex guard for that and when it'd fail, we'd
- // go back all the way to candidate selection.
- // TODO: cache per call site type
- return new OverloadedMethod(invokables, this, callSiteType, linkerServices).getInvoker();
+ // go back all the way to candidate selection. Note that we're resolving any potential caller sensitive
+ // methods here to their handles, as the OverloadedMethod instance is specific to a call site, so it
+ // has an already determined Lookup.
+ final List<MethodHandle> methodHandles = new ArrayList<>(invokables.size());
+ final MethodHandles.Lookup lookup = callSiteDescriptor.getLookup();
+ for(SingleDynamicMethod method: invokables) {
+ methodHandles.add(method.getTarget(lookup));
+ }
+ return new OverloadedMethod(methodHandles, this, callSiteType, linkerServices).getInvoker();
}
}
}
@Override
- public boolean contains(MethodHandle mh) {
- final MethodType type = mh.type();
- for(MethodHandle method: methods) {
- if(typesEqualNoReceiver(type, method.type())) {
+ public boolean contains(SingleDynamicMethod m) {
+ for(SingleDynamicMethod method: methods) {
+ if(method.contains(m)) {
return true;
}
}
return false;
}
- private static boolean typesEqualNoReceiver(MethodType type1, MethodType type2) {
- final int pc = type1.parameterCount();
- if(pc != type2.parameterCount()) {
- return false;
- }
- for(int i = 1; i < pc; ++i) { // i = 1: ignore receiver
- if(type1.parameterType(i) != type2.parameterType(i)) {
- return false;
- }
- }
- return true;
- }
-
ClassLoader getClassLoader() {
return classLoader;
}
private static boolean isApplicableDynamically(LinkerServices linkerServices, MethodType callSiteType,
- MethodHandle m) {
- final MethodType methodType = m.type();
- final boolean varArgs = m.isVarargsCollector();
+ SingleDynamicMethod m) {
+ final MethodType methodType = m.getMethodType();
+ final boolean varArgs = m.isVarArgs();
final int fixedArgLen = methodType.parameterCount() - (varArgs ? 1 : 0);
final int callSiteArgLen = callSiteType.parameterCount();
@@ -301,20 +298,11 @@ class OverloadedDynamicMethod extends DynamicMethod {
}
/**
- * Add a method identified by a {@link SimpleDynamicMethod} to this overloaded method's set.
- *
- * @param method the method to add.
- */
- void addMethod(SimpleDynamicMethod method) {
- addMethod(method.getTarget());
- }
-
- /**
* Add a method to this overloaded method's set.
*
* @param method a method to add
*/
- public void addMethod(MethodHandle method) {
+ public void addMethod(SingleDynamicMethod method) {
methods.add(method);
}
}
diff --git a/src/jdk/internal/dynalink/beans/OverloadedMethod.java b/src/jdk/internal/dynalink/beans/OverloadedMethod.java
index 7093e757..f711489b 100644
--- a/src/jdk/internal/dynalink/beans/OverloadedMethod.java
+++ b/src/jdk/internal/dynalink/beans/OverloadedMethod.java
@@ -135,7 +135,7 @@ class OverloadedMethod {
varArgMethods.trimToSize();
final MethodHandle bound = SELECT_METHOD.bindTo(this);
- final MethodHandle collecting = SimpleDynamicMethod.collectArguments(bound, argNum).asType(
+ final MethodHandle collecting = SingleDynamicMethod.collectArguments(bound, argNum).asType(
callSiteType.changeReturnType(MethodHandle.class));
invoker = MethodHandles.foldArguments(MethodHandles.exactInvoker(callSiteType), collecting);
}
@@ -167,7 +167,7 @@ class OverloadedMethod {
break;
}
case 1: {
- method = new SimpleDynamicMethod(methods.get(0)).getInvocation(callSiteType, linkerServices);
+ method = SingleDynamicMethod.getInvocation(methods.get(0), callSiteType, linkerServices);
break;
}
default: {
diff --git a/src/jdk/internal/dynalink/beans/SimpleDynamicMethod.java b/src/jdk/internal/dynalink/beans/SimpleDynamicMethod.java
index 1fbf7dbb..9d4d6961 100644
--- a/src/jdk/internal/dynalink/beans/SimpleDynamicMethod.java
+++ b/src/jdk/internal/dynalink/beans/SimpleDynamicMethod.java
@@ -84,29 +84,22 @@
package jdk.internal.dynalink.beans;
import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
-import java.lang.reflect.Array;
-import jdk.internal.dynalink.linker.LinkerServices;
-import jdk.internal.dynalink.support.Guards;
/**
- * A dynamic method bound to exactly one, non-overloaded Java method. Handles varargs.
+ * A dynamic method bound to exactly one Java method or constructor that is not caller sensitive. Since its target is
+ * not caller sensitive, this class pre-caches its method handle and always returns it from the call to
+ * {@link #getTarget(Lookup)}. Can be used in general to represents dynamic methods bound to a single method handle,
+ * even if that handle is not mapped to a Java method, i.e. as a wrapper around field getters/setters, array element
+ * getters/setters, etc.
*
* @author Attila Szegedi
*/
-class SimpleDynamicMethod extends DynamicMethod {
+class SimpleDynamicMethod extends SingleDynamicMethod {
private final MethodHandle target;
/**
- * Creates a simple dynamic method with no name.
- * @param target the target method handle
- */
- SimpleDynamicMethod(MethodHandle target) {
- this(target, null);
- }
-
- /**
* Creates a new simple dynamic method, with a name constructed from the class name, method name, and handle
* signature.
*
@@ -115,125 +108,26 @@ class SimpleDynamicMethod extends DynamicMethod {
* @param name the simple name of the method
*/
SimpleDynamicMethod(MethodHandle target, Class<?> clazz, String name) {
- this(target, getName(target, clazz, name));
- }
-
- SimpleDynamicMethod(MethodHandle target, String name) {
- super(name);
+ super(getName(target, clazz, name));
this.target = target;
}
private static String getName(MethodHandle target, Class<?> clazz, String name) {
- return getMethodNameWithSignature(target, getClassAndMethodName(clazz, name));
- }
-
- static String getMethodNameWithSignature(MethodHandle target, String methodName) {
- final String typeStr = target.type().toString();
- final int retTypeIndex = typeStr.lastIndexOf(')') + 1;
- int secondParamIndex = typeStr.indexOf(',') + 1;
- if(secondParamIndex == 0) {
- secondParamIndex = retTypeIndex - 1;
- }
- return typeStr.substring(retTypeIndex) + " " + methodName + "(" + typeStr.substring(secondParamIndex, retTypeIndex);
- }
-
- /**
- * Returns the target of this dynamic method
- *
- * @return the target of this dynamic method
- */
- MethodHandle getTarget() {
- return target;
+ return getMethodNameWithSignature(target.type(), getClassAndMethodName(clazz, name));
}
@Override
- SimpleDynamicMethod getMethodForExactParamTypes(String paramTypes) {
- return typeMatchesDescription(paramTypes, target.type()) ? this : null;
+ boolean isVarArgs() {
+ return target.isVarargsCollector();
}
@Override
- MethodHandle getInvocation(MethodType callSiteType, LinkerServices linkerServices) {
- final MethodType methodType = target.type();
- final int paramsLen = methodType.parameterCount();
- final boolean varArgs = target.isVarargsCollector();
- final MethodHandle fixTarget = varArgs ? target.asFixedArity() : target;
- final int fixParamsLen = varArgs ? paramsLen - 1 : paramsLen;
- final int argsLen = callSiteType.parameterCount();
- if(argsLen < fixParamsLen) {
- // Less actual arguments than number of fixed declared arguments; can't invoke.
- return null;
- }
- // Method handle has the same number of fixed arguments as the call site type
- if(argsLen == fixParamsLen) {
- // Method handle that matches the number of actual arguments as the number of fixed arguments
- final MethodHandle matchedMethod;
- if(varArgs) {
- // If vararg, add a zero-length array of the expected type as the last argument to signify no variable
- // arguments.
- matchedMethod = MethodHandles.insertArguments(fixTarget, fixParamsLen, Array.newInstance(
- methodType.parameterType(fixParamsLen).getComponentType(), 0));
- } else {
- // Otherwise, just use the method
- matchedMethod = fixTarget;
- }
- return createConvertingInvocation(matchedMethod, linkerServices, callSiteType);
- }
-
- // What's below only works for varargs
- if(!varArgs) {
- return null;
- }
-
- final Class<?> varArgType = methodType.parameterType(fixParamsLen);
- // Handle a somewhat sinister corner case: caller passes exactly one argument in the vararg position, and we
- // must handle both a prepacked vararg array as well as a genuine 1-long vararg sequence.
- if(argsLen == paramsLen) {
- final Class<?> callSiteLastArgType = callSiteType.parameterType(fixParamsLen);
- if(varArgType.isAssignableFrom(callSiteLastArgType)) {
- // Call site signature guarantees we'll always be passed a single compatible array; just link directly
- // to the method.
- return createConvertingInvocation(fixTarget, linkerServices, callSiteType);
- }
- if(!linkerServices.canConvert(callSiteLastArgType, varArgType)) {
- // Call site signature guarantees the argument can definitely not be an array (i.e. it is primitive);
- // link immediately to a vararg-packing method handle.
- return createConvertingInvocation(collectArguments(fixTarget, argsLen), linkerServices, callSiteType);
- }
- // Call site signature makes no guarantees that the single argument in the vararg position will be
- // compatible across all invocations. Need to insert an appropriate guard and fall back to generic vararg
- // method when it is not.
- return MethodHandles.guardWithTest(Guards.isInstance(varArgType, fixParamsLen, callSiteType),
- createConvertingInvocation(fixTarget, linkerServices, callSiteType),
- createConvertingInvocation(collectArguments(fixTarget, argsLen), linkerServices, callSiteType));
- }
-
- // Remaining case: more than one vararg.
- return createConvertingInvocation(collectArguments(fixTarget, argsLen), linkerServices, callSiteType);
+ MethodType getMethodType() {
+ return target.type();
}
@Override
- public boolean contains(MethodHandle mh) {
- return target.type().parameterList().equals(mh.type().parameterList());
- }
-
- /**
- * Creates a method handle out of the original target that will collect the varargs for the exact component type of
- * the varArg array. Note that this will nicely trigger language-specific type converters for exactly those varargs
- * for which it is necessary when later passed to linkerServices.convertArguments().
- *
- * @param target the original method handle
- * @param parameterCount the total number of arguments in the new method handle
- * @return a collecting method handle
- */
- static MethodHandle collectArguments(MethodHandle target, final int parameterCount) {
- final MethodType methodType = target.type();
- final int fixParamsLen = methodType.parameterCount() - 1;
- final Class<?> arrayType = methodType.parameterType(fixParamsLen);
- return target.asCollector(arrayType, parameterCount - fixParamsLen);
- }
-
- private static MethodHandle createConvertingInvocation(final MethodHandle sizedMethod,
- final LinkerServices linkerServices, final MethodType callSiteType) {
- return linkerServices.asType(sizedMethod, callSiteType);
+ MethodHandle getTarget(Lookup lookup) {
+ return target;
}
}
diff --git a/src/jdk/internal/dynalink/beans/SingleDynamicMethod.java b/src/jdk/internal/dynalink/beans/SingleDynamicMethod.java
new file mode 100644
index 00000000..d15fab99
--- /dev/null
+++ b/src/jdk/internal/dynalink/beans/SingleDynamicMethod.java
@@ -0,0 +1,255 @@
+/*
+ * 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. 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file, and Oracle licenses the original version of this file under the BSD
+ * license:
+ */
+/*
+ Copyright 2009-2013 Attila Szegedi
+
+ Licensed under both the Apache License, Version 2.0 (the "Apache License")
+ and the BSD License (the "BSD License"), with licensee being free to
+ choose either of the two at their discretion.
+
+ You may not use this file except in compliance with either the Apache
+ License or the BSD License.
+
+ If you choose to use this file in compliance with the Apache License, the
+ following notice applies to you:
+
+ You may obtain a copy of the Apache License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+
+ If you choose to use this file in compliance with the BSD License, the
+ following notice applies to you:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the copyright holder nor the names of
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package jdk.internal.dynalink.beans;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.lang.reflect.Array;
+import java.util.StringTokenizer;
+import jdk.internal.dynalink.CallSiteDescriptor;
+import jdk.internal.dynalink.linker.LinkerServices;
+import jdk.internal.dynalink.support.Guards;
+
+/**
+ * Base class for dynamic methods that dispatch to a single target Java method or constructor. Handles adaptation of the
+ * target method to a call site type (including mapping variable arity methods to a call site signature with different
+ * arity).
+ * @author Attila Szegedi
+ * @version $Id: $
+ */
+abstract class SingleDynamicMethod extends DynamicMethod {
+ SingleDynamicMethod(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns true if this method is variable arity.
+ * @return true if this method is variable arity.
+ */
+ abstract boolean isVarArgs();
+
+ /**
+ * Returns this method's native type.
+ * @return this method's native type.
+ */
+ abstract MethodType getMethodType();
+
+ /**
+ * Given a specified lookup, returns a method handle to this method's target.
+ * @param lookup the lookup to use.
+ * @return the handle to this method's target method.
+ */
+ abstract MethodHandle getTarget(MethodHandles.Lookup lookup);
+
+ @Override
+ MethodHandle getInvocation(CallSiteDescriptor callSiteDescriptor, LinkerServices linkerServices) {
+ return getInvocation(getTarget(callSiteDescriptor.getLookup()), callSiteDescriptor.getMethodType(),
+ linkerServices);
+ }
+
+ @Override
+ SingleDynamicMethod getMethodForExactParamTypes(String paramTypes) {
+ return typeMatchesDescription(paramTypes, getMethodType()) ? this : null;
+ }
+
+ @Override
+ boolean contains(SingleDynamicMethod method) {
+ return getMethodType().parameterList().equals(method.getMethodType().parameterList());
+ }
+
+ static String getMethodNameWithSignature(MethodType type, String methodName) {
+ final String typeStr = type.toString();
+ final int retTypeIndex = typeStr.lastIndexOf(')') + 1;
+ int secondParamIndex = typeStr.indexOf(',') + 1;
+ if(secondParamIndex == 0) {
+ secondParamIndex = retTypeIndex - 1;
+ }
+ return typeStr.substring(retTypeIndex) + " " + methodName + "(" + typeStr.substring(secondParamIndex, retTypeIndex);
+ }
+
+ /**
+ * Given a method handle and a call site type, adapts the method handle to the call site type. Performs type
+ * conversions as needed using the specified linker services, and in case that the method handle is a vararg
+ * collector, matches it to the arity of the call site.
+ * @param target the method handle to adapt
+ * @param callSiteType the type of the call site
+ * @param linkerServices the linker services used for type conversions
+ * @return the adapted method handle.
+ */
+ static MethodHandle getInvocation(MethodHandle target, MethodType callSiteType, LinkerServices linkerServices) {
+ final MethodType methodType = target.type();
+ final int paramsLen = methodType.parameterCount();
+ final boolean varArgs = target.isVarargsCollector();
+ final MethodHandle fixTarget = varArgs ? target.asFixedArity() : target;
+ final int fixParamsLen = varArgs ? paramsLen - 1 : paramsLen;
+ final int argsLen = callSiteType.parameterCount();
+ if(argsLen < fixParamsLen) {
+ // Less actual arguments than number of fixed declared arguments; can't invoke.
+ return null;
+ }
+ // Method handle has the same number of fixed arguments as the call site type
+ if(argsLen == fixParamsLen) {
+ // Method handle that matches the number of actual arguments as the number of fixed arguments
+ final MethodHandle matchedMethod;
+ if(varArgs) {
+ // If vararg, add a zero-length array of the expected type as the last argument to signify no variable
+ // arguments.
+ matchedMethod = MethodHandles.insertArguments(fixTarget, fixParamsLen, Array.newInstance(
+ methodType.parameterType(fixParamsLen).getComponentType(), 0));
+ } else {
+ // Otherwise, just use the method
+ matchedMethod = fixTarget;
+ }
+ return createConvertingInvocation(matchedMethod, linkerServices, callSiteType);
+ }
+
+ // What's below only works for varargs
+ if(!varArgs) {
+ return null;
+ }
+
+ final Class<?> varArgType = methodType.parameterType(fixParamsLen);
+ // Handle a somewhat sinister corner case: caller passes exactly one argument in the vararg position, and we
+ // must handle both a prepacked vararg array as well as a genuine 1-long vararg sequence.
+ if(argsLen == paramsLen) {
+ final Class<?> callSiteLastArgType = callSiteType.parameterType(fixParamsLen);
+ if(varArgType.isAssignableFrom(callSiteLastArgType)) {
+ // Call site signature guarantees we'll always be passed a single compatible array; just link directly
+ // to the method, introducing necessary conversions. Also, preserve it being a variable arity method.
+ return createConvertingInvocation(target, linkerServices, callSiteType).asVarargsCollector(
+ callSiteLastArgType);
+ }
+ if(!linkerServices.canConvert(callSiteLastArgType, varArgType)) {
+ // Call site signature guarantees the argument can definitely not be an array (i.e. it is primitive);
+ // link immediately to a vararg-packing method handle.
+ return createConvertingInvocation(collectArguments(fixTarget, argsLen), linkerServices, callSiteType);
+ }
+ // Call site signature makes no guarantees that the single argument in the vararg position will be
+ // compatible across all invocations. Need to insert an appropriate guard and fall back to generic vararg
+ // method when it is not.
+ return MethodHandles.guardWithTest(Guards.isInstance(varArgType, fixParamsLen, callSiteType),
+ createConvertingInvocation(fixTarget, linkerServices, callSiteType),
+ createConvertingInvocation(collectArguments(fixTarget, argsLen), linkerServices, callSiteType));
+ }
+
+ // Remaining case: more than one vararg.
+ return createConvertingInvocation(collectArguments(fixTarget, argsLen), linkerServices, callSiteType);
+ }
+
+ /**
+ * Creates a method handle out of the original target that will collect the varargs for the exact component type of
+ * the varArg array. Note that this will nicely trigger language-specific type converters for exactly those varargs
+ * for which it is necessary when later passed to linkerServices.convertArguments().
+ *
+ * @param target the original method handle
+ * @param parameterCount the total number of arguments in the new method handle
+ * @return a collecting method handle
+ */
+ static MethodHandle collectArguments(MethodHandle target, final int parameterCount) {
+ final MethodType methodType = target.type();
+ final int fixParamsLen = methodType.parameterCount() - 1;
+ final Class<?> arrayType = methodType.parameterType(fixParamsLen);
+ return target.asCollector(arrayType, parameterCount - fixParamsLen);
+ }
+
+ private static MethodHandle createConvertingInvocation(final MethodHandle sizedMethod,
+ final LinkerServices linkerServices, final MethodType callSiteType) {
+ return linkerServices.asType(sizedMethod, callSiteType);
+ }
+
+ private static boolean typeMatchesDescription(String paramTypes, MethodType type) {
+ final StringTokenizer tok = new StringTokenizer(paramTypes, ", ");
+ for(int i = 1; i < type.parameterCount(); ++i) { // i = 1 as we ignore the receiver
+ if(!(tok.hasMoreTokens() && typeNameMatches(tok.nextToken(), type.parameterType(i)))) {
+ return false;
+ }
+ }
+ return !tok.hasMoreTokens();
+ }
+
+ private static boolean typeNameMatches(String typeName, Class<?> type) {
+ return typeName.equals(typeName.indexOf('.') == -1 ? type.getSimpleName() : type.getCanonicalName());
+ }
+}
diff --git a/src/jdk/internal/dynalink/beans/StaticClassIntrospector.java b/src/jdk/internal/dynalink/beans/StaticClassIntrospector.java
index 214152a4..62ce41a9 100644
--- a/src/jdk/internal/dynalink/beans/StaticClassIntrospector.java
+++ b/src/jdk/internal/dynalink/beans/StaticClassIntrospector.java
@@ -106,10 +106,18 @@ class StaticClassIntrospector extends FacetIntrospector {
@Override
MethodHandle editMethodHandle(MethodHandle mh) {
+ return editStaticMethodHandle(mh);
+ }
+
+ static MethodHandle editStaticMethodHandle(MethodHandle mh) {
return dropReceiver(mh, Object.class);
}
- static MethodHandle dropReceiver(final MethodHandle mh, final Class<?> receiverClass) {
+ static MethodHandle editConstructorMethodHandle(MethodHandle cmh) {
+ return dropReceiver(cmh, StaticClass.class);
+ }
+
+ private static MethodHandle dropReceiver(final MethodHandle mh, final Class<?> receiverClass) {
MethodHandle newHandle = MethodHandles.dropArguments(mh, 0, receiverClass);
// NOTE: this is a workaround for the fact that dropArguments doesn't preserve vararg collector state.
if(mh.isVarargsCollector() && !newHandle.isVarargsCollector()) {
diff --git a/src/jdk/internal/dynalink/beans/StaticClassLinker.java b/src/jdk/internal/dynalink/beans/StaticClassLinker.java
index d6096fe5..2abdbbe9 100644
--- a/src/jdk/internal/dynalink/beans/StaticClassLinker.java
+++ b/src/jdk/internal/dynalink/beans/StaticClassLinker.java
@@ -87,13 +87,11 @@ import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Arrays;
+import java.util.Collection;
import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.beans.GuardedInvocationComponent.ValidationType;
import jdk.internal.dynalink.linker.GuardedInvocation;
-import jdk.internal.dynalink.linker.GuardingDynamicLinker;
import jdk.internal.dynalink.linker.LinkRequest;
import jdk.internal.dynalink.linker.LinkerServices;
import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
@@ -104,9 +102,9 @@ import jdk.internal.dynalink.support.Lookup;
* @author Attila Szegedi
*/
class StaticClassLinker implements TypeBasedGuardingDynamicLinker {
- private final ClassValue<GuardingDynamicLinker> linkers = new ClassValue<GuardingDynamicLinker>() {
+ private static final ClassValue<SingleClassStaticsLinker> linkers = new ClassValue<SingleClassStaticsLinker>() {
@Override
- protected GuardingDynamicLinker computeValue(Class<?> clazz) {
+ protected SingleClassStaticsLinker computeValue(Class<?> clazz) {
return new SingleClassStaticsLinker(clazz);
}
};
@@ -131,20 +129,11 @@ class StaticClassLinker implements TypeBasedGuardingDynamicLinker {
private static DynamicMethod createConstructorMethod(Class<?> clazz) {
if(clazz.isArray()) {
final MethodHandle boundArrayCtor = ARRAY_CTOR.bindTo(clazz.getComponentType());
- return new SimpleDynamicMethod(drop(boundArrayCtor.asType(boundArrayCtor.type().changeReturnType(
- clazz))), clazz, "<init>");
+ return new SimpleDynamicMethod(StaticClassIntrospector.editConstructorMethodHandle(
+ boundArrayCtor.asType(boundArrayCtor.type().changeReturnType(clazz))), clazz, "<init>");
}
- final Constructor<?>[] ctrs = clazz.getConstructors();
- final List<MethodHandle> mhs = new ArrayList<>(ctrs.length);
- for(int i = 0; i < ctrs.length; ++i) {
- mhs.add(drop(SafeUnreflector.unreflectConstructor(ctrs[i])));
- }
- return createDynamicMethod(mhs, clazz, "<init>");
- }
-
- private static MethodHandle drop(MethodHandle mh) {
- return StaticClassIntrospector.dropReceiver(mh, StaticClass.class);
+ return createDynamicMethod(Arrays.asList(clazz.getConstructors()), clazz, "<init>");
}
@Override
@@ -161,17 +150,28 @@ class StaticClassLinker implements TypeBasedGuardingDynamicLinker {
}
final CallSiteDescriptor desc = request.getCallSiteDescriptor();
final String op = desc.getNameToken(CallSiteDescriptor.OPERATOR);
- final MethodType methodType = desc.getMethodType();
if("new" == op && constructor != null) {
- final MethodHandle ctorInvocation = constructor.getInvocation(methodType, linkerServices);
+ final MethodHandle ctorInvocation = constructor.getInvocation(desc, linkerServices);
if(ctorInvocation != null) {
- return new GuardedInvocation(ctorInvocation, getClassGuard(methodType));
+ return new GuardedInvocation(ctorInvocation, getClassGuard(desc.getMethodType()));
}
}
return null;
}
}
+ static Collection<String> getReadableStaticPropertyNames(Class<?> clazz) {
+ return linkers.get(clazz).getReadablePropertyNames();
+ }
+
+ static Collection<String> getWritableStaticPropertyNames(Class<?> clazz) {
+ return linkers.get(clazz).getWritablePropertyNames();
+ }
+
+ static Collection<String> getStaticMethodNames(Class<?> clazz) {
+ return linkers.get(clazz).getMethodNames();
+ }
+
@Override
public GuardedInvocation getGuardedInvocation(LinkRequest request, LinkerServices linkerServices) throws Exception {
final Object receiver = request.getReceiver();
diff --git a/src/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java b/src/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java
index e51f6fe2..3161cf50 100644
--- a/src/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java
+++ b/src/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java
@@ -139,8 +139,9 @@ public abstract class AbstractCallSiteDescriptor implements CallSiteDescriptor {
@Override
public int hashCode() {
+ final MethodHandles.Lookup lookup = getLookup();
+ int h = lookup.lookupClass().hashCode() + 31 * lookup.lookupModes();
final int c = getNameTokenCount();
- int h = 0;
for(int i = 0; i < c; ++i) {
h = h * 31 + getNameToken(i).hashCode();
}
diff --git a/src/jdk/internal/dynalink/support/Lookup.java b/src/jdk/internal/dynalink/support/Lookup.java
index 52a61024..4b21e1c4 100644
--- a/src/jdk/internal/dynalink/support/Lookup.java
+++ b/src/jdk/internal/dynalink/support/Lookup.java
@@ -122,6 +122,18 @@ public class Lookup {
* @return the unreflected method handle.
*/
public MethodHandle unreflect(Method m) {
+ return unreflect(lookup, m);
+ }
+
+ /**
+ * Performs a {@link java.lang.invoke.MethodHandles.Lookup#unreflect(Method)}, converting any encountered
+ * {@link IllegalAccessException} into an {@link IllegalAccessError}.
+ *
+ * @param lookup the lookup used to unreflect
+ * @param m the method to unreflect
+ * @return the unreflected method handle.
+ */
+ public static MethodHandle unreflect(MethodHandles.Lookup lookup, Method m) {
try {
return lookup.unreflect(m);
} catch(IllegalAccessException e) {
@@ -131,7 +143,6 @@ public class Lookup {
}
}
-
/**
* Performs a {@link java.lang.invoke.MethodHandles.Lookup#unreflectGetter(Field)}, converting any encountered
* {@link IllegalAccessException} into an {@link IllegalAccessError}.
@@ -202,6 +213,18 @@ public class Lookup {
* @return the unreflected constructor handle.
*/
public MethodHandle unreflectConstructor(Constructor<?> c) {
+ return unreflectConstructor(lookup, c);
+ }
+
+ /**
+ * Performs a {@link java.lang.invoke.MethodHandles.Lookup#unreflectConstructor(Constructor)}, converting any
+ * encountered {@link IllegalAccessException} into an {@link IllegalAccessError}.
+ *
+ * @param lookup the lookup used to unreflect
+ * @param c the constructor to unreflect
+ * @return the unreflected constructor handle.
+ */
+ public static MethodHandle unreflectConstructor(MethodHandles.Lookup lookup, Constructor<?> c) {
try {
return lookup.unreflectConstructor(c);
} catch(IllegalAccessException e) {
diff --git a/src/jdk/nashorn/api/scripting/NashornException.java b/src/jdk/nashorn/api/scripting/NashornException.java
index 3cd687cc..d5ec5bb4 100644
--- a/src/jdk/nashorn/api/scripting/NashornException.java
+++ b/src/jdk/nashorn/api/scripting/NashornException.java
@@ -146,7 +146,7 @@ public abstract class NashornException extends RuntimeException {
* @return array of javascript stack frames
*/
public static StackTraceElement[] getScriptFrames(final Throwable exception) {
- final StackTraceElement[] frames = ((Throwable)exception).getStackTrace();
+ final StackTraceElement[] frames = exception.getStackTrace();
final List<StackTraceElement> filtered = new ArrayList<>();
for (final StackTraceElement st : frames) {
if (ECMAErrors.isScriptFrame(st)) {
@@ -170,7 +170,7 @@ public abstract class NashornException extends RuntimeException {
*/
public static String getScriptStackString(final Throwable exception) {
final StringBuilder buf = new StringBuilder();
- final StackTraceElement[] frames = getScriptFrames((Throwable)exception);
+ final StackTraceElement[] frames = getScriptFrames(exception);
for (final StackTraceElement st : frames) {
buf.append("\tat ");
buf.append(st.getMethodName());
diff --git a/src/jdk/nashorn/api/scripting/NashornScriptEngine.java b/src/jdk/nashorn/api/scripting/NashornScriptEngine.java
index d38e63c8..682975a8 100644
--- a/src/jdk/nashorn/api/scripting/NashornScriptEngine.java
+++ b/src/jdk/nashorn/api/scripting/NashornScriptEngine.java
@@ -33,6 +33,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.net.URL;
import java.nio.charset.Charset;
import java.security.AccessController;
@@ -184,6 +185,19 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C
}
private <T> T getInterfaceInner(final Object self, final Class<T> clazz) {
+ if (clazz == null || !clazz.isInterface()) {
+ throw new IllegalArgumentException("interface Class expected");
+ }
+
+ // perform security access check as early as possible
+ final SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ if (! Modifier.isPublic(clazz.getModifiers())) {
+ throw new SecurityException("attempt to implement non-public interfce: " + clazz);
+ }
+ Context.checkPackageAccess(clazz.getName());
+ }
+
final ScriptObject realSelf;
final ScriptObject ctxtGlobal = getNashornGlobalFrom(context);
if(self == null) {
@@ -193,6 +207,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C
} else {
realSelf = (ScriptObject)self;
}
+
try {
final ScriptObject oldGlobal = getNashornGlobal();
try {
diff --git a/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java b/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
index c7dbab5a..c7c384e7 100644
--- a/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
+++ b/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
@@ -52,11 +52,6 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
private final ScriptObject sobj;
private final ScriptObject global;
- ScriptObjectMirror(final ScriptObject sobj, final ScriptObject global) {
- this.sobj = sobj;
- this.global = global;
- }
-
@Override
public boolean equals(final Object other) {
if (other instanceof ScriptObjectMirror) {
@@ -81,25 +76,6 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
});
}
- private <V> V inGlobal(final Callable<V> callable) {
- final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
- final boolean globalChanged = (oldGlobal != global);
- if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(global);
- }
- try {
- return callable.call();
- } catch (final RuntimeException e) {
- throw e;
- } catch (final Exception e) {
- throw new AssertionError("Cannot happen", e);
- } finally {
- if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(oldGlobal);
- }
- }
- }
-
// JSObject methods
@Override
public Object call(final String functionName, final Object... args) {
@@ -212,6 +188,8 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
});
}
+ // javax.script.Bindings methods
+
@Override
public void clear() {
inGlobal(new Callable<Object>() {
@@ -308,9 +286,9 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public void putAll(final Map<? extends String, ? extends Object> map) {
final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
final boolean globalChanged = (oldGlobal != global);
- final boolean strict = sobj.isStrictContext();
inGlobal(new Callable<Object>() {
@Override public Object call() {
+ final boolean strict = global.isStrictContext();
for (final Map.Entry<? extends String, ? extends Object> entry : map.entrySet()) {
final Object value = entry.getValue();
final Object modValue = globalChanged? wrap(value, oldGlobal) : value;
@@ -379,7 +357,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public Object getProto() {
return inGlobal(new Callable<Object>() {
@Override public Object call() {
- return wrap(getScriptObject().getProto(), global);
+ return wrap(sobj.getProto(), global);
}
});
}
@@ -395,7 +373,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public Object getOwnPropertyDescriptor(final String key) {
return inGlobal(new Callable<Object>() {
@Override public Object call() {
- return wrap(getScriptObject().getOwnPropertyDescriptor(key), global);
+ return wrap(sobj.getOwnPropertyDescriptor(key), global);
}
});
}
@@ -409,7 +387,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public String[] getOwnKeys(final boolean all) {
return inGlobal(new Callable<String[]>() {
@Override public String[] call() {
- return getScriptObject().getOwnKeys(all);
+ return sobj.getOwnKeys(all);
}
});
}
@@ -422,7 +400,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public ScriptObjectMirror preventExtensions() {
return inGlobal(new Callable<ScriptObjectMirror>() {
@Override public ScriptObjectMirror call() {
- getScriptObject().preventExtensions();
+ sobj.preventExtensions();
return ScriptObjectMirror.this;
}
});
@@ -435,7 +413,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public boolean isExtensible() {
return inGlobal(new Callable<Boolean>() {
@Override public Boolean call() {
- return getScriptObject().isExtensible();
+ return sobj.isExtensible();
}
});
}
@@ -447,7 +425,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public ScriptObjectMirror seal() {
return inGlobal(new Callable<ScriptObjectMirror>() {
@Override public ScriptObjectMirror call() {
- getScriptObject().seal();
+ sobj.seal();
return ScriptObjectMirror.this;
}
});
@@ -460,7 +438,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public boolean isSealed() {
return inGlobal(new Callable<Boolean>() {
@Override public Boolean call() {
- return getScriptObject().isSealed();
+ return sobj.isSealed();
}
});
}
@@ -472,7 +450,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public ScriptObjectMirror freeze() {
return inGlobal(new Callable<ScriptObjectMirror>() {
@Override public ScriptObjectMirror call() {
- getScriptObject().freeze();
+ sobj.freeze();
return ScriptObjectMirror.this;
}
});
@@ -485,7 +463,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
public boolean isFrozen() {
return inGlobal(new Callable<Boolean>() {
@Override public Boolean call() {
- return getScriptObject().isFrozen();
+ return sobj.isFrozen();
}
});
}
@@ -507,28 +485,18 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
return inGlobal(new Callable<Boolean>() {
@Override public Boolean call() {
- return getScriptObject().isInstance(instance.getScriptObject());
+ return sobj.isInstance(instance.sobj);
}
});
}
/**
- * Utility to check if given object is ECMAScript undefined value
- *
- * @param obj object to check
- * @return true if 'obj' is ECMAScript undefined value
- */
- public static boolean isUndefined(final Object obj) {
- return obj == ScriptRuntime.UNDEFINED;
- }
-
- /**
* is this a function object?
*
* @return if this mirror wraps a ECMAScript function instance
*/
public boolean isFunction() {
- return getScriptObject() instanceof ScriptFunction;
+ return sobj instanceof ScriptFunction;
}
/**
@@ -537,7 +505,7 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
* @return true if this mirror represents a ECMAScript 'use strict' function
*/
public boolean isStrictFunction() {
- return isFunction() && ((ScriptFunction)getScriptObject()).isStrict();
+ return isFunction() && ((ScriptFunction)sobj).isStrict();
}
/**
@@ -546,10 +514,18 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
* @return if this mirror wraps a ECMAScript array object
*/
public boolean isArray() {
- return getScriptObject().isArray();
+ return sobj.isArray();
}
- // These are public only so that Context can access these.
+ /**
+ * Utility to check if given object is ECMAScript undefined value
+ *
+ * @param obj object to check
+ * @return true if 'obj' is ECMAScript undefined value
+ */
+ public static boolean isUndefined(final Object obj) {
+ return obj == ScriptRuntime.UNDEFINED;
+ }
/**
* Make a script object mirror on given object if needed.
@@ -621,6 +597,12 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
}
// package-privates below this.
+
+ ScriptObjectMirror(final ScriptObject sobj, final ScriptObject global) {
+ this.sobj = sobj;
+ this.global = global;
+ }
+
ScriptObject getScriptObject() {
return sobj;
}
@@ -628,4 +610,25 @@ public final class ScriptObjectMirror extends JSObject implements Bindings {
static Object translateUndefined(Object obj) {
return (obj == ScriptRuntime.UNDEFINED)? null : obj;
}
+
+ // internals only below this.
+ private <V> V inGlobal(final Callable<V> callable) {
+ final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
+ final boolean globalChanged = (oldGlobal != global);
+ if (globalChanged) {
+ NashornScriptEngine.setNashornGlobal(global);
+ }
+ try {
+ return callable.call();
+ } catch (final RuntimeException e) {
+ throw e;
+ } catch (final Exception e) {
+ throw new AssertionError("Cannot happen", e);
+ } finally {
+ if (globalChanged) {
+ NashornScriptEngine.setNashornGlobal(oldGlobal);
+ }
+ }
+ }
+
}
diff --git a/src/jdk/nashorn/internal/codegen/Attr.java b/src/jdk/nashorn/internal/codegen/Attr.java
index 3a442a7d..f56a881d 100644
--- a/src/jdk/nashorn/internal/codegen/Attr.java
+++ b/src/jdk/nashorn/internal/codegen/Attr.java
@@ -61,6 +61,7 @@ import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.CallNode;
import jdk.nashorn.internal.ir.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
@@ -72,7 +73,6 @@ import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.ObjectNode;
-import jdk.nashorn.internal.ir.PropertyNode;
import jdk.nashorn.internal.ir.ReturnNode;
import jdk.nashorn.internal.ir.RuntimeNode;
import jdk.nashorn.internal.ir.RuntimeNode.Request;
@@ -94,7 +94,6 @@ import jdk.nashorn.internal.runtime.DebugLogger;
import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyMap;
-import jdk.nashorn.internal.runtime.ScriptObject;
/**
* This is the attribution pass of the code generator. Attr takes Lowered IR,
@@ -166,19 +165,19 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
}
private void initFunctionWideVariables(final FunctionNode functionNode, final Block body) {
- initCompileConstant(CALLEE, body, IS_PARAM | IS_INTERNAL, FunctionNode.FUNCTION_TYPE);
+ initCompileConstant(CALLEE, body, IS_PARAM | IS_INTERNAL);
initCompileConstant(THIS, body, IS_PARAM | IS_THIS, Type.OBJECT);
if (functionNode.isVarArg()) {
- initCompileConstant(VARARGS, body, IS_PARAM | IS_INTERNAL, Type.OBJECT_ARRAY);
+ initCompileConstant(VARARGS, body, IS_PARAM | IS_INTERNAL);
if (functionNode.needsArguments()) {
- initCompileConstant(ARGUMENTS, body, IS_VAR | IS_INTERNAL | IS_ALWAYS_DEFINED, Type.typeFor(ScriptObject.class));
+ initCompileConstant(ARGUMENTS, body, IS_VAR | IS_INTERNAL | IS_ALWAYS_DEFINED);
addLocalDef(ARGUMENTS.symbolName());
}
}
initParameters(functionNode, body);
- initCompileConstant(SCOPE, body, IS_VAR | IS_INTERNAL | IS_ALWAYS_DEFINED, Type.typeFor(ScriptObject.class));
+ initCompileConstant(SCOPE, body, IS_VAR | IS_INTERNAL | IS_ALWAYS_DEFINED);
initCompileConstant(RETURN, body, IS_VAR | IS_INTERNAL | IS_ALWAYS_DEFINED, Type.OBJECT);
}
@@ -234,10 +233,25 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
@Override
public boolean enterVarNode(final VarNode varNode) {
final String name = varNode.getName().getName();
- //if this is used the var node symbol needs to be tagged as can be undefined
+ //if this is used before the var node, the var node symbol needs to be tagged as can be undefined
if (uses.contains(name)) {
canBeUndefined.add(name);
}
+
+ // all uses of the declared varnode inside the var node are potentially undefined
+ // however this is a bit conservative as e.g. var x = 17; var x = 1 + x; does work
+ if (!varNode.isFunctionDeclaration() && varNode.getInit() != null) {
+ varNode.getInit().accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ @Override
+ public boolean enterIdentNode(final IdentNode identNode) {
+ if (name.equals(identNode.getName())) {
+ canBeUndefined.add(name);
+ }
+ return false;
+ }
+ });
+ }
+
return true;
}
@@ -257,6 +271,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
}
return varNode.setName((IdentNode)ident.setSymbol(lc, symbol));
}
+
return varNode;
}
});
@@ -326,10 +341,11 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
catchNestingLevel++;
// define block-local exception variable
- final Symbol def = defineSymbol(block, exception.getName(), IS_VAR | IS_LET | IS_ALWAYS_DEFINED);
+ final String exname = exception.getName();
+ final Symbol def = defineSymbol(block, exname, IS_VAR | IS_LET | IS_ALWAYS_DEFINED);
newType(def, Type.OBJECT); //we can catch anything, not just ecma exceptions
- addLocalDef(exception.getName());
+ addLocalDef(exname);
return true;
}
@@ -496,7 +512,6 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
assert nameSymbol != null;
selfInit = selfInit.setName((IdentNode)name.setSymbol(lc, nameSymbol));
- selfInit = (VarNode)selfInit.setSymbol(lc, nameSymbol);
newStatements.add(selfInit);
newStatements.addAll(body.getStatements());
@@ -661,7 +676,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
if (scopeBlock != null) {
assert lc.contains(scopeBlock);
- lc.setFlag(scopeBlock, Block.NEEDS_SCOPE);
+ lc.setBlockNeedsScope(scopeBlock);
}
}
}
@@ -724,14 +739,9 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
}
@Override
- public Node leavePropertyNode(final PropertyNode propertyNode) {
- // assign a pseudo symbol to property name, see NASHORN-710
- return propertyNode.setSymbol(lc, new Symbol(propertyNode.getKeyName(), 0, Type.OBJECT));
- }
-
- @Override
public Node leaveReturnNode(final ReturnNode returnNode) {
- final Node expr = returnNode.getExpression();
+ final Expression expr = returnNode.getExpression();
+ final Type returnType;
if (expr != null) {
//we can't do parameter specialization if we return something that hasn't been typed yet
@@ -740,10 +750,12 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
symbol.setType(Type.OBJECT);
}
- final Type returnType = Type.widest(returnTypes.pop(), symbol.getSymbolType());
- returnTypes.push(returnType);
- LOG.info("Returntype is now ", returnType);
+ returnType = Type.widest(returnTypes.pop(), symbol.getSymbolType());
+ } else {
+ returnType = Type.OBJECT; //undefined
}
+ LOG.info("Returntype is now ", returnType);
+ returnTypes.push(returnType);
end(returnNode);
@@ -765,7 +777,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
final LiteralNode<?> lit = (LiteralNode<?>)test;
if (lit.isNumeric() && !(lit.getValue() instanceof Integer)) {
if (JSType.isRepresentableAsInt(lit.getNumber())) {
- newCaseNode = caseNode.setTest(LiteralNode.newInstance(lit, lit.getInt32()).accept(this));
+ newCaseNode = caseNode.setTest((Expression)LiteralNode.newInstance(lit, lit.getInt32()).accept(this));
}
}
} else {
@@ -774,6 +786,9 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
}
type = Type.widest(type, newCaseNode.getTest().getType());
+ if (type.isBoolean()) {
+ type = Type.OBJECT; //booleans and integers aren't assignment compatible
+ }
}
newCases.add(newCaseNode);
@@ -825,19 +840,18 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveVarNode(final VarNode varNode) {
- VarNode newVarNode = varNode;
-
- final Node init = newVarNode.getInit();
- final IdentNode ident = newVarNode.getName();
- final String name = ident.getName();
+ final Expression init = varNode.getInit();
+ final IdentNode ident = varNode.getName();
+ final String name = ident.getName();
- final Symbol symbol = findSymbol(lc.getCurrentBlock(), ident.getName());
+ final Symbol symbol = findSymbol(lc.getCurrentBlock(), name);
+ assert ident.getSymbol() == symbol;
if (init == null) {
// var x; with no init will be treated like a use of x by
// leaveIdentNode unless we remove the name from the localdef list.
removeLocalDef(name);
- return end(newVarNode.setSymbol(lc, symbol));
+ return end(varNode);
}
addLocalDef(name);
@@ -846,8 +860,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
final IdentNode newIdent = (IdentNode)ident.setSymbol(lc, symbol);
- newVarNode = newVarNode.setName(newIdent);
- newVarNode = (VarNode)newVarNode.setSymbol(lc, symbol);
+ final VarNode newVarNode = varNode.setName(newIdent);
final boolean isScript = lc.getDefiningFunction(symbol).isProgram(); //see NASHORN-56
if ((init.getType().isNumeric() || init.getType().isBoolean()) && !isScript) {
@@ -857,7 +870,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
newType(symbol, Type.OBJECT);
}
- assert newVarNode.hasType() : newVarNode + " has no type";
+ assert newVarNode.getName().hasType() : newVarNode + " has no type";
return end(newVarNode);
}
@@ -885,11 +898,11 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
public Node leaveDELETE(final UnaryNode unaryNode) {
final FunctionNode currentFunctionNode = lc.getCurrentFunction();
final boolean strictMode = currentFunctionNode.isStrict();
- final Node rhs = unaryNode.rhs();
- final Node strictFlagNode = LiteralNode.newInstance(unaryNode, strictMode).accept(this);
+ final Expression rhs = unaryNode.rhs();
+ final Expression strictFlagNode = (Expression)LiteralNode.newInstance(unaryNode, strictMode).accept(this);
Request request = Request.DELETE;
- final List<Node> args = new ArrayList<>();
+ final List<Expression> args = new ArrayList<>();
if (rhs instanceof IdentNode) {
// If this is a declared variable or a function parameter, delete always fails (except for globals).
@@ -900,7 +913,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
if (failDelete && rhs.getSymbol().isThis()) {
return LiteralNode.newInstance(unaryNode, true).accept(this);
}
- final Node literalNode = LiteralNode.newInstance(unaryNode, name).accept(this);
+ final Expression literalNode = (Expression)LiteralNode.newInstance(unaryNode, name).accept(this);
if (!failDelete) {
args.add(compilerConstant(SCOPE));
@@ -912,16 +925,17 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
request = Request.FAIL_DELETE;
}
} else if (rhs instanceof AccessNode) {
- final Node base = ((AccessNode)rhs).getBase();
- final IdentNode property = ((AccessNode)rhs).getProperty();
+ final Expression base = ((AccessNode)rhs).getBase();
+ final IdentNode property = ((AccessNode)rhs).getProperty();
args.add(base);
- args.add(LiteralNode.newInstance(unaryNode, property.getName()).accept(this));
+ args.add((Expression)LiteralNode.newInstance(unaryNode, property.getName()).accept(this));
args.add(strictFlagNode);
} else if (rhs instanceof IndexNode) {
- final Node base = ((IndexNode)rhs).getBase();
- final Node index = ((IndexNode)rhs).getIndex();
+ final IndexNode indexNode = (IndexNode)rhs;
+ final Expression base = indexNode.getBase();
+ final Expression index = indexNode.getIndex();
args.add(base);
args.add(index);
@@ -976,15 +990,15 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveTYPEOF(final UnaryNode unaryNode) {
- final Node rhs = unaryNode.rhs();
+ final Expression rhs = unaryNode.rhs();
- List<Node> args = new ArrayList<>();
+ List<Expression> args = new ArrayList<>();
if (rhs instanceof IdentNode && !rhs.getSymbol().isParam() && !rhs.getSymbol().isVar()) {
args.add(compilerConstant(SCOPE));
- args.add(LiteralNode.newInstance(rhs, ((IdentNode)rhs).getName()).accept(this)); //null
+ args.add((Expression)LiteralNode.newInstance(rhs, ((IdentNode)rhs).getName()).accept(this)); //null
} else {
args.add(rhs);
- args.add(LiteralNode.newInstance(unaryNode).accept(this)); //null, do not reuse token of identifier rhs, it can be e.g. 'this'
+ args.add((Expression)LiteralNode.newInstance(unaryNode).accept(this)); //null, do not reuse token of identifier rhs, it can be e.g. 'this'
}
RuntimeNode runtimeNode = new RuntimeNode(unaryNode, Request.TYPEOF, args);
@@ -1009,10 +1023,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveVOID(final UnaryNode unaryNode) {
- final RuntimeNode runtimeNode = (RuntimeNode)new RuntimeNode(unaryNode, Request.VOID).accept(this);
- assert runtimeNode.getSymbol().getSymbolType().isObject();
- end(unaryNode);
- return runtimeNode;
+ return end(ensureSymbol(Type.OBJECT, unaryNode));
}
/**
@@ -1021,8 +1032,8 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
*/
@Override
public Node leaveADD(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
ensureTypeNotUnknown(lhs);
ensureTypeNotUnknown(rhs);
@@ -1077,8 +1088,8 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
private Node leaveAssignmentNode(final BinaryNode binaryNode) {
BinaryNode newBinaryNode = binaryNode;
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
final Type type;
if (rhs.getType().isNumeric()) {
@@ -1114,8 +1125,8 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveASSIGN_ADD(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
final Type widest = Type.widest(lhs.getType(), rhs.getType());
//Type.NUMBER if we can't prove that the add doesn't overflow. todo
@@ -1394,19 +1405,26 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveTernaryNode(final TernaryNode ternaryNode) {
- final Node lhs = ternaryNode.rhs();
- final Node rhs = ternaryNode.third();
+ final Expression trueExpr = ternaryNode.getTrueExpression();
+ final Expression falseExpr = ternaryNode.getFalseExpression();
- ensureTypeNotUnknown(lhs);
- ensureTypeNotUnknown(rhs);
+ ensureTypeNotUnknown(trueExpr);
+ ensureTypeNotUnknown(falseExpr);
- final Type type = Type.widest(lhs.getType(), rhs.getType());
+ final Type type = Type.widest(trueExpr.getType(), falseExpr.getType());
return end(ensureSymbol(type, ternaryNode));
}
+ private void initCompileConstant(final CompilerConstants cc, final Block block, final int flags) {
+ final Class<?> type = cc.type();
+ // Must not call this method for constants with no explicit types; use the one with (..., Type) signature instead.
+ assert type != null;
+ initCompileConstant(cc, block, flags, Type.typeFor(type));
+ }
+
private void initCompileConstant(final CompilerConstants cc, final Block block, final int flags, final Type type) {
final Symbol symbol = defineSymbol(block, cc.symbolName(), flags);
- newType(symbol, type);
+ symbol.setTypeOverride(type);
symbol.setNeedsSlot(true);
}
@@ -1511,7 +1529,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
}
}
- private static void ensureTypeNotUnknown(final Node node) {
+ private static void ensureTypeNotUnknown(final Expression node) {
final Symbol symbol = node.getSymbol();
@@ -1568,13 +1586,13 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
*
* @param assignmentDest the destination node of the assignment, e.g. lhs for binary nodes
*/
- private Node ensureAssignmentSlots(final Node assignmentDest) {
+ private Expression ensureAssignmentSlots(final Expression assignmentDest) {
final LexicalContext attrLexicalContext = lc;
- return assignmentDest.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ return (Expression)assignmentDest.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
@Override
public Node leaveIndexNode(final IndexNode indexNode) {
assert indexNode.getSymbol().isTemp();
- final Node index = indexNode.getIndex();
+ final Expression index = indexNode.getIndex();
//only temps can be set as needing slots. the others will self resolve
//it is illegal to take a scope var and force it to be a slot, that breaks
Symbol indexSymbol = index.getSymbol();
@@ -1616,7 +1634,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
changed.clear();
final FunctionNode newFunctionNode = (FunctionNode)currentFunctionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
- private Node widen(final Node node, final Type to) {
+ private Expression widen(final Expression node, final Type to) {
if (node instanceof LiteralNode) {
return node;
}
@@ -1628,7 +1646,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
symbol = temporarySymbols.getTypedTemporarySymbol(to);
}
newType(symbol, to);
- final Node newNode = node.setSymbol(lc, symbol);
+ final Expression newNode = node.setSymbol(lc, symbol);
changed.add(newNode);
return newNode;
}
@@ -1683,7 +1701,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
private Node leaveSelfModifyingAssignmentNode(final BinaryNode binaryNode, final Type destType) {
//e.g. for -=, Number, no wider, destType (binaryNode.getWidestOperationType()) is the coerce type
- final Node lhs = binaryNode.lhs();
+ final Expression lhs = binaryNode.lhs();
newType(lhs.getSymbol(), destType); //may not narrow if dest is already wider than destType
// ensureSymbol(destType, binaryNode); //for OP= nodes, the node can carry a narrower types than its lhs rhs. This is perfectly fine
@@ -1691,9 +1709,9 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
return end(ensureSymbol(destType, ensureAssignmentSlots(binaryNode)));
}
- private Node ensureSymbol(final Type type, final Node node) {
+ private Expression ensureSymbol(final Type type, final Expression expr) {
LOG.info("New TEMPORARY added to ", lc.getCurrentFunction().getName(), " type=", type);
- return temporarySymbols.ensureSymbol(lc, type, node);
+ return temporarySymbols.ensureSymbol(lc, type, expr);
}
private Symbol newInternal(final String name, final Type type) {
@@ -1815,11 +1833,11 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
return true;
}
- private Node end(final Node node) {
+ private <T extends Node> T end(final T node) {
return end(node, true);
}
- private Node end(final Node node, final boolean printNode) {
+ private <T extends Node> T end(final T node, final boolean printNode) {
if(node instanceof Statement) {
// If we're done with a statement, all temporaries can be reused.
temporarySymbols.reuse();
@@ -1834,10 +1852,13 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> {
append(" in '").
append(lc.getCurrentFunction().getName());
- if (node.getSymbol() == null) {
- sb.append(" <NO SYMBOL>");
- } else {
- sb.append(" <symbol=").append(node.getSymbol()).append('>');
+ if(node instanceof Expression) {
+ final Symbol symbol = ((Expression)node).getSymbol();
+ if (symbol == null) {
+ sb.append(" <NO SYMBOL>");
+ } else {
+ sb.append(" <symbol=").append(symbol).append('>');
+ }
}
LOG.unindent();
diff --git a/src/jdk/nashorn/internal/codegen/BranchOptimizer.java b/src/jdk/nashorn/internal/codegen/BranchOptimizer.java
index ee922115..02ea95f1 100644
--- a/src/jdk/nashorn/internal/codegen/BranchOptimizer.java
+++ b/src/jdk/nashorn/internal/codegen/BranchOptimizer.java
@@ -34,7 +34,7 @@ import static jdk.nashorn.internal.codegen.Condition.NE;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.BinaryNode;
-import jdk.nashorn.internal.ir.Node;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.TernaryNode;
import jdk.nashorn.internal.ir.UnaryNode;
@@ -52,16 +52,16 @@ final class BranchOptimizer {
this.method = method;
}
- void execute(final Node node, final Label label, final boolean state) {
+ void execute(final Expression node, final Label label, final boolean state) {
branchOptimizer(node, label, state);
}
- private void load(final Node node) {
+ private void load(final Expression node) {
codegen.load(node);
}
private void branchOptimizer(final UnaryNode unaryNode, final Label label, final boolean state) {
- final Node rhs = unaryNode.rhs();
+ final Expression rhs = unaryNode.rhs();
switch (unaryNode.tokenType()) {
case NOT:
@@ -88,8 +88,8 @@ final class BranchOptimizer {
}
private void branchOptimizer(final BinaryNode binaryNode, final Label label, final boolean state) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
switch (binaryNode.tokenType()) {
case AND:
@@ -173,7 +173,7 @@ final class BranchOptimizer {
}
}
- private void branchOptimizer(final Node node, final Label label, final boolean state) {
+ private void branchOptimizer(final Expression node, final Label label, final boolean state) {
if (!(node instanceof TernaryNode)) {
if (node instanceof BinaryNode) {
diff --git a/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/src/jdk/nashorn/internal/codegen/CodeGenerator.java
index 414d1bb8..9503e95a 100644
--- a/src/jdk/nashorn/internal/codegen/CodeGenerator.java
+++ b/src/jdk/nashorn/internal/codegen/CodeGenerator.java
@@ -55,10 +55,12 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
+import java.util.Set;
import java.util.TreeMap;
import jdk.nashorn.internal.codegen.ClassEmitter.Flag;
import jdk.nashorn.internal.codegen.CompilerConstants.Call;
@@ -69,6 +71,7 @@ import jdk.nashorn.internal.ir.AccessNode;
import jdk.nashorn.internal.ir.BaseNode;
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
+import jdk.nashorn.internal.ir.BlockStatement;
import jdk.nashorn.internal.ir.BreakNode;
import jdk.nashorn.internal.ir.BreakableNode;
import jdk.nashorn.internal.ir.CallNode;
@@ -76,7 +79,8 @@ import jdk.nashorn.internal.ir.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
import jdk.nashorn.internal.ir.ContinueNode;
import jdk.nashorn.internal.ir.EmptyNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.Expression;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
@@ -109,6 +113,8 @@ import jdk.nashorn.internal.ir.WithNode;
import jdk.nashorn.internal.ir.debug.ASTWriter;
import jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.objects.Global;
+import jdk.nashorn.internal.objects.ScriptFunctionImpl;
import jdk.nashorn.internal.parser.Lexer.RegexToken;
import jdk.nashorn.internal.parser.TokenType;
import jdk.nashorn.internal.runtime.Context;
@@ -148,11 +154,9 @@ import jdk.nashorn.internal.runtime.linker.LinkerCallSite;
*/
final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContext> {
- /** Name of the Global object, cannot be referred to as .class, @see CodeGenerator */
- private static final String GLOBAL_OBJECT = Compiler.OBJECTS_PACKAGE + '/' + "Global";
+ private static final String GLOBAL_OBJECT = Type.getInternalName(Global.class);
- /** Name of the ScriptFunctionImpl, cannot be referred to as .class @see FunctionObjectCreator */
- private static final String SCRIPTFUNCTION_IMPL_OBJECT = Compiler.OBJECTS_PACKAGE + '/' + "ScriptFunctionImpl";
+ private static final String SCRIPTFUNCTION_IMPL_OBJECT = Type.getInternalName(ScriptFunctionImpl.class);
/** Constant data & installation. The only reason the compiler keeps this is because it is assigned
* by reflection in class installation */
@@ -179,6 +183,10 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
private static final DebugLogger LOG = new DebugLogger("codegen", "nashorn.codegen.debug");
+ /** From what size should we use spill instead of fields for JavaScript objects? */
+ private static final int OBJECT_SPILL_THRESHOLD = 300;
+
+ private final Set<String> emittedMethods = new HashSet<>();
/**
* Constructor.
@@ -348,11 +356,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
*
* @return the method emitter used
*/
- MethodEmitter load(final Node node) {
+ MethodEmitter load(final Expression node) {
return load(node, false);
}
- private MethodEmitter load(final Node node, final boolean baseAlreadyOnStack) {
+ private MethodEmitter load(final Expression node, final boolean baseAlreadyOnStack) {
final Symbol symbol = node.getSymbol();
// If we lack symbols, we just generate what we see.
@@ -486,6 +494,9 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterBlock(final Block block) {
+ if(lc.isFunctionBody() && emittedMethods.contains(lc.getCurrentFunction().getName())) {
+ return false;
+ }
method.label(block.getEntryLabel());
initLocals(block);
@@ -537,11 +548,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
- private int loadArgs(final List<Node> args) {
+ private int loadArgs(final List<Expression> args) {
return loadArgs(args, null, false, args.size());
}
- private int loadArgs(final List<Node> args, final String signature, final boolean isVarArg, final int argCount) {
+ private int loadArgs(final List<Expression> args, final String signature, final boolean isVarArg, final int argCount) {
// arg have already been converted to objects here.
if (isVarArg || argCount > LinkerCallSite.ARGLIMIT) {
loadArgsArray(args);
@@ -551,7 +562,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
// pad with undefined if size is too short. argCount is the real number of args
int n = 0;
final Type[] params = signature == null ? null : Type.getMethodArguments(signature);
- for (final Node arg : args) {
+ for (final Expression arg : args) {
assert arg != null;
load(arg);
if (n >= argCount) {
@@ -572,12 +583,13 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterCallNode(final CallNode callNode) {
- lineNumber(callNode);
+ lineNumber(callNode.getLineNumber());
- final List<Node> args = callNode.getArgs();
- final Node function = callNode.getFunction();
- final Block currentBlock = lc.getCurrentBlock();
+ final List<Expression> args = callNode.getArgs();
+ final Expression function = callNode.getFunction();
+ final Block currentBlock = lc.getCurrentBlock();
final CodeGeneratorLexicalContext codegenLexicalContext = lc;
+ final Type callNodeType = callNode.getType();
function.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
@@ -593,7 +605,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
loadArgs(args);
final Type[] paramTypes = method.getTypesFromStack(args.size());
- final SharedScopeCall scopeCall = codegenLexicalContext.getScopeCall(unit, symbol, identNode.getType(), callNode.getType(), paramTypes, scopeCallFlags);
+ final SharedScopeCall scopeCall = codegenLexicalContext.getScopeCall(unit, symbol, identNode.getType(), callNodeType, paramTypes, scopeCallFlags);
return scopeCall.generateInvoke(method);
}
@@ -602,7 +614,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method.convert(Type.OBJECT); // foo() makes no sense if foo == 3
// ScriptFunction will see CALLSITE_SCOPE and will bind scope accordingly.
method.loadNull(); //the 'this'
- method.dynamicCall(callNode.getType(), 2 + loadArgs(args), flags);
+ method.dynamicCall(callNodeType, 2 + loadArgs(args), flags);
}
private void evalCall(final IdentNode node, final int flags) {
@@ -634,14 +646,14 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
// direct call to Global.directEval
globalDirectEval();
- method.convert(callNode.getType());
+ method.convert(callNodeType);
method._goto(eval_done);
method.label(not_eval);
// This is some scope 'eval' or global eval replaced by user
// but not the built-in ECMAScript 'eval' function call
method.loadNull();
- method.dynamicCall(callNode.getType(), 2 + loadArgs(args), flags);
+ method.dynamicCall(callNodeType, 2 + loadArgs(args), flags);
method.label(eval_done);
}
@@ -666,7 +678,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
} else {
sharedScopeCall(node, flags);
}
- assert method.peekType().equals(callNode.getType()) : method.peekType() + "!=" + callNode.getType();
+ assert method.peekType().equals(callNodeType) : method.peekType() + "!=" + callNode.getType();
} else {
enterDefault(node);
}
@@ -681,8 +693,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method.dup();
method.dynamicGet(node.getType(), node.getProperty().getName(), getCallSiteFlags(), true);
method.swap();
- method.dynamicCall(callNode.getType(), 2 + loadArgs(args), getCallSiteFlags());
- assert method.peekType().equals(callNode.getType());
+ method.dynamicCall(callNodeType, 2 + loadArgs(args), getCallSiteFlags());
+ assert method.peekType().equals(callNodeType);
return false;
}
@@ -707,6 +719,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
assert callee.getCompileUnit() != null : "no compile unit for " + callee.getName() + " " + Debug.id(callee) + " " + callNode;
method.invokestatic(callee.getCompileUnit().getUnitClassName(), callee.getName(), signature);
assert method.peekType().equals(callee.getReturnType()) : method.peekType() + " != " + callee.getReturnType();
+ method.convert(callNodeType);
return false;
}
@@ -722,7 +735,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
method.dynamicGetIndex(node.getType(), getCallSiteFlags(), true);
method.swap();
- method.dynamicCall(callNode.getType(), 2 + loadArgs(args), getCallSiteFlags());
+ method.dynamicCall(callNodeType, 2 + loadArgs(args), getCallSiteFlags());
assert method.peekType().equals(callNode.getType());
return false;
@@ -734,7 +747,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
load(function);
method.convert(Type.OBJECT); //TODO, e.g. booleans can be used as functions
method.loadNull(); // ScriptFunction will figure out the correct this when it sees CALLSITE_SCOPE
- method.dynamicCall(callNode.getType(), 2 + loadArgs(args), getCallSiteFlags() | CALLSITE_SCOPE);
+ method.dynamicCall(callNodeType, 2 + loadArgs(args), getCallSiteFlags() | CALLSITE_SCOPE);
assert method.peekType().equals(callNode.getType());
return false;
@@ -767,11 +780,19 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
@Override
- public boolean enterExecuteNode(final ExecuteNode executeNode) {
- lineNumber(executeNode);
+ public boolean enterExpressionStatement(final ExpressionStatement expressionStatement) {
+ lineNumber(expressionStatement);
- final Node expression = executeNode.getExpression();
- expression.accept(this);
+ expressionStatement.getExpression().accept(this);
+
+ return false;
+ }
+
+ @Override
+ public boolean enterBlockStatement(final BlockStatement blockStatement) {
+ lineNumber(blockStatement);
+
+ blockStatement.getBlock().accept(this);
return false;
}
@@ -790,10 +811,10 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
private void enterFor(final ForNode forNode) {
- final Node init = forNode.getInit();
- final Node test = forNode.getTest();
- final Block body = forNode.getBody();
- final Node modify = forNode.getModify();
+ final Expression init = forNode.getInit();
+ final Expression test = forNode.getTest();
+ final Block body = forNode.getBody();
+ final Expression modify = forNode.getModify();
if (init != null) {
init.accept(this);
@@ -823,19 +844,13 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
private void enterForIn(final ForNode forNode) {
final Block body = forNode.getBody();
- final Node modify = forNode.getModify();
+ final Expression modify = forNode.getModify();
final Symbol iter = forNode.getIterator();
final Label loopLabel = new Label("loop");
- Node init = forNode.getInit();
-
- // We have to evaluate the optional initializer expression
- // of the iterator variable of the for-in statement.
- if (init instanceof VarNode) {
- init.accept(this);
- init = ((VarNode)init).getName();
- }
+ final Expression init = forNode.getInit();
+ assert init instanceof IdentNode;
load(modify);
assert modify.getType().isObject();
@@ -844,7 +859,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method._goto(forNode.getContinueLabel());
method.label(loopLabel);
- new Store<Node>(init) {
+ new Store<Expression>(init) {
@Override
protected void storeNonDiscard() {
return;
@@ -877,9 +892,15 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
final FunctionNode function = lc.getCurrentFunction();
if (isFunctionBody) {
- /* Fix the predefined slots so they have numbers >= 0, like varargs. */
- if (function.needsParentScope()) {
- initParentScope();
+ if(method.hasScope()) {
+ if (function.needsParentScope()) {
+ method.loadCompilerConstant(CALLEE);
+ method.invoke(ScriptFunction.GET_SCOPE);
+ } else {
+ assert function.hasScopeBlock();
+ method.loadNull();
+ }
+ method.storeCompilerConstant(SCOPE);
}
if (function.needsArguments()) {
initArguments(function);
@@ -940,22 +961,12 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
* Create a new object based on the symbols and values, generate
* bootstrap code for object
*/
- final FieldObjectCreator<Symbol> foc = new FieldObjectCreator<Symbol>(this, nameList, newSymbols, values, true, hasArguments) {
+ new FieldObjectCreator<Symbol>(this, nameList, newSymbols, values, true, hasArguments) {
@Override
protected void loadValue(final Symbol value) {
method.load(value);
}
-
- @Override
- protected void loadScope(MethodEmitter m) {
- if (function.needsParentScope()) {
- m.loadCompilerConstant(SCOPE);
- } else {
- m.loadNull();
- }
- }
- };
- foc.makeObject(method);
+ }.makeObject(method);
// runScript(): merge scope into global
if (isFunctionBody && function.isProgram()) {
@@ -995,12 +1006,6 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method.storeCompilerConstant(ARGUMENTS);
}
- private void initParentScope() {
- method.loadCompilerConstant(CALLEE);
- method.invoke(ScriptFunction.GET_SCOPE);
- method.storeCompilerConstant(SCOPE);
- }
-
@Override
public boolean enterFunctionNode(final FunctionNode functionNode) {
if (functionNode.isLazy()) {
@@ -1009,17 +1014,28 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
- LOG.info("=== BEGIN ", functionNode.getName());
+ final String fnName = functionNode.getName();
+ // NOTE: we only emit the method for a function with the given name once. We can have multiple functions with
+ // the same name as a result of inlining finally blocks. However, in the future -- with type specialization,
+ // notably -- we might need to check for both name *and* signature. Of course, even that might not be
+ // sufficient; the function might have a code dependency on the type of the variables in its enclosing scopes,
+ // and the type of such a variable can be different in catch and finally blocks. So, in the future we will have
+ // to decide to either generate a unique method for each inlined copy of the function, maybe figure out its
+ // exact type closure and deduplicate based on that, or just decide that functions in finally blocks aren't
+ // worth it, and generate one method with most generic type closure.
+ if(!emittedMethods.contains(fnName)) {
+ LOG.info("=== BEGIN ", fnName);
- assert functionNode.getCompileUnit() != null : "no compile unit for " + functionNode.getName() + " " + Debug.id(functionNode);
- unit = lc.pushCompileUnit(functionNode.getCompileUnit());
- assert lc.hasCompileUnits();
+ assert functionNode.getCompileUnit() != null : "no compile unit for " + fnName + " " + Debug.id(functionNode);
+ unit = lc.pushCompileUnit(functionNode.getCompileUnit());
+ assert lc.hasCompileUnits();
- method = lc.pushMethodEmitter(unit.getClassEmitter().method(functionNode));
- // new method - reset last line number
- lastLineNumber = -1;
- // Mark end for variable tables.
- method.begin();
+ method = lc.pushMethodEmitter(unit.getClassEmitter().method(functionNode));
+ // new method - reset last line number
+ lastLineNumber = -1;
+ // Mark end for variable tables.
+ method.begin();
+ }
return true;
}
@@ -1027,13 +1043,14 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
try {
- method.end(); // wrap up this method
- unit = lc.popCompileUnit(functionNode.getCompileUnit());
- method = lc.popMethodEmitter(method);
- LOG.info("=== END ", functionNode.getName());
+ if(emittedMethods.add(functionNode.getName())) {
+ method.end(); // wrap up this method
+ unit = lc.popCompileUnit(functionNode.getCompileUnit());
+ method = lc.popMethodEmitter(method);
+ LOG.info("=== END ", functionNode.getName());
+ }
final FunctionNode newFunctionNode = functionNode.setState(lc, CompilationState.EMITTED);
-
newFunctionObject(newFunctionNode, functionNode);
return newFunctionNode;
} catch (final Throwable t) {
@@ -1053,7 +1070,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
public boolean enterIfNode(final IfNode ifNode) {
lineNumber(ifNode);
- final Node test = ifNode.getTest();
+ final Expression test = ifNode.getTest();
final Block pass = ifNode.getPass();
final Block fail = ifNode.getFail();
@@ -1093,7 +1110,10 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
private void lineNumber(final Statement statement) {
- final int lineNumber = statement.getLineNumber();
+ lineNumber(statement.getLineNumber());
+ }
+
+ private void lineNumber(int lineNumber) {
if (lineNumber != lastLineNumber) {
method.lineNumber(lineNumber);
}
@@ -1112,7 +1132,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
private MethodEmitter loadArray(final ArrayLiteralNode arrayLiteralNode, final ArrayType arrayType) {
assert arrayType == Type.INT_ARRAY || arrayType == Type.LONG_ARRAY || arrayType == Type.NUMBER_ARRAY || arrayType == Type.OBJECT_ARRAY;
- final Node[] nodes = arrayLiteralNode.getValue();
+ final Expression[] nodes = arrayLiteralNode.getValue();
final Object presets = arrayLiteralNode.getPresets();
final int[] postsets = arrayLiteralNode.getPostsets();
final Class<?> type = arrayType.getTypeClass();
@@ -1172,11 +1192,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return method;
}
- private void storeElement(final Node[] nodes, final Type elementType, final int index) {
+ private void storeElement(final Expression[] nodes, final Type elementType, final int index) {
method.dup();
method.load(index);
- final Node element = nodes[index];
+ final Expression element = nodes[index];
if (element == null) {
method.loadEmpty(elementType);
@@ -1188,7 +1208,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method.arraystore();
}
- private MethodEmitter loadArgsArray(final List<Node> args) {
+ private MethodEmitter loadArgsArray(final List<Expression> args) {
final Object[] array = new Object[args.size()];
loadConstant(array);
@@ -1318,9 +1338,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return method;
}
- @SuppressWarnings("rawtypes")
@Override
- public boolean enterLiteralNode(final LiteralNode literalNode) {
+ public boolean enterLiteralNode(final LiteralNode<?> literalNode) {
assert literalNode.getSymbol() != null : literalNode + " has no symbol";
load(literalNode).store(literalNode.getSymbol());
return false;
@@ -1330,16 +1349,16 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
public boolean enterObjectNode(final ObjectNode objectNode) {
final List<PropertyNode> elements = objectNode.getElements();
- final List<String> keys = new ArrayList<>();
- final List<Symbol> symbols = new ArrayList<>();
- final List<Node> values = new ArrayList<>();
+ final List<String> keys = new ArrayList<>();
+ final List<Symbol> symbols = new ArrayList<>();
+ final List<Expression> values = new ArrayList<>();
boolean hasGettersSetters = false;
for (PropertyNode propertyNode: elements) {
- final Node value = propertyNode.getValue();
+ final Expression value = propertyNode.getValue();
final String key = propertyNode.getKeyName();
- final Symbol symbol = value == null ? null : propertyNode.getSymbol();
+ final Symbol symbol = value == null ? null : propertyNode.getKey().getSymbol();
if (value == null) {
hasGettersSetters = true;
@@ -1350,73 +1369,71 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
values.add(value);
}
- new FieldObjectCreator<Node>(this, keys, symbols, values) {
- @Override
- protected void loadValue(final Node node) {
- load(node);
- }
+ if (elements.size() > OBJECT_SPILL_THRESHOLD) {
+ new SpillObjectCreator(this, keys, symbols, values).makeObject(method);
+ } else {
+ new FieldObjectCreator<Expression>(this, keys, symbols, values) {
+ @Override
+ protected void loadValue(final Expression node) {
+ load(node);
+ }
- /**
- * Ensure that the properties start out as object types so that
- * we can do putfield initializations instead of dynamicSetIndex
- * which would be the case to determine initial property type
- * otherwise.
- *
- * Use case, it's very expensive to do a million var x = {a:obj, b:obj}
- * just to have to invalidate them immediately on initialization
- *
- * see NASHORN-594
- */
- @Override
- protected MapCreator newMapCreator(final Class<?> fieldObjectClass) {
- return new MapCreator(fieldObjectClass, keys, symbols) {
- @Override
- protected int getPropertyFlags(final Symbol symbol, final boolean isVarArg) {
- return super.getPropertyFlags(symbol, isVarArg) | Property.IS_ALWAYS_OBJECT;
- }
- };
- }
+ /**
+ * Ensure that the properties start out as object types so that
+ * we can do putfield initializations instead of dynamicSetIndex
+ * which would be the case to determine initial property type
+ * otherwise.
+ *
+ * Use case, it's very expensive to do a million var x = {a:obj, b:obj}
+ * just to have to invalidate them immediately on initialization
+ *
+ * see NASHORN-594
+ */
+ @Override
+ protected MapCreator newMapCreator(final Class<?> fieldObjectClass) {
+ return new MapCreator(fieldObjectClass, keys, symbols) {
+ @Override
+ protected int getPropertyFlags(final Symbol symbol, final boolean hasArguments) {
+ return super.getPropertyFlags(symbol, hasArguments) | Property.IS_ALWAYS_OBJECT;
+ }
+ };
+ }
- }.makeObject(method);
+ }.makeObject(method);
+ }
method.dup();
globalObjectPrototype();
method.invoke(ScriptObject.SET_PROTO);
- if (!hasGettersSetters) {
- method.store(objectNode.getSymbol());
- return false;
- }
+ if (hasGettersSetters) {
+ for (final PropertyNode propertyNode : elements) {
+ final FunctionNode getter = propertyNode.getGetter();
+ final FunctionNode setter = propertyNode.getSetter();
- for (final Node element : elements) {
- final PropertyNode propertyNode = (PropertyNode)element;
- final Object key = propertyNode.getKey();
- final FunctionNode getter = propertyNode.getGetter();
- final FunctionNode setter = propertyNode.getSetter();
+ if (getter == null && setter == null) {
+ continue;
+ }
- if (getter == null && setter == null) {
- continue;
- }
+ method.dup().loadKey(propertyNode.getKey());
- method.dup().loadKey(key);
+ if (getter == null) {
+ method.loadNull();
+ } else {
+ getter.accept(this);
+ }
- if (getter == null) {
- method.loadNull();
- } else {
- getter.accept(this);
- }
+ if (setter == null) {
+ method.loadNull();
+ } else {
+ setter.accept(this);
+ }
- if (setter == null) {
- method.loadNull();
- } else {
- setter.accept(this);
+ method.invoke(ScriptObject.SET_USER_ACCESSORS);
}
-
- method.invoke(ScriptObject.SET_USER_ACCESSORS);
}
method.store(objectNode.getSymbol());
-
return false;
}
@@ -1428,7 +1445,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
final Type returnType = lc.getCurrentFunction().getReturnType();
- final Node expression = returnNode.getExpression();
+ final Expression expression = returnNode.getExpression();
if (expression != null) {
load(expression);
} else {
@@ -1444,7 +1461,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return node instanceof LiteralNode<?> && ((LiteralNode<?>) node).isNull();
}
- private boolean nullCheck(final RuntimeNode runtimeNode, final List<Node> args, final String signature) {
+ private boolean nullCheck(final RuntimeNode runtimeNode, final List<Expression> args, final String signature) {
final Request request = runtimeNode.getRequest();
if (!Request.isEQ(request) && !Request.isNE(request)) {
@@ -1453,11 +1470,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
assert args.size() == 2 : "EQ or NE or TYPEOF need two args";
- Node lhs = args.get(0);
- Node rhs = args.get(1);
+ Expression lhs = args.get(0);
+ Expression rhs = args.get(1);
if (isNullLiteral(lhs)) {
- final Node tmp = lhs;
+ final Expression tmp = lhs;
lhs = rhs;
rhs = tmp;
}
@@ -1511,7 +1528,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
- private boolean specializationCheck(final RuntimeNode.Request request, final Node node, final List<Node> args) {
+ private boolean specializationCheck(final RuntimeNode.Request request, final Expression node, final List<Expression> args) {
if (!request.canSpecialize()) {
return false;
}
@@ -1564,10 +1581,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
*
* TODO - remove this - Access Specializer will always know after Attr/Lower
*/
+ final List<Expression> args = runtimeNode.getArgs();
if (runtimeNode.isPrimitive() && !runtimeNode.isFinal() && isReducible(runtimeNode.getRequest())) {
- final Node lhs = runtimeNode.getArgs().get(0);
- assert runtimeNode.getArgs().size() > 1 : runtimeNode + " must have two args";
- final Node rhs = runtimeNode.getArgs().get(1);
+ final Expression lhs = args.get(0);
+ assert args.size() > 1 : runtimeNode + " must have two args";
+ final Expression rhs = args.get(1);
final Type type = runtimeNode.getType();
final Symbol symbol = runtimeNode.getSymbol();
@@ -1604,9 +1622,6 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
}
- // Get the request arguments.
- final List<Node> args = runtimeNode.getArgs();
-
if (nullCheck(runtimeNode, args, new FunctionSignature(false, false, runtimeNode.getType(), args).toString())) {
return false;
}
@@ -1615,7 +1630,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
- for (final Node arg : runtimeNode.getArgs()) {
+ for (final Expression arg : args) {
load(arg).convert(Type.OBJECT); //TODO this should not be necessary below Lower
}
@@ -1626,7 +1641,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
false,
false,
runtimeNode.getType(),
- runtimeNode.getArgs().size()).toString());
+ args.size()).toString());
method.convert(runtimeNode.getType());
method.store(runtimeNode.getSymbol());
@@ -1635,8 +1650,6 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterSplitNode(final SplitNode splitNode) {
- lineNumber(splitNode);
-
final CompileUnit splitCompileUnit = splitNode.getCompileUnit();
final FunctionNode fn = lc.getCurrentFunction();
@@ -1781,7 +1794,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
public boolean enterSwitchNode(final SwitchNode switchNode) {
lineNumber(switchNode);
- final Node expression = switchNode.getExpression();
+ final Expression expression = switchNode.getExpression();
final Symbol tag = switchNode.getTag();
final boolean allInteger = tag.getSymbolType().isInteger();
final List<CaseNode> cases = switchNode.getCases();
@@ -1847,7 +1860,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
// If expression not int see if we can convert, if not use deflt to trigger default.
if (!type.isInteger()) {
method.load(deflt);
- final Class exprClass = type.getTypeClass();
+ final Class<?> exprClass = type.getTypeClass();
method.invoke(staticCallNoLookup(ScriptRuntime.class, "switchTagAsInt", int.class, exprClass.isPrimitive()? exprClass : Object.class, int.class));
}
@@ -1878,11 +1891,13 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method.store(tag);
method.conditionalJump(Condition.NE, true, defaultLabel);
} else {
+ assert tag.getSymbolType().isObject();
+ method.convert(Type.OBJECT); //e.g. 1 literal pushed and tag is object
method.store(tag);
}
for (final CaseNode caseNode : cases) {
- final Node test = caseNode.getTest();
+ final Expression test = caseNode.getTest();
if (test != null) {
method.load(tag);
@@ -1922,10 +1937,10 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
final Source source = lc.getCurrentFunction().getSource();
- final Node expression = throwNode.getExpression();
- final int position = throwNode.position();
- final int line = source.getLine(position);
- final int column = source.getColumn(position);
+ final Expression expression = throwNode.getExpression();
+ final int position = throwNode.position();
+ final int line = source.getLine(position);
+ final int column = source.getColumn(position);
load(expression);
assert expression.getType().isObject();
@@ -1974,10 +1989,10 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
lc.push(catchBlock);
enterBlock(catchBlock);
- final CatchNode catchNode = (CatchNode)catchBlocks.get(i).getStatements().get(0);
- final IdentNode exception = catchNode.getException();
- final Node exceptionCondition = catchNode.getExceptionCondition();
- final Block catchBody = catchNode.getBody();
+ final CatchNode catchNode = (CatchNode)catchBlocks.get(i).getStatements().get(0);
+ final IdentNode exception = catchNode.getException();
+ final Expression exceptionCondition = catchNode.getExceptionCondition();
+ final Block catchBody = catchNode.getBody();
new Store<IdentNode>(exception) {
@Override
@@ -2045,7 +2060,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterVarNode(final VarNode varNode) {
- final Node init = varNode.getInit();
+ final Expression init = varNode.getInit();
if (init == null) {
return false;
@@ -2053,8 +2068,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
lineNumber(varNode);
- final Symbol varSymbol = varNode.getSymbol();
- assert varSymbol != null : "variable node " + varNode + " requires a symbol";
+ final Symbol varSymbol = varNode.getName().getSymbol();
+ assert varSymbol != null : "variable node " + varNode + " requires a name with a symbol";
assert method != null;
@@ -2074,9 +2089,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
method.dynamicSet(type, identNode.getName(), flags);
}
} else {
- assert varNode.getType() == varNode.getName().getType() : "varNode type=" + varNode.getType() + " nametype=" + varNode.getName().getType() + " inittype=" + init.getType();
-
- method.convert(varNode.getType()); // aw: convert moved here
+ method.convert(varNode.getName().getType()); // aw: convert moved here
method.store(varSymbol);
}
@@ -2087,11 +2100,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
public boolean enterWhileNode(final WhileNode whileNode) {
lineNumber(whileNode);
- final Node test = whileNode.getTest();
- final Block body = whileNode.getBody();
- final Label breakLabel = whileNode.getBreakLabel();
- final Label continueLabel = whileNode.getContinueLabel();
- final Label loopLabel = new Label("loop");
+ final Expression test = whileNode.getTest();
+ final Block body = whileNode.getBody();
+ final Label breakLabel = whileNode.getBreakLabel();
+ final Label continueLabel = whileNode.getContinueLabel();
+ final Label loopLabel = new Label("loop");
if (!whileNode.isDoWhile()) {
method._goto(continueLabel);
@@ -2118,8 +2131,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterWithNode(final WithNode withNode) {
- final Node expression = withNode.getExpression();
- final Node body = withNode.getBody();
+ final Expression expression = withNode.getExpression();
+ final Node body = withNode.getBody();
// It is possible to have a "pathological" case where the with block does not reference *any* identifiers. It's
// pointless, but legal. In that case, if nothing else in the method forced the assignment of a slot to the
@@ -2194,7 +2207,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
// do this better with convert calls to method. TODO
@Override
public boolean enterCONVERT(final UnaryNode unaryNode) {
- final Node rhs = unaryNode.rhs();
+ final Expression rhs = unaryNode.rhs();
final Type to = unaryNode.getType();
if (to.isObject() && rhs instanceof LiteralNode) {
@@ -2231,11 +2244,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterDECINC(final UnaryNode unaryNode) {
- final Node rhs = unaryNode.rhs();
- final Type type = unaryNode.getType();
- final TokenType tokenType = unaryNode.tokenType();
- final boolean isPostfix = tokenType == TokenType.DECPOSTFIX || tokenType == TokenType.INCPOSTFIX;
- final boolean isIncrement = tokenType == TokenType.INCPREFIX || tokenType == TokenType.INCPOSTFIX;
+ final Expression rhs = unaryNode.rhs();
+ final Type type = unaryNode.getType();
+ final TokenType tokenType = unaryNode.tokenType();
+ final boolean isPostfix = tokenType == TokenType.DECPOSTFIX || tokenType == TokenType.INCPOSTFIX;
+ final boolean isIncrement = tokenType == TokenType.INCPREFIX || tokenType == TokenType.INCPOSTFIX;
assert !type.isObject();
@@ -2279,7 +2292,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterDISCARD(final UnaryNode unaryNode) {
- final Node rhs = unaryNode.rhs();
+ final Expression rhs = unaryNode.rhs();
lc.pushDiscard(rhs);
load(rhs);
@@ -2296,7 +2309,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterNEW(final UnaryNode unaryNode) {
final CallNode callNode = (CallNode)unaryNode.rhs();
- final List<Node> args = callNode.getArgs();
+ final List<Expression> args = callNode.getArgs();
// Load function reference.
load(callNode.getFunction()).convert(Type.OBJECT); // must detect type error
@@ -2309,7 +2322,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterNOT(final UnaryNode unaryNode) {
- final Node rhs = unaryNode.rhs();
+ final Expression rhs = unaryNode.rhs();
load(rhs);
@@ -2335,19 +2348,26 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
- private Node enterNumericAdd(final Node lhs, final Node rhs, final Type type, final Symbol symbol) {
+ @Override
+ public boolean enterVOID(final UnaryNode unaryNode) {
+ load(unaryNode.rhs()).pop();
+ method.loadUndefined(Type.OBJECT);
+
+ return false;
+ }
+
+ private void enterNumericAdd(final Expression lhs, final Expression rhs, final Type type, final Symbol symbol) {
assert lhs.getType().equals(rhs.getType()) && lhs.getType().equals(type) : lhs.getType() + " != " + rhs.getType() + " != " + type + " " + new ASTWriter(lhs) + " " + new ASTWriter(rhs);
load(lhs);
load(rhs);
method.add(); //if the symbol is optimistic, it always needs to be written, not on the stack?
method.store(symbol);
- return null;
}
@Override
public boolean enterADD(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
final Type type = binaryNode.getType();
if (type.isNumeric()) {
@@ -2363,8 +2383,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
private boolean enterAND_OR(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
final Label skip = new Label("skip");
@@ -2391,8 +2411,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterASSIGN(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
final Type lhsType = lhs.getType();
final Type rhsType = rhs.getType();
@@ -2660,8 +2680,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
private boolean enterComma(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
load(lhs);
load(rhs);
@@ -2692,7 +2712,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
- private boolean enterCmp(final Node lhs, final Node rhs, final Condition cond, final Type type, final Symbol symbol) {
+ private boolean enterCmp(final Expression lhs, final Expression rhs, final Condition cond, final Type type, final Symbol symbol) {
final Type lhsType = lhs.getType();
final Type rhsType = rhs.getType();
@@ -2845,21 +2865,21 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
@Override
public boolean enterTernaryNode(final TernaryNode ternaryNode) {
- final Node lhs = ternaryNode.lhs();
- final Node rhs = ternaryNode.rhs();
- final Node third = ternaryNode.third();
+ final Expression test = ternaryNode.getTest();
+ final Expression trueExpr = ternaryNode.getTrueExpression();
+ final Expression falseExpr = ternaryNode.getFalseExpression();
final Symbol symbol = ternaryNode.getSymbol();
final Label falseLabel = new Label("ternary_false");
final Label exitLabel = new Label("ternary_exit");
- Type widest = Type.widest(rhs.getType(), third.getType());
- if (rhs.getType().isArray() || third.getType().isArray()) { //loadArray creates a Java array type on the stack, calls global allocate, which creates a native array type
+ Type widest = Type.widest(trueExpr.getType(), falseExpr.getType());
+ if (trueExpr.getType().isArray() || falseExpr.getType().isArray()) { //loadArray creates a Java array type on the stack, calls global allocate, which creates a native array type
widest = Type.OBJECT;
}
- load(lhs);
- assert lhs.getType().isBoolean() : "lhs in ternary must be boolean";
+ load(test);
+ assert test.getType().isBoolean() : "lhs in ternary must be boolean";
// we still keep the conversion here as the AccessSpecializer can have separated the types, e.g. var y = x ? x=55 : 17
// will left as (Object)x=55 : (Object)17 by Lower. Then the first term can be {I}x=55 of type int, which breaks the
@@ -2867,11 +2887,11 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
// to early, or Apply the AccessSpecializer too late. We are mostly probably looking for a separate type pass to
// do this property. Then we never need any conversions in CodeGenerator
method.ifeq(falseLabel);
- load(rhs);
+ load(trueExpr);
method.convert(widest);
method._goto(exitLabel);
method.label(falseLabel);
- load(third);
+ load(falseExpr);
method.convert(widest);
method.label(exitLabel);
method.store(symbol);
@@ -2924,8 +2944,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
*
* @param <T>
*/
- private abstract class SelfModifyingStore<T extends Node> extends Store<T> {
- protected SelfModifyingStore(final T assignNode, final Node target) {
+ private abstract class SelfModifyingStore<T extends Expression> extends Store<T> {
+ protected SelfModifyingStore(final T assignNode, final Expression target) {
super(assignNode, target);
}
@@ -2938,13 +2958,13 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
/**
* Helper class to generate stores
*/
- private abstract class Store<T extends Node> {
+ private abstract class Store<T extends Expression> {
/** An assignment node, e.g. x += y */
protected final T assignNode;
/** The target node to store to, e.g. x */
- private final Node target;
+ private final Expression target;
/** How deep on the stack do the arguments go if this generates an indy call */
private int depth;
@@ -2958,7 +2978,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
* @param assignNode the node representing the whole assignment
* @param target the target node of the assignment (destination)
*/
- protected Store(final T assignNode, final Node target) {
+ protected Store(final T assignNode, final Expression target) {
this.assignNode = assignNode;
this.target = target;
}
@@ -3001,8 +3021,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
private void enterBaseNode() {
assert target instanceof BaseNode : "error - base node " + target + " must be instanceof BaseNode";
- final BaseNode baseNode = (BaseNode)target;
- final Node base = baseNode.getBase();
+ final BaseNode baseNode = (BaseNode)target;
+ final Expression base = baseNode.getBase();
load(base);
method.convert(Type.OBJECT);
@@ -3023,7 +3043,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
public boolean enterIndexNode(final IndexNode node) {
enterBaseNode();
- final Node index = node.getIndex();
+ final Expression index = node.getIndex();
// could be boolean here as well
load(index);
if (!index.getType().isNumeric()) {
@@ -3173,31 +3193,24 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return;
}
- final boolean isLazy = functionNode.isLazy();
+ // Generate the object class and property map in case this function is ever used as constructor
+ final String className = SCRIPTFUNCTION_IMPL_OBJECT;
+ final int fieldCount = ObjectClassGenerator.getPaddedFieldCount(functionNode.countThisProperties());
+ final String allocatorClassName = Compiler.binaryName(ObjectClassGenerator.getClassName(fieldCount));
+ final PropertyMap allocatorMap = PropertyMap.newMap(null, 0, fieldCount, 0);
- new ObjectCreator(this, new ArrayList<String>(), new ArrayList<Symbol>(), false, false) {
- @Override
- protected void makeObject(final MethodEmitter m) {
- final String className = SCRIPTFUNCTION_IMPL_OBJECT;
-
- m._new(className).dup();
- loadConstant(new RecompilableScriptFunctionData(functionNode, compiler.getCodeInstaller(), Compiler.binaryName(getClassName()), makeMap()));
+ method._new(className).dup();
+ loadConstant(new RecompilableScriptFunctionData(functionNode, compiler.getCodeInstaller(), allocatorClassName, allocatorMap));
- if (isLazy || functionNode.needsParentScope()) {
- m.loadCompilerConstant(SCOPE);
- } else {
- m.loadNull();
- }
- m.invoke(constructorNoLookup(className, RecompilableScriptFunctionData.class, ScriptObject.class));
- }
- }.makeObject(method);
+ if (functionNode.isLazy() || functionNode.needsParentScope()) {
+ method.loadCompilerConstant(SCOPE);
+ } else {
+ method.loadNull();
+ }
+ method.invoke(constructorNoLookup(className, RecompilableScriptFunctionData.class, ScriptObject.class));
}
- /*
- * Globals are special. We cannot refer to any Global (or NativeObject) class by .class, as they are different
- * for different contexts. As far as I can tell, the only NativeObject that we need to deal with like this
- * is from the code pipeline is Global
- */
+ // calls on Global class.
private MethodEmitter globalInstance() {
return method.invokestatic(GLOBAL_OBJECT, "instance", "()L" + GLOBAL_OBJECT + ';');
}
diff --git a/src/jdk/nashorn/internal/codegen/CompilationPhase.java b/src/jdk/nashorn/internal/codegen/CompilationPhase.java
index 9f263067..5d48fb73 100644
--- a/src/jdk/nashorn/internal/codegen/CompilationPhase.java
+++ b/src/jdk/nashorn/internal/codegen/CompilationPhase.java
@@ -18,17 +18,16 @@ import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-
import jdk.nashorn.internal.codegen.types.Range;
import jdk.nashorn.internal.codegen.types.Type;
-import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.CallNode;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.FunctionNode;
+import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
import jdk.nashorn.internal.ir.LexicalContext;
+import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.ReturnNode;
import jdk.nashorn.internal.ir.Symbol;
-import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
-import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.TemporarySymbols;
import jdk.nashorn.internal.ir.debug.ASTWriter;
import jdk.nashorn.internal.ir.debug.PrintVisitor;
@@ -117,7 +116,7 @@ enum CompilationPhase {
final FunctionNode parent = lc.getParentFunction(functionNode);
assert parent != null;
lc.setFlag(parent, FunctionNode.HAS_LAZY_CHILDREN);
- lc.setFlag(parent.getBody(), Block.NEEDS_SCOPE);
+ lc.setBlockNeedsScope(parent.getBody());
lc.setFlag(functionNode, FunctionNode.IS_LAZY);
return functionNode;
}
@@ -258,17 +257,20 @@ enum CompilationPhase {
@Override
public Node leaveDefault(final Node node) {
- final Symbol symbol = node.getSymbol();
- if (symbol != null) {
- final Range range = symbol.getRange();
- final Type symbolType = symbol.getSymbolType();
- if (!symbolType.isNumeric()) {
- return node;
- }
- final Type rangeType = range.getType();
- if (!Type.areEquivalent(symbolType, rangeType) && Type.widest(symbolType, rangeType) == symbolType) { //we can narrow range
- RangeAnalyzer.LOG.info("[", lc.getCurrentFunction().getName(), "] ", symbol, " can be ", range.getType(), " ", symbol.getRange());
- return node.setSymbol(lc, symbol.setTypeOverrideShared(range.getType(), compiler.getTemporarySymbols()));
+ if(node instanceof Expression) {
+ final Expression expr = (Expression)node;
+ final Symbol symbol = expr.getSymbol();
+ if (symbol != null) {
+ final Range range = symbol.getRange();
+ final Type symbolType = symbol.getSymbolType();
+ if (!symbolType.isNumeric()) {
+ return expr;
+ }
+ final Type rangeType = range.getType();
+ if (!Type.areEquivalent(symbolType, rangeType) && Type.widest(symbolType, rangeType) == symbolType) { //we can narrow range
+ RangeAnalyzer.LOG.info("[", lc.getCurrentFunction().getName(), "] ", symbol, " can be ", range.getType(), " ", symbol.getRange());
+ return expr.setSymbol(lc, symbol.setTypeOverrideShared(range.getType(), compiler.getTemporarySymbols()));
+ }
}
}
return node;
diff --git a/src/jdk/nashorn/internal/codegen/Compiler.java b/src/jdk/nashorn/internal/codegen/Compiler.java
index 72fcf178..a31358f6 100644
--- a/src/jdk/nashorn/internal/codegen/Compiler.java
+++ b/src/jdk/nashorn/internal/codegen/Compiler.java
@@ -528,8 +528,8 @@ public final class Compiler {
return this.env;
}
- private static String safeSourceName(final Source source) {
- String baseName = new File(source.getName()).getName();
+ private String safeSourceName(final Source src) {
+ String baseName = new File(src.getName()).getName();
final int index = baseName.lastIndexOf(".js");
if (index != -1) {
@@ -537,6 +537,9 @@ public final class Compiler {
}
baseName = baseName.replace('.', '_').replace('-', '_');
+ if (! env._loader_per_compile) {
+ baseName = baseName + installer.getUniqueScriptId();
+ }
final String mangled = NameCodec.encode(baseName);
return mangled != null ? mangled : baseName;
diff --git a/src/jdk/nashorn/internal/codegen/CompilerConstants.java b/src/jdk/nashorn/internal/codegen/CompilerConstants.java
index 3deff98c..c8ccc1ce 100644
--- a/src/jdk/nashorn/internal/codegen/CompilerConstants.java
+++ b/src/jdk/nashorn/internal/codegen/CompilerConstants.java
@@ -100,10 +100,10 @@ public enum CompilerConstants {
CALLEE(":callee", ScriptFunction.class),
/** the varargs variable when necessary */
- VARARGS(":varargs"),
+ VARARGS(":varargs", Object[].class),
/** the arguments vector when necessary and the slot */
- ARGUMENTS("arguments", Object.class, 2),
+ ARGUMENTS("arguments", ScriptObject.class, 2),
/** prefix for iterators for for (x in ...) */
ITERATOR_PREFIX(":i", Iterator.class),
diff --git a/src/jdk/nashorn/internal/codegen/FieldObjectCreator.java b/src/jdk/nashorn/internal/codegen/FieldObjectCreator.java
index 974b5ba8..9e15b497 100644
--- a/src/jdk/nashorn/internal/codegen/FieldObjectCreator.java
+++ b/src/jdk/nashorn/internal/codegen/FieldObjectCreator.java
@@ -26,15 +26,16 @@
package jdk.nashorn.internal.codegen;
import static jdk.nashorn.internal.codegen.CompilerConstants.ARGUMENTS;
-import static jdk.nashorn.internal.codegen.CompilerConstants.SCOPE;
import static jdk.nashorn.internal.codegen.CompilerConstants.constructorNoLookup;
import static jdk.nashorn.internal.codegen.CompilerConstants.typeDescriptor;
+import static jdk.nashorn.internal.codegen.ObjectClassGenerator.getPaddedFieldCount;
import static jdk.nashorn.internal.codegen.types.Type.OBJECT;
import java.util.Iterator;
import java.util.List;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.Symbol;
+import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.arrays.ArrayIndex;
@@ -48,6 +49,13 @@ import jdk.nashorn.internal.runtime.arrays.ArrayIndex;
* @see jdk.nashorn.internal.ir.Node
*/
public abstract class FieldObjectCreator<T> extends ObjectCreator {
+
+ private String fieldObjectClassName;
+ private Class<?> fieldObjectClass;
+ private int fieldCount;
+ private int paddedFieldCount;
+ private int paramCount;
+
/** array of corresponding values to symbols (null for no values) */
private final List<T> values;
@@ -80,14 +88,9 @@ public abstract class FieldObjectCreator<T> extends ObjectCreator {
super(codegen, keys, symbols, isScope, hasArguments);
this.values = values;
this.callSiteFlags = codegen.getCallSiteFlags();
- }
- /**
- * Loads the scope on the stack through the passed method emitter.
- * @param method the method emitter to use
- */
- protected void loadScope(final MethodEmitter method) {
- method.loadCompilerConstant(SCOPE);
+ countFields();
+ findClass();
}
/**
@@ -137,6 +140,13 @@ public abstract class FieldObjectCreator<T> extends ObjectCreator {
}
}
+ @Override
+ protected PropertyMap makeMap() {
+ assert propertyMap == null : "property map already initialized";
+ propertyMap = newMapCreator(fieldObjectClass).makeFieldMap(hasArguments(), fieldCount, paddedFieldCount);
+ return propertyMap;
+ }
+
/**
* Technique for loading an initial value. Defined by anonymous subclasses in code gen.
*
@@ -173,4 +183,47 @@ public abstract class FieldObjectCreator<T> extends ObjectCreator {
loadValue(value);
method.dynamicSetIndex(callSiteFlags);
}
+
+ /**
+ * Locate (or indirectly create) the object container class.
+ */
+ private void findClass() {
+ fieldObjectClassName = isScope() ?
+ ObjectClassGenerator.getClassName(fieldCount, paramCount) :
+ ObjectClassGenerator.getClassName(paddedFieldCount);
+
+ try {
+ this.fieldObjectClass = Context.forStructureClass(Compiler.binaryName(fieldObjectClassName));
+ } catch (final ClassNotFoundException e) {
+ throw new AssertionError("Nashorn has encountered an internal error. Structure can not be created.");
+ }
+ }
+
+ /**
+ * Get the class name for the object class,
+ * e.g. {@code com.nashorn.oracle.scripts.JO2P0}
+ *
+ * @return script class name
+ */
+ String getClassName() {
+ return fieldObjectClassName;
+ }
+
+ /**
+ * Tally the number of fields and parameters.
+ */
+ private void countFields() {
+ for (final Symbol symbol : this.symbols) {
+ if (symbol != null) {
+ if (hasArguments() && symbol.isParam()) {
+ symbol.setFieldIndex(paramCount++);
+ } else {
+ symbol.setFieldIndex(fieldCount++);
+ }
+ }
+ }
+
+ paddedFieldCount = getPaddedFieldCount(fieldCount);
+ }
+
}
diff --git a/src/jdk/nashorn/internal/codegen/FinalizeTypes.java b/src/jdk/nashorn/internal/codegen/FinalizeTypes.java
index f9d64322..476ac745 100644
--- a/src/jdk/nashorn/internal/codegen/FinalizeTypes.java
+++ b/src/jdk/nashorn/internal/codegen/FinalizeTypes.java
@@ -31,7 +31,6 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.SCOPE;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.AccessNode;
import jdk.nashorn.internal.ir.Assignment;
@@ -40,7 +39,8 @@ import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.CallNode;
import jdk.nashorn.internal.ir.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.Expression;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
@@ -147,9 +147,9 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
* strings etc as well.
*/
@Override
- public Node leaveADD(final BinaryNode binaryNode) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ public Expression leaveADD(final BinaryNode binaryNode) {
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
final Type type = binaryNode.getType();
@@ -175,6 +175,14 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
if (destType == null) {
destType = specBinaryNode.getType();
}
+ // Register assignments to this object in case this is used as constructor
+ if (binaryNode.lhs() instanceof AccessNode) {
+ AccessNode accessNode = (AccessNode) binaryNode.lhs();
+
+ if (accessNode.getBase().getSymbol().isThis()) {
+ lc.getCurrentFunction().addThisProperty(accessNode.getProperty().getName());
+ }
+ }
return specBinaryNode.setRHS(convert(specBinaryNode.rhs(), destType));
}
@@ -233,7 +241,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
return leaveASSIGN(binaryNode);
}
- private boolean symbolIsInteger(Node node) {
+ private boolean symbolIsInteger(final Expression node) {
final Symbol symbol = node.getSymbol();
assert symbol != null && symbol.getSymbolType().isInteger() : "int coercion expected: " + Debug.id(symbol) + " " + symbol + " " + lc.getCurrentFunction().getSource();
return true;
@@ -365,7 +373,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveCatchNode(final CatchNode catchNode) {
- final Node exceptionCondition = catchNode.getExceptionCondition();
+ final Expression exceptionCondition = catchNode.getExceptionCondition();
if (exceptionCondition != null) {
return catchNode.setExceptionCondition(convert(exceptionCondition, Type.BOOLEAN));
}
@@ -373,16 +381,16 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
}
@Override
- public Node leaveExecuteNode(final ExecuteNode executeNode) {
+ public Node leaveExpressionStatement(final ExpressionStatement expressionStatement) {
temporarySymbols.reuse();
- return executeNode.setExpression(discard(executeNode.getExpression()));
+ return expressionStatement.setExpression(discard(expressionStatement.getExpression()));
}
@Override
public Node leaveForNode(final ForNode forNode) {
- final Node init = forNode.getInit();
- final Node test = forNode.getTest();
- final Node modify = forNode.getModify();
+ final Expression init = forNode.getInit();
+ final Expression test = forNode.getTest();
+ final Expression modify = forNode.getModify();
if (forNode.isForIn()) {
return forNode.setModify(lc, convert(forNode.getModify(), Type.OBJECT)); // NASHORN-400
@@ -407,10 +415,10 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
if (!functionNode.needsCallee()) {
functionNode.compilerConstant(CALLEE).setNeedsSlot(false);
}
- // Similar reasoning applies to __scope__ symbol: if the function doesn't need either parent scope or its
- // own scope, we ensure it doesn't get a slot, but we can't determine whether it needs a scope earlier than
- // this phase.
- if (!(functionNode.getBody().needsScope() || functionNode.needsParentScope())) {
+ // Similar reasoning applies to __scope__ symbol: if the function doesn't need either parent scope and none of
+ // its blocks create a scope, we ensure it doesn't get a slot, but we can't determine whether it needs a scope
+ // earlier than this phase.
+ if (!(functionNode.hasScopeBlock() || functionNode.needsParentScope())) {
functionNode.compilerConstant(SCOPE).setNeedsSlot(false);
}
@@ -432,13 +440,13 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
public boolean enterLiteralNode(final LiteralNode literalNode) {
if (literalNode instanceof ArrayLiteralNode) {
final ArrayLiteralNode arrayLiteralNode = (ArrayLiteralNode)literalNode;
- final Node[] array = arrayLiteralNode.getValue();
+ final Expression[] array = arrayLiteralNode.getValue();
final Type elementType = arrayLiteralNode.getElementType();
for (int i = 0; i < array.length; i++) {
final Node element = array[i];
if (element != null) {
- array[i] = convert(element.accept(this), elementType);
+ array[i] = convert((Expression)element.accept(this), elementType);
}
}
}
@@ -448,7 +456,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
- final Node expr = returnNode.getExpression();
+ final Expression expr = returnNode.getExpression();
if (expr != null) {
return returnNode.setExpression(convert(expr, lc.getCurrentFunction().getReturnType()));
}
@@ -457,8 +465,8 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveRuntimeNode(final RuntimeNode runtimeNode) {
- final List<Node> args = runtimeNode.getArgs();
- for (final Node arg : args) {
+ final List<Expression> args = runtimeNode.getArgs();
+ for (final Expression arg : args) {
assert !arg.getType().isUnknown();
}
return runtimeNode;
@@ -472,12 +480,12 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
return switchNode;
}
- final Node expression = switchNode.getExpression();
+ final Expression expression = switchNode.getExpression();
final List<CaseNode> cases = switchNode.getCases();
final List<CaseNode> newCases = new ArrayList<>();
for (final CaseNode caseNode : cases) {
- final Node test = caseNode.getTest();
+ final Expression test = caseNode.getTest();
newCases.add(test != null ? caseNode.setTest(convert(test, Type.OBJECT)) : caseNode);
}
@@ -488,7 +496,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveTernaryNode(final TernaryNode ternaryNode) {
- return ternaryNode.setLHS(convert(ternaryNode.lhs(), Type.BOOLEAN));
+ return ternaryNode.setTest(convert(ternaryNode.getTest(), Type.BOOLEAN));
}
@Override
@@ -498,16 +506,16 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveVarNode(final VarNode varNode) {
- final Node init = varNode.getInit();
+ final Expression init = varNode.getInit();
if (init != null) {
final SpecializedNode specialized = specialize(varNode);
final VarNode specVarNode = (VarNode)specialized.node;
Type destType = specialized.type;
if (destType == null) {
- destType = specVarNode.getType();
+ destType = specVarNode.getName().getType();
}
- assert specVarNode.hasType() : specVarNode + " doesn't have a type";
- final Node convertedInit = convert(init, destType);
+ assert specVarNode.getName().hasType() : specVarNode + " doesn't have a type";
+ final Expression convertedInit = convert(init, destType);
temporarySymbols.reuse();
return specVarNode.setInit(convertedInit);
}
@@ -517,7 +525,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
@Override
public Node leaveWhileNode(final WhileNode whileNode) {
- final Node test = whileNode.getTest();
+ final Expression test = whileNode.getTest();
if (test != null) {
return whileNode.setTest(lc, convert(test, Type.BOOLEAN));
}
@@ -592,8 +600,8 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
*/
@SuppressWarnings("fallthrough")
private Node leaveCmp(final BinaryNode binaryNode, final RuntimeNode.Request request) {
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
Type widest = Type.widest(lhs.getType(), rhs.getType());
@@ -689,10 +697,10 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
}
}
- <T extends Node> SpecializedNode specialize(final Assignment<T> assignment) {
+ <T extends Expression> SpecializedNode specialize(final Assignment<T> assignment) {
final Node node = ((Node)assignment);
final T lhs = assignment.getAssignmentDest();
- final Node rhs = assignment.getAssignmentSource();
+ final Expression rhs = assignment.getAssignmentSource();
if (!canHaveCallSiteType(lhs)) {
return new SpecializedNode(node, null);
@@ -711,8 +719,16 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
}
final Node newNode = assignment.setAssignmentDest(setTypeOverride(lhs, to));
- final Node typePropagatedNode = propagateType(newNode, to);
-
+ final Node typePropagatedNode;
+ if(newNode instanceof Expression) {
+ typePropagatedNode = propagateType((Expression)newNode, to);
+ } else if(newNode instanceof VarNode) {
+ // VarNode, being a statement, doesn't have its own symbol; it uses the symbol of its name instead.
+ final VarNode varNode = (VarNode)newNode;
+ typePropagatedNode = varNode.setName((IdentNode)propagateType(varNode.getName(), to));
+ } else {
+ throw new AssertionError();
+ }
return new SpecializedNode(typePropagatedNode, to);
}
@@ -752,7 +768,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
* @param to new type
*/
@SuppressWarnings("unchecked")
- <T extends Node> T setTypeOverride(final T node, final Type to) {
+ <T extends Expression> T setTypeOverride(final T node, final Type to) {
final Type from = node.getType();
if (!node.getType().equals(to)) {
LOG.info("Changing call override type for '", node, "' from ", node.getType(), " to ", to);
@@ -781,7 +797,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
* @param to destination type
* @return conversion node
*/
- private Node convert(final Node node, final Type to) {
+ private Expression convert(final Expression node, final Type to) {
assert !to.isUnknown() : "unknown type for " + node + " class=" + node.getClass();
assert node != null : "node is null";
assert node.getSymbol() != null : "node " + node + " " + node.getClass() + " has no symbol! " + lc.getCurrentFunction();
@@ -797,7 +813,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
return node;
}
- Node resultNode = node;
+ Expression resultNode = node;
if (node instanceof LiteralNode && !(node instanceof ArrayLiteralNode) && !to.isObject()) {
final LiteralNode<?> newNode = new LiteralNodeConstantEvaluator((LiteralNode<?>)node, to).eval();
@@ -821,9 +837,9 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
return temporarySymbols.ensureSymbol(lc, to, resultNode);
}
- private static Node discard(final Node node) {
+ private static Expression discard(final Expression node) {
if (node.getSymbol() != null) {
- final Node discard = new UnaryNode(Token.recast(node.getToken(), TokenType.DISCARD), node);
+ final UnaryNode discard = new UnaryNode(Token.recast(node.getToken(), TokenType.DISCARD), node);
//discard never has a symbol in the discard node - then it would be a nop
assert !node.isTerminal();
return discard;
@@ -846,7 +862,7 @@ final class FinalizeTypes extends NodeOperatorVisitor<LexicalContext> {
* @param node
* @param to
*/
- private Node propagateType(final Node node, final Type to) {
+ private Expression propagateType(final Expression node, final Type to) {
Symbol symbol = node.getSymbol();
if (symbol.isTemp() && symbol.getSymbolType() != to) {
symbol = symbol.setTypeOverrideShared(to, temporarySymbols);
diff --git a/src/jdk/nashorn/internal/codegen/FoldConstants.java b/src/jdk/nashorn/internal/codegen/FoldConstants.java
index 2331cf75..49dfbb32 100644
--- a/src/jdk/nashorn/internal/codegen/FoldConstants.java
+++ b/src/jdk/nashorn/internal/codegen/FoldConstants.java
@@ -28,8 +28,8 @@ package jdk.nashorn.internal.codegen;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
+import jdk.nashorn.internal.ir.BlockStatement;
import jdk.nashorn.internal.ir.EmptyNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
import jdk.nashorn.internal.ir.IfNode;
@@ -91,7 +91,7 @@ final class FoldConstants extends NodeVisitor<LexicalContext> {
if (test instanceof LiteralNode) {
final Block shortCut = ((LiteralNode<?>)test).isTrue() ? ifNode.getPass() : ifNode.getFail();
if (shortCut != null) {
- return new ExecuteNode(shortCut.getLineNumber(), shortCut.getToken(), shortCut.getFinish(), shortCut);
+ return new BlockStatement(ifNode.getLineNumber(), shortCut);
}
return new EmptyNode(ifNode);
}
@@ -100,9 +100,9 @@ final class FoldConstants extends NodeVisitor<LexicalContext> {
@Override
public Node leaveTernaryNode(final TernaryNode ternaryNode) {
- final Node test = ternaryNode.lhs();
+ final Node test = ternaryNode.getTest();
if (test instanceof LiteralNode) {
- return ((LiteralNode<?>)test).isTrue() ? ternaryNode.rhs() : ternaryNode.third();
+ return ((LiteralNode<?>)test).isTrue() ? ternaryNode.getTrueExpression() : ternaryNode.getFalseExpression();
}
return ternaryNode;
}
diff --git a/src/jdk/nashorn/internal/codegen/FunctionSignature.java b/src/jdk/nashorn/internal/codegen/FunctionSignature.java
index 057d2d4e..1c1b5f74 100644
--- a/src/jdk/nashorn/internal/codegen/FunctionSignature.java
+++ b/src/jdk/nashorn/internal/codegen/FunctionSignature.java
@@ -31,8 +31,8 @@ import java.lang.invoke.MethodType;
import java.util.ArrayList;
import java.util.List;
import jdk.nashorn.internal.codegen.types.Type;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.linker.LinkerCallSite;
@@ -63,7 +63,7 @@ public final class FunctionSignature {
* @param retType what is the return type
* @param args argument list of AST Nodes
*/
- public FunctionSignature(final boolean hasSelf, final boolean hasCallee, final Type retType, final List<? extends Node> args) {
+ public FunctionSignature(final boolean hasSelf, final boolean hasCallee, final Type retType, final List<? extends Expression> args) {
this(hasSelf, hasCallee, retType, FunctionSignature.typeArray(args));
}
@@ -167,7 +167,7 @@ public final class FunctionSignature {
*
* @return the array of types
*/
- private static Type[] typeArray(final List<? extends Node> args) {
+ private static Type[] typeArray(final List<? extends Expression> args) {
if (args == null) {
return null;
}
@@ -175,7 +175,7 @@ public final class FunctionSignature {
final Type[] typeArray = new Type[args.size()];
int pos = 0;
- for (final Node arg : args) {
+ for (final Expression arg : args) {
typeArray[pos++] = arg.getType();
}
diff --git a/src/jdk/nashorn/internal/codegen/Lower.java b/src/jdk/nashorn/internal/codegen/Lower.java
index 013564c2..cc109695 100644
--- a/src/jdk/nashorn/internal/codegen/Lower.java
+++ b/src/jdk/nashorn/internal/codegen/Lower.java
@@ -32,16 +32,19 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.THIS;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.ListIterator;
import jdk.nashorn.internal.ir.BaseNode;
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.BlockLexicalContext;
+import jdk.nashorn.internal.ir.BlockStatement;
import jdk.nashorn.internal.ir.BreakNode;
import jdk.nashorn.internal.ir.CallNode;
import jdk.nashorn.internal.ir.CatchNode;
import jdk.nashorn.internal.ir.ContinueNode;
import jdk.nashorn.internal.ir.EmptyNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.Expression;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
@@ -115,6 +118,21 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
}
return newStatements;
}
+
+ @Override
+ protected Block afterSetStatements(final Block block) {
+ final List<Statement> stmts = block.getStatements();
+ for(final ListIterator<Statement> li = stmts.listIterator(stmts.size()); li.hasPrevious();) {
+ final Statement stmt = li.previous();
+ // popStatements() guarantees that the only thing after a terminal statement are uninitialized
+ // VarNodes. We skip past those, and set the terminal state of the block to the value of the
+ // terminal state of the first statement that is not an uninitialized VarNode.
+ if(!(stmt instanceof VarNode && ((VarNode)stmt).getInit() == null)) {
+ return block.setIsTerminal(this, stmt.isTerminal());
+ }
+ }
+ return block.setIsTerminal(this, false);
+ }
});
}
@@ -122,7 +140,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
public boolean enterBlock(final Block block) {
final FunctionNode function = lc.getCurrentFunction();
if (lc.isFunctionBody() && function.isProgram() && !function.hasDeclaredFunctions()) {
- new ExecuteNode(block.getLineNumber(), block.getToken(), block.getFinish(), LiteralNode.newInstance(block, ScriptRuntime.UNDEFINED)).accept(this);
+ new ExpressionStatement(function.getLineNumber(), block.getToken(), block.getFinish(), LiteralNode.newInstance(block, ScriptRuntime.UNDEFINED)).accept(this);
}
return true;
}
@@ -132,24 +150,20 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
//now we have committed the entire statement list to the block, but we need to truncate
//whatever is after the last terminal. block append won't append past it
- Statement last = lc.getLastStatement();
if (lc.isFunctionBody()) {
final FunctionNode currentFunction = lc.getCurrentFunction();
final boolean isProgram = currentFunction.isProgram();
+ final Statement last = lc.getLastStatement();
final ReturnNode returnNode = new ReturnNode(
- last == null ? block.getLineNumber() : last.getLineNumber(), //TODO?
+ last == null ? currentFunction.getLineNumber() : last.getLineNumber(), //TODO?
currentFunction.getToken(),
currentFunction.getFinish(),
isProgram ?
compilerConstant(RETURN) :
LiteralNode.newInstance(block, ScriptRuntime.UNDEFINED));
- last = (Statement)returnNode.accept(this);
- }
-
- if (last != null && last.isTerminal()) {
- return block.setIsTerminal(lc, true);
+ returnNode.accept(this);
}
return block;
@@ -183,23 +197,21 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
}
@Override
- public Node leaveExecuteNode(final ExecuteNode executeNode) {
- final Node expr = executeNode.getExpression();
- ExecuteNode node = executeNode;
+ public Node leaveExpressionStatement(final ExpressionStatement expressionStatement) {
+ final Expression expr = expressionStatement.getExpression();
+ ExpressionStatement node = expressionStatement;
final FunctionNode currentFunction = lc.getCurrentFunction();
if (currentFunction.isProgram()) {
- if (!(expr instanceof Block) || expr instanceof FunctionNode) { // it's not a block, but can be a function
- if (!isInternalExpression(expr) && !isEvalResultAssignment(expr)) {
- node = executeNode.setExpression(
- new BinaryNode(
- Token.recast(
- executeNode.getToken(),
- TokenType.ASSIGN),
- compilerConstant(RETURN),
- expr));
- }
+ if (!isInternalExpression(expr) && !isEvalResultAssignment(expr)) {
+ node = expressionStatement.setExpression(
+ new BinaryNode(
+ Token.recast(
+ expressionStatement.getToken(),
+ TokenType.ASSIGN),
+ compilerConstant(RETURN),
+ expr));
}
}
@@ -207,6 +219,11 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
}
@Override
+ public Node leaveBlockStatement(BlockStatement blockStatement) {
+ return addStatement(blockStatement);
+ }
+
+ @Override
public Node leaveForNode(final ForNode forNode) {
ForNode newForNode = forNode;
@@ -290,11 +307,11 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
final IdentNode exception = new IdentNode(token, finish, lc.getCurrentFunction().uniqueName("catch_all"));
- final Block catchBody = new Block(lineNumber, token, finish, new ThrowNode(lineNumber, token, finish, new IdentNode(exception), ThrowNode.IS_SYNTHETIC_RETHROW)).
+ final Block catchBody = new Block(token, finish, new ThrowNode(lineNumber, token, finish, new IdentNode(exception), ThrowNode.IS_SYNTHETIC_RETHROW)).
setIsTerminal(lc, true); //ends with throw, so terminal
final CatchNode catchAllNode = new CatchNode(lineNumber, token, finish, new IdentNode(exception), null, catchBody, CatchNode.IS_SYNTHETIC_RETHROW);
- final Block catchAllBlock = new Block(lineNumber, token, finish, catchAllNode);
+ final Block catchAllBlock = new Block(token, finish, catchAllNode);
//catchallblock -> catchallnode (catchnode) -> exception -> throw
@@ -343,14 +360,14 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
if (!isTerminal(newStatements)) {
newStatements.add(throwNode);
}
- return new Block(throwNode.getLineNumber(), throwNode.getToken(), throwNode.getFinish(), newStatements);
+ return BlockStatement.createReplacement(throwNode, newStatements);
}
return throwNode;
}
@Override
public Node leaveBreakNode(final BreakNode breakNode) {
- return copy(breakNode, Lower.this.lc.getBreakable(breakNode.getLabel()));
+ return copy(breakNode, (Node)Lower.this.lc.getBreakable(breakNode.getLabel()));
}
@Override
@@ -360,15 +377,15 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
@Override
public Node leaveReturnNode(final ReturnNode returnNode) {
- final Node expr = returnNode.getExpression();
+ final Expression expr = returnNode.getExpression();
final List<Statement> newStatements = new ArrayList<>();
- final Node resultNode;
+ final Expression resultNode;
if (expr != null) {
//we need to evaluate the result of the return in case it is complex while
//still in the try block, store it in a result value and return it afterwards
resultNode = new IdentNode(Lower.this.compilerConstant(RETURN));
- newStatements.add(new ExecuteNode(returnNode.getLineNumber(), returnNode.getToken(), returnNode.getFinish(), new BinaryNode(Token.recast(returnNode.getToken(), TokenType.ASSIGN), resultNode, expr)));
+ newStatements.add(new ExpressionStatement(returnNode.getLineNumber(), returnNode.getToken(), returnNode.getFinish(), new BinaryNode(Token.recast(returnNode.getToken(), TokenType.ASSIGN), resultNode, expr)));
} else {
resultNode = null;
}
@@ -378,7 +395,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
newStatements.add(expr == null ? returnNode : returnNode.setExpression(resultNode));
}
- return new ExecuteNode(returnNode.getLineNumber(), returnNode.getToken(), returnNode.getFinish(), new Block(returnNode.getLineNumber(), returnNode.getToken(), lc.getCurrentBlock().getFinish(), newStatements));
+ return BlockStatement.createReplacement(returnNode, lc.getCurrentBlock().getFinish(), newStatements);
}
private Node copy(final Statement endpoint, final Node targetNode) {
@@ -387,7 +404,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
if (!isTerminal(newStatements)) {
newStatements.add(endpoint);
}
- return new ExecuteNode(endpoint.getLineNumber(), endpoint.getToken(), endpoint.getFinish(), new Block(endpoint.getLineNumber(), endpoint.getToken(), finish, newStatements));
+ return BlockStatement.createReplacement(endpoint, finish, newStatements);
}
return endpoint;
}
@@ -449,7 +466,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
if (tryNode.getCatchBlocks().isEmpty()) {
newTryNode = tryNode.setFinallyBody(null);
} else {
- Block outerBody = new Block(tryNode.getLineNumber(), tryNode.getToken(), tryNode.getFinish(), new ArrayList<Statement>(Arrays.asList(tryNode.setFinallyBody(null))));
+ Block outerBody = new Block(tryNode.getToken(), tryNode.getFinish(), new ArrayList<Statement>(Arrays.asList(tryNode.setFinallyBody(null))));
newTryNode = tryNode.setBody(outerBody).setCatchBlocks(null);
}
@@ -466,7 +483,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
public Node leaveVarNode(final VarNode varNode) {
addStatement(varNode);
if (varNode.getFlag(VarNode.IS_LAST_FUNCTION_DECLARATION) && lc.getCurrentFunction().isProgram()) {
- new ExecuteNode(varNode.getLineNumber(), varNode.getToken(), varNode.getFinish(), new IdentNode(varNode.getName())).accept(this);
+ new ExpressionStatement(varNode.getLineNumber(), varNode.getToken(), varNode.getFinish(), new IdentNode(varNode.getName())).accept(this);
}
return varNode;
}
@@ -499,7 +516,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
* @param function function called by a CallNode
* @return transformed node to marker function or identity if not ident/access/indexnode
*/
- private static Node markerFunction(final Node function) {
+ private static Expression markerFunction(final Expression function) {
if (function instanceof IdentNode) {
return ((IdentNode)function).setIsFunction();
} else if (function instanceof BaseNode) {
@@ -541,15 +558,15 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
private CallNode checkEval(final CallNode callNode) {
if (callNode.getFunction() instanceof IdentNode) {
- final List<Node> args = callNode.getArgs();
- final IdentNode callee = (IdentNode)callNode.getFunction();
+ final List<Expression> args = callNode.getArgs();
+ final IdentNode callee = (IdentNode)callNode.getFunction();
// 'eval' call with at least one argument
if (args.size() >= 1 && EVAL.symbolName().equals(callee.getName())) {
final FunctionNode currentFunction = lc.getCurrentFunction();
return callNode.setEvalArgs(
new CallNode.EvalArgs(
- ensureUniqueNamesIn(args.get(0)).accept(this),
+ (Expression)ensureUniqueNamesIn(args.get(0)).accept(this),
compilerConstant(THIS),
evalLocation(callee),
currentFunction.isStrict()));
@@ -618,7 +635,7 @@ final class Lower extends NodeOperatorVisitor<BlockLexicalContext> {
* @param expression expression to check for internal symbol
* @return true if internal, false otherwise
*/
- private static boolean isInternalExpression(final Node expression) {
+ private static boolean isInternalExpression(final Expression expression) {
final Symbol symbol = expression.getSymbol();
return symbol != null && symbol.isInternal();
}
diff --git a/src/jdk/nashorn/internal/codegen/MapCreator.java b/src/jdk/nashorn/internal/codegen/MapCreator.java
index 609fac9b..6ad03c73 100644
--- a/src/jdk/nashorn/internal/codegen/MapCreator.java
+++ b/src/jdk/nashorn/internal/codegen/MapCreator.java
@@ -41,10 +41,10 @@ public class MapCreator {
private final Class<?> structure;
/** key set for object map */
- private final String[] keys;
+ final List<String> keys;
/** corresponding symbol set for object map */
- private final Symbol[] symbols;
+ final List<Symbol> symbols;
/**
* Constructor
@@ -54,11 +54,9 @@ public class MapCreator {
* @param symbols list of symbols for map
*/
MapCreator(final Class<?> structure, final List<String> keys, final List<Symbol> symbols) {
- final int size = keys.size();
-
this.structure = structure;
- this.keys = keys.toArray(new String[size]);
- this.symbols = symbols.toArray(new Symbol[size]);
+ this.keys = keys;
+ this.symbols = symbols;
}
/**
@@ -70,21 +68,37 @@ public class MapCreator {
*
* @return New map populated with accessor properties.
*/
- PropertyMap makeMap(final boolean hasArguments, final int fieldCount, final int fieldMaximum) {
+ PropertyMap makeFieldMap(final boolean hasArguments, final int fieldCount, final int fieldMaximum) {
final List<Property> properties = new ArrayList<>();
-
assert keys != null;
- for (int i = 0; i < keys.length; i++) {
- final String key = keys[i];
- final Symbol symbol = symbols[i];
+ for (int i = 0, length = keys.size(); i < length; i++) {
+ final String key = keys.get(i);
+ final Symbol symbol = symbols.get(i);
if (symbol != null && !ArrayIndex.isIntArrayIndex(key)) {
properties.add(new AccessorProperty(key, getPropertyFlags(symbol, hasArguments), structure, symbol.getFieldIndex()));
}
}
- return PropertyMap.newMap(structure, properties, fieldCount, fieldMaximum);
+ return PropertyMap.newMap(properties, fieldCount, fieldMaximum, 0);
+ }
+
+ PropertyMap makeSpillMap(final boolean hasArguments) {
+ final List<Property> properties = new ArrayList<>();
+ int spillIndex = 0;
+ assert keys != null;
+
+ for (int i = 0, length = keys.size(); i < length; i++) {
+ final String key = keys.get(i);
+ final Symbol symbol = symbols.get(i);
+
+ if (symbol != null && !ArrayIndex.isIntArrayIndex(key)) {
+ properties.add(new AccessorProperty(key, getPropertyFlags(symbol, hasArguments), spillIndex++));
+ }
+ }
+
+ return PropertyMap.newMap(properties, 0, 0, spillIndex);
}
/**
diff --git a/src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java b/src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java
index 934df7a6..fa3d19e5 100644
--- a/src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java
+++ b/src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java
@@ -74,11 +74,6 @@ public final class ObjectClassGenerator {
static final int FIELD_PADDING = 4;
/**
- * Rounding when calculating the number of fields.
- */
- static final int FIELD_ROUNDING = 4;
-
- /**
* Debug field logger
* Should we print debugging information for fields when they are generated and getters/setters are called?
*/
@@ -325,7 +320,6 @@ public final class ObjectClassGenerator {
final List<String> initFields = addFields(classEmitter, fieldCount);
final MethodEmitter init = newInitMethod(classEmitter);
- initializeToUndefined(init, className, initFields);
init.returnVoid();
init.end();
@@ -441,13 +435,13 @@ public final class ObjectClassGenerator {
* @return Open method emitter.
*/
private static MethodEmitter newInitScopeWithArgumentsMethod(final ClassEmitter classEmitter) {
- final MethodEmitter init = classEmitter.init(PropertyMap.class, ScriptObject.class, Object.class);
+ final MethodEmitter init = classEmitter.init(PropertyMap.class, ScriptObject.class, ScriptObject.class);
init.begin();
init.load(Type.OBJECT, JAVA_THIS.slot());
init.load(Type.OBJECT, INIT_MAP.slot());
init.load(Type.OBJECT, INIT_SCOPE.slot());
init.load(Type.OBJECT, INIT_ARGUMENTS.slot());
- init.invoke(constructorNoLookup(FunctionScope.class, PropertyMap.class, ScriptObject.class, Object.class));
+ init.invoke(constructorNoLookup(FunctionScope.class, PropertyMap.class, ScriptObject.class, ScriptObject.class));
return init;
}
@@ -709,6 +703,15 @@ public final class ObjectClassGenerator {
}
}
+ /**
+ * Add padding to field count to avoid creating too many classes and have some spare fields
+ * @param count the field count
+ * @return the padded field count
+ */
+ static int getPaddedFieldCount(final int count) {
+ return count / FIELD_PADDING * FIELD_PADDING + FIELD_PADDING;
+ }
+
//
// Provide generic getters and setters for undefined types. If a type is undefined, all
// and marshals the set to the correct setter depending on the type of the value being set.
diff --git a/src/jdk/nashorn/internal/codegen/ObjectCreator.java b/src/jdk/nashorn/internal/codegen/ObjectCreator.java
index b0e5a773..2a8ebba7 100644
--- a/src/jdk/nashorn/internal/codegen/ObjectCreator.java
+++ b/src/jdk/nashorn/internal/codegen/ObjectCreator.java
@@ -25,10 +25,10 @@
package jdk.nashorn.internal.codegen;
+import static jdk.nashorn.internal.codegen.CompilerConstants.SCOPE;
+
import java.util.List;
-import static jdk.nashorn.internal.codegen.ObjectClassGenerator.FIELD_PADDING;
import jdk.nashorn.internal.ir.Symbol;
-import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.PropertyMap;
/**
@@ -36,9 +36,6 @@ import jdk.nashorn.internal.runtime.PropertyMap;
*/
public abstract class ObjectCreator {
- /** Compile unit for this ObjectCreator, see CompileUnit */
- //protected final CompileUnit compileUnit;
-
/** List of keys to initiate in this ObjectCreator */
protected final List<String> keys;
@@ -50,12 +47,7 @@ public abstract class ObjectCreator {
private final boolean isScope;
private final boolean hasArguments;
- private int fieldCount;
- private int paddedFieldCount;
- private int paramCount;
- private String fieldObjectClassName;
- private Class<?> fieldObjectClass;
- private PropertyMap propertyMap;
+ protected PropertyMap propertyMap;
/**
* Constructor
@@ -72,41 +64,6 @@ public abstract class ObjectCreator {
this.symbols = symbols;
this.isScope = isScope;
this.hasArguments = hasArguments;
-
- countFields();
- findClass();
- }
-
- /**
- * Tally the number of fields and parameters.
- */
- private void countFields() {
- for (final Symbol symbol : this.symbols) {
- if (symbol != null) {
- if (hasArguments() && symbol.isParam()) {
- symbol.setFieldIndex(paramCount++);
- } else {
- symbol.setFieldIndex(fieldCount++);
- }
- }
- }
-
- paddedFieldCount = fieldCount + FIELD_PADDING;
- }
-
- /**
- * Locate (or indirectly create) the object container class.
- */
- private void findClass() {
- fieldObjectClassName = isScope() ?
- ObjectClassGenerator.getClassName(fieldCount, paramCount) :
- ObjectClassGenerator.getClassName(paddedFieldCount);
-
- try {
- this.fieldObjectClass = Context.forStructureClass(Compiler.binaryName(fieldObjectClassName));
- } catch (final ClassNotFoundException e) {
- throw new AssertionError("Nashorn has encountered an internal error. Structure can not be created.");
- }
}
/**
@@ -116,6 +73,12 @@ public abstract class ObjectCreator {
protected abstract void makeObject(final MethodEmitter method);
/**
+ * Construct the property map appropriate for the object.
+ * @return the newly created property map
+ */
+ protected abstract PropertyMap makeMap();
+
+ /**
* Create a new MapCreator
* @param clazz type of MapCreator
* @return map creator instantiated by type
@@ -125,12 +88,11 @@ public abstract class ObjectCreator {
}
/**
- * Construct the property map appropriate for the object.
- * @return the newly created property map
+ * Loads the scope on the stack through the passed method emitter.
+ * @param method the method emitter to use
*/
- protected PropertyMap makeMap() {
- propertyMap = newMapCreator(fieldObjectClass).makeMap(hasArguments(), fieldCount, paddedFieldCount);
- return propertyMap;
+ protected void loadScope(final MethodEmitter method) {
+ method.loadCompilerConstant(SCOPE);
}
/**
@@ -144,16 +106,6 @@ public abstract class ObjectCreator {
}
/**
- * Get the class name for the object class,
- * e.g. {@code com.nashorn.oracle.scripts.JO2P0}
- *
- * @return script class name
- */
- String getClassName() {
- return fieldObjectClassName;
- }
-
- /**
* Is this a scope object
* @return true if scope
*/
diff --git a/src/jdk/nashorn/internal/codegen/RangeAnalyzer.java b/src/jdk/nashorn/internal/codegen/RangeAnalyzer.java
index ab61d374..4056ec0c 100644
--- a/src/jdk/nashorn/internal/codegen/RangeAnalyzer.java
+++ b/src/jdk/nashorn/internal/codegen/RangeAnalyzer.java
@@ -28,11 +28,11 @@ package jdk.nashorn.internal.codegen;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
-
import jdk.nashorn.internal.codegen.types.Range;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.Assignment;
import jdk.nashorn.internal.ir.BinaryNode;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.IdentNode;
import jdk.nashorn.internal.ir.LexicalContext;
@@ -87,7 +87,7 @@ final class RangeAnalyzer extends NodeOperatorVisitor<LexicalContext> {
}
//destination visited
- private Symbol setRange(final Node dest, final Range range) {
+ private Symbol setRange(final Expression dest, final Range range) {
if (range.isUnknown()) {
return null;
}
@@ -352,7 +352,6 @@ final class RangeAnalyzer extends NodeOperatorVisitor<LexicalContext> {
range = range.isUnknown() ? Range.createGenericRange() : range;
setRange(node.getName(), range);
- setRange(node, range);
}
return node;
@@ -438,12 +437,12 @@ final class RangeAnalyzer extends NodeOperatorVisitor<LexicalContext> {
* @return
*/
private static Symbol findLoopCounter(final LoopNode node) {
- final Node test = node.getTest();
+ final Expression test = node.getTest();
if (test != null && test.isComparison()) {
final BinaryNode binaryNode = (BinaryNode)test;
- final Node lhs = binaryNode.lhs();
- final Node rhs = binaryNode.rhs();
+ final Expression lhs = binaryNode.lhs();
+ final Expression rhs = binaryNode.rhs();
//detect ident cmp int_literal
if (lhs instanceof IdentNode && rhs instanceof LiteralNode && ((LiteralNode<?>)rhs).getType().isInteger()) {
diff --git a/src/jdk/nashorn/internal/codegen/SpillObjectCreator.java b/src/jdk/nashorn/internal/codegen/SpillObjectCreator.java
new file mode 100644
index 00000000..08dfedf1
--- /dev/null
+++ b/src/jdk/nashorn/internal/codegen/SpillObjectCreator.java
@@ -0,0 +1,133 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.codegen;
+
+import static jdk.nashorn.internal.codegen.CompilerConstants.constructorNoLookup;
+import static jdk.nashorn.internal.codegen.types.Type.OBJECT;
+
+import java.util.List;
+import jdk.nashorn.internal.codegen.types.Type;
+import jdk.nashorn.internal.ir.Expression;
+import jdk.nashorn.internal.ir.LiteralNode;
+import jdk.nashorn.internal.ir.Symbol;
+import jdk.nashorn.internal.runtime.Property;
+import jdk.nashorn.internal.runtime.PropertyMap;
+import jdk.nashorn.internal.runtime.ScriptObject;
+import jdk.nashorn.internal.scripts.JO;
+
+/**
+ * An object creator that uses spill properties.
+ */
+public class SpillObjectCreator extends ObjectCreator {
+
+ private final List<Expression> values;
+
+ /**
+ * Constructor
+ *
+ * @param codegen code generator
+ * @param keys keys for fields in object
+ * @param symbols symbols for fields in object
+ * @param values list of values corresponding to keys
+ */
+ protected SpillObjectCreator(final CodeGenerator codegen, final List<String> keys, final List<Symbol> symbols, final List<Expression> values) {
+ super(codegen, keys, symbols, false, false);
+ this.values = values;
+ makeMap();
+ }
+
+ @Override
+ protected void makeObject(final MethodEmitter method) {
+ assert !isScope() : "spill scope objects are not currently supported";
+
+ final int length = keys.size();
+ final Object[] presetValues = new Object[propertyMap.size()];
+ final Class clazz = JO.class;
+
+ // Compute constant values
+ for (int i = 0; i < length; i++) {
+ final String key = keys.get(i);
+ final Property property = propertyMap.findProperty(key);
+
+ if (property != null) {
+ presetValues[property.getSlot()] = LiteralNode.objectAsConstant(values.get(i));
+ }
+ }
+
+ method._new(clazz).dup();
+ codegen.loadConstant(propertyMap);
+
+ method.invoke(constructorNoLookup(JO.class, PropertyMap.class));
+
+ method.dup();
+ codegen.loadConstant(presetValues);
+
+ // Create properties with non-constant values
+ for (int i = 0; i < length; i++) {
+ final String key = keys.get(i);
+ final Property property = propertyMap.findProperty(key);
+
+ if (property != null && presetValues[property.getSlot()] == LiteralNode.POSTSET_MARKER) {
+ method.dup();
+ method.load(property.getSlot());
+ codegen.load(values.get(i)).convert(OBJECT);
+ method.arraystore();
+ presetValues[property.getSlot()] = null;
+ }
+ }
+
+ method.putField(Type.typeFor(ScriptObject.class).getInternalName(), "spill", Type.OBJECT_ARRAY.getDescriptor());
+ final int callSiteFlags = codegen.getCallSiteFlags();
+
+ // Assign properties with valid array index keys
+ for (int i = 0; i < length; i++) {
+ final String key = keys.get(i);
+ final Property property = propertyMap.findProperty(key);
+ final Expression value = values.get(i);
+
+ if (property == null && value != null) {
+ method.dup();
+ method.load(keys.get(i));
+ codegen.load(value);
+ method.dynamicSetIndex(callSiteFlags);
+ }
+ }
+ }
+
+ @Override
+ protected PropertyMap makeMap() {
+ assert propertyMap == null : "property map already initialized";
+
+ propertyMap = new MapCreator(JO.class, keys, symbols) {
+ @Override
+ protected int getPropertyFlags(Symbol symbol, boolean hasArguments) {
+ return super.getPropertyFlags(symbol, hasArguments) | Property.IS_SPILL | Property.IS_ALWAYS_OBJECT;
+ }
+ }.makeSpillMap(false);
+
+ return propertyMap;
+ }
+}
diff --git a/src/jdk/nashorn/internal/codegen/Splitter.java b/src/jdk/nashorn/internal/codegen/Splitter.java
index e724ce26..a35c6dfd 100644
--- a/src/jdk/nashorn/internal/codegen/Splitter.java
+++ b/src/jdk/nashorn/internal/codegen/Splitter.java
@@ -31,7 +31,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
@@ -221,14 +220,13 @@ final class Splitter extends NodeVisitor<LexicalContext> {
* @return New split node.
*/
private SplitNode createBlockSplitNode(final Block parent, final FunctionNode function, final List<Statement> statements, final long weight) {
- final int lineNumber = parent.getLineNumber();
final long token = parent.getToken();
final int finish = parent.getFinish();
final String name = function.uniqueName(SPLIT_PREFIX.symbolName());
- final Block newBlock = new Block(lineNumber, token, finish, statements);
+ final Block newBlock = new Block(token, finish, statements);
- return new SplitNode(lineNumber, name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
+ return new SplitNode(name, newBlock, compiler.findUnit(weight + WeighNodes.FUNCTION_WEIGHT));
}
@Override
diff --git a/src/jdk/nashorn/internal/codegen/WeighNodes.java b/src/jdk/nashorn/internal/codegen/WeighNodes.java
index 1adef12b..57b3bafa 100644
--- a/src/jdk/nashorn/internal/codegen/WeighNodes.java
+++ b/src/jdk/nashorn/internal/codegen/WeighNodes.java
@@ -27,7 +27,6 @@ package jdk.nashorn.internal.codegen;
import java.util.List;
import java.util.Map;
-
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.AccessNode;
import jdk.nashorn.internal.ir.BinaryNode;
@@ -36,7 +35,7 @@ import jdk.nashorn.internal.ir.BreakNode;
import jdk.nashorn.internal.ir.CallNode;
import jdk.nashorn.internal.ir.CatchNode;
import jdk.nashorn.internal.ir.ContinueNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IdentNode;
@@ -158,8 +157,8 @@ final class WeighNodes extends NodeOperatorVisitor<LexicalContext> {
}
@Override
- public Node leaveExecuteNode(final ExecuteNode executeNode) {
- return executeNode;
+ public Node leaveExpressionStatement(final ExpressionStatement expressionStatement) {
+ return expressionStatement;
}
@Override
diff --git a/src/jdk/nashorn/internal/codegen/types/Type.java b/src/jdk/nashorn/internal/codegen/types/Type.java
index ab32a779..c1e8bfbb 100644
--- a/src/jdk/nashorn/internal/codegen/types/Type.java
+++ b/src/jdk/nashorn/internal/codegen/types/Type.java
@@ -47,9 +47,8 @@ import static jdk.internal.org.objectweb.asm.Opcodes.T_INT;
import static jdk.internal.org.objectweb.asm.Opcodes.T_LONG;
import java.lang.invoke.MethodHandle;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import jdk.internal.org.objectweb.asm.MethodVisitor;
import jdk.nashorn.internal.codegen.CompilerConstants.Call;
@@ -548,19 +547,19 @@ public abstract class Type implements Comparable<Type>, BytecodeOps {
* @return the Type representing this class
*/
public static Type typeFor(final Class<?> clazz) {
- Type type = cache.get(clazz);
-
- if (type == null) {
- assert !clazz.isPrimitive() || clazz == void.class;
- if (clazz.isArray()) {
- type = new ArrayType(clazz);
- } else {
- type = new ObjectType(clazz);
- }
- cache.put(clazz, type);
+ final Type type = cache.get(clazz);
+ if(type != null) {
+ return type;
+ }
+ assert !clazz.isPrimitive() || clazz == void.class;
+ final Type newType;
+ if (clazz.isArray()) {
+ newType = new ArrayType(clazz);
+ } else {
+ newType = new ObjectType(clazz);
}
-
- return type;
+ final Type existingType = cache.putIfAbsent(clazz, newType);
+ return existingType == null ? newType : existingType;
}
@Override
@@ -663,35 +662,38 @@ public abstract class Type implements Comparable<Type>, BytecodeOps {
}
}
+ /** Mappings between java classes and their Type singletons */
+ private static final ConcurrentMap<Class<?>, Type> cache = new ConcurrentHashMap<>();
+
/**
* This is the boolean singleton, used for all boolean types
*/
- public static final Type BOOLEAN = new BooleanType();
+ public static final Type BOOLEAN = putInCache(new BooleanType());
/**
* This is an integer type, i.e INT, INT32.
*/
- public static final Type INT = new IntType();
+ public static final Type INT = putInCache(new IntType());
/**
* This is the number singleton, used for all number types
*/
- public static final Type NUMBER = new NumberType();
+ public static final Type NUMBER = putInCache(new NumberType());
/**
* This is the long singleton, used for all long types
*/
- public static final Type LONG = new LongType();
+ public static final Type LONG = putInCache(new LongType());
/**
* A string singleton
*/
- public static final Type STRING = new ObjectType(String.class);
+ public static final Type STRING = putInCache(new ObjectType(String.class));
/**
* This is the object singleton, used for all object types
*/
- public static final Type OBJECT = new ObjectType();
+ public static final Type OBJECT = putInCache(new ObjectType());
/**
* This is the singleton for integer arrays
@@ -775,13 +777,13 @@ public abstract class Type implements Comparable<Type>, BytecodeOps {
};
/** Singleton for method handle arrays used for properties etc. */
- public static final ArrayType METHODHANDLE_ARRAY = new ArrayType(MethodHandle[].class);
+ public static final ArrayType METHODHANDLE_ARRAY = putInCache(new ArrayType(MethodHandle[].class));
/** This is the singleton for string arrays */
- public static final ArrayType STRING_ARRAY = new ArrayType(String[].class);
+ public static final ArrayType STRING_ARRAY = putInCache(new ArrayType(String[].class));
/** This is the singleton for object arrays */
- public static final ArrayType OBJECT_ARRAY = new ArrayType(Object[].class);
+ public static final ArrayType OBJECT_ARRAY = putInCache(new ArrayType(Object[].class));
/** This type, always an object type, just a toString override */
public static final Type THIS = new ObjectType() {
@@ -855,18 +857,8 @@ public abstract class Type implements Comparable<Type>, BytecodeOps {
}
};
- /** Mappings between java classes and their Type singletons */
- private static final Map<Class<?>, Type> cache = Collections.synchronizedMap(new HashMap<Class<?>, Type>());
-
- //TODO may need to be cleared, as all types are retained throughout code generation
- static {
- cache.put(BOOLEAN.getTypeClass(), BOOLEAN);
- cache.put(INT.getTypeClass(), INT);
- cache.put(LONG.getTypeClass(), LONG);
- cache.put(NUMBER.getTypeClass(), NUMBER);
- cache.put(STRING.getTypeClass(), STRING);
- cache.put(OBJECT.getTypeClass(), OBJECT);
- cache.put(OBJECT_ARRAY.getTypeClass(), OBJECT_ARRAY);
+ private static <T extends Type> T putInCache(T type) {
+ cache.put(type.getTypeClass(), type);
+ return type;
}
-
}
diff --git a/src/jdk/nashorn/internal/ir/AccessNode.java b/src/jdk/nashorn/internal/ir/AccessNode.java
index eecc5713..55b0aa3f 100644
--- a/src/jdk/nashorn/internal/ir/AccessNode.java
+++ b/src/jdk/nashorn/internal/ir/AccessNode.java
@@ -45,12 +45,12 @@ public final class AccessNode extends BaseNode {
* @param base base node
* @param property property
*/
- public AccessNode(final long token, final int finish, final Node base, final IdentNode property) {
+ public AccessNode(final long token, final int finish, final Expression base, final IdentNode property) {
super(token, finish, base, false, false);
this.property = property.setIsPropertyName();
}
- private AccessNode(final AccessNode accessNode, final Node base, final IdentNode property, final boolean isFunction, final boolean hasCallSiteType) {
+ private AccessNode(final AccessNode accessNode, final Expression base, final IdentNode property, final boolean isFunction, final boolean hasCallSiteType) {
super(accessNode, base, isFunction, hasCallSiteType);
this.property = property;
}
@@ -63,7 +63,7 @@ public final class AccessNode extends BaseNode {
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterAccessNode(this)) {
return visitor.leaveAccessNode(
- setBase(base.accept(visitor)).
+ setBase((Expression)base.accept(visitor)).
setProperty((IdentNode)property.accept(visitor)));
}
return this;
@@ -103,7 +103,7 @@ public final class AccessNode extends BaseNode {
return property;
}
- private AccessNode setBase(final Node base) {
+ private AccessNode setBase(final Expression base) {
if (this.base == base) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/Assignment.java b/src/jdk/nashorn/internal/ir/Assignment.java
index 0c531bc2..093b0d80 100644
--- a/src/jdk/nashorn/internal/ir/Assignment.java
+++ b/src/jdk/nashorn/internal/ir/Assignment.java
@@ -31,7 +31,7 @@ package jdk.nashorn.internal.ir;
*
* @param <D> the destination type
*/
-public interface Assignment<D extends Node> {
+public interface Assignment<D extends Expression> {
/**
* Get assignment destination
@@ -45,7 +45,7 @@ public interface Assignment<D extends Node> {
*
* @return get the assignment source node
*/
- public Node getAssignmentSource();
+ public Expression getAssignmentSource();
/**
* Set assignment destination node.
diff --git a/src/jdk/nashorn/internal/ir/BaseNode.java b/src/jdk/nashorn/internal/ir/BaseNode.java
index a1b7c0ee..f945ef35 100644
--- a/src/jdk/nashorn/internal/ir/BaseNode.java
+++ b/src/jdk/nashorn/internal/ir/BaseNode.java
@@ -26,6 +26,7 @@
package jdk.nashorn.internal.ir;
import static jdk.nashorn.internal.codegen.ObjectClassGenerator.DEBUG_FIELDS;
+
import jdk.nashorn.internal.codegen.ObjectClassGenerator;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.annotations.Immutable;
@@ -37,10 +38,10 @@ import jdk.nashorn.internal.ir.annotations.Immutable;
* @see IndexNode
*/
@Immutable
-public abstract class BaseNode extends Node implements FunctionCall, TypeOverride<BaseNode> {
+public abstract class BaseNode extends Expression implements FunctionCall, TypeOverride<BaseNode> {
/** Base Node. */
- protected final Node base;
+ protected final Expression base;
private final boolean isFunction;
@@ -55,7 +56,7 @@ public abstract class BaseNode extends Node implements FunctionCall, TypeOverrid
* @param isFunction is this a function
* @param hasCallSiteType does this access have a callsite type
*/
- public BaseNode(final long token, final int finish, final Node base, final boolean isFunction, final boolean hasCallSiteType) {
+ public BaseNode(final long token, final int finish, final Expression base, final boolean isFunction, final boolean hasCallSiteType) {
super(token, base.getStart(), finish);
this.base = base;
this.isFunction = isFunction;
@@ -69,7 +70,7 @@ public abstract class BaseNode extends Node implements FunctionCall, TypeOverrid
* @param isFunction is this a function
* @param hasCallSiteType does this access have a callsite type
*/
- protected BaseNode(final BaseNode baseNode, final Node base, final boolean isFunction, final boolean hasCallSiteType) {
+ protected BaseNode(final BaseNode baseNode, final Expression base, final boolean isFunction, final boolean hasCallSiteType) {
super(baseNode);
this.base = base;
this.isFunction = isFunction;
@@ -80,7 +81,7 @@ public abstract class BaseNode extends Node implements FunctionCall, TypeOverrid
* Get the base node for this access
* @return the base node
*/
- public Node getBase() {
+ public Expression getBase() {
return base;
}
diff --git a/src/jdk/nashorn/internal/ir/BinaryNode.java b/src/jdk/nashorn/internal/ir/BinaryNode.java
index 4afa1945..1576fb93 100644
--- a/src/jdk/nashorn/internal/ir/BinaryNode.java
+++ b/src/jdk/nashorn/internal/ir/BinaryNode.java
@@ -34,11 +34,11 @@ import jdk.nashorn.internal.parser.TokenType;
* BinaryNode nodes represent two operand operations.
*/
@Immutable
-public final class BinaryNode extends Node implements Assignment<Node> {
+public final class BinaryNode extends Expression implements Assignment<Expression> {
/** Left hand side argument. */
- private final Node lhs;
+ private final Expression lhs;
- private final Node rhs;
+ private final Expression rhs;
/**
* Constructor
@@ -47,13 +47,13 @@ public final class BinaryNode extends Node implements Assignment<Node> {
* @param lhs left hand side
* @param rhs right hand side
*/
- public BinaryNode(final long token, final Node lhs, final Node rhs) {
+ public BinaryNode(final long token, final Expression lhs, final Expression rhs) {
super(token, lhs.getStart(), rhs.getFinish());
this.lhs = lhs;
this.rhs = rhs;
}
- private BinaryNode(final BinaryNode binaryNode, final Node lhs, final Node rhs) {
+ private BinaryNode(final BinaryNode binaryNode, final Expression lhs, final Expression rhs) {
super(binaryNode);
this.lhs = lhs;
this.rhs = rhs;
@@ -141,17 +141,17 @@ public final class BinaryNode extends Node implements Assignment<Node> {
}
@Override
- public Node getAssignmentDest() {
+ public Expression getAssignmentDest() {
return isAssignment() ? lhs() : null;
}
@Override
- public Node setAssignmentDest(Node n) {
+ public BinaryNode setAssignmentDest(Expression n) {
return setLHS(n);
}
@Override
- public Node getAssignmentSource() {
+ public Expression getAssignmentSource() {
return rhs();
}
@@ -162,7 +162,7 @@ public final class BinaryNode extends Node implements Assignment<Node> {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterBinaryNode(this)) {
- return visitor.leaveBinaryNode(setLHS(lhs.accept(visitor)).setRHS(rhs.accept(visitor)));
+ return visitor.leaveBinaryNode(setLHS((Expression)lhs.accept(visitor)).setRHS((Expression)rhs.accept(visitor)));
}
return this;
@@ -218,7 +218,7 @@ public final class BinaryNode extends Node implements Assignment<Node> {
* Get the left hand side expression for this node
* @return the left hand side expression
*/
- public Node lhs() {
+ public Expression lhs() {
return lhs;
}
@@ -226,7 +226,7 @@ public final class BinaryNode extends Node implements Assignment<Node> {
* Get the right hand side expression for this node
* @return the left hand side expression
*/
- public Node rhs() {
+ public Expression rhs() {
return rhs;
}
@@ -235,7 +235,7 @@ public final class BinaryNode extends Node implements Assignment<Node> {
* @param lhs new left hand side expression
* @return a node equivalent to this one except for the requested change.
*/
- public BinaryNode setLHS(final Node lhs) {
+ public BinaryNode setLHS(final Expression lhs) {
if (this.lhs == lhs) {
return this;
}
@@ -247,7 +247,7 @@ public final class BinaryNode extends Node implements Assignment<Node> {
* @param rhs new left hand side expression
* @return a node equivalent to this one except for the requested change.
*/
- public BinaryNode setRHS(final Node rhs) {
+ public BinaryNode setRHS(final Expression rhs) {
if (this.rhs == rhs) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/Block.java b/src/jdk/nashorn/internal/ir/Block.java
index 71692144..c411401e 100644
--- a/src/jdk/nashorn/internal/ir/Block.java
+++ b/src/jdk/nashorn/internal/ir/Block.java
@@ -38,11 +38,10 @@ import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
/**
- * IR representation for a list of statements and functions. All provides the
- * basis for script body.
+ * IR representation for a list of statements.
*/
@Immutable
-public class Block extends BreakableNode implements Flags<Block> {
+public class Block extends Node implements BreakableNode, Flags<Block> {
/** List of statements */
protected final List<Statement> statements;
@@ -52,6 +51,9 @@ public class Block extends BreakableNode implements Flags<Block> {
/** Entry label. */
protected final Label entryLabel;
+ /** Break label. */
+ private final Label breakLabel;
+
/** Does the block/function need a new scope? */
protected final int flags;
@@ -76,17 +78,17 @@ public class Block extends BreakableNode implements Flags<Block> {
/**
* Constructor
*
- * @param lineNumber line number
* @param token token
* @param finish finish
* @param statements statements
*/
- public Block(final int lineNumber, final long token, final int finish, final Statement... statements) {
- super(lineNumber, token, finish, new Label("block_break"));
+ public Block(final long token, final int finish, final Statement... statements) {
+ super(token, finish);
this.statements = Arrays.asList(statements);
this.symbols = new LinkedHashMap<>();
this.entryLabel = new Label("block_entry");
+ this.breakLabel = new Label("block_break");
this.flags = 0;
}
@@ -98,8 +100,8 @@ public class Block extends BreakableNode implements Flags<Block> {
* @param finish finish
* @param statements statements
*/
- public Block(final int lineNumber, final long token, final int finish, final List<Statement> statements) {
- this(lineNumber, token, finish, statements.toArray(new Statement[statements.size()]));
+ public Block(final long token, final int finish, final List<Statement> statements) {
+ this(token, finish, statements.toArray(new Statement[statements.size()]));
}
private Block(final Block block, final int finish, final List<Statement> statements, final int flags, final Map<String, Symbol> symbols) {
@@ -108,6 +110,7 @@ public class Block extends BreakableNode implements Flags<Block> {
this.flags = flags;
this.symbols = new LinkedHashMap<>(symbols); //todo - symbols have no dependencies on any IR node and can as far as we understand it be shallow copied now
this.entryLabel = new Label(block.entryLabel);
+ this.breakLabel = new Label(block.breakLabel);
this.finish = finish;
}
@@ -223,6 +226,11 @@ public class Block extends BreakableNode implements Flags<Block> {
return entryLabel;
}
+ @Override
+ public Label getBreakLabel() {
+ return breakLabel;
+ }
+
/**
* Get the list of statements in this block
*
@@ -322,7 +330,17 @@ public class Block extends BreakableNode implements Flags<Block> {
}
@Override
- protected boolean isBreakableWithoutLabel() {
+ public boolean isBreakableWithoutLabel() {
return false;
}
+
+ @Override
+ public List<Label> getLabels() {
+ return Collections.singletonList(breakLabel);
+ }
+
+ @Override
+ public Node accept(NodeVisitor<? extends LexicalContext> visitor) {
+ return Acceptor.accept(this, visitor);
+ }
}
diff --git a/src/jdk/nashorn/internal/ir/BlockLexicalContext.java b/src/jdk/nashorn/internal/ir/BlockLexicalContext.java
index 71c80a6b..8fecddd0 100644
--- a/src/jdk/nashorn/internal/ir/BlockLexicalContext.java
+++ b/src/jdk/nashorn/internal/ir/BlockLexicalContext.java
@@ -29,7 +29,6 @@ import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
-import java.util.ListIterator;
/**
* This is a subclass of lexical context used for filling
@@ -63,6 +62,16 @@ public class BlockLexicalContext extends LexicalContext {
return sstack.pop();
}
+ /**
+ * Override this method to perform some additional processing on the block after its statements have been set. By
+ * default does nothing and returns the original block.
+ * @param block the block to operate on
+ * @return a modified block.
+ */
+ protected Block afterSetStatements(Block block) {
+ return block;
+ }
+
@SuppressWarnings("unchecked")
@Override
public <T extends LexicalContextNode> T pop(final T node) {
@@ -70,6 +79,7 @@ public class BlockLexicalContext extends LexicalContext {
if (node instanceof Block) {
final List<Statement> newStatements = popStatements();
expected = (T)((Block)node).setStatements(this, newStatements);
+ expected = (T)afterSetStatements((Block)expected);
if (!sstack.isEmpty()) {
lastStatement = lastStatement(sstack.peek());
}
@@ -107,10 +117,7 @@ public class BlockLexicalContext extends LexicalContext {
}
private static Statement lastStatement(final List<Statement> statements) {
- for (final ListIterator<Statement> iter = statements.listIterator(statements.size()); iter.hasPrevious(); ) {
- final Statement node = iter.previous();
- return node;
- }
- return null;
+ final int s = statements.size();
+ return s == 0 ? null : statements.get(s - 1);
}
}
diff --git a/src/jdk/nashorn/internal/ir/BlockStatement.java b/src/jdk/nashorn/internal/ir/BlockStatement.java
new file mode 100644
index 00000000..e790cf49
--- /dev/null
+++ b/src/jdk/nashorn/internal/ir/BlockStatement.java
@@ -0,0 +1,115 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.ir;
+
+import java.util.List;
+import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+
+/**
+ * Represents a block used as a statement.
+ */
+public class BlockStatement extends Statement {
+ /** Block to execute. */
+ private final Block block;
+
+ /**
+ * Constructor
+ *
+ * @param lineNumber line number
+ * @param block the block to execute
+ */
+ public BlockStatement(final int lineNumber, final Block block) {
+ super(lineNumber, block.getToken(), block.getFinish());
+ this.block = block;
+ }
+
+ private BlockStatement(final BlockStatement blockStatement, final Block block) {
+ super(blockStatement);
+ this.block = block;
+ }
+
+ /**
+ * Use this method to create a block statement meant to replace a single statement.
+ * @param stmt the statement to replace
+ * @param newStmts the statements for the new block statement
+ * @return a block statement with the new statements. It will have the line number, token, and finish of the
+ * original statement.
+ */
+ public static Statement createReplacement(final Statement stmt, final List<Statement> newStmts) {
+ return createReplacement(stmt, stmt.getFinish(), newStmts);
+ }
+
+ /**
+ * Use this method to create a block statement meant to replace a single statement.
+ * @param stmt the statement to replace
+ * @param finish the new finish for the block
+ * @param newStmts the statements for the new block statement
+ * @return a block statement with the new statements. It will have the line number, and token of the
+ * original statement.
+ */
+ public static Statement createReplacement(final Statement stmt, int finish, final List<Statement> newStmts) {
+ return new BlockStatement(stmt.getLineNumber(), new Block(stmt.getToken(), finish, newStmts));
+ }
+
+ @Override
+ public boolean isTerminal() {
+ return block.isTerminal();
+ }
+
+ @Override
+ public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
+ if (visitor.enterBlockStatement(this)) {
+ return visitor.leaveBlockStatement(setBlock((Block)block.accept(visitor)));
+ }
+
+ return this;
+ }
+
+ @Override
+ public void toString(final StringBuilder sb) {
+ block.toString(sb);
+ }
+
+ /**
+ * Return the block to be executed
+ * @return the block
+ */
+ public Block getBlock() {
+ return block;
+ }
+
+ /**
+ * Reset the block to be executed
+ * @param block the block
+ * @return new or same execute node
+ */
+ public BlockStatement setBlock(final Block block) {
+ if (this.block == block) {
+ return this;
+ }
+ return new BlockStatement(this, block);
+ }
+}
diff --git a/src/jdk/nashorn/internal/ir/BreakableNode.java b/src/jdk/nashorn/internal/ir/BreakableNode.java
index 171df8e3..61528de2 100644
--- a/src/jdk/nashorn/internal/ir/BreakableNode.java
+++ b/src/jdk/nashorn/internal/ir/BreakableNode.java
@@ -25,46 +25,14 @@
package jdk.nashorn.internal.ir;
-import java.util.Arrays;
import java.util.List;
-
import jdk.nashorn.internal.codegen.Label;
-import jdk.nashorn.internal.ir.annotations.Immutable;
/**
* This class represents a node from which control flow can execute
* a {@code break} statement
*/
-@Immutable
-public abstract class BreakableNode extends LexicalContextNode {
-
- /** break label. */
- protected final Label breakLabel;
-
- /**
- * Constructor
- *
- * @param lineNumber line number
- * @param token token
- * @param finish finish
- * @param breakLabel break label
- */
- protected BreakableNode(final int lineNumber, final long token, final int finish, final Label breakLabel) {
- super(lineNumber, token, finish);
- this.breakLabel = breakLabel;
- }
-
- /**
- * Copy constructor
- *
- * @param breakableNode source node
- */
- protected BreakableNode(final BreakableNode breakableNode) {
- super(breakableNode);
- this.breakLabel = new Label(breakableNode.getBreakLabel());
- }
-
- @Override
+public interface BreakableNode extends LexicalContextNode {
public abstract Node ensureUniqueLabels(final LexicalContext lc);
/**
@@ -72,17 +40,13 @@ public abstract class BreakableNode extends LexicalContextNode {
* e.g. everything but Blocks, basically
* @return true if breakable without label
*/
- protected boolean isBreakableWithoutLabel() {
- return true;
- }
+ public boolean isBreakableWithoutLabel();
/**
* Return the break label, i.e. the location to go to on break.
* @return the break label
*/
- public Label getBreakLabel() {
- return breakLabel;
- }
+ public Label getBreakLabel();
/**
* Return the labels associated with this node. Breakable nodes that
@@ -90,8 +54,5 @@ public abstract class BreakableNode extends LexicalContextNode {
* afterwards the node in code
* @return list of labels representing locations around this node
*/
- public List<Label> getLabels() {
- return Arrays.asList(breakLabel);
- }
-
+ public List<Label> getLabels();
}
diff --git a/src/jdk/nashorn/internal/ir/BreakableStatement.java b/src/jdk/nashorn/internal/ir/BreakableStatement.java
new file mode 100644
index 00000000..fa74454e
--- /dev/null
+++ b/src/jdk/nashorn/internal/ir/BreakableStatement.java
@@ -0,0 +1,91 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.ir;
+
+import java.util.Collections;
+import java.util.List;
+import jdk.nashorn.internal.codegen.Label;
+import jdk.nashorn.internal.ir.annotations.Immutable;
+
+@Immutable
+abstract class BreakableStatement extends LexicalContextStatement implements BreakableNode {
+
+ /** break label. */
+ protected final Label breakLabel;
+
+ /**
+ * Constructor
+ *
+ * @param lineNumber line number
+ * @param token token
+ * @param finish finish
+ * @param breakLabel break label
+ */
+ protected BreakableStatement(final int lineNumber, final long token, final int finish, final Label breakLabel) {
+ super(lineNumber, token, finish);
+ this.breakLabel = breakLabel;
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param breakableNode source node
+ */
+ protected BreakableStatement(final BreakableStatement breakableNode) {
+ super(breakableNode);
+ this.breakLabel = new Label(breakableNode.getBreakLabel());
+ }
+
+ /**
+ * Check whether this can be broken out from without using a label,
+ * e.g. everything but Blocks, basically
+ * @return true if breakable without label
+ */
+ @Override
+ public boolean isBreakableWithoutLabel() {
+ return true;
+ }
+
+ /**
+ * Return the break label, i.e. the location to go to on break.
+ * @return the break label
+ */
+ @Override
+ public Label getBreakLabel() {
+ return breakLabel;
+ }
+
+ /**
+ * Return the labels associated with this node. Breakable nodes that
+ * aren't LoopNodes only have a break label - the location immediately
+ * afterwards the node in code
+ * @return list of labels representing locations around this node
+ */
+ @Override
+ public List<Label> getLabels() {
+ return Collections.singletonList(breakLabel);
+ }
+}
diff --git a/src/jdk/nashorn/internal/ir/CallNode.java b/src/jdk/nashorn/internal/ir/CallNode.java
index 7180d9ce..ffaae078 100644
--- a/src/jdk/nashorn/internal/ir/CallNode.java
+++ b/src/jdk/nashorn/internal/ir/CallNode.java
@@ -27,7 +27,6 @@ package jdk.nashorn.internal.ir;
import java.util.Collections;
import java.util.List;
-
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.annotations.Ignore;
import jdk.nashorn.internal.ir.annotations.Immutable;
@@ -37,27 +36,29 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* IR representation for a function call.
*/
@Immutable
-public final class CallNode extends LexicalContextNode implements TypeOverride<CallNode> {
+public final class CallNode extends LexicalContextExpression implements TypeOverride<CallNode> {
private final Type type;
/** Function identifier or function body. */
- private final Node function;
+ private final Expression function;
/** Call arguments. */
- private final List<Node> args;
+ private final List<Expression> args;
/** Is this a "new" operation */
public static final int IS_NEW = 0x1;
private final int flags;
+ private final int lineNumber;
+
/**
* Arguments to be passed to builtin {@code eval} function
*/
public static class EvalArgs {
/** evaluated code */
- private final Node code;
+ private final Expression code;
/** 'this' passed to evaluated code */
private final IdentNode evalThis;
@@ -76,7 +77,7 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* @param location location for the eval call
* @param strictMode is this a call from a strict context?
*/
- public EvalArgs(final Node code, final IdentNode evalThis, final String location, final boolean strictMode) {
+ public EvalArgs(final Expression code, final IdentNode evalThis, final String location, final boolean strictMode) {
this.code = code;
this.evalThis = evalThis;
this.location = location;
@@ -87,11 +88,11 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* Return the code that is to be eval:ed by this eval function
* @return code as an AST node
*/
- public Node getCode() {
+ public Expression getCode() {
return code;
}
- private EvalArgs setCode(final Node code) {
+ private EvalArgs setCode(final Expression code) {
if (this.code == code) {
return this;
}
@@ -143,18 +144,20 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* @param function the function to call
* @param args args to the call
*/
- public CallNode(final int lineNumber, final long token, final int finish, final Node function, final List<Node> args) {
- super(lineNumber, token, finish);
-
- this.function = function;
- this.args = args;
- this.flags = 0;
- this.type = null;
- this.evalArgs = null;
+ public CallNode(final int lineNumber, final long token, final int finish, final Expression function, final List<Expression> args) {
+ super(token, finish);
+
+ this.function = function;
+ this.args = args;
+ this.flags = 0;
+ this.type = null;
+ this.evalArgs = null;
+ this.lineNumber = lineNumber;
}
- private CallNode(final CallNode callNode, final Node function, final List<Node> args, final int flags, final Type type, final EvalArgs evalArgs) {
+ private CallNode(final CallNode callNode, final Expression function, final List<Expression> args, final int flags, final Type type, final EvalArgs evalArgs) {
super(callNode);
+ this.lineNumber = callNode.lineNumber;
this.function = function;
this.args = args;
this.flags = flags;
@@ -162,6 +165,14 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
this.evalArgs = evalArgs;
}
+ /**
+ * Returns the line number.
+ * @return the line number.
+ */
+ public int getLineNumber() {
+ return lineNumber;
+ }
+
@Override
public Type getType() {
if (hasCallSiteType()) {
@@ -198,13 +209,13 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterCallNode(this)) {
final CallNode newCallNode = (CallNode)visitor.leaveCallNode(
- setFunction(function.accept(visitor)).
- setArgs(Node.accept(visitor, Node.class, args)).
+ setFunction((Expression)function.accept(visitor)).
+ setArgs(Node.accept(visitor, Expression.class, args)).
setFlags(flags).
setType(null, lc, type).
setEvalArgs(evalArgs == null ?
null :
- evalArgs.setCode(evalArgs.getCode().accept(visitor)).
+ evalArgs.setCode((Expression)evalArgs.getCode().accept(visitor)).
setThis((IdentNode)evalArgs.getThis().accept(visitor))));
// Theoretically, we'd need to instead pass lc to every setter and do a replacement on each. In practice,
// setType from TypeOverride can't accept a lc, and we don't necessarily want to go there now.
@@ -248,7 +259,7 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* Get the arguments for the call
* @return a list of arguments
*/
- public List<Node> getArgs() {
+ public List<Expression> getArgs() {
return Collections.unmodifiableList(args);
}
@@ -256,7 +267,7 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* Reset the arguments for the call
* @param args new arguments list
*/
- private CallNode setArgs(final List<Node> args) {
+ private CallNode setArgs(final List<Expression> args) {
if (this.args == args) {
return this;
}
@@ -297,7 +308,7 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* Return the function expression that this call invokes
* @return the function
*/
- public Node getFunction() {
+ public Expression getFunction() {
return function;
}
@@ -306,7 +317,7 @@ public final class CallNode extends LexicalContextNode implements TypeOverride<C
* @param function the function
* @return same node or new one on state change
*/
- public CallNode setFunction(final Node function) {
+ public CallNode setFunction(final Expression function) {
if (this.function == function) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/CaseNode.java b/src/jdk/nashorn/internal/ir/CaseNode.java
index aae370f3..c809058a 100644
--- a/src/jdk/nashorn/internal/ir/CaseNode.java
+++ b/src/jdk/nashorn/internal/ir/CaseNode.java
@@ -36,7 +36,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@Immutable
public final class CaseNode extends Node {
/** Test expression. */
- private final Node test;
+ private final Expression test;
/** Statements. */
private final Block body;
@@ -52,7 +52,7 @@ public final class CaseNode extends Node {
* @param test case test node, can be any node in JavaScript
* @param body case body
*/
- public CaseNode(final long token, final int finish, final Node test, final Block body) {
+ public CaseNode(final long token, final int finish, final Expression test, final Block body) {
super(token, finish);
this.test = test;
@@ -60,7 +60,7 @@ public final class CaseNode extends Node {
this.entry = new Label("entry");
}
- CaseNode(final CaseNode caseNode, final Node test, final Block body) {
+ CaseNode(final CaseNode caseNode, final Expression test, final Block body) {
super(caseNode);
this.test = test;
@@ -80,7 +80,7 @@ public final class CaseNode extends Node {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterCaseNode(this)) {
- final Node newTest = test == null ? null : test.accept(visitor);
+ final Expression newTest = test == null ? null : (Expression)test.accept(visitor);
final Block newBody = body == null ? null : (Block)body.accept(visitor);
return visitor.leaveCaseNode(setTest(newTest).setBody(newBody));
@@ -120,7 +120,7 @@ public final class CaseNode extends Node {
* Get the test expression for this case node
* @return the test
*/
- public Node getTest() {
+ public Expression getTest() {
return test;
}
@@ -129,7 +129,7 @@ public final class CaseNode extends Node {
* @param test new test expression
* @return new or same CaseNode
*/
- public CaseNode setTest(final Node test) {
+ public CaseNode setTest(final Expression test) {
if (this.test == test) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/CatchNode.java b/src/jdk/nashorn/internal/ir/CatchNode.java
index f3818148..ba640a52 100644
--- a/src/jdk/nashorn/internal/ir/CatchNode.java
+++ b/src/jdk/nashorn/internal/ir/CatchNode.java
@@ -37,7 +37,7 @@ public final class CatchNode extends Statement {
private final IdentNode exception;
/** Exception condition. */
- private final Node exceptionCondition;
+ private final Expression exceptionCondition;
/** Catch body. */
private final Block body;
@@ -58,7 +58,7 @@ public final class CatchNode extends Statement {
* @param body catch body
* @param flags flags
*/
- public CatchNode(final int lineNumber, final long token, final int finish, final IdentNode exception, final Node exceptionCondition, final Block body, final int flags) {
+ public CatchNode(final int lineNumber, final long token, final int finish, final IdentNode exception, final Expression exceptionCondition, final Block body, final int flags) {
super(lineNumber, token, finish);
this.exception = exception;
this.exceptionCondition = exceptionCondition;
@@ -66,7 +66,7 @@ public final class CatchNode extends Statement {
this.flags = flags;
}
- private CatchNode(final CatchNode catchNode, final IdentNode exception, final Node exceptionCondition, final Block body, final int flags) {
+ private CatchNode(final CatchNode catchNode, final IdentNode exception, final Expression exceptionCondition, final Block body, final int flags) {
super(catchNode);
this.exception = exception;
this.exceptionCondition = exceptionCondition;
@@ -83,7 +83,7 @@ public final class CatchNode extends Statement {
if (visitor.enterCatchNode(this)) {
return visitor.leaveCatchNode(
setException((IdentNode)exception.accept(visitor)).
- setExceptionCondition(exceptionCondition == null ? null : exceptionCondition.accept(visitor)).
+ setExceptionCondition(exceptionCondition == null ? null : (Expression)exceptionCondition.accept(visitor)).
setBody((Block)body.accept(visitor)));
}
@@ -119,7 +119,7 @@ public final class CatchNode extends Statement {
* Get the exception condition for this catch block
* @return the exception condition
*/
- public Node getExceptionCondition() {
+ public Expression getExceptionCondition() {
return exceptionCondition;
}
@@ -128,7 +128,7 @@ public final class CatchNode extends Statement {
* @param exceptionCondition the new exception condition
* @return new or same CatchNode
*/
- public CatchNode setExceptionCondition(final Node exceptionCondition) {
+ public CatchNode setExceptionCondition(final Expression exceptionCondition) {
if (this.exceptionCondition == exceptionCondition) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/Expression.java b/src/jdk/nashorn/internal/ir/Expression.java
new file mode 100644
index 00000000..9006fa8d
--- /dev/null
+++ b/src/jdk/nashorn/internal/ir/Expression.java
@@ -0,0 +1,99 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.ir;
+
+import jdk.nashorn.internal.codegen.types.Type;
+
+/**
+ * Common superclass for all expression nodes. Expression nodes can have
+ * an associated symbol as well as a type.
+ *
+ */
+public abstract class Expression extends Node {
+ private Symbol symbol;
+
+ Expression(long token, int start, int finish) {
+ super(token, start, finish);
+ }
+
+ Expression(long token, int finish) {
+ super(token, finish);
+ }
+
+ Expression(Expression expr) {
+ super(expr);
+ this.symbol = expr.symbol;
+ }
+
+ /**
+ * Return the Symbol the compiler has assigned to this Node. The symbol
+ * is the place where it's expression value is stored after evaluation
+ *
+ * @return the symbol
+ */
+ public Symbol getSymbol() {
+ return symbol;
+ }
+
+ /**
+ * Assign a symbol to this node. See {@link Expression#getSymbol()} for explanation
+ * of what a symbol is
+ *
+ * @param lc lexical context
+ * @param symbol the symbol
+ * @return new node
+ */
+ public Expression setSymbol(final LexicalContext lc, final Symbol symbol) {
+ if (this.symbol == symbol) {
+ return this;
+ }
+ final Expression newExpr = (Expression)clone();
+ newExpr.symbol = symbol;
+ return newExpr;
+ }
+
+ /**
+ * Check if the expression has a type. The default behavior is to go into the symbol
+ * and check the symbol type, but there may be overrides, for example in
+ * getters that require a different type than the internal representation
+ *
+ * @return true if a type exists
+ */
+ public boolean hasType() {
+ return getSymbol() != null;
+ }
+
+ /**
+ * Returns the type of the expression. Typically this is the symbol type. No types
+ * are stored in the expression itself, unless it implements TypeOverride.
+ *
+ * @return the type of the node.
+ */
+ public Type getType() {
+ assert hasType() : this + " has no type";
+ return symbol.getSymbolType();
+ }
+}
diff --git a/src/jdk/nashorn/internal/ir/ExecuteNode.java b/src/jdk/nashorn/internal/ir/ExpressionStatement.java
index c696202b..8b118a2b 100644
--- a/src/jdk/nashorn/internal/ir/ExecuteNode.java
+++ b/src/jdk/nashorn/internal/ir/ExpressionStatement.java
@@ -34,9 +34,9 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* statements being added to the IR
*/
@Immutable
-public final class ExecuteNode extends Statement {
+public final class ExpressionStatement extends Statement {
/** Expression to execute. */
- private final Node expression;
+ private final Expression expression;
/**
* Constructor
@@ -46,13 +46,13 @@ public final class ExecuteNode extends Statement {
* @param finish finish
* @param expression the expression to execute
*/
- public ExecuteNode(final int lineNumber, final long token, final int finish, final Node expression) {
+ public ExpressionStatement(final int lineNumber, final long token, final int finish, final Expression expression) {
super(lineNumber, token, finish);
this.expression = expression;
}
- private ExecuteNode(final ExecuteNode executeNode, final Node expression) {
- super(executeNode);
+ private ExpressionStatement(final ExpressionStatement expressionStatement, final Expression expression) {
+ super(expressionStatement);
this.expression = expression;
}
@@ -63,8 +63,8 @@ public final class ExecuteNode extends Statement {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
- if (visitor.enterExecuteNode(this)) {
- return visitor.leaveExecuteNode(setExpression(expression.accept(visitor)));
+ if (visitor.enterExpressionStatement(this)) {
+ return visitor.leaveExpressionStatement(setExpression((Expression)expression.accept(visitor)));
}
return this;
@@ -79,7 +79,7 @@ public final class ExecuteNode extends Statement {
* Return the expression to be executed
* @return the expression
*/
- public Node getExpression() {
+ public Expression getExpression() {
return expression;
}
@@ -88,10 +88,10 @@ public final class ExecuteNode extends Statement {
* @param expression the expression
* @return new or same execute node
*/
- public ExecuteNode setExpression(final Node expression) {
+ public ExpressionStatement setExpression(final Expression expression) {
if (this.expression == expression) {
return this;
}
- return new ExecuteNode(this, expression);
+ return new ExpressionStatement(this, expression);
}
}
diff --git a/src/jdk/nashorn/internal/ir/ForNode.java b/src/jdk/nashorn/internal/ir/ForNode.java
index bad38c6a..8130e23b 100644
--- a/src/jdk/nashorn/internal/ir/ForNode.java
+++ b/src/jdk/nashorn/internal/ir/ForNode.java
@@ -34,10 +34,10 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@Immutable
public final class ForNode extends LoopNode {
/** Initialize expression. */
- private final Node init;
+ private final Expression init;
/** Test expression. */
- private final Node modify;
+ private final Expression modify;
/** Iterator symbol. */
private Symbol iterator;
@@ -65,14 +65,14 @@ public final class ForNode extends LoopNode {
* @param modify modify
* @param flags flags
*/
- public ForNode(final int lineNumber, final long token, final int finish, final Node init, final Node test, final Block body, final Node modify, final int flags) {
+ public ForNode(final int lineNumber, final long token, final int finish, final Expression init, final Expression test, final Block body, final Expression modify, final int flags) {
super(lineNumber, token, finish, test, body, false);
this.init = init;
this.modify = modify;
this.flags = flags;
}
- private ForNode(final ForNode forNode, final Node init, final Node test, final Block body, final Node modify, final int flags, final boolean controlFlowEscapes) {
+ private ForNode(final ForNode forNode, final Expression init, final Expression test, final Block body, final Expression modify, final int flags, final boolean controlFlowEscapes) {
super(forNode, test, body, controlFlowEscapes);
this.init = init;
this.modify = modify;
@@ -86,12 +86,12 @@ public final class ForNode extends LoopNode {
}
@Override
- protected Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
+ public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterForNode(this)) {
return visitor.leaveForNode(
- setInit(lc, init == null ? null : init.accept(visitor)).
- setTest(lc, test == null ? null : test.accept(visitor)).
- setModify(lc, modify == null ? null : modify.accept(visitor)).
+ setInit(lc, init == null ? null : (Expression)init.accept(visitor)).
+ setTest(lc, test == null ? null : (Expression)test.accept(visitor)).
+ setModify(lc, modify == null ? null : (Expression)modify.accept(visitor)).
setBody(lc, (Block)body.accept(visitor)));
}
@@ -140,7 +140,7 @@ public final class ForNode extends LoopNode {
* Get the initialization expression for this for loop
* @return the initialization expression
*/
- public Node getInit() {
+ public Expression getInit() {
return init;
}
@@ -150,7 +150,7 @@ public final class ForNode extends LoopNode {
* @param init new initialization expression
* @return new for node if changed or existing if not
*/
- public ForNode setInit(final LexicalContext lc, final Node init) {
+ public ForNode setInit(final LexicalContext lc, final Expression init) {
if (this.init == init) {
return this;
}
@@ -212,7 +212,7 @@ public final class ForNode extends LoopNode {
* Get the modification expression for this ForNode
* @return the modification expression
*/
- public Node getModify() {
+ public Expression getModify() {
return modify;
}
@@ -222,7 +222,7 @@ public final class ForNode extends LoopNode {
* @param modify new modification expression
* @return new for node if changed or existing if not
*/
- public ForNode setModify(final LexicalContext lc, final Node modify) {
+ public ForNode setModify(final LexicalContext lc, final Expression modify) {
if (this.modify == modify) {
return this;
}
@@ -230,12 +230,12 @@ public final class ForNode extends LoopNode {
}
@Override
- public Node getTest() {
+ public Expression getTest() {
return test;
}
@Override
- public ForNode setTest(final LexicalContext lc, final Node test) {
+ public ForNode setTest(final LexicalContext lc, final Expression test) {
if (this.test == test) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/FunctionNode.java b/src/jdk/nashorn/internal/ir/FunctionNode.java
index 3640db30..311a7f91 100644
--- a/src/jdk/nashorn/internal/ir/FunctionNode.java
+++ b/src/jdk/nashorn/internal/ir/FunctionNode.java
@@ -47,7 +47,7 @@ import jdk.nashorn.internal.runtime.linker.LinkerCallSite;
* IR representation for function (or script.)
*/
@Immutable
-public final class FunctionNode extends LexicalContextNode implements Flags<FunctionNode> {
+public final class FunctionNode extends LexicalContextExpression implements Flags<FunctionNode> {
/** Type used for all FunctionNodes */
public static final Type FUNCTION_TYPE = Type.typeFor(ScriptFunction.class);
@@ -131,9 +131,15 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
@Ignore
private final Compiler.Hints hints;
+ /** Properties of this object assigned in this function */
+ @Ignore
+ private HashSet<String> thisProperties;
+
/** Function flags. */
private final int flags;
+ private final int lineNumber;
+
/** Is anonymous function flag. */
public static final int IS_ANONYMOUS = 1 << 0;
@@ -156,6 +162,10 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
/** Does a nested function contain eval? If it does, then all variables in this function might be get/set by it. */
public static final int HAS_NESTED_EVAL = 1 << 6;
+ /** Does this function have any blocks that create a scope? This is used to determine if the function needs to
+ * have a local variable slot for the scope symbol. */
+ public static final int HAS_SCOPE_BLOCK = 1 << 7;
+
/**
* Flag this function as one that defines the identifier "arguments" as a function parameter or nested function
* name. This precludes it from needing to have an Arguments object defined as "arguments" local variable. Note that
@@ -226,9 +236,10 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
final List<IdentNode> parameters,
final FunctionNode.Kind kind,
final int flags) {
- super(lineNumber, token, finish);
+ super(token, finish);
this.source = source;
+ this.lineNumber = lineNumber;
this.ident = ident;
this.name = name;
this.kind = kind;
@@ -258,7 +269,7 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
final FunctionNode snapshot,
final Compiler.Hints hints) {
super(functionNode);
-
+ this.lineNumber = functionNode.lineNumber;
this.flags = flags;
this.name = name;
this.returnType = returnType;
@@ -277,6 +288,7 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
this.declaredSymbols = functionNode.declaredSymbols;
this.kind = functionNode.kind;
this.firstToken = functionNode.firstToken;
+ this.thisProperties = functionNode.thisProperties;
}
@Override
@@ -296,6 +308,14 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
}
/**
+ * Returns the line number.
+ * @return the line number.
+ */
+ public int getLineNumber() {
+ return lineNumber;
+ }
+
+ /**
* Get the version of this function node's code as it looked upon construction
* i.e typically parsed and nothing else
* @return initial version of function node
@@ -572,7 +592,7 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
if(this.body == body) {
return this;
}
- return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints));
+ return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags | (body.needsScope() ? FunctionNode.HAS_SCOPE_BLOCK : 0), name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints));
}
/**
@@ -614,6 +634,33 @@ public final class FunctionNode extends LexicalContextNode implements Flags<Func
}
/**
+ * Register a property assigned to the this object in this function.
+ * @param key the property name
+ */
+ public void addThisProperty(final String key) {
+ if (thisProperties == null) {
+ thisProperties = new HashSet<>();
+ }
+ thisProperties.add(key);
+ }
+
+ /**
+ * Get the number of properties assigned to the this object in this function.
+ * @return number of properties
+ */
+ public int countThisProperties() {
+ return thisProperties == null ? 0 : thisProperties.size();
+ }
+
+ /**
+ * Returns true if any of the blocks in this function create their own scope.
+ * @return true if any of the blocks in this function create their own scope.
+ */
+ public boolean hasScopeBlock() {
+ return getFlag(HAS_SCOPE_BLOCK);
+ }
+
+ /**
* Return the kind of this function
* @see FunctionNode.Kind
* @return the kind
diff --git a/src/jdk/nashorn/internal/ir/IdentNode.java b/src/jdk/nashorn/internal/ir/IdentNode.java
index de197c3c..14d1304d 100644
--- a/src/jdk/nashorn/internal/ir/IdentNode.java
+++ b/src/jdk/nashorn/internal/ir/IdentNode.java
@@ -29,6 +29,7 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.__DIR__;
import static jdk.nashorn.internal.codegen.CompilerConstants.__FILE__;
import static jdk.nashorn.internal.codegen.CompilerConstants.__LINE__;
import static jdk.nashorn.internal.codegen.ObjectClassGenerator.DEBUG_FIELDS;
+
import jdk.nashorn.internal.codegen.ObjectClassGenerator;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.annotations.Immutable;
@@ -38,7 +39,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* IR representation for an identifier.
*/
@Immutable
-public final class IdentNode extends Node implements PropertyKey, TypeOverride<IdentNode>, FunctionCall {
+public final class IdentNode extends Expression implements PropertyKey, TypeOverride<IdentNode>, FunctionCall {
private static final int PROPERTY_NAME = 1 << 0;
private static final int INITIALIZED_HERE = 1 << 1;
private static final int FUNCTION = 1 << 2;
diff --git a/src/jdk/nashorn/internal/ir/IfNode.java b/src/jdk/nashorn/internal/ir/IfNode.java
index 1b606cb0..64e70d87 100644
--- a/src/jdk/nashorn/internal/ir/IfNode.java
+++ b/src/jdk/nashorn/internal/ir/IfNode.java
@@ -34,7 +34,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@Immutable
public final class IfNode extends Statement {
/** Test expression. */
- private final Node test;
+ private final Expression test;
/** Pass statements. */
private final Block pass;
@@ -52,14 +52,14 @@ public final class IfNode extends Statement {
* @param pass block to execute when test passes
* @param fail block to execute when test fails or null
*/
- public IfNode(final int lineNumber, final long token, final int finish, final Node test, final Block pass, final Block fail) {
+ public IfNode(final int lineNumber, final long token, final int finish, final Expression test, final Block pass, final Block fail) {
super(lineNumber, token, finish);
this.test = test;
this.pass = pass;
this.fail = fail;
}
- private IfNode(final IfNode ifNode, final Node test, final Block pass, final Block fail) {
+ private IfNode(final IfNode ifNode, final Expression test, final Block pass, final Block fail) {
super(ifNode);
this.test = test;
this.pass = pass;
@@ -75,7 +75,7 @@ public final class IfNode extends Statement {
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterIfNode(this)) {
return visitor.leaveIfNode(
- setTest(test.accept(visitor)).
+ setTest((Expression)test.accept(visitor)).
setPass((Block)pass.accept(visitor)).
setFail(fail == null ? null : (Block)fail.accept(visitor)));
}
@@ -124,7 +124,7 @@ public final class IfNode extends Statement {
* Get the test expression for this IfNode
* @return the test expression
*/
- public Node getTest() {
+ public Expression getTest() {
return test;
}
@@ -133,7 +133,7 @@ public final class IfNode extends Statement {
* @param test a new test expression
* @return new or same IfNode
*/
- public IfNode setTest(final Node test) {
+ public IfNode setTest(final Expression test) {
if (this.test == test) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/IndexNode.java b/src/jdk/nashorn/internal/ir/IndexNode.java
index 0a9b7db2..2799e9be 100644
--- a/src/jdk/nashorn/internal/ir/IndexNode.java
+++ b/src/jdk/nashorn/internal/ir/IndexNode.java
@@ -35,7 +35,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@Immutable
public final class IndexNode extends BaseNode {
/** Property index. */
- private final Node index;
+ private final Expression index;
/**
* Constructors
@@ -45,12 +45,12 @@ public final class IndexNode extends BaseNode {
* @param base base node for access
* @param index index for access
*/
- public IndexNode(final long token, final int finish, final Node base, final Node index) {
+ public IndexNode(final long token, final int finish, final Expression base, final Expression index) {
super(token, finish, base, false, false);
this.index = index;
}
- private IndexNode(final IndexNode indexNode, final Node base, final Node index, final boolean isFunction, final boolean hasCallSiteType) {
+ private IndexNode(final IndexNode indexNode, final Expression base, final Expression index, final boolean isFunction, final boolean hasCallSiteType) {
super(indexNode, base, isFunction, hasCallSiteType);
this.index = index;
}
@@ -59,8 +59,8 @@ public final class IndexNode extends BaseNode {
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterIndexNode(this)) {
return visitor.leaveIndexNode(
- setBase(base.accept(visitor)).
- setIndex(index.accept(visitor)));
+ setBase((Expression)base.accept(visitor)).
+ setIndex((Expression)index.accept(visitor)));
}
return this;
}
@@ -95,11 +95,11 @@ public final class IndexNode extends BaseNode {
* Get the index expression for this IndexNode
* @return the index
*/
- public Node getIndex() {
+ public Expression getIndex() {
return index;
}
- private IndexNode setBase(final Node base) {
+ private IndexNode setBase(final Expression base) {
if (this.base == base) {
return this;
}
@@ -111,7 +111,7 @@ public final class IndexNode extends BaseNode {
* @param index new index expression
* @return a node equivalent to this one except for the requested change.
*/
- public IndexNode setIndex(Node index) {
+ public IndexNode setIndex(Expression index) {
if(this.index == index) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/LabelNode.java b/src/jdk/nashorn/internal/ir/LabelNode.java
index ad9979ef..9903c2b0 100644
--- a/src/jdk/nashorn/internal/ir/LabelNode.java
+++ b/src/jdk/nashorn/internal/ir/LabelNode.java
@@ -32,7 +32,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* IR representation for a labeled statement.
*/
@Immutable
-public final class LabelNode extends LexicalContextNode {
+public final class LabelNode extends LexicalContextStatement {
/** Label ident. */
private final IdentNode label;
diff --git a/src/jdk/nashorn/internal/ir/LexicalContext.java b/src/jdk/nashorn/internal/ir/LexicalContext.java
index 2ca5ec39..ed0ca62f 100644
--- a/src/jdk/nashorn/internal/ir/LexicalContext.java
+++ b/src/jdk/nashorn/internal/ir/LexicalContext.java
@@ -54,13 +54,16 @@ public class LexicalContext {
/**
* Set the flags for a lexical context node on the stack. Does not
- * replace the flags, but rather adds to them
+ * replace the flags, but rather adds to them.
*
* @param node node
* @param flag new flag to set
*/
public void setFlag(final LexicalContextNode node, final int flag) {
if (flag != 0) {
+ // Use setBlockNeedsScope() instead
+ assert !(flag == Block.NEEDS_SCOPE && node instanceof Block);
+
for (int i = sp - 1; i >= 0; i--) {
if (stack[i] == node) {
flags[i] |= flag;
@@ -72,6 +75,29 @@ public class LexicalContext {
}
/**
+ * Marks the block as one that creates a scope. Note that this method must
+ * be used instead of {@link #setFlag(LexicalContextNode, int)} with
+ * {@link Block#NEEDS_SCOPE} because it atomically also sets the
+ * {@link FunctionNode#HAS_SCOPE_BLOCK} flag on the block's containing
+ * function.
+ * @param block the block that needs to be marked as creating a scope.
+ */
+ public void setBlockNeedsScope(final Block block) {
+ for (int i = sp - 1; i >= 0; i--) {
+ if (stack[i] == block) {
+ flags[i] |= Block.NEEDS_SCOPE;
+ for(int j = i - 1; j >=0; j --) {
+ if(stack[j] instanceof FunctionNode) {
+ flags[j] |= FunctionNode.HAS_SCOPE_BLOCK;
+ return;
+ }
+ }
+ }
+ }
+ assert false;
+ }
+
+ /**
* Get the flags for a lexical context node on the stack
* @param node node
* @return the flags for the node
@@ -550,19 +576,20 @@ public class LexicalContext {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
- final Node node = stack[i];
+ final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
- final Source source = ((FunctionNode)node).getSource();
+ final FunctionNode fn = (FunctionNode)node;
+ final Source source = fn.getSource();
String src = source.toString();
if (src.indexOf(File.pathSeparator) != -1) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
- src += source.getLine(node.getStart());
+ src += source.getLine(fn.getStart());
sb.append(src);
}
sb.append(' ');
@@ -605,7 +632,7 @@ public class LexicalContext {
private T findNext() {
for (int i = index; i >= 0; i--) {
- final Node node = stack[i];
+ final Object node = stack[i];
if (node == until) {
return null;
}
diff --git a/src/jdk/nashorn/internal/ir/LexicalContextExpression.java b/src/jdk/nashorn/internal/ir/LexicalContextExpression.java
new file mode 100644
index 00000000..d3c77777
--- /dev/null
+++ b/src/jdk/nashorn/internal/ir/LexicalContextExpression.java
@@ -0,0 +1,59 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.ir;
+
+import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+
+abstract class LexicalContextExpression extends Expression implements LexicalContextNode {
+
+ LexicalContextExpression(LexicalContextExpression expr) {
+ super(expr);
+ }
+
+ LexicalContextExpression(long token, int start, int finish) {
+ super(token, start, finish);
+ }
+
+ LexicalContextExpression(long token, int finish) {
+ super(token, finish);
+ }
+
+ @Override
+ public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
+ return Acceptor.accept(this, visitor);
+ }
+
+ /**
+ * Set the symbol and replace in lexical context if applicable
+ * @param lc lexical context
+ * @param symbol symbol
+ * @return new node if symbol changed
+ */
+ @Override
+ public Expression setSymbol(final LexicalContext lc, final Symbol symbol) {
+ return Node.replaceInLexicalContext(lc, this, (LexicalContextExpression)super.setSymbol(null, symbol));
+ }
+}
diff --git a/src/jdk/nashorn/internal/ir/LexicalContextNode.java b/src/jdk/nashorn/internal/ir/LexicalContextNode.java
index 020faf8e..bb6a681d 100644
--- a/src/jdk/nashorn/internal/ir/LexicalContextNode.java
+++ b/src/jdk/nashorn/internal/ir/LexicalContextNode.java
@@ -26,31 +26,12 @@ package jdk.nashorn.internal.ir;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+
/**
- * Superclass for nodes that can be part of the lexical context
+ * Interface for nodes that can be part of the lexical context.
* @see LexicalContext
*/
-public abstract class LexicalContextNode extends Statement {
- /**
- * Constructor
- *
- * @param lineNumber line number
- * @param token token
- * @param finish finish
- */
- protected LexicalContextNode(final int lineNumber, final long token, final int finish) {
- super(lineNumber, token, finish);
- }
-
- /**
- * Copy constructor
- *
- * @param node source node
- */
- protected LexicalContextNode(final LexicalContextNode node) {
- super(node);
- }
-
+public interface LexicalContextNode {
/**
* Accept function for the node given a lexical context. It must be prepared
* to replace itself if present in the lexical context
@@ -60,25 +41,15 @@ public abstract class LexicalContextNode extends Statement {
*
* @return new node or same node depending on state change
*/
- protected abstract Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor);
-
- @Override
- public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
- final LexicalContext lc = visitor.getLexicalContext();
- lc.push(this);
- final LexicalContextNode newNode = (LexicalContextNode)accept(lc, visitor);
- return lc.pop(newNode);
- }
+ Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor);
- /**
- * Set the symbol and replace in lexical context if applicable
- * @param lc lexical context
- * @param symbol symbol
- * @return new node if symbol changed
- */
- @Override
- public Node setSymbol(final LexicalContext lc, final Symbol symbol) {
- return Node.replaceInLexicalContext(lc, this, (LexicalContextNode)super.setSymbol(null, symbol));
+ // Would be a default method on Java 8
+ static class Acceptor {
+ static Node accept(LexicalContextNode node, final NodeVisitor<? extends LexicalContext> visitor) {
+ final LexicalContext lc = visitor.getLexicalContext();
+ lc.push(node);
+ final LexicalContextNode newNode = (LexicalContextNode)node.accept(lc, visitor);
+ return (Node)lc.pop(newNode);
+ }
}
-
}
diff --git a/src/jdk/nashorn/internal/ir/LexicalContextStatement.java b/src/jdk/nashorn/internal/ir/LexicalContextStatement.java
new file mode 100644
index 00000000..c7bbfb2f
--- /dev/null
+++ b/src/jdk/nashorn/internal/ir/LexicalContextStatement.java
@@ -0,0 +1,55 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.ir;
+
+import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+
+abstract class LexicalContextStatement extends Statement implements LexicalContextNode {
+ /**
+ * Constructor
+ *
+ * @param lineNumber line number
+ * @param token token
+ * @param finish finish
+ */
+ protected LexicalContextStatement(final int lineNumber, final long token, final int finish) {
+ super(lineNumber, token, finish);
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param node source node
+ */
+ protected LexicalContextStatement(final LexicalContextStatement node) {
+ super(node);
+ }
+
+ @Override
+ public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
+ return Acceptor.accept(this, visitor);
+ }
+}
diff --git a/src/jdk/nashorn/internal/ir/LiteralNode.java b/src/jdk/nashorn/internal/ir/LiteralNode.java
index a7cea66a..b2d9e9fa 100644
--- a/src/jdk/nashorn/internal/ir/LiteralNode.java
+++ b/src/jdk/nashorn/internal/ir/LiteralNode.java
@@ -45,10 +45,13 @@ import jdk.nashorn.internal.runtime.Undefined;
* @param <T> the literal type
*/
@Immutable
-public abstract class LiteralNode<T> extends Node implements PropertyKey {
+public abstract class LiteralNode<T> extends Expression implements PropertyKey {
/** Literal value */
protected final T value;
+ /** Marker for values that must be computed at runtime */
+ public static final Object POSTSET_MARKER = new Object();
+
/**
* Constructor
*
@@ -495,6 +498,30 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
return new LexerTokenLiteralNode(parent.getToken(), parent.getFinish(), value);
}
+ /**
+ * Get the constant value for an object, or {@link #POSTSET_MARKER} if the value can't be statically computed.
+ *
+ * @param object a node or value object
+ * @return the constant value or {@code POSTSET_MARKER}
+ */
+ public static Object objectAsConstant(final Object object) {
+ if (object == null) {
+ return null;
+ } else if (object instanceof Number || object instanceof String || object instanceof Boolean) {
+ return object;
+ } else if (object instanceof LiteralNode) {
+ return objectAsConstant(((LiteralNode<?>)object).getValue());
+ } else if (object instanceof UnaryNode) {
+ final UnaryNode unaryNode = (UnaryNode)object;
+
+ if (unaryNode.isTokenType(TokenType.CONVERT) && unaryNode.getType().isObject()) {
+ return objectAsConstant(unaryNode.rhs());
+ }
+ }
+
+ return POSTSET_MARKER;
+ }
+
private static final class NullLiteralNode extends LiteralNode<Object> {
private NullLiteralNode(final long token, final int finish) {
@@ -524,12 +551,7 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
/**
* Array literal node class.
*/
- public static final class ArrayLiteralNode extends LiteralNode<Node[]> {
- private static class PostsetMarker {
- //empty
- }
-
- private static PostsetMarker POSTSET_MARKER = new PostsetMarker();
+ public static final class ArrayLiteralNode extends LiteralNode<Expression[]> {
/** Array element type. */
private Type elementType;
@@ -597,7 +619,7 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
* @param finish finish
* @param value array literal value, a Node array
*/
- protected ArrayLiteralNode(final long token, final int finish, final Node[] value) {
+ protected ArrayLiteralNode(final long token, final int finish, final Expression[] value) {
super(Token.recast(token, TokenType.ARRAY), finish, value);
this.elementType = Type.UNKNOWN;
}
@@ -606,7 +628,7 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
* Copy constructor
* @param node source array literal node
*/
- private ArrayLiteralNode(final ArrayLiteralNode node, final Node[] value) {
+ private ArrayLiteralNode(final ArrayLiteralNode node, final Expression[] value) {
super(node, value);
this.elementType = node.elementType;
this.presets = node.presets;
@@ -715,7 +737,7 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
}
private void analyzeElements() {
- for (final Node node : value) {
+ for (final Expression node : value) {
if (node == null) {
elementType = elementType.widest(Type.OBJECT); //no way to represent undefined as number
break;
@@ -740,24 +762,6 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
}
}
- private Object objectAsConstant(final Object object) {
- if (object == null) {
- return null;
- } else if (object instanceof Number || object instanceof String || object instanceof Boolean) {
- return object;
- } else if (object instanceof LiteralNode) {
- return objectAsConstant(((LiteralNode<?>)object).getValue());
- } else if (object instanceof UnaryNode) {
- final UnaryNode unaryNode = (UnaryNode)object;
-
- if (unaryNode.isTokenType(TokenType.CONVERT) && unaryNode.getType().isObject()) {
- return objectAsConstant(unaryNode.rhs());
- }
- }
-
- return POSTSET_MARKER;
- }
-
@Override
public Node[] getArray() {
return value;
@@ -822,15 +826,15 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterLiteralNode(this)) {
- final List<Node> oldValue = Arrays.asList(value);
- final List<Node> newValue = Node.accept(visitor, Node.class, oldValue);
+ final List<Expression> oldValue = Arrays.asList(value);
+ final List<Expression> newValue = Node.accept(visitor, Expression.class, oldValue);
return visitor.leaveLiteralNode(oldValue != newValue ? setValue(newValue) : this);
}
return this;
}
- private ArrayLiteralNode setValue(final List<Node> value) {
- return new ArrayLiteralNode(this, value.toArray(new Node[value.size()]));
+ private ArrayLiteralNode setValue(final List<Expression> value) {
+ return new ArrayLiteralNode(this, value.toArray(new Expression[value.size()]));
}
@Override
@@ -862,8 +866,8 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
*
* @return the new literal node
*/
- public static LiteralNode<Node[]> newInstance(final long token, final int finish, final List<Node> value) {
- return new ArrayLiteralNode(token, finish, value.toArray(new Node[value.size()]));
+ public static LiteralNode<Expression[]> newInstance(final long token, final int finish, final List<Expression> value) {
+ return new ArrayLiteralNode(token, finish, value.toArray(new Expression[value.size()]));
}
@@ -875,8 +879,8 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
*
* @return the new literal node
*/
- public static LiteralNode<?> newInstance(final Node parent, final List<Node> value) {
- return new ArrayLiteralNode(parent.getToken(), parent.getFinish(), value.toArray(new Node[value.size()]));
+ public static LiteralNode<?> newInstance(final Node parent, final List<Expression> value) {
+ return new ArrayLiteralNode(parent.getToken(), parent.getFinish(), value.toArray(new Expression[value.size()]));
}
/**
@@ -888,7 +892,7 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
*
* @return the new literal node
*/
- public static LiteralNode<Node[]> newInstance(final long token, final int finish, final Node[] value) {
+ public static LiteralNode<Expression[]> newInstance(final long token, final int finish, final Expression[] value) {
return new ArrayLiteralNode(token, finish, value);
}
}
diff --git a/src/jdk/nashorn/internal/ir/LoopNode.java b/src/jdk/nashorn/internal/ir/LoopNode.java
index 4a4fd3be..107030a2 100644
--- a/src/jdk/nashorn/internal/ir/LoopNode.java
+++ b/src/jdk/nashorn/internal/ir/LoopNode.java
@@ -27,18 +27,17 @@ package jdk.nashorn.internal.ir;
import java.util.Arrays;
import java.util.List;
-
import jdk.nashorn.internal.codegen.Label;
/**
* A loop node, for example a while node, do while node or for node
*/
-public abstract class LoopNode extends BreakableNode {
+public abstract class LoopNode extends BreakableStatement {
/** loop continue label. */
protected final Label continueLabel;
/** Loop test node, null if infinite */
- protected final Node test;
+ protected final Expression test;
/** Loop body */
protected final Block body;
@@ -56,7 +55,7 @@ public abstract class LoopNode extends BreakableNode {
* @param body loop body
* @param controlFlowEscapes controlFlowEscapes
*/
- protected LoopNode(final int lineNumber, final long token, final int finish, final Node test, final Block body, final boolean controlFlowEscapes) {
+ protected LoopNode(final int lineNumber, final long token, final int finish, final Expression test, final Block body, final boolean controlFlowEscapes) {
super(lineNumber, token, finish, new Label("while_break"));
this.continueLabel = new Label("while_continue");
this.test = test;
@@ -72,7 +71,7 @@ public abstract class LoopNode extends BreakableNode {
* @param body new body
* @param controlFlowEscapes controlFlowEscapes
*/
- protected LoopNode(final LoopNode loopNode, final Node test, final Block body, final boolean controlFlowEscapes) {
+ protected LoopNode(final LoopNode loopNode, final Expression test, final Block body, final boolean controlFlowEscapes) {
super(loopNode);
this.continueLabel = new Label(loopNode.continueLabel);
this.test = test;
@@ -151,7 +150,7 @@ public abstract class LoopNode extends BreakableNode {
* Get the test for this for node
* @return the test
*/
- public abstract Node getTest();
+ public abstract Expression getTest();
/**
* Set the test for this for node
@@ -160,7 +159,7 @@ public abstract class LoopNode extends BreakableNode {
* @param test new test
* @return same or new node depending on if test was changed
*/
- public abstract LoopNode setTest(final LexicalContext lc, final Node test);
+ public abstract LoopNode setTest(final LexicalContext lc, final Expression test);
/**
* Set the control flow escapes flag for this node.
diff --git a/src/jdk/nashorn/internal/ir/Node.java b/src/jdk/nashorn/internal/ir/Node.java
index 4342c2be..c59c235b 100644
--- a/src/jdk/nashorn/internal/ir/Node.java
+++ b/src/jdk/nashorn/internal/ir/Node.java
@@ -27,7 +27,6 @@ package jdk.nashorn.internal.ir;
import java.util.ArrayList;
import java.util.List;
-
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
import jdk.nashorn.internal.parser.Token;
@@ -37,9 +36,6 @@ import jdk.nashorn.internal.parser.TokenType;
* Nodes are used to compose Abstract Syntax Trees.
*/
public abstract class Node implements Cloneable {
- /** Node symbol. */
- private Symbol symbol;
-
/** Start of source range. */
protected final int start;
@@ -81,34 +77,11 @@ public abstract class Node implements Cloneable {
*/
protected Node(final Node node) {
this.token = node.token;
- this.symbol = node.symbol;
this.start = node.start;
this.finish = node.finish;
}
/**
- * Check if the node has a type. The default behavior is to go into the symbol
- * and check the symbol type, but there may be overrides, for example in
- * getters that require a different type than the internal representation
- *
- * @return true if a type exists
- */
- public boolean hasType() {
- return getSymbol() != null;
- }
-
- /**
- * Returns the type of the node. Typically this is the symbol type. No types
- * are stored in the node itself, unless it implements TypeOverride
- *
- * @return the type of the node.
- */
- public Type getType() {
- assert hasType() : this + " has no type";
- return symbol.getSymbolType();
- }
-
- /**
* Is this an atom node - for example a literal or an identity
*
* @return true if atom
@@ -235,16 +208,6 @@ public abstract class Node implements Cloneable {
return start;
}
- /**
- * Return the Symbol the compiler has assigned to this Node. The symbol
- * is the place where it's expression value is stored after evaluation
- *
- * @return the symbol
- */
- public Symbol getSymbol() {
- return symbol;
- }
-
@Override
protected Object clone() {
try {
@@ -254,24 +217,6 @@ public abstract class Node implements Cloneable {
}
}
- /**
- * Assign a symbol to this node. See {@link Node#getSymbol()} for explanation
- * of what a symbol is
- *
- * @param lc lexical context
- * @param symbol the symbol
- * @return new node
- */
- public Node setSymbol(final LexicalContext lc, final Symbol symbol) {
- if (this.symbol == symbol) {
- return this;
- }
- final Node newNode = (Node)clone();
- newNode.symbol = symbol;
- return newNode;
- }
-
-
@Override
public final boolean equals(final Object other) {
return super.equals(other);
diff --git a/src/jdk/nashorn/internal/ir/ObjectNode.java b/src/jdk/nashorn/internal/ir/ObjectNode.java
index 31c07812..b46e9b31 100644
--- a/src/jdk/nashorn/internal/ir/ObjectNode.java
+++ b/src/jdk/nashorn/internal/ir/ObjectNode.java
@@ -34,7 +34,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* IR representation of an object literal.
*/
@Immutable
-public final class ObjectNode extends Node {
+public final class ObjectNode extends Expression {
/** Literal elements. */
private final List<PropertyNode> elements;
diff --git a/src/jdk/nashorn/internal/ir/PropertyNode.java b/src/jdk/nashorn/internal/ir/PropertyNode.java
index 8bf6b80f..9cb82091 100644
--- a/src/jdk/nashorn/internal/ir/PropertyNode.java
+++ b/src/jdk/nashorn/internal/ir/PropertyNode.java
@@ -38,7 +38,7 @@ public final class PropertyNode extends Node {
private final PropertyKey key;
/** Property value. */
- private final Node value;
+ private final Expression value;
/** Property getter. */
private final FunctionNode getter;
@@ -56,7 +56,7 @@ public final class PropertyNode extends Node {
* @param getter getter function body
* @param setter setter function body
*/
- public PropertyNode(final long token, final int finish, final PropertyKey key, final Node value, final FunctionNode getter, final FunctionNode setter) {
+ public PropertyNode(final long token, final int finish, final PropertyKey key, final Expression value, final FunctionNode getter, final FunctionNode setter) {
super(token, finish);
this.key = key;
this.value = value;
@@ -64,7 +64,7 @@ public final class PropertyNode extends Node {
this.setter = setter;
}
- private PropertyNode(final PropertyNode propertyNode, final PropertyKey key, final Node value, final FunctionNode getter, final FunctionNode setter) {
+ private PropertyNode(final PropertyNode propertyNode, final PropertyKey key, final Expression value, final FunctionNode getter, final FunctionNode setter) {
super(propertyNode);
this.key = key;
this.value = value;
@@ -85,7 +85,7 @@ public final class PropertyNode extends Node {
if (visitor.enterPropertyNode(this)) {
return visitor.leavePropertyNode(
setKey((PropertyKey)((Node)key).accept(visitor)).
- setValue(value == null ? null : value.accept(visitor)).
+ setValue(value == null ? null : (Expression)value.accept(visitor)).
setGetter(getter == null ? null : (FunctionNode)getter.accept(visitor)).
setSetter(setter == null ? null : (FunctionNode)setter.accept(visitor)));
}
@@ -140,8 +140,8 @@ public final class PropertyNode extends Node {
* Return the key for this property node
* @return the key
*/
- public Node getKey() {
- return (Node)key;
+ public Expression getKey() {
+ return (Expression)key;
}
private PropertyNode setKey(final PropertyKey key) {
@@ -175,7 +175,7 @@ public final class PropertyNode extends Node {
* Get the value of this property
* @return property value
*/
- public Node getValue() {
+ public Expression getValue() {
return value;
}
@@ -184,7 +184,7 @@ public final class PropertyNode extends Node {
* @param value new value
* @return same node or new node if state changed
*/
- public PropertyNode setValue(final Node value) {
+ public PropertyNode setValue(final Expression value) {
if (this.value == value) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/ReturnNode.java b/src/jdk/nashorn/internal/ir/ReturnNode.java
index 563d0519..209e47b1 100644
--- a/src/jdk/nashorn/internal/ir/ReturnNode.java
+++ b/src/jdk/nashorn/internal/ir/ReturnNode.java
@@ -27,6 +27,7 @@ package jdk.nashorn.internal.ir;
import static jdk.nashorn.internal.parser.TokenType.RETURN;
import static jdk.nashorn.internal.parser.TokenType.YIELD;
+
import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@@ -36,7 +37,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@Immutable
public class ReturnNode extends Statement {
/** Optional expression. */
- private final Node expression;
+ private final Expression expression;
/**
* Constructor
@@ -46,12 +47,12 @@ public class ReturnNode extends Statement {
* @param finish finish
* @param expression expression to return
*/
- public ReturnNode(final int lineNumber, final long token, final int finish, final Node expression) {
+ public ReturnNode(final int lineNumber, final long token, final int finish, final Expression expression) {
super(lineNumber, token, finish);
this.expression = expression;
}
- private ReturnNode(final ReturnNode returnNode, final Node expression) {
+ private ReturnNode(final ReturnNode returnNode, final Expression expression) {
super(returnNode);
this.expression = expression;
}
@@ -89,7 +90,7 @@ public class ReturnNode extends Statement {
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterReturnNode(this)) {
if (expression != null) {
- return visitor.leaveReturnNode(setExpression(expression.accept(visitor)));
+ return visitor.leaveReturnNode(setExpression((Expression)expression.accept(visitor)));
}
return visitor.leaveReturnNode(this);
}
@@ -111,7 +112,7 @@ public class ReturnNode extends Statement {
* Get the expression this node returns
* @return return expression, or null if void return
*/
- public Node getExpression() {
+ public Expression getExpression() {
return expression;
}
@@ -120,7 +121,7 @@ public class ReturnNode extends Statement {
* @param expression new expression, or null if void return
* @return new or same return node
*/
- public ReturnNode setExpression(final Node expression) {
+ public ReturnNode setExpression(final Expression expression) {
if (this.expression == expression) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/RuntimeNode.java b/src/jdk/nashorn/internal/ir/RuntimeNode.java
index 540b2eaf..d100b408 100644
--- a/src/jdk/nashorn/internal/ir/RuntimeNode.java
+++ b/src/jdk/nashorn/internal/ir/RuntimeNode.java
@@ -29,7 +29,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@@ -39,7 +38,7 @@ import jdk.nashorn.internal.parser.TokenType;
* IR representation for a runtime call.
*/
@Immutable
-public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
+public class RuntimeNode extends Expression implements TypeOverride<RuntimeNode> {
/**
* Request enum used for meta-information about the runtime request
@@ -53,8 +52,6 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
NEW,
/** Typeof operator */
TYPEOF,
- /** void type */
- VOID,
/** Reference error type */
REFERENCE_ERROR,
/** Delete operator */
@@ -269,7 +266,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
private final Request request;
/** Call arguments. */
- private final List<Node> args;
+ private final List<Expression> args;
/** Call site override - e.g. we know that a ScriptRuntime.ADD will return an int */
private final Type callSiteType;
@@ -285,7 +282,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
* @param request the request
* @param args arguments to request
*/
- public RuntimeNode(final long token, final int finish, final Request request, final List<Node> args) {
+ public RuntimeNode(final long token, final int finish, final Request request, final List<Expression> args) {
super(token, finish);
this.request = request;
@@ -294,7 +291,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
this.isFinal = false;
}
- private RuntimeNode(final RuntimeNode runtimeNode, final Request request, final Type callSiteType, final boolean isFinal, final List<Node> args) {
+ private RuntimeNode(final RuntimeNode runtimeNode, final Request request, final Type callSiteType, final boolean isFinal, final List<Expression> args) {
super(runtimeNode);
this.request = request;
@@ -311,7 +308,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
* @param request the request
* @param args arguments to request
*/
- public RuntimeNode(final long token, final int finish, final Request request, final Node... args) {
+ public RuntimeNode(final long token, final int finish, final Request request, final Expression... args) {
this(token, finish, request, Arrays.asList(args));
}
@@ -322,7 +319,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
* @param request the request
* @param args arguments to request
*/
- public RuntimeNode(final Node parent, final Request request, final Node... args) {
+ public RuntimeNode(final Expression parent, final Request request, final Expression... args) {
this(parent, request, Arrays.asList(args));
}
@@ -333,7 +330,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
* @param request the request
* @param args arguments to request
*/
- public RuntimeNode(final Node parent, final Request request, final List<Node> args) {
+ public RuntimeNode(final Expression parent, final Request request, final List<Expression> args) {
super(parent);
this.request = request;
@@ -410,9 +407,9 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterRuntimeNode(this)) {
- final List<Node> newArgs = new ArrayList<>();
+ final List<Expression> newArgs = new ArrayList<>();
for (final Node arg : args) {
- newArgs.add(arg.accept(visitor));
+ newArgs.add((Expression)arg.accept(visitor));
}
return visitor.leaveRuntimeNode(setArgs(newArgs));
}
@@ -445,11 +442,11 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
* Get the arguments for this runtime node
* @return argument list
*/
- public List<Node> getArgs() {
+ public List<Expression> getArgs() {
return Collections.unmodifiableList(args);
}
- private RuntimeNode setArgs(final List<Node> args) {
+ private RuntimeNode setArgs(final List<Expression> args) {
if (this.args == args) {
return this;
}
@@ -472,7 +469,7 @@ public class RuntimeNode extends Node implements TypeOverride<RuntimeNode> {
* @return true if all arguments now are primitive
*/
public boolean isPrimitive() {
- for (final Node arg : args) {
+ for (final Expression arg : args) {
if (arg.getType().isObject()) {
return false;
}
diff --git a/src/jdk/nashorn/internal/ir/SplitNode.java b/src/jdk/nashorn/internal/ir/SplitNode.java
index e71cd6bd..d6c619b7 100644
--- a/src/jdk/nashorn/internal/ir/SplitNode.java
+++ b/src/jdk/nashorn/internal/ir/SplitNode.java
@@ -33,7 +33,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* Node indicating code is split across classes.
*/
@Immutable
-public class SplitNode extends LexicalContextNode {
+public class SplitNode extends LexicalContextStatement {
/** Split node method name. */
private final String name;
@@ -46,13 +46,12 @@ public class SplitNode extends LexicalContextNode {
/**
* Constructor
*
- * @param lineNumber lineNumber
* @param name name of split node
* @param body body of split code
* @param compileUnit compile unit to use for the body
*/
- public SplitNode(final int lineNumber, final String name, final Node body, final CompileUnit compileUnit) {
- super(lineNumber, body.getToken(), body.getFinish());
+ public SplitNode(final String name, final Node body, final CompileUnit compileUnit) {
+ super(-1, body.getToken(), body.getFinish());
this.name = name;
this.body = body;
this.compileUnit = compileUnit;
diff --git a/src/jdk/nashorn/internal/ir/SwitchNode.java b/src/jdk/nashorn/internal/ir/SwitchNode.java
index 3790ad51..d31bec52 100644
--- a/src/jdk/nashorn/internal/ir/SwitchNode.java
+++ b/src/jdk/nashorn/internal/ir/SwitchNode.java
@@ -28,7 +28,6 @@ package jdk.nashorn.internal.ir;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-
import jdk.nashorn.internal.codegen.Label;
import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@@ -37,9 +36,9 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* IR representation of a SWITCH statement.
*/
@Immutable
-public final class SwitchNode extends BreakableNode {
+public final class SwitchNode extends BreakableStatement {
/** Switch expression. */
- private final Node expression;
+ private final Expression expression;
/** Switch cases. */
private final List<CaseNode> cases;
@@ -60,14 +59,14 @@ public final class SwitchNode extends BreakableNode {
* @param cases cases
* @param defaultCase the default case node - null if none, otherwise has to be present in cases list
*/
- public SwitchNode(final int lineNumber, final long token, final int finish, final Node expression, final List<CaseNode> cases, final CaseNode defaultCase) {
+ public SwitchNode(final int lineNumber, final long token, final int finish, final Expression expression, final List<CaseNode> cases, final CaseNode defaultCase) {
super(lineNumber, token, finish, new Label("switch_break"));
this.expression = expression;
this.cases = cases;
this.defaultCaseIndex = defaultCase == null ? -1 : cases.indexOf(defaultCase);
}
- private SwitchNode(final SwitchNode switchNode, final Node expression, final List<CaseNode> cases, final int defaultCase) {
+ private SwitchNode(final SwitchNode switchNode, final Expression expression, final List<CaseNode> cases, final int defaultCase) {
super(switchNode);
this.expression = expression;
this.cases = cases;
@@ -103,7 +102,7 @@ public final class SwitchNode extends BreakableNode {
public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterSwitchNode(this)) {
return visitor.leaveSwitchNode(
- setExpression(lc, expression.accept(visitor)).
+ setExpression(lc, (Expression)expression.accept(visitor)).
setCases(lc, Node.accept(visitor, CaseNode.class, cases), defaultCaseIndex));
}
@@ -167,7 +166,7 @@ public final class SwitchNode extends BreakableNode {
* Return the expression to switch on
* @return switch expression
*/
- public Node getExpression() {
+ public Expression getExpression() {
return expression;
}
@@ -177,7 +176,7 @@ public final class SwitchNode extends BreakableNode {
* @param expression switch expression
* @return new switch node or same if no state was changed
*/
- public SwitchNode setExpression(final LexicalContext lc, final Node expression) {
+ public SwitchNode setExpression(final LexicalContext lc, final Expression expression) {
if (this.expression == expression) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/Symbol.java b/src/jdk/nashorn/internal/ir/Symbol.java
index 7c183902..5061ab90 100644
--- a/src/jdk/nashorn/internal/ir/Symbol.java
+++ b/src/jdk/nashorn/internal/ir/Symbol.java
@@ -29,7 +29,6 @@ import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
-
import jdk.nashorn.internal.codegen.types.Range;
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.runtime.Context;
@@ -705,7 +704,7 @@ public final class Symbol implements Comparable<Symbol> {
public static void setSymbolIsScope(final LexicalContext lc, final Symbol symbol) {
symbol.setIsScope();
if (!symbol.isGlobal()) {
- lc.setFlag(lc.getDefiningBlock(symbol), Block.NEEDS_SCOPE);
+ lc.setBlockNeedsScope(lc.getDefiningBlock(symbol));
}
}
diff --git a/src/jdk/nashorn/internal/ir/TemporarySymbols.java b/src/jdk/nashorn/internal/ir/TemporarySymbols.java
index ee8069e1..4a438ddd 100644
--- a/src/jdk/nashorn/internal/ir/TemporarySymbols.java
+++ b/src/jdk/nashorn/internal/ir/TemporarySymbols.java
@@ -49,7 +49,7 @@ public class TemporarySymbols {
* @param node the node
* @return the node that is guaranteed to have a symbol.
*/
- public Node ensureSymbol(final LexicalContext lc, final Type type, final Node node) {
+ public Expression ensureSymbol(final LexicalContext lc, final Type type, final Expression node) {
final Symbol symbol = node.getSymbol();
if (symbol != null) {
return node;
diff --git a/src/jdk/nashorn/internal/ir/TernaryNode.java b/src/jdk/nashorn/internal/ir/TernaryNode.java
index c05e6245..70e1c726 100644
--- a/src/jdk/nashorn/internal/ir/TernaryNode.java
+++ b/src/jdk/nashorn/internal/ir/TernaryNode.java
@@ -32,43 +32,43 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* TernaryNode nodes represent three operand operations (?:).
*/
@Immutable
-public final class TernaryNode extends Node {
- private final Node lhs;
+public final class TernaryNode extends Expression {
+ private final Expression test;
- private final Node rhs;
+ private final Expression trueExpr;
/** Third argument. */
- private final Node third;
+ private final Expression falseExpr;
/**
* Constructor
*
- * @param token token
- * @param lhs left hand side node
- * @param rhs right hand side node
- * @param third third node
+ * @param token token
+ * @param test test expression
+ * @param trueExpr expression evaluated when test evaluates to true
+ * @param falseExpr expression evaluated when test evaluates to true
*/
- public TernaryNode(final long token, final Node lhs, final Node rhs, final Node third) {
- super(token, third.getFinish());
- this.lhs = lhs;
- this.rhs = rhs;
- this.third = third;
+ public TernaryNode(final long token, final Expression test, final Expression trueExpr, final Expression falseExpr) {
+ super(token, falseExpr.getFinish());
+ this.test = test;
+ this.trueExpr = trueExpr;
+ this.falseExpr = falseExpr;
}
- private TernaryNode(final TernaryNode ternaryNode, final Node lhs, final Node rhs, final Node third) {
+ private TernaryNode(final TernaryNode ternaryNode, final Expression test, final Expression trueExpr, final Expression falseExpr) {
super(ternaryNode);
- this.lhs = lhs;
- this.rhs = rhs;
- this.third = third;
+ this.test = test;
+ this.trueExpr = trueExpr;
+ this.falseExpr = falseExpr;
}
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterTernaryNode(this)) {
- final Node newLhs = lhs().accept(visitor);
- final Node newRhs = rhs().accept(visitor);
- final Node newThird = third.accept(visitor);
- return visitor.leaveTernaryNode(setThird(newThird).setLHS(newLhs).setRHS(newRhs));
+ final Expression newTest = (Expression)getTest().accept(visitor);
+ final Expression newTrueExpr = (Expression)getTrueExpression().accept(visitor);
+ final Expression newFalseExpr = (Expression)falseExpr.accept(visitor);
+ return visitor.leaveTernaryNode(setTest(newTest).setTrueExpression(newTrueExpr).setFalseExpression1(newFalseExpr));
}
return this;
@@ -76,96 +76,96 @@ public final class TernaryNode extends Node {
@Override
public void toString(final StringBuilder sb) {
- final boolean lhsParen = tokenType().needsParens(lhs().tokenType(), true);
- final boolean rhsParen = tokenType().needsParens(rhs().tokenType(), false);
- final boolean thirdParen = tokenType().needsParens(third().tokenType(), false);
+ final boolean testParen = tokenType().needsParens(getTest().tokenType(), true);
+ final boolean trueParen = tokenType().needsParens(getTrueExpression().tokenType(), false);
+ final boolean falseParen = tokenType().needsParens(getFalseExpression().tokenType(), false);
- if (lhsParen) {
+ if (testParen) {
sb.append('(');
}
- lhs().toString(sb);
- if (lhsParen) {
+ getTest().toString(sb);
+ if (testParen) {
sb.append(')');
}
sb.append(" ? ");
- if (rhsParen) {
+ if (trueParen) {
sb.append('(');
}
- rhs().toString(sb);
- if (rhsParen) {
+ getTrueExpression().toString(sb);
+ if (trueParen) {
sb.append(')');
}
sb.append(" : ");
- if (thirdParen) {
+ if (falseParen) {
sb.append('(');
}
- third().toString(sb);
- if (thirdParen) {
+ getFalseExpression().toString(sb);
+ if (falseParen) {
sb.append(')');
}
}
/**
- * Get the lhs node for this ternary expression, i.e. "x" in x ? y : z
- * @return a node
+ * Get the test expression for this ternary expression, i.e. "x" in x ? y : z
+ * @return the test expression
*/
- public Node lhs() {
- return lhs;
+ public Expression getTest() {
+ return test;
}
/**
- * Get the rhs node for this ternary expression, i.e. "y" in x ? y : z
- * @return a node
+ * Get the true expression for this ternary expression, i.e. "y" in x ? y : z
+ * @return the true expression
*/
- public Node rhs() {
- return rhs;
+ public Expression getTrueExpression() {
+ return trueExpr;
}
/**
- * Get the "third" node for this ternary expression, i.e. "z" in x ? y : z
- * @return a node
+ * Get the false expression for this ternary expression, i.e. "z" in x ? y : z
+ * @return the false expression
*/
- public Node third() {
- return third;
+ public Expression getFalseExpression() {
+ return falseExpr;
}
/**
- * Set the left hand side expression for this node
- * @param lhs new left hand side expression
+ * Set the test expression for this node
+ * @param test new test expression
* @return a node equivalent to this one except for the requested change.
*/
- public TernaryNode setLHS(final Node lhs) {
- if (this.lhs == lhs) {
+ public TernaryNode setTest(final Expression test) {
+ if (this.test == test) {
return this;
}
- return new TernaryNode(this, lhs, rhs, third);
+ return new TernaryNode(this, test, trueExpr, falseExpr);
}
/**
- * Set the right hand side expression for this node
- * @param rhs new left hand side expression
+ * Set the true expression for this node
+ * @param trueExpr new true expression
* @return a node equivalent to this one except for the requested change.
*/
- public TernaryNode setRHS(final Node rhs) {
- if (this.rhs == rhs) {
+ public TernaryNode setTrueExpression(final Expression trueExpr) {
+ if (this.trueExpr == trueExpr) {
return this;
}
- return new TernaryNode(this, lhs, rhs, third);
+ return new TernaryNode(this, test, trueExpr, falseExpr);
}
/**
- * Reset the "third" node for this ternary expression, i.e. "z" in x ? y : z
- * @param third a node
+ * Set the false expression for this node
+ * @param falseExpr new false expression
* @return a node equivalent to this one except for the requested change.
*/
- public TernaryNode setThird(final Node third) {
- if (this.third == third) {
+ public TernaryNode setFalseExpression1(final Expression falseExpr) {
+ if (this.falseExpr == falseExpr) {
return this;
}
- return new TernaryNode(this, lhs, rhs, third);
+ return new TernaryNode(this, test, trueExpr, falseExpr);
}
}
diff --git a/src/jdk/nashorn/internal/ir/ThrowNode.java b/src/jdk/nashorn/internal/ir/ThrowNode.java
index 3d33fc77..70efa532 100644
--- a/src/jdk/nashorn/internal/ir/ThrowNode.java
+++ b/src/jdk/nashorn/internal/ir/ThrowNode.java
@@ -34,7 +34,7 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@Immutable
public final class ThrowNode extends Statement {
/** Exception expression. */
- private final Node expression;
+ private final Expression expression;
private final int flags;
@@ -50,13 +50,13 @@ public final class ThrowNode extends Statement {
* @param expression expression to throw
* @param flags flags
*/
- public ThrowNode(final int lineNumber, final long token, final int finish, final Node expression, final int flags) {
+ public ThrowNode(final int lineNumber, final long token, final int finish, final Expression expression, final int flags) {
super(lineNumber, token, finish);
this.expression = expression;
this.flags = flags;
}
- private ThrowNode(final ThrowNode node, final Node expression, final int flags) {
+ private ThrowNode(final ThrowNode node, final Expression expression, final int flags) {
super(node);
this.expression = expression;
this.flags = flags;
@@ -74,7 +74,7 @@ public final class ThrowNode extends Statement {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterThrowNode(this)) {
- return visitor.leaveThrowNode(setExpression(expression.accept(visitor)));
+ return visitor.leaveThrowNode(setExpression((Expression)expression.accept(visitor)));
}
return this;
@@ -93,7 +93,7 @@ public final class ThrowNode extends Statement {
* Get the expression that is being thrown by this node
* @return expression
*/
- public Node getExpression() {
+ public Expression getExpression() {
return expression;
}
@@ -102,7 +102,7 @@ public final class ThrowNode extends Statement {
* @param expression new expression
* @return new or same thrownode
*/
- public ThrowNode setExpression(final Node expression) {
+ public ThrowNode setExpression(final Expression expression) {
if (this.expression == expression) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/UnaryNode.java b/src/jdk/nashorn/internal/ir/UnaryNode.java
index f9c971ed..2de2ca5d 100644
--- a/src/jdk/nashorn/internal/ir/UnaryNode.java
+++ b/src/jdk/nashorn/internal/ir/UnaryNode.java
@@ -29,6 +29,7 @@ import static jdk.nashorn.internal.parser.TokenType.BIT_NOT;
import static jdk.nashorn.internal.parser.TokenType.CONVERT;
import static jdk.nashorn.internal.parser.TokenType.DECPOSTFIX;
import static jdk.nashorn.internal.parser.TokenType.INCPOSTFIX;
+
import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
@@ -39,9 +40,9 @@ import jdk.nashorn.internal.parser.TokenType;
* UnaryNode nodes represent single operand operations.
*/
@Immutable
-public final class UnaryNode extends Node implements Assignment<Node> {
+public final class UnaryNode extends Expression implements Assignment<Expression> {
/** Right hand side argument. */
- private final Node rhs;
+ private final Expression rhs;
/**
* Constructor
@@ -49,7 +50,7 @@ public final class UnaryNode extends Node implements Assignment<Node> {
* @param token token
* @param rhs expression
*/
- public UnaryNode(final long token, final Node rhs) {
+ public UnaryNode(final long token, final Expression rhs) {
this(token, Math.min(rhs.getStart(), Token.descPosition(token)), Math.max(Token.descPosition(token) + Token.descLength(token), rhs.getFinish()), rhs);
}
@@ -61,13 +62,13 @@ public final class UnaryNode extends Node implements Assignment<Node> {
* @param finish finish
* @param rhs expression
*/
- public UnaryNode(final long token, final int start, final int finish, final Node rhs) {
+ public UnaryNode(final long token, final int start, final int finish, final Expression rhs) {
super(token, start, finish);
this.rhs = rhs;
}
- private UnaryNode(final UnaryNode unaryNode, final Node rhs) {
+ private UnaryNode(final UnaryNode unaryNode, final Expression rhs) {
super(unaryNode);
this.rhs = rhs;
}
@@ -101,17 +102,17 @@ public final class UnaryNode extends Node implements Assignment<Node> {
}
@Override
- public Node getAssignmentDest() {
+ public Expression getAssignmentDest() {
return isAssignment() ? rhs() : null;
}
@Override
- public Node setAssignmentDest(Node n) {
+ public UnaryNode setAssignmentDest(Expression n) {
return setRHS(n);
}
@Override
- public Node getAssignmentSource() {
+ public Expression getAssignmentSource() {
return getAssignmentDest();
}
@@ -122,7 +123,7 @@ public final class UnaryNode extends Node implements Assignment<Node> {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterUnaryNode(this)) {
- return visitor.leaveUnaryNode(setRHS(rhs.accept(visitor)));
+ return visitor.leaveUnaryNode(setRHS((Expression)rhs.accept(visitor)));
}
return this;
@@ -130,6 +131,22 @@ public final class UnaryNode extends Node implements Assignment<Node> {
@Override
public void toString(final StringBuilder sb) {
+ toString(sb, new Runnable() {
+ @Override
+ public void run() {
+ sb.append(rhs().toString());
+ }
+ });
+ }
+
+ /**
+ * Creates the string representation of this unary node, delegating the creation of the string representation of its
+ * operand to a specified runnable.
+ * @param sb the string builder to use
+ * @param rhsStringBuilder the runnable that appends the string representation of the operand to the string builder
+ * when invoked.
+ */
+ public void toString(final StringBuilder sb, final Runnable rhsStringBuilder) {
final TokenType type = tokenType();
final String name = type.getName();
final boolean isPostfix = type == DECPOSTFIX || type == INCPOSTFIX;
@@ -161,7 +178,7 @@ public final class UnaryNode extends Node implements Assignment<Node> {
if (rhsParen) {
sb.append('(');
}
- rhs().toString(sb);
+ rhsStringBuilder.run();
if (rhsParen) {
sb.append(')');
}
@@ -189,7 +206,7 @@ public final class UnaryNode extends Node implements Assignment<Node> {
*
* @return right hand side or expression node
*/
- public Node rhs() {
+ public Expression rhs() {
return rhs;
}
@@ -202,7 +219,7 @@ public final class UnaryNode extends Node implements Assignment<Node> {
* @param rhs right hand side or expression node
* @return a node equivalent to this one except for the requested change.
*/
- public UnaryNode setRHS(final Node rhs) {
+ public UnaryNode setRHS(final Expression rhs) {
if (this.rhs == rhs) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/VarNode.java b/src/jdk/nashorn/internal/ir/VarNode.java
index d4f41d6d..67648a00 100644
--- a/src/jdk/nashorn/internal/ir/VarNode.java
+++ b/src/jdk/nashorn/internal/ir/VarNode.java
@@ -37,7 +37,7 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
private final IdentNode name;
/** Initialization expression. */
- private final Node init;
+ private final Expression init;
/** Is this a var statement (as opposed to a "var" in a for loop statement) */
private final int flags;
@@ -59,11 +59,11 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
* @param name name of variable
* @param init init node or null if just a declaration
*/
- public VarNode(final int lineNumber, final long token, final int finish, final IdentNode name, final Node init) {
+ public VarNode(final int lineNumber, final long token, final int finish, final IdentNode name, final Expression init) {
this(lineNumber, token, finish, name, init, IS_STATEMENT);
}
- private VarNode(final VarNode varNode, final IdentNode name, final Node init, final int flags) {
+ private VarNode(final VarNode varNode, final IdentNode name, final Expression init, final int flags) {
super(varNode);
this.name = init == null ? name : name.setIsInitializedHere();
this.init = init;
@@ -80,7 +80,7 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
* @param init init node or null if just a declaration
* @param flags flags
*/
- public VarNode(final int lineNumber, final long token, final int finish, final IdentNode name, final Node init, final int flags) {
+ public VarNode(final int lineNumber, final long token, final int finish, final IdentNode name, final Expression init, final int flags) {
super(lineNumber, token, finish);
this.name = init == null ? name : name.setIsInitializedHere();
@@ -99,12 +99,12 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
}
@Override
- public Node setAssignmentDest(IdentNode n) {
+ public VarNode setAssignmentDest(IdentNode n) {
return setName(n);
}
@Override
- public Node getAssignmentSource() {
+ public Expression getAssignmentSource() {
return isAssignment() ? getInit() : null;
}
@@ -123,9 +123,9 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
@Override
public Node accept(final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterVarNode(this)) {
- final IdentNode newName = (IdentNode)name.accept(visitor);
- final Node newInit = init == null ? null : init.accept(visitor);
- final VarNode newThis;
+ final IdentNode newName = (IdentNode)name.accept(visitor);
+ final Expression newInit = init == null ? null : (Expression)init.accept(visitor);
+ final VarNode newThis;
if (name != newName || init != newInit) {
newThis = new VarNode(this, newName, newInit, flags);
} else {
@@ -151,7 +151,7 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
* If this is an assignment of the form {@code var x = init;}, get the init part.
* @return the expression to initialize the variable to, null if just a declaration
*/
- public Node getInit() {
+ public Expression getInit() {
return init;
}
@@ -160,7 +160,7 @@ public final class VarNode extends Statement implements Assignment<IdentNode> {
* @param init new initialization expression
* @return a node equivalent to this one except for the requested change.
*/
- public VarNode setInit(final Node init) {
+ public VarNode setInit(final Expression init) {
if (this.init == init) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/WhileNode.java b/src/jdk/nashorn/internal/ir/WhileNode.java
index c2d05b3d..3c0046c0 100644
--- a/src/jdk/nashorn/internal/ir/WhileNode.java
+++ b/src/jdk/nashorn/internal/ir/WhileNode.java
@@ -59,7 +59,7 @@ public final class WhileNode extends LoopNode {
* @param body body
* @param controlFlowEscapes control flow escapes?
*/
- protected WhileNode(final WhileNode whileNode, final Node test, final Block body, final boolean controlFlowEscapes) {
+ protected WhileNode(final WhileNode whileNode, final Expression test, final Block body, final boolean controlFlowEscapes) {
super(whileNode, test, body, controlFlowEscapes);
this.isDoWhile = whileNode.isDoWhile;
}
@@ -75,28 +75,28 @@ public final class WhileNode extends LoopNode {
}
@Override
- protected Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
+ public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterWhileNode(this)) {
if (isDoWhile()) {
return visitor.leaveWhileNode(
- setTest(lc, test.accept(visitor)).
+ setTest(lc, (Expression)test.accept(visitor)).
setBody(lc, (Block)body.accept(visitor)));
}
return visitor.leaveWhileNode(
setBody(lc, (Block)body.accept(visitor)).
- setTest(lc, test.accept(visitor)));
+ setTest(lc, (Expression)test.accept(visitor)));
}
return this;
}
@Override
- public Node getTest() {
+ public Expression getTest() {
return test;
}
@Override
- public WhileNode setTest(final LexicalContext lc, final Node test) {
+ public WhileNode setTest(final LexicalContext lc, final Expression test) {
if (this.test == test) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/WithNode.java b/src/jdk/nashorn/internal/ir/WithNode.java
index 387659b2..69bd22d6 100644
--- a/src/jdk/nashorn/internal/ir/WithNode.java
+++ b/src/jdk/nashorn/internal/ir/WithNode.java
@@ -32,9 +32,9 @@ import jdk.nashorn.internal.ir.visitor.NodeVisitor;
* IR representation for {@code with} statements.
*/
@Immutable
-public final class WithNode extends LexicalContextNode {
+public final class WithNode extends LexicalContextStatement {
/** This expression. */
- private final Node expression;
+ private final Expression expression;
/** Statements. */
private final Block body;
@@ -52,7 +52,7 @@ public final class WithNode extends LexicalContextNode {
this.body = null;
}
- private WithNode(final WithNode node, final Node expression, final Block body) {
+ private WithNode(final WithNode node, final Expression expression, final Block body) {
super(node);
this.expression = expression;
this.body = body;
@@ -67,7 +67,7 @@ public final class WithNode extends LexicalContextNode {
public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
if (visitor.enterWithNode(this)) {
return visitor.leaveWithNode(
- setExpression(lc, expression.accept(visitor)).
+ setExpression(lc, (Expression)expression.accept(visitor)).
setBody(lc, (Block)body.accept(visitor)));
}
return this;
@@ -110,7 +110,7 @@ public final class WithNode extends LexicalContextNode {
* Get the expression of this WithNode
* @return the expression
*/
- public Node getExpression() {
+ public Expression getExpression() {
return expression;
}
@@ -120,7 +120,7 @@ public final class WithNode extends LexicalContextNode {
* @param expression new expression
* @return new or same withnode
*/
- public WithNode setExpression(final LexicalContext lc, final Node expression) {
+ public WithNode setExpression(final LexicalContext lc, final Expression expression) {
if (this.expression == expression) {
return this;
}
diff --git a/src/jdk/nashorn/internal/ir/debug/ASTWriter.java b/src/jdk/nashorn/internal/ir/debug/ASTWriter.java
index 5d9b5dfb..2f75e09b 100644
--- a/src/jdk/nashorn/internal/ir/debug/ASTWriter.java
+++ b/src/jdk/nashorn/internal/ir/debug/ASTWriter.java
@@ -33,10 +33,11 @@ import java.util.Deque;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.Node;
+import jdk.nashorn.internal.ir.Symbol;
import jdk.nashorn.internal.ir.TernaryNode;
import jdk.nashorn.internal.ir.annotations.Ignore;
import jdk.nashorn.internal.ir.annotations.Reference;
@@ -111,8 +112,15 @@ public final class ASTWriter {
type = "ref: " + type;
}
type += "@" + Debug.id(node);
- if (node.getSymbol() != null) {
- type += "#" + node.getSymbol();
+ final Symbol symbol;
+ if(node instanceof Expression) {
+ symbol = ((Expression)node).getSymbol();
+ } else {
+ symbol = null;
+ }
+
+ if (symbol != null) {
+ type += "#" + symbol;
}
if (node instanceof Block && ((Block)node).needsScope()) {
@@ -135,8 +143,8 @@ public final class ASTWriter {
status += " Goto ";
}
- if (node.getSymbol() != null) {
- status += node.getSymbol();
+ if (symbol != null) {
+ status += symbol;
}
status = status.trim();
@@ -144,8 +152,8 @@ public final class ASTWriter {
status = " [" + status + "]";
}
- if (node.getSymbol() != null) {
- String tname = node.getType().toString();
+ if (symbol != null) {
+ String tname = ((Expression)node).getType().toString();
if (tname.indexOf('.') != -1) {
tname = tname.substring(tname.lastIndexOf('.') + 1, tname.length());
}
diff --git a/src/jdk/nashorn/internal/ir/debug/JSONWriter.java b/src/jdk/nashorn/internal/ir/debug/JSONWriter.java
index 4415ebd7..be4d49b4 100644
--- a/src/jdk/nashorn/internal/ir/debug/JSONWriter.java
+++ b/src/jdk/nashorn/internal/ir/debug/JSONWriter.java
@@ -27,18 +27,18 @@ package jdk.nashorn.internal.ir.debug;
import java.util.Arrays;
import java.util.List;
-
import jdk.nashorn.internal.codegen.CompilerConstants;
import jdk.nashorn.internal.ir.AccessNode;
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
+import jdk.nashorn.internal.ir.BlockStatement;
import jdk.nashorn.internal.ir.BreakNode;
import jdk.nashorn.internal.ir.CallNode;
import jdk.nashorn.internal.ir.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
import jdk.nashorn.internal.ir.ContinueNode;
import jdk.nashorn.internal.ir.EmptyNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IdentNode;
@@ -298,14 +298,27 @@ public final class JSONWriter extends NodeVisitor<LexicalContext> {
}
@Override
- public boolean enterExecuteNode(final ExecuteNode executeNode) {
- enterDefault(executeNode);
+ public boolean enterExpressionStatement(final ExpressionStatement expressionStatement) {
+ enterDefault(expressionStatement);
type("ExpressionStatement");
comma();
property("expression");
- executeNode.getExpression().accept(this);
+ expressionStatement.getExpression().accept(this);
+
+ return leave();
+ }
+
+ @Override
+ public boolean enterBlockStatement(BlockStatement blockStatement) {
+ enterDefault(blockStatement);
+
+ type("BlockStatement");
+ comma();
+
+ property("block");
+ blockStatement.getBlock().accept(this);
return leave();
}
@@ -514,7 +527,7 @@ public final class JSONWriter extends NodeVisitor<LexicalContext> {
type("ArrayExpression");
comma();
- final Node[] value = (Node[])literalNode.getValue();
+ final Node[] value = literalNode.getArray();
array("elements", Arrays.asList(value));
} else {
type("Literal");
@@ -680,15 +693,15 @@ public final class JSONWriter extends NodeVisitor<LexicalContext> {
comma();
property("test");
- ternaryNode.lhs().accept(this);
+ ternaryNode.getTest().accept(this);
comma();
property("consequent");
- ternaryNode.rhs().accept(this);
+ ternaryNode.getTrueExpression().accept(this);
comma();
property("alternate");
- ternaryNode.third().accept(this);
+ ternaryNode.getFalseExpression().accept(this);
return leave();
}
diff --git a/src/jdk/nashorn/internal/ir/debug/PrintVisitor.java b/src/jdk/nashorn/internal/ir/debug/PrintVisitor.java
index 2e2368b1..f939dc67 100644
--- a/src/jdk/nashorn/internal/ir/debug/PrintVisitor.java
+++ b/src/jdk/nashorn/internal/ir/debug/PrintVisitor.java
@@ -26,12 +26,11 @@
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.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IfNode;
@@ -41,8 +40,8 @@ import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.SplitNode;
import jdk.nashorn.internal.ir.Statement;
import jdk.nashorn.internal.ir.SwitchNode;
-import jdk.nashorn.internal.ir.Symbol;
import jdk.nashorn.internal.ir.TryNode;
+import jdk.nashorn.internal.ir.UnaryNode;
import jdk.nashorn.internal.ir.VarNode;
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
@@ -167,14 +166,6 @@ public final class PrintVisitor extends NodeVisitor<LexicalContext> {
continue;
}
- final Symbol symbol = statement.getSymbol();
-
- if (symbol != null) {
- sb.append(" [");
- sb.append(symbol.toString());
- sb.append(']');
- }
-
int lastIndex = sb.length() - 1;
char lastChar = sb.charAt(lastIndex);
while (Character.isWhitespace(lastChar) && lastIndex >= 0) {
@@ -215,8 +206,19 @@ public final class PrintVisitor extends NodeVisitor<LexicalContext> {
}
@Override
- public boolean enterExecuteNode(final ExecuteNode executeNode) {
- executeNode.getExpression().accept(this);
+ public boolean enterUnaryNode(final UnaryNode unaryNode) {
+ unaryNode.toString(sb, new Runnable() {
+ @Override
+ public void run() {
+ unaryNode.rhs().accept(PrintVisitor.this);
+ }
+ });
+ return false;
+ }
+
+ @Override
+ public boolean enterExpressionStatement(final ExpressionStatement expressionStatement) {
+ expressionStatement.getExpression().accept(this);
return false;
}
diff --git a/src/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java b/src/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java
index 1791f92b..71600395 100644
--- a/src/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java
+++ b/src/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java
@@ -1263,6 +1263,4 @@ public class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T
public Node leaveSUB(final BinaryNode binaryNode) {
return leaveDefault(binaryNode);
}
-
-
}
diff --git a/src/jdk/nashorn/internal/ir/visitor/NodeVisitor.java b/src/jdk/nashorn/internal/ir/visitor/NodeVisitor.java
index d8a21a64..4dc55b33 100644
--- a/src/jdk/nashorn/internal/ir/visitor/NodeVisitor.java
+++ b/src/jdk/nashorn/internal/ir/visitor/NodeVisitor.java
@@ -28,13 +28,14 @@ package jdk.nashorn.internal.ir.visitor;
import jdk.nashorn.internal.ir.AccessNode;
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
+import jdk.nashorn.internal.ir.BlockStatement;
import jdk.nashorn.internal.ir.BreakNode;
import jdk.nashorn.internal.ir.CallNode;
import jdk.nashorn.internal.ir.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
import jdk.nashorn.internal.ir.ContinueNode;
import jdk.nashorn.internal.ir.EmptyNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IdentNode;
@@ -308,23 +309,43 @@ public abstract class NodeVisitor<T extends LexicalContext> {
}
/**
- * Callback for entering an ExecuteNode
+ * Callback for entering an ExpressionStatement
*
- * @param executeNode the node
+ * @param expressionStatement the node
* @return true if traversal should continue and node children be traversed, false otherwise
*/
- public boolean enterExecuteNode(final ExecuteNode executeNode) {
- return enterDefault(executeNode);
+ public boolean enterExpressionStatement(final ExpressionStatement expressionStatement) {
+ return enterDefault(expressionStatement);
}
/**
- * Callback for leaving an ExecuteNode
+ * Callback for leaving an ExpressionStatement
*
- * @param executeNode the node
+ * @param expressionStatement the node
* @return processed node, which will replace the original one, or the original node
*/
- public Node leaveExecuteNode(final ExecuteNode executeNode) {
- return leaveDefault(executeNode);
+ public Node leaveExpressionStatement(final ExpressionStatement expressionStatement) {
+ return leaveDefault(expressionStatement);
+ }
+
+ /**
+ * Callback for entering a BlockStatement
+ *
+ * @param blockStatement the node
+ * @return true if traversal should continue and node children be traversed, false otherwise
+ */
+ public boolean enterBlockStatement(final BlockStatement blockStatement) {
+ return enterDefault(blockStatement);
+ }
+
+ /**
+ * Callback for leaving a BlockStatement
+ *
+ * @param blockStatement the node
+ * @return processed node, which will replace the original one, or the original node
+ */
+ public Node leaveBlockStatement(final BlockStatement blockStatement) {
+ return leaveDefault(blockStatement);
}
/**
diff --git a/src/jdk/nashorn/internal/lookup/Lookup.java b/src/jdk/nashorn/internal/lookup/Lookup.java
index a454527a..0dd2741e 100644
--- a/src/jdk/nashorn/internal/lookup/Lookup.java
+++ b/src/jdk/nashorn/internal/lookup/Lookup.java
@@ -32,8 +32,6 @@ import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import jdk.nashorn.internal.runtime.JSType;
-import jdk.nashorn.internal.runtime.Property;
-import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptRuntime;
/**
@@ -125,44 +123,6 @@ public final class Lookup {
}
/**
- * Create a new {@link Property}
- *
- * @param map property map
- * @param key property key
- * @param flags property flags
- * @param propertyGetter getter for property if available, null otherwise
- * @param propertySetter setter for property if available, null otherwise
- *
- * @return new property map, representing {@code PropertyMap} with the new property added to it
- */
- @SuppressWarnings("fallthrough")
- public static PropertyMap newProperty(final PropertyMap map, final String key, final int flags, final MethodHandle propertyGetter, final MethodHandle propertySetter) {
- MethodHandle getter = propertyGetter;
- MethodHandle setter = propertySetter;
-
- // TODO: this is temporary code. This code exists to support reflective
- // field reader/writer handles generated by "unreflect" lookup.
-
- switch (getter.type().parameterCount()) {
- case 0:
- // A static field reader, so drop the 'self' argument.
- getter = MH.dropArguments(getter, 0, Object.class);
- if (setter != null) {
- setter = MH.dropArguments(setter, 0, Object.class);
- }
- // fall through
- case 1:
- // standard getter that accepts 'self'.
- break;
- default:
- // Huh!! something wrong..
- throw new IllegalArgumentException("getter/setter has wrong arguments");
- }
-
- return map.newProperty(key, flags, -1, getter, setter);
- }
-
- /**
* This method filters primitive return types using JavaScript semantics. For example,
* an (int) cast of a double in Java land is not the same thing as invoking toInt32 on it.
* If you are returning values to JavaScript that have to be of a specific type, this is
diff --git a/src/jdk/nashorn/internal/objects/AccessorPropertyDescriptor.java b/src/jdk/nashorn/internal/objects/AccessorPropertyDescriptor.java
index d2d80b2f..b3731620 100644
--- a/src/jdk/nashorn/internal/objects/AccessorPropertyDescriptor.java
+++ b/src/jdk/nashorn/internal/objects/AccessorPropertyDescriptor.java
@@ -67,12 +67,12 @@ public final class AccessorPropertyDescriptor extends ScriptObject implements Pr
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- AccessorPropertyDescriptor() {
- this(false, false, UNDEFINED, UNDEFINED);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- AccessorPropertyDescriptor(final boolean configurable, final boolean enumerable, final Object get, final Object set) {
- super(Global.objectPrototype(), $nasgenmap$);
+ AccessorPropertyDescriptor(final boolean configurable, final boolean enumerable, final Object get, final Object set, final Global global) {
+ super(global.getObjectPrototype(), global.getAccessorPropertyDescriptorMap());
this.configurable = configurable;
this.enumerable = enumerable;
this.get = get;
diff --git a/src/jdk/nashorn/internal/objects/ArrayBufferView.java b/src/jdk/nashorn/internal/objects/ArrayBufferView.java
index 312d521c..40b1a95c 100644
--- a/src/jdk/nashorn/internal/objects/ArrayBufferView.java
+++ b/src/jdk/nashorn/internal/objects/ArrayBufferView.java
@@ -25,6 +25,8 @@
package jdk.nashorn.internal.objects;
+import static jdk.nashorn.internal.runtime.ECMAErrors.rangeError;
+
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Getter;
import jdk.nashorn.internal.objects.annotations.ScriptClass;
@@ -34,20 +36,27 @@ import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.arrays.ArrayData;
-import static jdk.nashorn.internal.runtime.ECMAErrors.rangeError;
-
@ScriptClass("ArrayBufferView")
abstract class ArrayBufferView extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- ArrayBufferView(final NativeArrayBuffer buffer, final int byteOffset, final int elementLength) {
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private ArrayBufferView(final NativeArrayBuffer buffer, final int byteOffset, final int elementLength, final Global global) {
+ super(global.getArrayBufferViewMap());
checkConstructorArgs(buffer, byteOffset, elementLength);
- this.setProto(getPrototype());
+ this.setProto(getPrototype(global));
this.setArray(factory().createArrayData(buffer, byteOffset, elementLength));
}
+ ArrayBufferView(final NativeArrayBuffer buffer, final int byteOffset, final int elementLength) {
+ this(buffer, byteOffset, elementLength, Global.instance());
+ }
+
private void checkConstructorArgs(final NativeArrayBuffer buffer, final int byteOffset, final int elementLength) {
if (byteOffset < 0 || elementLength < 0) {
throw new RuntimeException("byteOffset or length must not be negative");
@@ -266,12 +275,17 @@ abstract class ArrayBufferView extends ScriptObject {
protected static abstract class Factory {
final int bytesPerElement;
+ final int maxElementLength;
public Factory(final int bytesPerElement) {
this.bytesPerElement = bytesPerElement;
+ this.maxElementLength = Integer.MAX_VALUE / bytesPerElement;
}
public final ArrayBufferView construct(final int elementLength) {
+ if(elementLength > maxElementLength) {
+ throw rangeError("inappropriate.array.buffer.length", JSType.toString(elementLength));
+ }
return construct(new NativeArrayBuffer(elementLength * bytesPerElement), 0, elementLength);
}
@@ -282,7 +296,7 @@ abstract class ArrayBufferView extends ScriptObject {
protected abstract Factory factory();
- protected abstract ScriptObject getPrototype();
+ protected abstract ScriptObject getPrototype(final Global global);
protected boolean isFloatArray() {
return false;
diff --git a/src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java b/src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java
index be155f50..a8f311eb 100644
--- a/src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java
+++ b/src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java
@@ -39,7 +39,7 @@ class BoundScriptFunctionImpl extends ScriptFunctionImpl {
private final ScriptFunction targetFunction;
BoundScriptFunctionImpl(ScriptFunctionData data, ScriptFunction targetFunction) {
- super(data);
+ super(data, Global.instance());
setPrototype(ScriptRuntime.UNDEFINED);
this.targetFunction = targetFunction;
}
diff --git a/src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java b/src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java
index 8ac43977..ef3f0a30 100644
--- a/src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java
+++ b/src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java
@@ -25,7 +25,6 @@
package jdk.nashorn.internal.objects;
-import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
import static jdk.nashorn.internal.runtime.ScriptRuntime.sameValue;
import java.util.Objects;
@@ -65,12 +64,12 @@ public final class DataPropertyDescriptor extends ScriptObject implements Proper
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- DataPropertyDescriptor() {
- this(false, false, false, UNDEFINED);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- DataPropertyDescriptor(final boolean configurable, final boolean enumerable, final boolean writable, final Object value) {
- super(Global.objectPrototype(), $nasgenmap$);
+ DataPropertyDescriptor(final boolean configurable, final boolean enumerable, final boolean writable, final Object value, final Global global) {
+ super(global.getObjectPrototype(), global.getDataPropertyDescriptorMap());
this.configurable = configurable;
this.enumerable = enumerable;
this.writable = writable;
diff --git a/src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java b/src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java
index d6e9cf60..f5662efa 100644
--- a/src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java
+++ b/src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java
@@ -55,12 +55,12 @@ public final class GenericPropertyDescriptor extends ScriptObject implements Pro
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- GenericPropertyDescriptor() {
- this(false, false);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- GenericPropertyDescriptor(final boolean configurable, final boolean enumerable) {
- super(Global.objectPrototype(), $nasgenmap$);
+ GenericPropertyDescriptor(final boolean configurable, final boolean enumerable, final Global global) {
+ super(global.getObjectPrototype(), global.getGenericPropertyDescriptorMap());
this.configurable = configurable;
this.enumerable = enumerable;
}
diff --git a/src/jdk/nashorn/internal/objects/Global.java b/src/jdk/nashorn/internal/objects/Global.java
index 5644c510..e54fbb45 100644
--- a/src/jdk/nashorn/internal/objects/Global.java
+++ b/src/jdk/nashorn/internal/objects/Global.java
@@ -43,7 +43,6 @@ import java.util.List;
import java.util.Map;
import jdk.internal.dynalink.linker.GuardedInvocation;
import jdk.internal.dynalink.linker.LinkRequest;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Property;
import jdk.nashorn.internal.objects.annotations.ScriptClass;
@@ -363,6 +362,36 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
private ScriptObject builtinFloat32Array;
private ScriptObject builtinFloat64Array;
+ private PropertyMap accessorPropertyDescriptorMap;
+ private PropertyMap arrayBufferViewMap;
+ private PropertyMap dataPropertyDescriptorMap;
+ private PropertyMap genericPropertyDescriptorMap;
+ private PropertyMap nativeArgumentsMap;
+ private PropertyMap nativeArrayMap;
+ private PropertyMap nativeArrayBufferMap;
+ private PropertyMap nativeBooleanMap;
+ private PropertyMap nativeDateMap;
+ private PropertyMap nativeErrorMap;
+ private PropertyMap nativeEvalErrorMap;
+ private PropertyMap nativeJSAdapterMap;
+ private PropertyMap nativeJavaImporterMap;
+ private PropertyMap nativeNumberMap;
+ private PropertyMap nativeRangeErrorMap;
+ private PropertyMap nativeReferenceErrorMap;
+ private PropertyMap nativeRegExpMap;
+ private PropertyMap nativeRegExpExecResultMap;
+ private PropertyMap nativeStrictArgumentsMap;
+ private PropertyMap nativeStringMap;
+ private PropertyMap nativeSyntaxErrorMap;
+ private PropertyMap nativeTypeErrorMap;
+ private PropertyMap nativeURIErrorMap;
+ private PropertyMap prototypeObjectMap;
+ private PropertyMap objectMap;
+ private PropertyMap functionMap;
+ private PropertyMap anonymousFunctionMap;
+ private PropertyMap strictFunctionMap;
+ private PropertyMap boundFunctionMap;
+
// Flag to indicate that a split method issued a return statement
private int splitState = -1;
@@ -379,8 +408,6 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
private static final MethodHandle LOADWITHNEWGLOBAL = findOwnMH("loadWithNewGlobal", Object.class, Object.class, Object[].class);
private static final MethodHandle EXIT = findOwnMH("exit", Object.class, Object.class, Object.class);
- private final Context context;
-
// initialized by nasgen
private static PropertyMap $nasgenmap$;
@@ -390,14 +417,14 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
* @param context the context
*/
public Global(final Context context) {
- this.context = context;
- this.setIsScope();
/*
* Duplicate global's map and use it. This way the initial Map filled
* by nasgen (referenced from static field in this class) is retained
- * 'as is'. This allows multiple globals to be used within a context.
+ * 'as is' (as that one is process wide singleton.
*/
- this.setMap(getMap().duplicate());
+ super($nasgenmap$.duplicate());
+ this.setContext(context);
+ this.setIsScope();
final int cacheSize = context.getEnv()._class_cache_size;
if (cacheSize > 0) {
@@ -424,7 +451,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
* @return the script environment
*/
static ScriptEnvironment getEnv() {
- return instance().context.getEnv();
+ return instance().getContext().getEnv();
}
/**
@@ -433,7 +460,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
* @return the context
*/
static Context getThisContext() {
- return instance().context;
+ return instance().getContext();
}
// GlobalObject interface implementation
@@ -456,11 +483,11 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
@Override
public Object wrapAsObject(final Object obj) {
if (obj instanceof Boolean) {
- return new NativeBoolean((Boolean)obj);
+ return new NativeBoolean((Boolean)obj, this);
} else if (obj instanceof Number) {
- return new NativeNumber(((Number)obj).doubleValue());
+ return new NativeNumber(((Number)obj).doubleValue(), this);
} else if (obj instanceof String || obj instanceof ConsString) {
- return new NativeString((CharSequence)obj);
+ return new NativeString((CharSequence)obj, this);
} else if (obj instanceof Object[]) { // extension
return new NativeArray((Object[])obj);
} else if (obj instanceof double[]) { // extension
@@ -489,7 +516,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
@Override
public ScriptObject newObject() {
- return new JO(getObjectPrototype());
+ return new JO(getObjectPrototype(), getObjectMap());
}
@Override
@@ -566,52 +593,52 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
@Override
public ScriptObject newError(final String msg) {
- return new NativeError(msg);
+ return new NativeError(msg, this);
}
@Override
public ScriptObject newEvalError(final String msg) {
- return new NativeEvalError(msg);
+ return new NativeEvalError(msg, this);
}
@Override
public ScriptObject newRangeError(final String msg) {
- return new NativeRangeError(msg);
+ return new NativeRangeError(msg, this);
}
@Override
public ScriptObject newReferenceError(final String msg) {
- return new NativeReferenceError(msg);
+ return new NativeReferenceError(msg, this);
}
@Override
public ScriptObject newSyntaxError(final String msg) {
- return new NativeSyntaxError(msg);
+ return new NativeSyntaxError(msg, this);
}
@Override
public ScriptObject newTypeError(final String msg) {
- return new NativeTypeError(msg);
+ return new NativeTypeError(msg, this);
}
@Override
public ScriptObject newURIError(final String msg) {
- return new NativeURIError(msg);
+ return new NativeURIError(msg, this);
}
@Override
public PropertyDescriptor newGenericDescriptor(final boolean configurable, final boolean enumerable) {
- return new GenericPropertyDescriptor(configurable, enumerable);
+ return new GenericPropertyDescriptor(configurable, enumerable, this);
}
@Override
public PropertyDescriptor newDataDescriptor(final Object value, final boolean configurable, final boolean enumerable, final boolean writable) {
- return new DataPropertyDescriptor(configurable, enumerable, writable, value);
+ return new DataPropertyDescriptor(configurable, enumerable, writable, value, this);
}
@Override
public PropertyDescriptor newAccessorDescriptor(final Object get, final Object set, final boolean configurable, final boolean enumerable) {
- final AccessorPropertyDescriptor desc = new AccessorPropertyDescriptor(configurable, enumerable, get == null ? UNDEFINED : get, set == null ? UNDEFINED : set);
+ final AccessorPropertyDescriptor desc = new AccessorPropertyDescriptor(configurable, enumerable, get == null ? UNDEFINED : get, set == null ? UNDEFINED : set, this);
if (get == null) {
desc.delete(PropertyDescriptor.GET, false);
@@ -700,7 +727,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
final Global global = Global.instance();
final ScriptObject scope = (self instanceof ScriptObject) ? (ScriptObject)self : global;
- return global.context.eval(scope, str.toString(), callThis, location, Boolean.TRUE.equals(strict));
+ return global.getContext().eval(scope, str.toString(), callThis, location, Boolean.TRUE.equals(strict));
}
/**
@@ -740,7 +767,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
public static Object load(final Object self, final Object source) throws IOException {
final Global global = Global.instance();
final ScriptObject scope = (self instanceof ScriptObject) ? (ScriptObject)self : global;
- return global.context.load(scope, source);
+ return global.getContext().load(scope, source);
}
/**
@@ -760,7 +787,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
final Object from = hasArgs ? args[0] : UNDEFINED;
final Object[] arguments = hasArgs ? Arrays.copyOfRange(args, 1, length) : args;
- return global.context.loadWithNewGlobal(from, arguments);
+ return global.getContext().loadWithNewGlobal(from, arguments);
}
/**
@@ -776,6 +803,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
return UNDEFINED;
}
+ // builtin prototype accessors
ScriptObject getFunctionPrototype() {
return ScriptFunction.getPrototype(builtinFunction);
}
@@ -884,11 +912,127 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
return ScriptFunction.getPrototype(builtinFloat64Array);
}
+ // Builtin PropertyMap accessors
+ PropertyMap getAccessorPropertyDescriptorMap() {
+ return accessorPropertyDescriptorMap;
+ }
+
+ PropertyMap getArrayBufferViewMap() {
+ return arrayBufferViewMap;
+ }
+
+ PropertyMap getDataPropertyDescriptorMap() {
+ return dataPropertyDescriptorMap;
+ }
+
+ PropertyMap getGenericPropertyDescriptorMap() {
+ return genericPropertyDescriptorMap;
+ }
+
+ PropertyMap getArgumentsMap() {
+ return nativeArgumentsMap;
+ }
+
+ PropertyMap getArrayMap() {
+ return nativeArrayMap;
+ }
+
+ PropertyMap getArrayBufferMap() {
+ return nativeArrayBufferMap;
+ }
+
+ PropertyMap getBooleanMap() {
+ return nativeBooleanMap;
+ }
+
+ PropertyMap getDateMap() {
+ return nativeDateMap;
+ }
+
+ PropertyMap getErrorMap() {
+ return nativeErrorMap;
+ }
+
+ PropertyMap getEvalErrorMap() {
+ return nativeEvalErrorMap;
+ }
+
+ PropertyMap getJSAdapterMap() {
+ return nativeJSAdapterMap;
+ }
+
+ PropertyMap getJavaImporterMap() {
+ return nativeJavaImporterMap;
+ }
+
+ PropertyMap getNumberMap() {
+ return nativeNumberMap;
+ }
+
+ PropertyMap getRangeErrorMap() {
+ return nativeRangeErrorMap;
+ }
+
+ PropertyMap getReferenceErrorMap() {
+ return nativeReferenceErrorMap;
+ }
+
+ PropertyMap getRegExpMap() {
+ return nativeRegExpMap;
+ }
+
+ PropertyMap getRegExpExecResultMap() {
+ return nativeRegExpExecResultMap;
+ }
+
+ PropertyMap getStrictArgumentsMap() {
+ return nativeStrictArgumentsMap;
+ }
+
+ PropertyMap getStringMap() {
+ return nativeStringMap;
+ }
+
+ PropertyMap getSyntaxErrorMap() {
+ return nativeSyntaxErrorMap;
+ }
+
+ PropertyMap getTypeErrorMap() {
+ return nativeTypeErrorMap;
+ }
+
+ PropertyMap getURIErrorMap() {
+ return nativeURIErrorMap;
+ }
+
+ PropertyMap getPrototypeObjectMap() {
+ return prototypeObjectMap;
+ }
+
+ PropertyMap getObjectMap() {
+ return objectMap;
+ }
+
+ PropertyMap getFunctionMap() {
+ return functionMap;
+ }
+
+ PropertyMap getAnonymousFunctionMap() {
+ return anonymousFunctionMap;
+ }
+
+ PropertyMap getStrictFunctionMap() {
+ return strictFunctionMap;
+ }
+
+ PropertyMap getBoundFunctionMap() {
+ return boundFunctionMap;
+ }
+
private ScriptFunction getBuiltinArray() {
return builtinArray;
}
-
/**
* Called from compiled script code to test if builtin has been overridden
*
@@ -1394,7 +1538,11 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
private void init() {
assert Context.getGlobal() == this : "this global is not set as current";
- final ScriptEnvironment env = context.getEnv();
+ final ScriptEnvironment env = getContext().getEnv();
+
+ // duplicate PropertyMaps of Native* classes
+ copyInitialMaps(env);
+
// initialize Function and Object constructor
initFunctionAndObject();
@@ -1440,10 +1588,10 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
final ScriptObject arrayPrototype = getArrayPrototype();
arrayPrototype.addOwnProperty("length", Attribute.NOT_ENUMERABLE|Attribute.NOT_CONFIGURABLE, 0.0);
- this.DEFAULT_DATE = new NativeDate(Double.NaN);
+ this.DEFAULT_DATE = new NativeDate(Double.NaN, this);
// initialize default regexp object
- this.DEFAULT_REGEXP = new NativeRegExp("(?:)");
+ this.DEFAULT_REGEXP = new NativeRegExp("(?:)", this);
// RegExp.prototype should behave like a RegExp object. So copy the
// properties.
@@ -1454,12 +1602,16 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
initErrorObjects();
// java access
- initJavaAccess();
+ if (! env._no_java) {
+ initJavaAccess();
+ }
- initTypedArray();
+ if (! env._no_typed_arrays) {
+ initTypedArray();
+ }
if (env._scripting) {
- initScripting();
+ initScripting(env);
}
if (Context.DEBUG && System.getSecurityManager() == null) {
@@ -1540,7 +1692,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
this.builtinJavaApi = initConstructor("Java");
}
- private void initScripting() {
+ private void initScripting(final ScriptEnvironment scriptEnv) {
Object value;
value = ScriptFunctionImpl.makeFunction("readLine", ScriptingFunctions.READLINE);
addOwnProperty("readLine", Attribute.NOT_ENUMERABLE, value);
@@ -1559,7 +1711,6 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
// Nashorn extension: global.$OPTIONS (scripting-mode-only)
final ScriptObject options = newObject();
- final ScriptEnvironment scriptEnv = context.getEnv();
copyOptions(options, scriptEnv);
addOwnProperty("$OPTIONS", Attribute.NOT_ENUMERABLE, options);
@@ -1712,6 +1863,46 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
}
}
+ private void copyInitialMaps(final ScriptEnvironment env) {
+ this.accessorPropertyDescriptorMap = AccessorPropertyDescriptor.getInitialMap().duplicate();
+ this.dataPropertyDescriptorMap = DataPropertyDescriptor.getInitialMap().duplicate();
+ this.genericPropertyDescriptorMap = GenericPropertyDescriptor.getInitialMap().duplicate();
+ this.nativeArgumentsMap = NativeArguments.getInitialMap().duplicate();
+ this.nativeArrayMap = NativeArray.getInitialMap().duplicate();
+ this.nativeBooleanMap = NativeBoolean.getInitialMap().duplicate();
+ this.nativeDateMap = NativeDate.getInitialMap().duplicate();
+ this.nativeErrorMap = NativeError.getInitialMap().duplicate();
+ this.nativeEvalErrorMap = NativeEvalError.getInitialMap().duplicate();
+ this.nativeJSAdapterMap = NativeJSAdapter.getInitialMap().duplicate();
+ this.nativeNumberMap = NativeNumber.getInitialMap().duplicate();
+ this.nativeRangeErrorMap = NativeRangeError.getInitialMap().duplicate();
+ this.nativeReferenceErrorMap = NativeReferenceError.getInitialMap().duplicate();
+ this.nativeRegExpMap = NativeRegExp.getInitialMap().duplicate();
+ this.nativeRegExpExecResultMap = NativeRegExpExecResult.getInitialMap().duplicate();
+ this.nativeStrictArgumentsMap = NativeStrictArguments.getInitialMap().duplicate();
+ this.nativeStringMap = NativeString.getInitialMap().duplicate();
+ this.nativeSyntaxErrorMap = NativeSyntaxError.getInitialMap().duplicate();
+ this.nativeTypeErrorMap = NativeTypeError.getInitialMap().duplicate();
+ this.nativeURIErrorMap = NativeURIError.getInitialMap().duplicate();
+ this.prototypeObjectMap = PrototypeObject.getInitialMap().duplicate();
+ this.objectMap = JO.getInitialMap().duplicate();
+ this.functionMap = ScriptFunctionImpl.getInitialMap().duplicate();
+ this.anonymousFunctionMap = ScriptFunctionImpl.getInitialAnonymousMap().duplicate();
+ this.strictFunctionMap = ScriptFunctionImpl.getInitialStrictMap().duplicate();
+ this.boundFunctionMap = ScriptFunctionImpl.getInitialBoundMap().duplicate();
+
+ // java
+ if (! env._no_java) {
+ this.nativeJavaImporterMap = NativeJavaImporter.getInitialMap().duplicate();
+ }
+
+ // typed arrays
+ if (! env._no_typed_arrays) {
+ this.arrayBufferViewMap = ArrayBufferView.getInitialMap().duplicate();
+ this.nativeArrayBufferMap = NativeArrayBuffer.getInitialMap().duplicate();
+ }
+ }
+
// Function and Object constructors are inter-dependent. Also,
// Function.prototype
// functions are not properly initialized. We fix the references here.
@@ -1723,7 +1914,7 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
this.builtinFunction = (ScriptFunction)initConstructor("Function");
// create global anonymous function
- final ScriptFunction anon = ScriptFunctionImpl.newAnonymousFunction();
+ final ScriptFunction anon = ScriptFunctionImpl.newAnonymousFunction(this);
// need to copy over members of Function.prototype to anon function
anon.addBoundProperties(getFunctionPrototype());
@@ -1792,13 +1983,8 @@ public final class Global extends ScriptObject implements GlobalObject, Scope {
}
}
-
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- try {
- return MethodHandles.lookup().findStatic(Global.class, name, MH.type(rtype, types));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), Global.class, name, MH.type(rtype, types));
}
RegExpResult getLastRegExpResult() {
diff --git a/src/jdk/nashorn/internal/objects/NativeArguments.java b/src/jdk/nashorn/internal/objects/NativeArguments.java
index 456284d8..3bd74d52 100644
--- a/src/jdk/nashorn/internal/objects/NativeArguments.java
+++ b/src/jdk/nashorn/internal/objects/NativeArguments.java
@@ -31,8 +31,10 @@ import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
+import jdk.nashorn.internal.runtime.AccessorProperty;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyDescriptor;
import jdk.nashorn.internal.runtime.PropertyMap;
@@ -41,8 +43,6 @@ import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.arrays.ArrayData;
import jdk.nashorn.internal.runtime.arrays.ArrayIndex;
-import jdk.nashorn.internal.lookup.Lookup;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
/**
* ECMA 10.6 Arguments Object.
@@ -64,10 +64,14 @@ public final class NativeArguments extends ScriptObject {
private static final PropertyMap map$;
static {
- PropertyMap map = PropertyMap.newMap(NativeArguments.class);
- map = Lookup.newProperty(map, "length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH);
- map = Lookup.newProperty(map, "callee", Property.NOT_ENUMERABLE, G$CALLEE, S$CALLEE);
- map$ = map;
+ final ArrayList<Property> properties = new ArrayList<>(2);
+ properties.add(AccessorProperty.create("length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH));
+ properties.add(AccessorProperty.create("callee", Property.NOT_ENUMERABLE, G$CALLEE, S$CALLEE));
+ map$ = PropertyMap.newMap(properties).setIsShared();
+ }
+
+ static PropertyMap getInitialMap() {
+ return map$;
}
private Object length;
@@ -76,8 +80,8 @@ public final class NativeArguments extends ScriptObject {
// This is lazily initialized - only when delete is invoked at all
private BitSet deleted;
- NativeArguments(final ScriptObject proto, final Object[] arguments, final Object callee, final int numParams) {
- super(proto, map$);
+ NativeArguments(final Object[] arguments, final Object callee, final int numParams, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
setIsArguments();
setArray(ArrayData.allocate(arguments));
@@ -550,8 +554,13 @@ public final class NativeArguments extends ScriptObject {
public static ScriptObject allocate(final Object[] arguments, final ScriptFunction callee, final int numParams) {
// Strict functions won't always have a callee for arguments, and will pass null instead.
final boolean isStrict = callee == null || callee.isStrict();
- final ScriptObject proto = Global.objectPrototype();
- return isStrict ? new NativeStrictArguments(proto, arguments, numParams) : new NativeArguments(proto, arguments, callee, numParams);
+ final Global global = Global.instance();
+ final ScriptObject proto = global.getObjectPrototype();
+ if (isStrict) {
+ return new NativeStrictArguments(arguments, numParams, proto, global.getStrictArgumentsMap());
+ } else {
+ return new NativeArguments(arguments, callee, numParams, proto, global.getArgumentsMap());
+ }
}
/**
@@ -623,11 +632,6 @@ public final class NativeArguments extends ScriptObject {
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- try {
- return MethodHandles.lookup().findStatic(NativeArguments.class, name, MH.type(rtype, types));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeArguments.class, name, MH.type(rtype, types));
}
-
}
diff --git a/src/jdk/nashorn/internal/objects/NativeArray.java b/src/jdk/nashorn/internal/objects/NativeArray.java
index 1af79785..c1b64c78 100644
--- a/src/jdk/nashorn/internal/objects/NativeArray.java
+++ b/src/jdk/nashorn/internal/objects/NativeArray.java
@@ -86,6 +86,10 @@ public final class NativeArray extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
/*
* Constructors.
*/
@@ -130,7 +134,11 @@ public final class NativeArray extends ScriptObject {
}
NativeArray(final ArrayData arrayData) {
- super(Global.instance().getArrayPrototype(), $nasgenmap$);
+ this(arrayData, Global.instance());
+ }
+
+ NativeArray(final ArrayData arrayData, final Global global) {
+ super(global.getArrayPrototype(), global.getArrayMap());
this.setArray(arrayData);
this.setIsArray();
}
@@ -544,35 +552,40 @@ public final class NativeArray extends ScriptObject {
@Function(attributes = Attribute.NOT_ENUMERABLE, arity = 1)
public static Object concat(final Object self, final Object... args) {
final ArrayList<Object> list = new ArrayList<>();
- final Object selfToObject = Global.toObject(self);
+ concatToList(list, Global.toObject(self));
- if (isArray(selfToObject)) {
- final Iterator<Object> iter = arrayLikeIterator(selfToObject, true);
- while (iter.hasNext()) {
- list.add(iter.next());
- }
- } else {
- // single element, add it
- list.add(selfToObject);
+ for (final Object obj : args) {
+ concatToList(list, obj);
}
- for (final Object obj : args) {
- if (isArray(obj) || obj instanceof Iterable || (obj != null && obj.getClass().isArray())) {
- final Iterator<Object> iter = arrayLikeIterator(obj, true);
- if (iter.hasNext()) {
- while (iter.hasNext()) {
- list.add(iter.next());
+ return new NativeArray(list.toArray());
+ }
+
+ private static void concatToList(final ArrayList<Object> list, final Object obj) {
+ final boolean isScriptArray = isArray(obj);
+ final boolean isScriptObject = isScriptArray || obj instanceof ScriptObject;
+ if (isScriptArray || obj instanceof Iterable || (obj != null && obj.getClass().isArray())) {
+ final Iterator<Object> iter = arrayLikeIterator(obj, true);
+ if (iter.hasNext()) {
+ for(int i = 0; iter.hasNext(); ++i) {
+ final Object value = iter.next();
+ if(value == ScriptRuntime.UNDEFINED && isScriptObject && !((ScriptObject)obj).has(i)) {
+ // TODO: eventually rewrite arrayLikeIterator to use a three-state enum for handling
+ // UNDEFINED instead of an "includeUndefined" boolean with states SKIP, INCLUDE,
+ // RETURN_EMPTY. Until then, this is how we'll make sure that empty elements don't make it
+ // into the concatenated array.
+ list.add(ScriptRuntime.EMPTY);
+ } else {
+ list.add(value);
}
- } else if (!isArray(obj)) {
- list.add(obj); // add empty object, but not an empty array
}
- } else {
- // single element, add it
- list.add(obj);
+ } else if (!isScriptArray) {
+ list.add(obj); // add empty object, but not an empty array
}
+ } else {
+ // single element, add it
+ list.add(obj);
}
-
- return new NativeArray(list.toArray());
}
/**
diff --git a/src/jdk/nashorn/internal/objects/NativeArrayBuffer.java b/src/jdk/nashorn/internal/objects/NativeArrayBuffer.java
index f122bfca..356e7b6c 100644
--- a/src/jdk/nashorn/internal/objects/NativeArrayBuffer.java
+++ b/src/jdk/nashorn/internal/objects/NativeArrayBuffer.java
@@ -43,6 +43,10 @@ final class NativeArrayBuffer extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
@Constructor(arity = 1)
public static Object constructor(final boolean newObj, final Object self, final Object... args) {
if (args.length == 0) {
@@ -52,11 +56,15 @@ final class NativeArrayBuffer extends ScriptObject {
return new NativeArrayBuffer(JSType.toInt32(args[0]));
}
- protected NativeArrayBuffer(final byte[] byteArray) {
- super(Global.instance().getArrayBufferPrototype(), $nasgenmap$);
+ protected NativeArrayBuffer(final byte[] byteArray, final Global global) {
+ super(global.getArrayBufferPrototype(), global.getArrayBufferMap());
this.buffer = byteArray;
}
+ protected NativeArrayBuffer(final byte[] byteArray) {
+ this(byteArray, Global.instance());
+ }
+
protected NativeArrayBuffer(final int byteLength) {
this(new byte[byteLength]);
}
diff --git a/src/jdk/nashorn/internal/objects/NativeBoolean.java b/src/jdk/nashorn/internal/objects/NativeBoolean.java
index bfbbb3d7..bb57cc71 100644
--- a/src/jdk/nashorn/internal/objects/NativeBoolean.java
+++ b/src/jdk/nashorn/internal/objects/NativeBoolean.java
@@ -40,7 +40,6 @@ import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
import jdk.nashorn.internal.runtime.linker.PrimitiveLookup;
/**
@@ -56,15 +55,23 @@ public final class NativeBoolean extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeBoolean(final boolean value) {
- this(value, Global.instance().getBooleanPrototype());
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- private NativeBoolean(final boolean value, final ScriptObject proto) {
- super(proto, $nasgenmap$);
+ private NativeBoolean(final boolean value, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
this.value = value;
}
+ NativeBoolean(final boolean flag, final Global global) {
+ this(flag, global.getBooleanPrototype(), global.getBooleanMap());
+ }
+
+ NativeBoolean(final boolean flag) {
+ this(flag, Global.instance());
+ }
+
@Override
public String safeToString() {
return "[Boolean " + toString() + "]";
@@ -131,11 +138,7 @@ public final class NativeBoolean extends ScriptObject {
final boolean flag = JSType.toBoolean(value);
if (newObj) {
- final ScriptObject proto = (self instanceof ScriptObject) ?
- ((ScriptObject)self).getProto() :
- Global.instance().getBooleanPrototype();
-
- return new NativeBoolean(flag, proto);
+ return new NativeBoolean(flag);
}
return flag;
@@ -176,10 +179,6 @@ public final class NativeBoolean extends ScriptObject {
}
private static MethodHandle findWrapFilter() {
- try {
- return MethodHandles.lookup().findStatic(NativeBoolean.class, "wrapFilter", MH.type(NativeBoolean.class, Object.class));
- } catch (NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeBoolean.class, "wrapFilter", MH.type(NativeBoolean.class, Object.class));
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeDate.java b/src/jdk/nashorn/internal/objects/NativeDate.java
index 3a7d0ef3..11ab886e 100644
--- a/src/jdk/nashorn/internal/objects/NativeDate.java
+++ b/src/jdk/nashorn/internal/objects/NativeDate.java
@@ -104,18 +104,30 @@ public final class NativeDate extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeDate() {
- this(System.currentTimeMillis());
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- NativeDate(final double time) {
- super(Global.instance().getDatePrototype(), $nasgenmap$);
+ private NativeDate(final double time, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
final ScriptEnvironment env = Global.getEnv();
this.time = time;
this.timezone = env._timezone;
}
+ NativeDate(final double time, final Global global) {
+ this(time, global.getDatePrototype(), global.getDateMap());
+ }
+
+ private NativeDate (final double time) {
+ this(time, Global.instance());
+ }
+
+ private NativeDate() {
+ this(System.currentTimeMillis());
+ }
+
@Override
public String getClassName() {
return "Date";
@@ -153,6 +165,10 @@ public final class NativeDate extends ScriptObject {
*/
@Constructor(arity = 7)
public static Object construct(final boolean isNew, final Object self, final Object... args) {
+ if (! isNew) {
+ return toStringImpl(new NativeDate(), FORMAT_DATE_TIME);
+ }
+
NativeDate result;
switch (args.length) {
case 0:
@@ -182,7 +198,7 @@ public final class NativeDate extends ScriptObject {
break;
}
- return isNew ? result : toStringImpl(new NativeDate(), FORMAT_DATE_TIME);
+ return result;
}
@Override
diff --git a/src/jdk/nashorn/internal/objects/NativeDebug.java b/src/jdk/nashorn/internal/objects/NativeDebug.java
index afcf7b2b..82757cba 100644
--- a/src/jdk/nashorn/internal/objects/NativeDebug.java
+++ b/src/jdk/nashorn/internal/objects/NativeDebug.java
@@ -49,10 +49,12 @@ import jdk.nashorn.internal.runtime.linker.LinkerCallSite;
public final class NativeDebug extends ScriptObject {
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
- NativeDebug() {
- super(Global.objectPrototype(), $nasgenmap$);
+ private NativeDebug() {
+ // don't create me!
+ throw new UnsupportedOperationException();
}
@Override
@@ -143,7 +145,7 @@ public final class NativeDebug extends ScriptObject {
*/
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR)
public static Object equals(final Object self, final Object obj1, final Object obj2) {
- return (obj1 != null) ? obj1.equals(obj2) : false;
+ return Objects.equals(obj1, obj2);
}
/**
@@ -176,6 +178,18 @@ public final class NativeDebug extends ScriptObject {
}
/**
+ * Returns the property listener count for a script object
+ *
+ * @param self self reference
+ * @param obj script object whose listener count is returned
+ * @return listener count
+ */
+ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR)
+ public static Object getListenerCount(final Object self, final Object obj) {
+ return (obj instanceof ScriptObject)? ((ScriptObject)obj).getListenerCount() : 0;
+ }
+
+ /**
* Dump all Nashorn debug mode counters. Calling this may be better if
* you want to print all counters. This way you can avoid too many callsites
* due to counter access itself!!
@@ -196,6 +210,8 @@ public final class NativeDebug extends ScriptObject {
out.println("ScriptFunction allocations " + ScriptFunction.getAllocations());
out.println("PropertyMap count " + PropertyMap.getCount());
out.println("PropertyMap cloned " + PropertyMap.getClonedCount());
+ out.println("PropertyMap shared " + PropertyMap.getSharedCount());
+ out.println("PropertyMap duplicated " + PropertyMap.getDuplicatedCount());
out.println("PropertyMap history hit " + PropertyMap.getHistoryHit());
out.println("PropertyMap proto invalidations " + PropertyMap.getProtoInvalidations());
out.println("PropertyMap proto history hit " + PropertyMap.getProtoHistoryHit());
diff --git a/src/jdk/nashorn/internal/objects/NativeError.java b/src/jdk/nashorn/internal/objects/NativeError.java
index 07f5d65a..dc6aef90 100644
--- a/src/jdk/nashorn/internal/objects/NativeError.java
+++ b/src/jdk/nashorn/internal/objects/NativeError.java
@@ -31,7 +31,6 @@ import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import jdk.nashorn.api.scripting.NashornException;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Constructor;
import jdk.nashorn.internal.objects.annotations.Function;
@@ -87,8 +86,12 @@ public final class NativeError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeError(final Object msg) {
- super(Global.instance().getErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private NativeError(final Object msg, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -96,6 +99,14 @@ public final class NativeError extends ScriptObject {
}
}
+ NativeError(final Object msg, final Global global) {
+ this(msg, global.getErrorPrototype(), global.getErrorMap());
+ }
+
+ private NativeError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
@@ -119,6 +130,7 @@ public final class NativeError extends ScriptObject {
* Nashorn extension: Error.captureStackTrace. Capture stack trace at the point of call into the Error object provided.
*
* @param self self reference
+ * @param errorObj the error object
* @return undefined
*/
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR)
@@ -286,9 +298,9 @@ public final class NativeError extends ScriptObject {
final Object exception = ECMAException.getException(sobj);
if (exception instanceof Throwable) {
return getScriptStackString(sobj, (Throwable)exception);
- } else {
- return "";
}
+
+ return "";
}
/**
@@ -353,11 +365,7 @@ public final class NativeError extends ScriptObject {
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- try {
- return MethodHandles.lookup().findStatic(NativeError.class, name, MH.type(rtype, types));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeError.class, name, MH.type(rtype, types));
}
private static String getScriptStackString(final ScriptObject sobj, final Throwable exp) {
diff --git a/src/jdk/nashorn/internal/objects/NativeEvalError.java b/src/jdk/nashorn/internal/objects/NativeEvalError.java
index 2b88f7dc..89e9485f 100644
--- a/src/jdk/nashorn/internal/objects/NativeEvalError.java
+++ b/src/jdk/nashorn/internal/objects/NativeEvalError.java
@@ -58,8 +58,12 @@ public final class NativeEvalError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeEvalError(final Object msg) {
- super(Global.instance().getEvalErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private NativeEvalError(final Object msg, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -67,12 +71,19 @@ public final class NativeEvalError extends ScriptObject {
}
}
+ NativeEvalError(final Object msg, final Global global) {
+ this(msg, global.getEvalErrorPrototype(), global.getEvalErrorMap());
+ }
+
+ private NativeEvalError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
}
-
/**
* ECMA 15.11.6.1 EvalError
*
diff --git a/src/jdk/nashorn/internal/objects/NativeFloat32Array.java b/src/jdk/nashorn/internal/objects/NativeFloat32Array.java
index beb7d50e..614fd6f5 100644
--- a/src/jdk/nashorn/internal/objects/NativeFloat32Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeFloat32Array.java
@@ -48,6 +48,7 @@ public final class NativeFloat32Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 4;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -191,7 +192,7 @@ public final class NativeFloat32Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getFloat32ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getFloat32ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeFloat64Array.java b/src/jdk/nashorn/internal/objects/NativeFloat64Array.java
index 3451e315..22467bcc 100644
--- a/src/jdk/nashorn/internal/objects/NativeFloat64Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeFloat64Array.java
@@ -48,6 +48,7 @@ public final class NativeFloat64Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 8;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -201,7 +202,7 @@ public final class NativeFloat64Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getFloat64ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getFloat64ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeFunction.java b/src/jdk/nashorn/internal/objects/NativeFunction.java
index 7df1b521..c208a35c 100644
--- a/src/jdk/nashorn/internal/objects/NativeFunction.java
+++ b/src/jdk/nashorn/internal/objects/NativeFunction.java
@@ -29,6 +29,7 @@ import static jdk.nashorn.internal.runtime.ECMAErrors.typeError;
import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
import java.util.List;
+
import jdk.nashorn.api.scripting.ScriptObjectMirror;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Constructor;
@@ -55,10 +56,12 @@ import jdk.nashorn.internal.runtime.Source;
public final class NativeFunction {
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
// do *not* create me!
private NativeFunction() {
+ throw new UnsupportedOperationException();
}
/**
diff --git a/src/jdk/nashorn/internal/objects/NativeInt16Array.java b/src/jdk/nashorn/internal/objects/NativeInt16Array.java
index d05c69d7..904dbce0 100644
--- a/src/jdk/nashorn/internal/objects/NativeInt16Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeInt16Array.java
@@ -42,6 +42,7 @@ import jdk.nashorn.internal.runtime.arrays.ArrayData;
public final class NativeInt16Array extends ArrayBufferView {
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
/**
@@ -150,7 +151,7 @@ public final class NativeInt16Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getInt16ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getInt16ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeInt32Array.java b/src/jdk/nashorn/internal/objects/NativeInt32Array.java
index 596b935c..78aed11f 100644
--- a/src/jdk/nashorn/internal/objects/NativeInt32Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeInt32Array.java
@@ -47,6 +47,7 @@ public final class NativeInt32Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 4;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -153,7 +154,7 @@ public final class NativeInt32Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getInt32ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getInt32ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeInt8Array.java b/src/jdk/nashorn/internal/objects/NativeInt8Array.java
index f1a9b7f7..3ed5688a 100644
--- a/src/jdk/nashorn/internal/objects/NativeInt8Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeInt8Array.java
@@ -47,6 +47,7 @@ public final class NativeInt8Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 1;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -143,7 +144,7 @@ public final class NativeInt8Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getInt8ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getInt8ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeJSAdapter.java b/src/jdk/nashorn/internal/objects/NativeJSAdapter.java
index 5db4a1fd..5b89e2ca 100644
--- a/src/jdk/nashorn/internal/objects/NativeJSAdapter.java
+++ b/src/jdk/nashorn/internal/objects/NativeJSAdapter.java
@@ -48,7 +48,7 @@ import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.arrays.ArrayLikeIterator;
import jdk.nashorn.internal.lookup.Lookup;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
+import jdk.nashorn.internal.scripts.JO;
/**
* This class is the implementation of the Nashorn-specific global object named {@code JSAdapter}. It can be
@@ -146,8 +146,12 @@ public final class NativeJSAdapter extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeJSAdapter(final ScriptObject proto, final Object overrides, final ScriptObject adaptee) {
- super(proto, $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ NativeJSAdapter(final Object overrides, final ScriptObject adaptee, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
this.adaptee = wrapAdaptee(adaptee);
if (overrides instanceof ScriptObject) {
this.overrides = true;
@@ -159,9 +163,7 @@ public final class NativeJSAdapter extends ScriptObject {
}
private static ScriptObject wrapAdaptee(final ScriptObject adaptee) {
- final ScriptObject sobj = new jdk.nashorn.internal.scripts.JO();
- sobj.setProto(adaptee);
- return sobj;
+ return new JO(adaptee, Global.instance().getObjectMap());
}
@Override
@@ -570,11 +572,12 @@ public final class NativeJSAdapter extends ScriptObject {
throw typeError("not.an.object", ScriptRuntime.safeToString(adaptee));
}
+ final Global global = Global.instance();
if (proto != null && !(proto instanceof ScriptObject)) {
- proto = Global.instance().getJSAdapterPrototype();
+ proto = global.getJSAdapterPrototype();
}
- return new NativeJSAdapter((ScriptObject)proto, overrides, (ScriptObject)adaptee);
+ return new NativeJSAdapter(overrides, (ScriptObject)adaptee, (ScriptObject)proto, global.getJSAdapterMap());
}
@Override
@@ -619,12 +622,15 @@ public final class NativeJSAdapter extends ScriptObject {
case "getMethod":
final FindProperty find = adaptee.findProperty(__call__, true);
if (find != null) {
- final ScriptFunctionImpl func = (ScriptFunctionImpl)getObjectValue(find);
- // TODO: It's a shame we need to produce a function bound to this and name, when we'd only need it bound
- // to name. Probably not a big deal, but if we can ever make it leaner, it'd be nice.
- return new GuardedInvocation(MH.dropArguments(MH.constant(Object.class,
- func.makeBoundFunction(this, new Object[] { name })), 0, Object.class),
- adaptee.getMap().getProtoGetSwitchPoint(adaptee.getProto(), __call__), testJSAdaptor(adaptee, null, null, null));
+ final Object value = getObjectValue(find);
+ if (value instanceof ScriptFunction) {
+ final ScriptFunctionImpl func = (ScriptFunctionImpl)value;
+ // TODO: It's a shame we need to produce a function bound to this and name, when we'd only need it bound
+ // to name. Probably not a big deal, but if we can ever make it leaner, it'd be nice.
+ return new GuardedInvocation(MH.dropArguments(MH.constant(Object.class,
+ func.makeBoundFunction(this, new Object[] { name })), 0, Object.class),
+ adaptee.getMap().getProtoGetSwitchPoint(adaptee.getProto(), __call__), testJSAdaptor(adaptee, null, null, null));
+ }
}
throw typeError("no.such.function", desc.getNameToken(2), ScriptRuntime.safeToString(this));
default:
@@ -684,16 +690,19 @@ public final class NativeJSAdapter extends ScriptObject {
final MethodType type = desc.getMethodType();
if (findData != null) {
final String name = desc.getNameTokenCount() > 2 ? desc.getNameToken(2) : null;
- final ScriptFunction func = (ScriptFunction)getObjectValue(findData);
+ final Object value = getObjectValue(findData);
+ if (value instanceof ScriptFunction) {
+ final ScriptFunction func = (ScriptFunction)value;
- final MethodHandle methodHandle = getCallMethodHandle(findData, type,
+ final MethodHandle methodHandle = getCallMethodHandle(findData, type,
useName ? name : null);
- if (methodHandle != null) {
- return new GuardedInvocation(
- methodHandle,
- adaptee.getMap().getProtoGetSwitchPoint(adaptee.getProto(), hook),
- testJSAdaptor(adaptee, findData.getGetter(Object.class), findData.getOwner(), func));
- }
+ if (methodHandle != null) {
+ return new GuardedInvocation(
+ methodHandle,
+ adaptee.getMap().getProtoGetSwitchPoint(adaptee.getProto(), hook),
+ testJSAdaptor(adaptee, findData.getGetter(Object.class), findData.getOwner(), func));
+ }
+ }
}
switch (hook) {
@@ -736,10 +745,6 @@ public final class NativeJSAdapter extends ScriptObject {
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- try {
- return MethodHandles.lookup().findStatic(NativeJSAdapter.class, name, MH.type(rtype, types));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeJSAdapter.class, name, MH.type(rtype, types));
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeJSON.java b/src/jdk/nashorn/internal/objects/NativeJSON.java
index 3270bc84..863d531b 100644
--- a/src/jdk/nashorn/internal/objects/NativeJSON.java
+++ b/src/jdk/nashorn/internal/objects/NativeJSON.java
@@ -60,10 +60,12 @@ public final class NativeJSON extends ScriptObject {
ScriptFunction.class, ScriptObject.class, Object.class, Object.class);
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
- NativeJSON() {
- super(Global.objectPrototype(), $nasgenmap$);
+ private NativeJSON() {
+ // don't create me!!
+ throw new UnsupportedOperationException();
}
/**
diff --git a/src/jdk/nashorn/internal/objects/NativeJava.java b/src/jdk/nashorn/internal/objects/NativeJava.java
index 7a9ec38f..be63e531 100644
--- a/src/jdk/nashorn/internal/objects/NativeJava.java
+++ b/src/jdk/nashorn/internal/objects/NativeJava.java
@@ -32,12 +32,14 @@ import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Deque;
import java.util.List;
+
import jdk.internal.dynalink.beans.StaticClass;
import jdk.internal.dynalink.support.TypeUtilities;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Function;
import jdk.nashorn.internal.objects.annotations.ScriptClass;
import jdk.nashorn.internal.objects.annotations.Where;
+import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.ListAdapter;
import jdk.nashorn.internal.runtime.PropertyMap;
@@ -54,9 +56,12 @@ import jdk.nashorn.internal.runtime.linker.JavaAdapterFactory;
public final class NativeJava {
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private NativeJava() {
+ // don't create me
+ throw new UnsupportedOperationException();
}
/**
@@ -103,12 +108,22 @@ public final class NativeJava {
* var anArrayList = new ArrayList
* var anArrayListWithSize = new ArrayList(16)
* </pre>
- * In the special case of inner classes, you need to use the JVM fully qualified name, meaning using {@code $} sign
- * in the class name:
+ * In the special case of inner classes, you can either use the JVM fully qualified name, meaning using {@code $}
+ * sign in the class name, or you can use the dot:
* <pre>
* var ftype = Java.type("java.awt.geom.Arc2D$Float")
* </pre>
- * However, once you retrieved the outer class, you can access the inner class as a property on it:
+ * and
+ * <pre>
+ * var ftype = Java.type("java.awt.geom.Arc2D.Float")
+ * </pre>
+ * both work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name
+ * as it is originally specified, and the internal JVM names for inner classes use the dollar sign. If you use the
+ * dot, Java.type will internally get a ClassNotFoundException and subsequently retry by changing the last dot to
+ * dollar sign. As a matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads
+ * the class or runs out of all dots in the name. This way it can correctly resolve and load even multiply nested
+ * inner classes with the dot notation. Again, this will be slower than using the dollar signs in the name. An
+ * alternative way to access the inner class is as a property of the outer class:
* <pre>
* var arctype = Java.type("java.awt.geom.Arc2D")
* var ftype = arctype.Float
@@ -388,7 +403,33 @@ public final class NativeJava {
private static Class<?> simpleType(final String typeName) throws ClassNotFoundException {
final Class<?> primClass = TypeUtilities.getPrimitiveTypeByName(typeName);
- return primClass != null ? primClass : Global.getThisContext().findClass(typeName);
+ if(primClass != null) {
+ return primClass;
+ }
+ final Context ctx = Global.getThisContext();
+ try {
+ return ctx.findClass(typeName);
+ } catch(ClassNotFoundException e) {
+ // The logic below compensates for a frequent user error - when people use dot notation to separate inner
+ // class names, i.e. "java.lang.Character.UnicodeBlock" vs."java.lang.Character$UnicodeBlock". The logic
+ // below will try alternative class names, replacing dots at the end of the name with dollar signs.
+ final StringBuilder nextName = new StringBuilder(typeName);
+ int lastDot = nextName.length();
+ for(;;) {
+ lastDot = nextName.lastIndexOf(".", lastDot - 1);
+ if(lastDot == -1) {
+ // Exhausted the search space, class not found - rethrow the original exception.
+ throw e;
+ }
+ nextName.setCharAt(lastDot, '$');
+ try {
+ return ctx.findClass(nextName.toString());
+ } catch(ClassNotFoundException cnfe) {
+ // Intentionally ignored, so the loop retries with the next name
+ }
+ }
+ }
+
}
private static Class<?> arrayType(final String typeName) throws ClassNotFoundException {
diff --git a/src/jdk/nashorn/internal/objects/NativeJavaImporter.java b/src/jdk/nashorn/internal/objects/NativeJavaImporter.java
index 9d4c15ac..c2d2bd10 100644
--- a/src/jdk/nashorn/internal/objects/NativeJavaImporter.java
+++ b/src/jdk/nashorn/internal/objects/NativeJavaImporter.java
@@ -59,11 +59,23 @@ public final class NativeJavaImporter extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeJavaImporter(final Object[] args) {
- super(Global.instance().getJavaImporterPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private NativeJavaImporter(final Object[] args, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
this.args = args;
}
+ private NativeJavaImporter(final Object[] args, final Global global) {
+ this(args, global.getJavaImporterPrototype(), global.getJavaImporterMap());
+ }
+
+ private NativeJavaImporter(final Object[] args) {
+ this(args, Global.instance());
+ }
+
@Override
public String getClassName() {
return "JavaImporter";
diff --git a/src/jdk/nashorn/internal/objects/NativeMath.java b/src/jdk/nashorn/internal/objects/NativeMath.java
index 2b093548..cc50fbb4 100644
--- a/src/jdk/nashorn/internal/objects/NativeMath.java
+++ b/src/jdk/nashorn/internal/objects/NativeMath.java
@@ -43,10 +43,12 @@ import jdk.nashorn.internal.runtime.ScriptObject;
public final class NativeMath extends ScriptObject {
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
- NativeMath() {
- super(Global.objectPrototype(), $nasgenmap$);
+ private NativeMath() {
+ // don't create me!
+ throw new UnsupportedOperationException();
}
/** ECMA 15.8.1.1 - E, always a double constant. Not writable or configurable */
diff --git a/src/jdk/nashorn/internal/objects/NativeNumber.java b/src/jdk/nashorn/internal/objects/NativeNumber.java
index 94a7cca1..d9d568b7 100644
--- a/src/jdk/nashorn/internal/objects/NativeNumber.java
+++ b/src/jdk/nashorn/internal/objects/NativeNumber.java
@@ -48,7 +48,6 @@ import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
import jdk.nashorn.internal.runtime.linker.PrimitiveLookup;
/**
@@ -87,17 +86,26 @@ public final class NativeNumber extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeNumber(final double value) {
- this(value, Global.instance().getNumberPrototype());
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- private NativeNumber(final double value, final ScriptObject proto) {
- super(proto, $nasgenmap$);
+ private NativeNumber(final double value, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
this.value = value;
this.isInt = isRepresentableAsInt(value);
this.isLong = isRepresentableAsLong(value);
}
+ NativeNumber(final double value, final Global global) {
+ this(value, global.getNumberPrototype(), global.getNumberMap());
+ }
+
+ private NativeNumber(final double value) {
+ this(value, Global.instance());
+ }
+
+
@Override
public String safeToString() {
return "[Number " + toString() + "]";
@@ -165,16 +173,7 @@ public final class NativeNumber extends ScriptObject {
public static Object constructor(final boolean newObj, final Object self, final Object... args) {
final double num = (args.length > 0) ? JSType.toNumber(args[0]) : 0.0;
- if (newObj) {
- final ScriptObject proto =
- (self instanceof ScriptObject) ?
- ((ScriptObject)self).getProto() :
- Global.instance().getNumberPrototype();
-
- return new NativeNumber(num, proto);
- }
-
- return num;
+ return newObj? new NativeNumber(num) : num;
}
/**
@@ -380,10 +379,6 @@ public final class NativeNumber extends ScriptObject {
}
private static MethodHandle findWrapFilter() {
- try {
- return MethodHandles.lookup().findStatic(NativeNumber.class, "wrapFilter", MH.type(NativeNumber.class, Object.class));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeNumber.class, "wrapFilter", MH.type(NativeNumber.class, Object.class));
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeObject.java b/src/jdk/nashorn/internal/objects/NativeObject.java
index 10340345..b392c662 100644
--- a/src/jdk/nashorn/internal/objects/NativeObject.java
+++ b/src/jdk/nashorn/internal/objects/NativeObject.java
@@ -28,18 +28,37 @@ package jdk.nashorn.internal.objects;
import static jdk.nashorn.internal.runtime.ECMAErrors.typeError;
import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import jdk.internal.dynalink.beans.BeansLinker;
+import jdk.internal.dynalink.beans.StaticClass;
+import jdk.internal.dynalink.linker.GuardedInvocation;
+import jdk.internal.dynalink.linker.GuardingDynamicLinker;
+import jdk.internal.dynalink.linker.LinkRequest;
+import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
+import jdk.internal.dynalink.support.LinkRequestImpl;
import jdk.nashorn.api.scripting.ScriptObjectMirror;
+import jdk.nashorn.internal.lookup.Lookup;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Constructor;
import jdk.nashorn.internal.objects.annotations.Function;
import jdk.nashorn.internal.objects.annotations.ScriptClass;
import jdk.nashorn.internal.objects.annotations.Where;
+import jdk.nashorn.internal.runtime.AccessorProperty;
import jdk.nashorn.internal.runtime.ECMAException;
import jdk.nashorn.internal.runtime.JSType;
+import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
+import jdk.nashorn.internal.runtime.linker.Bootstrap;
import jdk.nashorn.internal.runtime.linker.InvokeByName;
/**
@@ -53,11 +72,16 @@ import jdk.nashorn.internal.runtime.linker.InvokeByName;
@ScriptClass("Object")
public final class NativeObject {
private static final InvokeByName TO_STRING = new InvokeByName("toString", ScriptObject.class);
+ private static final MethodType MIRROR_GETTER_TYPE = MethodType.methodType(Object.class, ScriptObjectMirror.class);
+ private static final MethodType MIRROR_SETTER_TYPE = MethodType.methodType(Object.class, ScriptObjectMirror.class, Object.class);
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private NativeObject() {
+ // don't create me!
+ throw new UnsupportedOperationException();
}
private static ECMAException notAnObject(final Object obj) {
@@ -469,4 +493,192 @@ public final class NativeObject {
return false;
}
+
+ /**
+ * Nashorn extension: Object.bindProperties
+ *
+ * Binds the source object's properties to the target object. Binding
+ * properties allows two-way read/write for the properties of the source object.
+ *
+ * Example:
+ * <pre>
+ * var obj = { x: 34, y: 100 };
+ * var foo = {}
+ *
+ * // bind properties of "obj" to "foo" object
+ * Object.bindProperties(foo, obj);
+ *
+ * // now, we can access/write on 'foo' properties
+ * print(foo.x); // prints obj.x which is 34
+ *
+ * // update obj.x via foo.x
+ * foo.x = "hello";
+ * print(obj.x); // prints "hello" now
+ *
+ * obj.x = 42; // foo.x also becomes 42
+ * print(foo.x); // prints 42
+ * </pre>
+ * <p>
+ * The source object bound can be a ScriptObject or a ScriptOjectMirror.
+ * null or undefined source object results in TypeError being thrown.
+ * </p>
+ * Example:
+ * <pre>
+ * var obj = loadWithNewGlobal({
+ * name: "test",
+ * script: "obj = { x: 33, y: 'hello' }"
+ * });
+ *
+ * // bind 'obj's properties to global scope 'this'
+ * Object.bindProperties(this, obj);
+ * print(x); // prints 33
+ * print(y); // prints "hello"
+ * x = Math.PI; // changes obj.x to Math.PI
+ * print(obj.x); // prints Math.PI
+ * </pre>
+ *
+ * Limitations of property binding:
+ * <ul>
+ * <li> Only enumerable, immediate (not proto inherited) properties of the source object are bound.
+ * <li> If the target object already contains a property called "foo", the source's "foo" is skipped (not bound).
+ * <li> Properties added to the source object after binding to the target are not bound.
+ * <li> Property configuration changes on the source object (or on the target) is not propagated.
+ * <li> Delete of property on the target (or the source) is not propagated -
+ * only the property value is set to 'undefined' if the property happens to be a data property.
+ * </ul>
+ * <p>
+ * It is recommended that the bound properties be treated as non-configurable
+ * properties to avoid surprises.
+ * </p>
+ *
+ * @param self self reference
+ * @param target the target object to which the source object's properties are bound
+ * @param source the source object whose properties are bound to the target
+ * @return the target object after property binding
+ */
+ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR)
+ public static Object bindProperties(final Object self, final Object target, final Object source) {
+ // target object has to be a ScriptObject
+ Global.checkObject(target);
+ // check null or undefined source object
+ Global.checkObjectCoercible(source);
+
+ final ScriptObject targetObj = (ScriptObject)target;
+
+ if (source instanceof ScriptObject) {
+ final ScriptObject sourceObj = (ScriptObject)source;
+ final Property[] properties = sourceObj.getMap().getProperties();
+
+ // filter non-enumerable properties
+ final ArrayList<Property> propList = new ArrayList<>();
+ for (Property prop : properties) {
+ if (prop.isEnumerable()) {
+ propList.add(prop);
+ }
+ }
+
+ if (! propList.isEmpty()) {
+ targetObj.addBoundProperties(sourceObj, propList.toArray(new Property[propList.size()]));
+ }
+ } else if (source instanceof ScriptObjectMirror) {
+ // get enumerable, immediate properties of mirror
+ final ScriptObjectMirror mirror = (ScriptObjectMirror)source;
+ final String[] keys = mirror.getOwnKeys(false);
+ if (keys.length == 0) {
+ // nothing to bind
+ return target;
+ }
+
+ // make accessor properties using dynamic invoker getters and setters
+ final AccessorProperty[] props = new AccessorProperty[keys.length];
+ for (int idx = 0; idx < keys.length; idx++) {
+ final String name = keys[idx];
+ final MethodHandle getter = Bootstrap.createDynamicInvoker("dyn:getMethod|getProp|getElem:" + name, MIRROR_GETTER_TYPE);
+ final MethodHandle setter = Bootstrap.createDynamicInvoker("dyn:setProp|setElem:" + name, MIRROR_SETTER_TYPE);
+ props[idx] = (AccessorProperty.create(name, 0, getter, setter));
+ }
+
+ targetObj.addBoundProperties(source, props);
+ } else if (source instanceof StaticClass) {
+ final Class<?> clazz = ((StaticClass)source).getRepresentedClass();
+ bindBeanProperties(targetObj, source, BeansLinker.getReadableStaticPropertyNames(clazz),
+ BeansLinker.getWritableStaticPropertyNames(clazz), BeansLinker.getStaticMethodNames(clazz));
+ } else {
+ final Class<?> clazz = source.getClass();
+ bindBeanProperties(targetObj, source, BeansLinker.getReadableInstancePropertyNames(clazz),
+ BeansLinker.getWritableInstancePropertyNames(clazz), BeansLinker.getInstanceMethodNames(clazz));
+ }
+
+ return target;
+ }
+
+ private static void bindBeanProperties(final ScriptObject targetObj, final Object source,
+ final Collection<String> readablePropertyNames, final Collection<String> writablePropertyNames,
+ final Collection<String> methodNames) {
+ final Set<String> propertyNames = new HashSet<>(readablePropertyNames);
+ propertyNames.addAll(writablePropertyNames);
+
+ final Class<?> clazz = source.getClass();
+ Bootstrap.checkReflectionAccess(clazz);
+
+ final MethodType getterType = MethodType.methodType(Object.class, clazz);
+ final MethodType setterType = MethodType.methodType(Object.class, clazz, Object.class);
+
+ final GuardingDynamicLinker linker = BeansLinker.getLinkerForClass(clazz);
+
+ final List<AccessorProperty> properties = new ArrayList<>(propertyNames.size() + methodNames.size());
+ for(final String methodName: methodNames) {
+ properties.add(AccessorProperty.create(methodName, Property.NOT_WRITABLE,
+ getBoundBeanMethodGetter(source, getBeanOperation(linker, "dyn:getMethod:" + methodName, getterType, source)),
+ null));
+ }
+ for(final String propertyName: propertyNames) {
+ final boolean isWritable = writablePropertyNames.contains(propertyName);
+ properties.add(AccessorProperty.create(propertyName, isWritable ? 0 : Property.NOT_WRITABLE,
+ readablePropertyNames.contains(propertyName) ? getBeanOperation(linker, "dyn:getProp:" + propertyName, getterType, source) : Lookup.EMPTY_GETTER,
+ isWritable ? getBeanOperation(linker, "dyn:setProp:" + propertyName, setterType, source) : Lookup.EMPTY_SETTER));
+ }
+
+ targetObj.addBoundProperties(source, properties.toArray(new AccessorProperty[properties.size()]));
+ }
+
+ private static MethodHandle getBoundBeanMethodGetter(Object source, MethodHandle methodGetter) {
+ try {
+ // NOTE: we're relying on the fact that "dyn:getMethod:..." return value is constant for any given method
+ // name and object linked with BeansLinker. (Actually, an even stronger assumption is true: return value is
+ // constant for any given method name and object's class.)
+ return MethodHandles.dropArguments(MethodHandles.constant(Object.class,
+ Bootstrap.bindDynamicMethod(methodGetter.invoke(source), source)), 0, Object.class);
+ } catch(RuntimeException|Error e) {
+ throw e;
+ } catch(Throwable t) {
+ throw new RuntimeException(t);
+ }
+ }
+
+ private static MethodHandle getBeanOperation(final GuardingDynamicLinker linker, final String operation,
+ final MethodType methodType, final Object source) {
+ final GuardedInvocation inv;
+ try {
+ inv = linker.getGuardedInvocation(createLinkRequest(operation, methodType, source),
+ Bootstrap.getLinkerServices());
+ assert passesGuard(source, inv.getGuard());
+ } catch(RuntimeException|Error e) {
+ throw e;
+ } catch(Throwable t) {
+ throw new RuntimeException(t);
+ }
+ assert inv.getSwitchPoint() == null; // Linkers in Dynalink's beans package don't use switchpoints.
+ // We discard the guard, as all method handles will be bound to a specific object.
+ return inv.getInvocation();
+ }
+
+ private static boolean passesGuard(final Object obj, final MethodHandle guard) throws Throwable {
+ return guard == null || (boolean)guard.invoke(obj);
+ }
+
+ private static LinkRequest createLinkRequest(String operation, MethodType methodType, Object source) {
+ return new LinkRequestImpl(CallSiteDescriptorFactory.create(MethodHandles.publicLookup(), operation,
+ methodType), false, source);
+ }
}
diff --git a/src/jdk/nashorn/internal/objects/NativeRangeError.java b/src/jdk/nashorn/internal/objects/NativeRangeError.java
index faf68f87..d51a0c09 100644
--- a/src/jdk/nashorn/internal/objects/NativeRangeError.java
+++ b/src/jdk/nashorn/internal/objects/NativeRangeError.java
@@ -58,8 +58,12 @@ public final class NativeRangeError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeRangeError(final Object msg) {
- super(Global.instance().getRangeErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private NativeRangeError(final Object msg, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -67,6 +71,14 @@ public final class NativeRangeError extends ScriptObject {
}
}
+ NativeRangeError(final Object msg, final Global global) {
+ this(msg, global.getRangeErrorPrototype(), global.getRangeErrorMap());
+ }
+
+ private NativeRangeError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
diff --git a/src/jdk/nashorn/internal/objects/NativeReferenceError.java b/src/jdk/nashorn/internal/objects/NativeReferenceError.java
index 954eed64..a269b515 100644
--- a/src/jdk/nashorn/internal/objects/NativeReferenceError.java
+++ b/src/jdk/nashorn/internal/objects/NativeReferenceError.java
@@ -58,8 +58,12 @@ public final class NativeReferenceError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeReferenceError(final Object msg) {
- super(Global.instance().getReferenceErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private NativeReferenceError(final Object msg, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -67,6 +71,14 @@ public final class NativeReferenceError extends ScriptObject {
}
}
+ NativeReferenceError(final Object msg, final Global global) {
+ this(msg, global.getReferenceErrorPrototype(), global.getReferenceErrorMap());
+ }
+
+ private NativeReferenceError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
diff --git a/src/jdk/nashorn/internal/objects/NativeRegExp.java b/src/jdk/nashorn/internal/objects/NativeRegExp.java
index bec8b37d..e6aa4be4 100644
--- a/src/jdk/nashorn/internal/objects/NativeRegExp.java
+++ b/src/jdk/nashorn/internal/objects/NativeRegExp.java
@@ -68,9 +68,20 @@ public final class NativeRegExp extends ScriptObject {
private Global globalObject;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
- NativeRegExp(final String input, final String flagString) {
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ private NativeRegExp(final Global global) {
+ super(global.getRegExpPrototype(), global.getRegExpMap());
+ this.globalObject = global;
+ }
+
+ NativeRegExp(final String input, final String flagString, final Global global) {
+ this(global);
try {
this.regexp = RegExpFactory.create(input, flagString);
} catch (final ParserException e) {
@@ -80,17 +91,24 @@ public final class NativeRegExp extends ScriptObject {
}
this.setLastIndex(0);
- init();
+ }
+
+ NativeRegExp(final String input, final String flagString) {
+ this(input, flagString, Global.instance());
+ }
+
+ NativeRegExp(final String string, final Global global) {
+ this(string, "", global);
}
NativeRegExp(final String string) {
- this(string, "");
+ this(string, Global.instance());
}
NativeRegExp(final NativeRegExp regExp) {
+ this(Global.instance());
this.lastIndex = regExp.getLastIndexObject();
this.regexp = regExp.getRegExp();
- init();
}
@Override
@@ -614,7 +632,7 @@ public final class NativeRegExp extends ScriptObject {
return null;
}
- return new NativeRegExpExecResult(match);
+ return new NativeRegExpExecResult(match, globalObject);
}
/**
@@ -885,12 +903,6 @@ public final class NativeRegExp extends ScriptObject {
this.lastIndex = JSType.toObject(lastIndex);
}
- private void init() {
- // Keep reference to global object to support "static" properties of RegExp
- this.globalObject = Global.instance();
- this.setProto(globalObject.getRegExpPrototype());
- }
-
private static NativeRegExp checkRegExp(final Object self) {
Global.checkObjectCoercible(self);
if (self instanceof NativeRegExp) {
diff --git a/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java b/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
index 66720552..3508e5f6 100644
--- a/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
+++ b/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
@@ -53,8 +53,12 @@ public final class NativeRegExpExecResult extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeRegExpExecResult(final RegExpResult result) {
- super(Global.instance().getArrayPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ NativeRegExpExecResult(final RegExpResult result, final Global global) {
+ super(global.getArrayPrototype(), global.getRegExpExecResultMap());
setIsArray();
this.setArray(ArrayData.allocate(result.getGroups().clone()));
this.index = result.getIndex();
diff --git a/src/jdk/nashorn/internal/objects/NativeStrictArguments.java b/src/jdk/nashorn/internal/objects/NativeStrictArguments.java
index cf434f9f..de6e4b51 100644
--- a/src/jdk/nashorn/internal/objects/NativeStrictArguments.java
+++ b/src/jdk/nashorn/internal/objects/NativeStrictArguments.java
@@ -30,14 +30,14 @@ import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
import java.util.Arrays;
+import jdk.nashorn.internal.runtime.AccessorProperty;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.arrays.ArrayData;
-import jdk.nashorn.internal.lookup.Lookup;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
/**
* ECMA 10.6 Arguments Object.
@@ -54,21 +54,26 @@ public final class NativeStrictArguments extends ScriptObject {
private static final PropertyMap map$;
static {
- PropertyMap map = PropertyMap.newMap(NativeStrictArguments.class);
- map = Lookup.newProperty(map, "length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH);
+ final ArrayList<Property> properties = new ArrayList<>(1);
+ properties.add(AccessorProperty.create("length", Property.NOT_ENUMERABLE, G$LENGTH, S$LENGTH));
+ PropertyMap map = PropertyMap.newMap(properties);
// In strict mode, the caller and callee properties should throw TypeError
// Need to add properties directly to map since slots are assigned speculatively by newUserAccessors.
final int flags = Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE;
map = map.addProperty(map.newUserAccessors("caller", flags));
map = map.addProperty(map.newUserAccessors("callee", flags));
- map$ = map;
+ map$ = map.setIsShared();
+ }
+
+ static PropertyMap getInitialMap() {
+ return map$;
}
private Object length;
private final Object[] namedArgs;
- NativeStrictArguments(final ScriptObject proto, final Object[] values, final int numParams) {
- super(proto, map$);
+ NativeStrictArguments(final Object[] values, final int numParams,final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
setIsArguments();
final ScriptFunction func = ScriptFunctionImpl.getTypeErrorThrower();
@@ -143,10 +148,6 @@ public final class NativeStrictArguments extends ScriptObject {
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- try {
- return MethodHandles.lookup().findStatic(NativeStrictArguments.class, name, MH.type(rtype, types));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeStrictArguments.class, name, MH.type(rtype, types));
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeString.java b/src/jdk/nashorn/internal/objects/NativeString.java
index a5b9ea83..aa2eec63 100644
--- a/src/jdk/nashorn/internal/objects/NativeString.java
+++ b/src/jdk/nashorn/internal/objects/NativeString.java
@@ -41,7 +41,7 @@ import java.util.Locale;
import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.linker.GuardedInvocation;
import jdk.internal.dynalink.linker.LinkRequest;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
+import jdk.nashorn.internal.lookup.MethodHandleFactory.LookupException;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Constructor;
import jdk.nashorn.internal.objects.annotations.Function;
@@ -74,12 +74,20 @@ public final class NativeString extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeString(final CharSequence value) {
- this(value, Global.instance().getStringPrototype());
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
}
- private NativeString(final CharSequence value, final ScriptObject proto) {
- super(proto, $nasgenmap$);
+ private NativeString(final CharSequence value) {
+ this(value, Global.instance());
+ }
+
+ NativeString(final CharSequence value, final Global global) {
+ this(value, global.getStringPrototype(), global.getStringMap());
+ }
+
+ private NativeString(final CharSequence value, final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
assert value instanceof String || value instanceof ConsString;
this.value = value;
}
@@ -147,9 +155,9 @@ public final class NativeString extends ScriptObject {
if (returnType == Object.class && (self instanceof String || self instanceof ConsString)) {
try {
- MethodHandle mh = MethodHandles.lookup().findStatic(NativeString.class, "get", desc.getMethodType());
+ MethodHandle mh = MH.findStatic(MethodHandles.lookup(), NativeString.class, "get", desc.getMethodType());
return new GuardedInvocation(mh, NashornGuards.getInstanceOf2Guard(String.class, ConsString.class));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
+ } catch (final LookupException e) {
// Shouldn't happen. Fall back to super
}
}
@@ -1065,10 +1073,7 @@ public final class NativeString extends ScriptObject {
}
private static Object newObj(final Object self, final CharSequence str) {
- if (self instanceof ScriptObject) {
- return new NativeString(str, ((ScriptObject)self).getProto());
- }
- return new NativeString(str, Global.instance().getStringPrototype());
+ return new NativeString(str);
}
/**
@@ -1202,10 +1207,6 @@ public final class NativeString extends ScriptObject {
}
private static MethodHandle findWrapFilter() {
- try {
- return MethodHandles.lookup().findStatic(NativeString.class, "wrapFilter", MH.type(NativeString.class, Object.class));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), NativeString.class, "wrapFilter", MH.type(NativeString.class, Object.class));
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeSyntaxError.java b/src/jdk/nashorn/internal/objects/NativeSyntaxError.java
index d7d04bba..45920ba7 100644
--- a/src/jdk/nashorn/internal/objects/NativeSyntaxError.java
+++ b/src/jdk/nashorn/internal/objects/NativeSyntaxError.java
@@ -58,8 +58,12 @@ public final class NativeSyntaxError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeSyntaxError(final Object msg) {
- super(Global.instance().getSyntaxErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ NativeSyntaxError(final Object msg, final Global global) {
+ super(global.getSyntaxErrorPrototype(), global.getSyntaxErrorMap());
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -67,6 +71,10 @@ public final class NativeSyntaxError extends ScriptObject {
}
}
+ private NativeSyntaxError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
diff --git a/src/jdk/nashorn/internal/objects/NativeTypeError.java b/src/jdk/nashorn/internal/objects/NativeTypeError.java
index c811a530..2b2308b1 100644
--- a/src/jdk/nashorn/internal/objects/NativeTypeError.java
+++ b/src/jdk/nashorn/internal/objects/NativeTypeError.java
@@ -58,8 +58,12 @@ public final class NativeTypeError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeTypeError(final Object msg) {
- super(Global.instance().getTypeErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ NativeTypeError(final Object msg, final Global global) {
+ super(global.getTypeErrorPrototype(), global.getTypeErrorMap());
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -67,6 +71,10 @@ public final class NativeTypeError extends ScriptObject {
}
}
+ private NativeTypeError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
diff --git a/src/jdk/nashorn/internal/objects/NativeURIError.java b/src/jdk/nashorn/internal/objects/NativeURIError.java
index 80df6c28..2caf1369 100644
--- a/src/jdk/nashorn/internal/objects/NativeURIError.java
+++ b/src/jdk/nashorn/internal/objects/NativeURIError.java
@@ -57,8 +57,12 @@ public final class NativeURIError extends ScriptObject {
// initialized by nasgen
private static PropertyMap $nasgenmap$;
- NativeURIError(final Object msg) {
- super(Global.instance().getURIErrorPrototype(), $nasgenmap$);
+ static PropertyMap getInitialMap() {
+ return $nasgenmap$;
+ }
+
+ NativeURIError(final Object msg, final Global global) {
+ super(global.getURIErrorPrototype(), global.getURIErrorMap());
if (msg != UNDEFINED) {
this.instMessage = JSType.toString(msg);
} else {
@@ -66,6 +70,10 @@ public final class NativeURIError extends ScriptObject {
}
}
+ private NativeURIError(final Object msg) {
+ this(msg, Global.instance());
+ }
+
@Override
public String getClassName() {
return "Error";
diff --git a/src/jdk/nashorn/internal/objects/NativeUint16Array.java b/src/jdk/nashorn/internal/objects/NativeUint16Array.java
index 39c19131..7c37bac9 100644
--- a/src/jdk/nashorn/internal/objects/NativeUint16Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeUint16Array.java
@@ -47,6 +47,7 @@ public final class NativeUint16Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 2;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -149,7 +150,7 @@ public final class NativeUint16Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getUint16ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getUint16ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeUint32Array.java b/src/jdk/nashorn/internal/objects/NativeUint32Array.java
index 37102bae..9b51db48 100644
--- a/src/jdk/nashorn/internal/objects/NativeUint32Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeUint32Array.java
@@ -48,6 +48,7 @@ public final class NativeUint32Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 4;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -168,7 +169,7 @@ public final class NativeUint32Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getUint32ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getUint32ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeUint8Array.java b/src/jdk/nashorn/internal/objects/NativeUint8Array.java
index aa6f89be..be4e59d3 100644
--- a/src/jdk/nashorn/internal/objects/NativeUint8Array.java
+++ b/src/jdk/nashorn/internal/objects/NativeUint8Array.java
@@ -47,6 +47,7 @@ public final class NativeUint8Array extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 1;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -142,7 +143,7 @@ public final class NativeUint8Array extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getUint8ArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getUint8ArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java b/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java
index 4467c856..43b777ba 100644
--- a/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java
+++ b/src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java
@@ -48,6 +48,7 @@ public final class NativeUint8ClampedArray extends ArrayBufferView {
public static final int BYTES_PER_ELEMENT = 1;
// initialized by nasgen
+ @SuppressWarnings("unused")
private static PropertyMap $nasgenmap$;
private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) {
@@ -159,7 +160,7 @@ public final class NativeUint8ClampedArray extends ArrayBufferView {
}
@Override
- protected ScriptObject getPrototype() {
- return Global.instance().getUint8ClampedArrayPrototype();
+ protected ScriptObject getPrototype(final Global global) {
+ return global.getUint8ClampedArrayPrototype();
}
}
diff --git a/src/jdk/nashorn/internal/objects/PrototypeObject.java b/src/jdk/nashorn/internal/objects/PrototypeObject.java
index 3a7205f9..837fee8b 100644
--- a/src/jdk/nashorn/internal/objects/PrototypeObject.java
+++ b/src/jdk/nashorn/internal/objects/PrototypeObject.java
@@ -30,12 +30,12 @@ import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import jdk.nashorn.internal.runtime.AccessorProperty;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
-import jdk.nashorn.internal.lookup.Lookup;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
/**
* Instances of this class serve as "prototype" object for script functions.
@@ -52,13 +52,22 @@ public class PrototypeObject extends ScriptObject {
private static final MethodHandle SET_CONSTRUCTOR = findOwnMH("setConstructor", void.class, Object.class, Object.class);
static {
- PropertyMap map = PropertyMap.newMap(PrototypeObject.class);
- map = Lookup.newProperty(map, "constructor", Property.NOT_ENUMERABLE, GET_CONSTRUCTOR, SET_CONSTRUCTOR);
- map$ = map;
+ final ArrayList<Property> properties = new ArrayList<>(1);
+ properties.add(AccessorProperty.create("constructor", Property.NOT_ENUMERABLE, GET_CONSTRUCTOR, SET_CONSTRUCTOR));
+ map$ = PropertyMap.newMap(properties).setIsShared();
+ }
+
+ static PropertyMap getInitialMap() {
+ return map$;
+ }
+
+ private PrototypeObject(final Global global, final PropertyMap map) {
+ super(map != map$? map.addAll(global.getPrototypeObjectMap()) : global.getPrototypeObjectMap());
+ setProto(global.getObjectPrototype());
}
PrototypeObject() {
- this(map$);
+ this(Global.instance(), map$);
}
/**
@@ -67,12 +76,11 @@ public class PrototypeObject extends ScriptObject {
* @param map property map
*/
public PrototypeObject(final PropertyMap map) {
- super(map != map$ ? map.addAll(map$) : map$);
- setProto(Global.objectPrototype());
+ this(Global.instance(), map);
}
PrototypeObject(final ScriptFunction func) {
- this(map$);
+ this(Global.instance(), map$);
this.constructor = func;
}
@@ -107,10 +115,6 @@ public class PrototypeObject extends ScriptObject {
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
- try {
- return MethodHandles.lookup().findStatic(PrototypeObject.class, name, MH.type(rtype, types));
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new MethodHandleFactory.LookupException(e);
- }
+ return MH.findStatic(MethodHandles.lookup(), PrototypeObject.class, name, MH.type(rtype, types));
}
}
diff --git a/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java b/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
index 6834ef4b..88421a70 100644
--- a/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
+++ b/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
@@ -28,6 +28,7 @@ package jdk.nashorn.internal.objects;
import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
import java.lang.invoke.MethodHandle;
+import java.util.ArrayList;
import jdk.nashorn.internal.runtime.GlobalFunctions;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyMap;
@@ -36,6 +37,7 @@ import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptFunctionData;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.lookup.Lookup;
+import jdk.nashorn.internal.runtime.AccessorProperty;
/**
* Concrete implementation of ScriptFunction. This sets correct map for the
@@ -53,9 +55,30 @@ public class ScriptFunctionImpl extends ScriptFunction {
// property map for non-strict, non-bound functions.
private static final PropertyMap map$;
+ static PropertyMap getInitialMap() {
+ return map$;
+ }
+
+ static PropertyMap getInitialAnonymousMap() {
+ return AnonymousFunction.getInitialMap();
+ }
+
+ static PropertyMap getInitialStrictMap() {
+ return strictmodemap$;
+ }
+
+ static PropertyMap getInitialBoundMap() {
+ return boundfunctionmap$;
+ }
+
// Marker object for lazily initialized prototype object
private static final Object LAZY_PROTOTYPE = new Object();
+ private ScriptFunctionImpl(final String name, final MethodHandle invokeHandle, final MethodHandle[] specs, final Global global) {
+ super(name, invokeHandle, global.getFunctionMap(), null, specs, false, true, true);
+ init(global);
+ }
+
/**
* Constructor called by Nasgen generated code, no membercount, use the default map.
* Creates builtin functions only.
@@ -65,8 +88,12 @@ public class ScriptFunctionImpl extends ScriptFunction {
* @param specs specialized versions of this method, if available, null otherwise
*/
ScriptFunctionImpl(final String name, final MethodHandle invokeHandle, final MethodHandle[] specs) {
- super(name, invokeHandle, map$, null, specs, false, true, true);
- init();
+ this(name, invokeHandle, specs, Global.instance());
+ }
+
+ private ScriptFunctionImpl(final String name, final MethodHandle invokeHandle, final PropertyMap map, final MethodHandle[] specs, final Global global) {
+ super(name, invokeHandle, map.addAll(global.getFunctionMap()), null, specs, false, true, true);
+ init(global);
}
/**
@@ -79,8 +106,12 @@ public class ScriptFunctionImpl extends ScriptFunction {
* @param specs specialized versions of this method, if available, null otherwise
*/
ScriptFunctionImpl(final String name, final MethodHandle invokeHandle, final PropertyMap map, final MethodHandle[] specs) {
- super(name, invokeHandle, map.addAll(map$), null, specs, false, true, true);
- init();
+ this(name, invokeHandle, map, specs, Global.instance());
+ }
+
+ private ScriptFunctionImpl(final String name, final MethodHandle methodHandle, final ScriptObject scope, final MethodHandle[] specs, final boolean isStrict, final boolean isBuiltin, final boolean isConstructor, final Global global) {
+ super(name, methodHandle, getMap(global, isStrict), scope, specs, isStrict, isBuiltin, isConstructor);
+ init(global);
}
/**
@@ -95,8 +126,12 @@ public class ScriptFunctionImpl extends ScriptFunction {
* @param isConstructor can the function be used as a constructor (most can; some built-ins are restricted).
*/
ScriptFunctionImpl(final String name, final MethodHandle methodHandle, final ScriptObject scope, final MethodHandle[] specs, final boolean isStrict, final boolean isBuiltin, final boolean isConstructor) {
- super(name, methodHandle, getMap(isStrict), scope, specs, isStrict, isBuiltin, isConstructor);
- init();
+ this(name, methodHandle, scope, specs, isStrict, isBuiltin, isConstructor, Global.instance());
+ }
+
+ private ScriptFunctionImpl(final RecompilableScriptFunctionData data, final ScriptObject scope, final Global global) {
+ super(data, getMap(global, data.isStrict()), scope);
+ init(global);
}
/**
@@ -106,27 +141,32 @@ public class ScriptFunctionImpl extends ScriptFunction {
* @param scope scope object
*/
public ScriptFunctionImpl(final RecompilableScriptFunctionData data, final ScriptObject scope) {
- super(data, getMap(data.isStrict()), scope);
- init();
+ this(data, scope, Global.instance());
}
/**
* Only invoked internally from {@link BoundScriptFunctionImpl} constructor.
* @param data the script function data for the bound function.
+ * @param global the global object
*/
- ScriptFunctionImpl(final ScriptFunctionData data) {
- super(data, boundfunctionmap$, null);
- init();
+ ScriptFunctionImpl(final ScriptFunctionData data, final Global global) {
+ super(data, global.getBoundFunctionMap(), null);
+ init(global);
}
static {
- PropertyMap map = PropertyMap.newMap(ScriptFunctionImpl.class);
- map = Lookup.newProperty(map, "prototype", Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE, G$PROTOTYPE, S$PROTOTYPE);
- map = Lookup.newProperty(map, "length", Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE | Property.NOT_WRITABLE, G$LENGTH, null);
- map = Lookup.newProperty(map, "name", Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE | Property.NOT_WRITABLE, G$NAME, null);
- map$ = map;
+ final ArrayList<Property> properties = new ArrayList<>(3);
+ properties.add(AccessorProperty.create("prototype", Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE, G$PROTOTYPE, S$PROTOTYPE));
+ properties.add(AccessorProperty.create("length", Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE | Property.NOT_WRITABLE, G$LENGTH, null));
+ properties.add(AccessorProperty.create("name", Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE | Property.NOT_WRITABLE, G$NAME, null));
+ map$ = PropertyMap.newMap(properties);
strictmodemap$ = createStrictModeMap(map$);
boundfunctionmap$ = createBoundFunctionMap(strictmodemap$);
+ // There are order dependencies between normal map, struct map and bound map
+ // We can make these 'shared' only after initialization of all three.
+ map$.setIsShared();
+ strictmodemap$.setIsShared();
+ boundfunctionmap$.setIsShared();
}
// function object representing TypeErrorThrower
@@ -149,17 +189,18 @@ public class ScriptFunctionImpl extends ScriptFunction {
return typeErrorThrower;
}
- private static PropertyMap createStrictModeMap(PropertyMap map) {
+ private static PropertyMap createStrictModeMap(final PropertyMap map) {
final int flags = Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE;
+ PropertyMap newMap = map;
// Need to add properties directly to map since slots are assigned speculatively by newUserAccessors.
- map = map.addProperty(map.newUserAccessors("arguments", flags));
- map = map.addProperty(map.newUserAccessors("caller", flags));
- return map;
+ newMap = newMap.addProperty(map.newUserAccessors("arguments", flags));
+ newMap = newMap.addProperty(map.newUserAccessors("caller", flags));
+ return newMap;
}
// Choose the map based on strict mode!
- private static PropertyMap getMap(final boolean strict) {
- return strict ? strictmodemap$ : map$;
+ private static PropertyMap getMap(final Global global, final boolean strict) {
+ return strict ? global.getStrictFunctionMap() : global.getFunctionMap();
}
private static PropertyMap createBoundFunctionMap(final PropertyMap strictModeMap) {
@@ -171,15 +212,19 @@ public class ScriptFunctionImpl extends ScriptFunction {
// Instance of this class is used as global anonymous function which
// serves as Function.prototype object.
private static class AnonymousFunction extends ScriptFunctionImpl {
- private static final PropertyMap nasgenmap$$ = PropertyMap.newMap(AnonymousFunction.class);
+ private static final PropertyMap anonmap$ = PropertyMap.newMap().setIsShared();
+
+ static PropertyMap getInitialMap() {
+ return anonmap$;
+ }
- AnonymousFunction() {
- super("", GlobalFunctions.ANONYMOUS, nasgenmap$$, null);
+ AnonymousFunction(final Global global) {
+ super("", GlobalFunctions.ANONYMOUS, global.getAnonymousFunctionMap(), null);
}
}
- static ScriptFunctionImpl newAnonymousFunction() {
- return new AnonymousFunction();
+ static ScriptFunctionImpl newAnonymousFunction(final Global global) {
+ return new AnonymousFunction(global);
}
/**
@@ -254,8 +299,8 @@ public class ScriptFunctionImpl extends ScriptFunction {
}
// Internals below..
- private void init() {
- this.setProto(Global.instance().getFunctionPrototype());
+ private void init(final Global global) {
+ this.setProto(global.getFunctionPrototype());
this.prototype = LAZY_PROTOTYPE;
// We have to fill user accessor functions late as these are stored
diff --git a/src/jdk/nashorn/internal/parser/JSONParser.java b/src/jdk/nashorn/internal/parser/JSONParser.java
index f1e68f66..cb14fcdf 100644
--- a/src/jdk/nashorn/internal/parser/JSONParser.java
+++ b/src/jdk/nashorn/internal/parser/JSONParser.java
@@ -35,6 +35,7 @@ import static jdk.nashorn.internal.parser.TokenType.STRING;
import java.util.ArrayList;
import java.util.List;
+import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.ObjectNode;
@@ -274,7 +275,7 @@ public class JSONParser extends AbstractParser {
* Parse a JSON literal from the token stream
* @return the JSON literal as a Node
*/
- private Node jsonLiteral() {
+ private Expression jsonLiteral() {
final long literalToken = token;
switch (type) {
@@ -326,7 +327,7 @@ public class JSONParser extends AbstractParser {
* Parse an array literal from the token stream
* @return the array literal as a Node
*/
- private Node arrayLiteral() {
+ private LiteralNode<Expression[]> arrayLiteral() {
// Unlike JavaScript array literals, elison is not permitted in JSON.
// Capture LBRACKET token.
@@ -334,9 +335,9 @@ public class JSONParser extends AbstractParser {
// LBRACKET tested in caller.
next();
- Node result = null;
+ LiteralNode<Expression[]> result = null;
// Prepare to accummulating elements.
- final List<Node> elements = new ArrayList<>();
+ final List<Expression> elements = new ArrayList<>();
loop:
while (true) {
@@ -368,7 +369,7 @@ loop:
* Parse an object literal from the token stream
* @return the object literal as a Node
*/
- private Node objectLiteral() {
+ private ObjectNode objectLiteral() {
// Capture LBRACE token.
final long objectToken = token;
// LBRACE tested in caller.
@@ -423,7 +424,7 @@ loop:
if (name != null) {
expect(COLON);
- final Node value = jsonLiteral();
+ final Expression value = jsonLiteral();
return new PropertyNode(propertyToken, value.getFinish(), name, value, null, null);
}
diff --git a/src/jdk/nashorn/internal/parser/Lexer.java b/src/jdk/nashorn/internal/parser/Lexer.java
index ecf67962..adb1445c 100644
--- a/src/jdk/nashorn/internal/parser/Lexer.java
+++ b/src/jdk/nashorn/internal/parser/Lexer.java
@@ -546,14 +546,27 @@ public class Lexer extends Scanner {
}
/**
+ * interface to receive line information for multi-line literals.
+ */
+ protected interface LineInfoReceiver {
+ /**
+ * Receives line information
+ * @param line last line number
+ * @param linePosition position of last line
+ */
+ public void lineInfo(int line, int linePosition);
+ }
+
+ /**
* Check whether the given token represents the beginning of a literal. If so scan
* the literal and return <tt>true</tt>, otherwise return false.
*
* @param token the token.
* @param startTokenType the token type.
+ * @parasm lir LineInfoReceiver that receives line info for multi-line string literals.
* @return True if a literal beginning with startToken was found and scanned.
*/
- protected boolean scanLiteral(final long token, final TokenType startTokenType) {
+ protected boolean scanLiteral(final long token, final TokenType startTokenType, final LineInfoReceiver lir) {
// Check if it can be a literal.
if (!canStartLiteral(startTokenType)) {
return false;
@@ -569,7 +582,7 @@ public class Lexer extends Scanner {
return scanRegEx();
} else if (ch0 == '<') {
if (ch1 == '<') {
- return scanHereString();
+ return scanHereString(lir);
} else if (Character.isJavaIdentifierStart(ch1)) {
return scanXMLLiteral();
}
@@ -1417,7 +1430,7 @@ public class Lexer extends Scanner {
*
* @return TRUE if is a here string.
*/
- private boolean scanHereString() {
+ private boolean scanHereString(final LineInfoReceiver lir) {
assert ch0 == '<' && ch1 == '<';
if (scripting) {
// Record beginning of here string.
@@ -1446,7 +1459,13 @@ public class Lexer extends Scanner {
// Record rest of line.
final State restState = saveState();
+ // keep line number updated
+ int lastLine = line;
+ int lastLinePosition = linePosition;
+
skipLine(false);
+ lastLine++;
+ lastLinePosition = position;
restState.setLimit(position);
// Record beginning of string.
@@ -1463,9 +1482,14 @@ public class Lexer extends Scanner {
}
skipLine(false);
+ lastLine++;
+ lastLinePosition = position;
stringEnd = position;
}
+ // notify last line information
+ lir.lineInfo(lastLine, lastLinePosition);
+
// Record end of string.
stringState.setLimit(stringEnd);
diff --git a/src/jdk/nashorn/internal/parser/Parser.java b/src/jdk/nashorn/internal/parser/Parser.java
index 181dcf83..fd97adde 100644
--- a/src/jdk/nashorn/internal/parser/Parser.java
+++ b/src/jdk/nashorn/internal/parser/Parser.java
@@ -54,9 +54,10 @@ import static jdk.nashorn.internal.parser.TokenType.TERNARY;
import static jdk.nashorn.internal.parser.TokenType.WHILE;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import jdk.nashorn.internal.codegen.CompilerConstants;
@@ -66,6 +67,7 @@ import jdk.nashorn.internal.ir.BaseNode;
import jdk.nashorn.internal.ir.BinaryNode;
import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.BlockLexicalContext;
+import jdk.nashorn.internal.ir.BlockStatement;
import jdk.nashorn.internal.ir.BreakNode;
import jdk.nashorn.internal.ir.BreakableNode;
import jdk.nashorn.internal.ir.CallNode;
@@ -73,7 +75,8 @@ import jdk.nashorn.internal.ir.CaseNode;
import jdk.nashorn.internal.ir.CatchNode;
import jdk.nashorn.internal.ir.ContinueNode;
import jdk.nashorn.internal.ir.EmptyNode;
-import jdk.nashorn.internal.ir.ExecuteNode;
+import jdk.nashorn.internal.ir.Expression;
+import jdk.nashorn.internal.ir.ExpressionStatement;
import jdk.nashorn.internal.ir.ForNode;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.FunctionNode.CompilationState;
@@ -127,6 +130,9 @@ public class Parser extends AbstractParser {
private static final DebugLogger LOG = new DebugLogger("parser");
+ /** to receive line information from Lexer when scanning multine literals. */
+ protected final Lexer.LineInfoReceiver lineInfoReceiver;
+
/**
* Constructor
*
@@ -151,6 +157,19 @@ public class Parser extends AbstractParser {
this.env = env;
this.namespace = new Namespace(env.getNamespace());
this.scripting = env._scripting;
+ if (this.scripting) {
+ this.lineInfoReceiver = new Lexer.LineInfoReceiver() {
+ @Override
+ public void lineInfo(final int line, final int linePosition) {
+ // update the parser maintained line information
+ Parser.this.line = line;
+ Parser.this.linePosition = linePosition;
+ }
+ };
+ } else {
+ // non-scripting mode script can't have multi-line literals
+ this.lineInfoReceiver = null;
+ }
}
/**
@@ -350,7 +369,7 @@ loop:
* @return New block.
*/
private Block newBlock() {
- return lc.push(new Block(line, token, Token.descPosition(token)));
+ return lc.push(new Block(token, Token.descPosition(token)));
}
/**
@@ -516,7 +535,7 @@ loop:
* @param rhs Right hand side expression.
* @return Verified expression.
*/
- private Node verifyAssignment(final long op, final Node lhs, final Node rhs) {
+ private Expression verifyAssignment(final long op, final Expression lhs, final Expression rhs) {
final TokenType opType = Token.descType(op);
switch (opType) {
@@ -562,7 +581,7 @@ loop:
* @param isPostfix Prefix or postfix.
* @return Reduced expression.
*/
- private static Node incDecExpression(final long firstToken, final TokenType tokenType, final Node expression, final boolean isPostfix) {
+ private static UnaryNode incDecExpression(final long firstToken, final TokenType tokenType, final Expression expression, final boolean isPostfix) {
if (isPostfix) {
return new UnaryNode(Token.recast(firstToken, tokenType == DECPREFIX ? DECPOSTFIX : INCPOSTFIX), expression.getStart(), Token.descPosition(firstToken) + Token.descLength(firstToken), expression);
}
@@ -622,8 +641,8 @@ loop:
* @return Directive value if the given statement is a directive
*/
private String getDirective(final Node stmt) {
- if (stmt instanceof ExecuteNode) {
- final Node expr = ((ExecuteNode)stmt).getExpression();
+ if (stmt instanceof ExpressionStatement) {
+ final Node expr = ((ExpressionStatement)stmt).getExpression();
if (expr instanceof LiteralNode) {
final LiteralNode<?> lit = (LiteralNode<?>)expr;
final long litToken = lit.getToken();
@@ -836,9 +855,7 @@ loop:
* Parse a statement block.
*/
private void block() {
- final Block newBlock = getBlock(true);
- // Force block execution.
- appendStatement(new ExecuteNode(newBlock.getLineNumber(), newBlock.getToken(), finish, newBlock));
+ appendStatement(new BlockStatement(line, getBlock(true)));
}
/**
@@ -921,7 +938,7 @@ loop:
verifyStrictIdent(name, "variable name");
// Assume no init.
- Node init = null;
+ Expression init = null;
// Look for initializer assignment.
if (type == ASSIGN) {
@@ -985,20 +1002,20 @@ loop:
final long expressionToken = token;
// Get expression and add as statement.
- final Node expression = expression();
+ final Expression expression = expression();
- ExecuteNode executeNode = null;
+ ExpressionStatement expressionStatement = null;
if (expression != null) {
- executeNode = new ExecuteNode(expressionLine, expressionToken, finish, expression);
- appendStatement(executeNode);
+ expressionStatement = new ExpressionStatement(expressionLine, expressionToken, finish, expression);
+ appendStatement(expressionStatement);
} else {
expect(null);
}
endOfLine();
- if (executeNode != null) {
- executeNode.setFinish(finish);
+ if (expressionStatement != null) {
+ expressionStatement.setFinish(finish);
lc.getCurrentBlock().setFinish(finish);
}
}
@@ -1020,7 +1037,7 @@ loop:
next();
expect(LPAREN);
- final Node test = expression();
+ final Expression test = expression();
expect(RPAREN);
final Block pass = getStatement();
@@ -1049,8 +1066,6 @@ loop:
// Create FOR node, capturing FOR token.
ForNode forNode = new ForNode(line, token, Token.descPosition(token), null, null, null, null, ForNode.IS_FOR);
- // Set up new block for scope of vars. Captures first token.
- Block outer = newBlock();
lc.push(forNode);
try {
@@ -1076,7 +1091,7 @@ loop:
case SEMICOLON:
break;
default:
- final Node expression = expression(unaryExpression(), COMMARIGHT.getPrecedence(), true);
+ final Expression expression = expression(unaryExpression(), COMMARIGHT.getPrecedence(), true);
forNode = forNode.setInit(lc, expression);
break;
}
@@ -1084,6 +1099,12 @@ loop:
switch (type) {
case SEMICOLON:
// for (init; test; modify)
+
+ // for each (init; test; modify) is invalid
+ if (forNode.isForEach()) {
+ throw error(AbstractParser.message("for.each.without.in"), token);
+ }
+
expect(SEMICOLON);
if (type != SEMICOLON) {
forNode = forNode.setTest(lc, expression());
@@ -1142,15 +1163,11 @@ loop:
final Block body = getStatement();
forNode = forNode.setBody(lc, body);
forNode.setFinish(body.getFinish());
- outer.setFinish(body.getFinish());
appendStatement(forNode);
} finally {
lc.pop(forNode);
- outer = restoreBlock(outer);
}
-
- appendStatement(new ExecuteNode(outer.getLineNumber(), outer.getToken(), outer.getFinish(), outer));
}
/**
@@ -1358,7 +1375,7 @@ loop:
// RETURN tested in caller.
nextOrEOL();
- Node expression = null;
+ Expression expression = null;
// SEMICOLON or expression.
switch (type) {
@@ -1394,7 +1411,7 @@ loop:
// YIELD tested in caller.
nextOrEOL();
- Node expression = null;
+ Expression expression = null;
// SEMICOLON or expression.
switch (type) {
@@ -1496,7 +1513,7 @@ loop:
while (type != RBRACE) {
// Prepare for next case.
- Node caseExpression = null;
+ Expression caseExpression = null;
final long caseToken = token;
switch (type) {
@@ -1589,7 +1606,7 @@ loop:
// THROW tested in caller.
nextOrEOL();
- Node expression = null;
+ Expression expression = null;
// SEMICOLON or expression.
switch (type) {
@@ -1637,6 +1654,7 @@ loop:
next();
// Container block needed to act as target for labeled break statements
+ final int startLine = line;
Block outer = newBlock();
// Create try.
@@ -1656,11 +1674,13 @@ loop:
verifyStrictIdent(exception, "catch argument");
// Check for conditional catch.
- Node ifExpression = null;
+ final Expression ifExpression;
if (type == IF) {
next();
// Get the exception condition.
ifExpression = expression();
+ } else {
+ ifExpression = null;
}
expect(RPAREN);
@@ -1707,7 +1727,7 @@ loop:
outer = restoreBlock(outer);
}
- appendStatement(new ExecuteNode(outer.getLineNumber(), outer.getToken(), outer.getFinish(), outer));
+ appendStatement(new BlockStatement(startLine, outer));
}
/**
@@ -1725,7 +1745,7 @@ loop:
// DEBUGGER tested in caller.
next();
endOfLine();
- appendStatement(new ExecuteNode(debuggerLine, debuggerToken, finish, new RuntimeNode(debuggerToken, finish, RuntimeNode.Request.DEBUGGER, new ArrayList<Node>())));
+ appendStatement(new ExpressionStatement(debuggerLine, debuggerToken, finish, new RuntimeNode(debuggerToken, finish, RuntimeNode.Request.DEBUGGER, new ArrayList<Expression>())));
}
/**
@@ -1743,7 +1763,7 @@ loop:
* @return Expression node.
*/
@SuppressWarnings("fallthrough")
- private Node primaryExpression() {
+ private Expression primaryExpression() {
// Capture first token.
final int primaryLine = line;
final long primaryToken = token;
@@ -1790,7 +1810,7 @@ loop:
case LPAREN:
next();
- final Node expression = expression();
+ final Expression expression = expression();
expect(RPAREN);
@@ -1798,7 +1818,7 @@ loop:
default:
// In this context some operator tokens mark the start of a literal.
- if (lexer.scanLiteral(primaryToken, type)) {
+ if (lexer.scanLiteral(primaryToken, type, lineInfoReceiver)) {
next();
return getLiteral();
}
@@ -1817,17 +1837,16 @@ loop:
* @param primaryToken Original string token.
* @return callNode to $EXEC.
*/
- Node execString(final int primaryLine, final long primaryToken) {
+ CallNode execString(final int primaryLine, final long primaryToken) {
// Synthesize an ident to call $EXEC.
final IdentNode execIdent = new IdentNode(primaryToken, finish, ScriptingFunctions.EXEC_NAME);
// Skip over EXECSTRING.
next();
// Set up argument list for call.
- final List<Node> arguments = new ArrayList<>();
// Skip beginning of edit string expression.
expect(LBRACE);
// Add the following expression to arguments.
- arguments.add(expression());
+ final List<Expression> arguments = Collections.singletonList(expression());
// Skip ending of edit string expression.
expect(RBRACE);
@@ -1854,14 +1873,14 @@ loop:
* Parse array literal.
* @return Expression node.
*/
- private Node arrayLiteral() {
+ private LiteralNode<Expression[]> arrayLiteral() {
// Capture LBRACKET token.
final long arrayToken = token;
// LBRACKET tested in caller.
next();
// Prepare to accummulating elements.
- final List<Node> elements = new ArrayList<>();
+ final List<Expression> elements = new ArrayList<>();
// Track elisions.
boolean elision = true;
loop:
@@ -1889,7 +1908,7 @@ loop:
throw error(AbstractParser.message("expected.comma", type.getNameOrType()));
}
// Add expression element.
- final Node expression = assignmentExpression(false);
+ final Expression expression = assignmentExpression(false);
if (expression != null) {
elements.add(expression);
@@ -1919,7 +1938,7 @@ loop:
* Parse an object literal.
* @return Expression node.
*/
- private Node objectLiteral() {
+ private ObjectNode objectLiteral() {
// Capture LBRACE token.
final long objectToken = token;
// LBRACE tested in caller.
@@ -1927,14 +1946,14 @@ loop:
// Object context.
// Prepare to accumulate elements.
- // final List<Node> elements = new ArrayList<>();
- final Map<String, PropertyNode> map = new LinkedHashMap<>();
+ final List<PropertyNode> elements = new ArrayList<>();
+ final Map<String, Integer> map = new HashMap<>();
// Create a block for the object literal.
- boolean commaSeen = true;
+ boolean commaSeen = true;
loop:
- while (true) {
- switch (type) {
+ while (true) {
+ switch (type) {
case RBRACE:
next();
break loop;
@@ -1956,30 +1975,29 @@ loop:
// Get and add the next property.
final PropertyNode property = propertyAssignment();
final String key = property.getKeyName();
- final PropertyNode existingProperty = map.get(key);
+ final Integer existing = map.get(key);
- if (existingProperty == null) {
- map.put(key, property);
- // elements.add(property);
+ if (existing == null) {
+ map.put(key, elements.size());
+ elements.add(property);
break;
}
+ final PropertyNode existingProperty = elements.get(existing);
+
// ECMA section 11.1.5 Object Initialiser
// point # 4 on property assignment production
- final Node value = property.getValue();
+ final Expression value = property.getValue();
final FunctionNode getter = property.getGetter();
final FunctionNode setter = property.getSetter();
- final Node prevValue = existingProperty.getValue();
+ final Expression prevValue = existingProperty.getValue();
final FunctionNode prevGetter = existingProperty.getGetter();
final FunctionNode prevSetter = existingProperty.getSetter();
- boolean redefinitionOk = true;
// ECMA 11.1.5 strict mode restrictions
- if (isStrictMode) {
- if (value != null && prevValue != null) {
- redefinitionOk = false;
- }
+ if (isStrictMode && value != null && prevValue != null) {
+ throw error(AbstractParser.message("property.redefinition", key), property.getToken());
}
final boolean isPrevAccessor = prevGetter != null || prevSetter != null;
@@ -1987,49 +2005,33 @@ loop:
// data property redefined as accessor property
if (prevValue != null && isAccessor) {
- redefinitionOk = false;
+ throw error(AbstractParser.message("property.redefinition", key), property.getToken());
}
// accessor property redefined as data
if (isPrevAccessor && value != null) {
- redefinitionOk = false;
+ throw error(AbstractParser.message("property.redefinition", key), property.getToken());
}
if (isAccessor && isPrevAccessor) {
if (getter != null && prevGetter != null ||
- setter != null && prevSetter != null) {
- redefinitionOk = false;
+ setter != null && prevSetter != null) {
+ throw error(AbstractParser.message("property.redefinition", key), property.getToken());
}
}
- if (!redefinitionOk) {
- throw error(AbstractParser.message("property.redefinition", key.toString()), property.getToken());
- }
-
- PropertyNode newProperty = existingProperty;
if (value != null) {
- if (prevValue == null) {
- map.put(key, newProperty = newProperty.setValue(value));
- } else {
- final long propertyToken = Token.recast(newProperty.getToken(), COMMARIGHT);
- map.put(key, newProperty = newProperty.setValue(new BinaryNode(propertyToken, prevValue, value)));
- }
-
- map.put(key, newProperty = newProperty.setGetter(null).setSetter(null));
- }
-
- if (getter != null) {
- map.put(key, newProperty = newProperty.setGetter(getter));
- }
-
- if (setter != null) {
- map.put(key, newProperty = newProperty.setSetter(setter));
+ elements.add(property);
+ } else if (getter != null) {
+ elements.set(existing, existingProperty.setGetter(getter));
+ } else if (setter != null) {
+ elements.set(existing, existingProperty.setSetter(setter));
}
break;
}
}
- return new ObjectNode(objectToken, finish, new ArrayList<>(map.values()));
+ return new ObjectNode(objectToken, finish, elements);
}
/**
@@ -2046,7 +2048,7 @@ loop:
private PropertyKey propertyName() {
switch (type) {
case IDENT:
- return getIdent();
+ return getIdent().setIsPropertyName();
case OCTAL:
if (isStrictMode) {
throw error(AbstractParser.message("strict.no.octal"), token);
@@ -2123,7 +2125,7 @@ loop:
}
}
- propertyName = new IdentNode(propertyToken, finish, ident);
+ propertyName = new IdentNode(propertyToken, finish, ident).setIsPropertyName();
} else {
propertyName = propertyName();
}
@@ -2149,14 +2151,14 @@ loop:
* Parse left hand side expression.
* @return Expression node.
*/
- private Node leftHandSideExpression() {
+ private Expression leftHandSideExpression() {
int callLine = line;
long callToken = token;
- Node lhs = memberExpression();
+ Expression lhs = memberExpression();
if (type == LPAREN) {
- final List<Node> arguments = argumentList();
+ final List<Expression> arguments = optimizeList(argumentList());
// Catch special functions.
if (lhs instanceof IdentNode) {
@@ -2175,7 +2177,7 @@ loop:
switch (type) {
case LPAREN:
// Get NEW or FUNCTION arguments.
- final List<Node> arguments = argumentList();
+ final List<Expression> arguments = optimizeList(argumentList());
// Create call node.
lhs = new CallNode(callLine, callToken, finish, lhs, arguments);
@@ -2186,7 +2188,7 @@ loop:
next();
// Get array index.
- final Node rhs = expression();
+ final Expression rhs = expression();
expect(RBRACKET);
@@ -2223,19 +2225,19 @@ loop:
* Parse new expression.
* @return Expression node.
*/
- private Node newExpression() {
+ private Expression newExpression() {
final long newToken = token;
// NEW is tested in caller.
next();
// Get function base.
final int callLine = line;
- final Node constructor = memberExpression();
+ final Expression constructor = memberExpression();
if (constructor == null) {
return null;
}
// Get arguments.
- List<Node> arguments;
+ ArrayList<Expression> arguments;
// Allow for missing arguments.
if (type == LPAREN) {
@@ -2253,12 +2255,11 @@ loop:
//
// The object literal following the "new Constructor()" expresssion
// is passed as an additional (last) argument to the constructor.
-
if (!env._no_syntax_extensions && type == LBRACE) {
arguments.add(objectLiteral());
}
- final CallNode callNode = new CallNode(callLine, constructor.getToken(), finish, constructor, arguments);
+ final CallNode callNode = new CallNode(callLine, constructor.getToken(), finish, constructor, optimizeList(arguments));
return new UnaryNode(newToken, callNode);
}
@@ -2276,9 +2277,9 @@ loop:
* Parse member expression.
* @return Expression node.
*/
- private Node memberExpression() {
+ private Expression memberExpression() {
// Prepare to build operation.
- Node lhs;
+ Expression lhs;
switch (type) {
case NEW:
@@ -2307,7 +2308,7 @@ loop:
next();
// Get array index.
- final Node index = expression();
+ final Expression index = expression();
expect(RBRACKET);
@@ -2352,9 +2353,9 @@ loop:
* Parse function call arguments.
* @return Argument list.
*/
- private List<Node> argumentList() {
+ private ArrayList<Expression> argumentList() {
// Prepare to accumulate list of arguments.
- final List<Node> nodeList = new ArrayList<>();
+ final ArrayList<Expression> nodeList = new ArrayList<>();
// LPAREN tested in caller.
next();
@@ -2374,9 +2375,23 @@ loop:
}
expect(RPAREN);
-
return nodeList;
- }
+ }
+
+ private static <T> List<T> optimizeList(ArrayList<T> list) {
+ switch(list.size()) {
+ case 0: {
+ return Collections.emptyList();
+ }
+ case 1: {
+ return Collections.singletonList(list.get(0));
+ }
+ default: {
+ list.trimToSize();
+ return list;
+ }
+ }
+ }
/**
* FunctionDeclaration :
@@ -2392,7 +2407,7 @@ loop:
*
* @return Expression node.
*/
- private Node functionExpression(final boolean isStatement, final boolean topLevel) {
+ private Expression functionExpression(final boolean isStatement, final boolean topLevel) {
final long functionToken = token;
final int functionLine = line;
// FUNCTION is tested in caller.
@@ -2568,10 +2583,8 @@ loop:
*/
// just expression as function body
- final Node expr = assignmentExpression(true);
+ final Expression expr = assignmentExpression(true);
assert lc.getCurrentBlock() == lc.getFunctionBody(functionNode);
- // create a return statement - this creates code in itself and does not need to be
- // wrapped into an ExecuteNode
final ReturnNode returnNode = new ReturnNode(functionNode.getLineNumber(), expr.getToken(), finish, expr);
appendStatement(returnNode);
lastToken = token;
@@ -2614,11 +2627,11 @@ loop:
}
}
- private RuntimeNode referenceError(final Node lhs, final Node rhs, final boolean earlyError) {
+ private RuntimeNode referenceError(final Expression lhs, final Expression rhs, final boolean earlyError) {
if (earlyError) {
throw error(JSErrorType.REFERENCE_ERROR, AbstractParser.message("invalid.lvalue"), lhs.getToken());
}
- final ArrayList<Node> args = new ArrayList<>();
+ final ArrayList<Expression> args = new ArrayList<>();
args.add(lhs);
if (rhs == null) {
args.add(LiteralNode.newInstance(lhs.getToken(), lhs.getFinish()));
@@ -2663,18 +2676,18 @@ loop:
* Parse unary expression.
* @return Expression node.
*/
- private Node unaryExpression() {
+ private Expression unaryExpression() {
final int unaryLine = line;
final long unaryToken = token;
switch (type) {
case DELETE: {
next();
- final Node expr = unaryExpression();
+ final Expression expr = unaryExpression();
if (expr instanceof BaseNode || expr instanceof IdentNode) {
return new UnaryNode(unaryToken, expr);
}
- appendStatement(new ExecuteNode(unaryLine, unaryToken, finish, expr));
+ appendStatement(new ExpressionStatement(unaryLine, unaryToken, finish, expr));
return LiteralNode.newInstance(unaryToken, finish, true);
}
case VOID:
@@ -2684,7 +2697,7 @@ loop:
case BIT_NOT:
case NOT:
next();
- final Node expr = unaryExpression();
+ final Expression expr = unaryExpression();
return new UnaryNode(unaryToken, expr);
case INCPREFIX:
@@ -2692,7 +2705,7 @@ loop:
final TokenType opType = type;
next();
- final Node lhs = leftHandSideExpression();
+ final Expression lhs = leftHandSideExpression();
// ++, -- without operand..
if (lhs == null) {
throw error(AbstractParser.message("expected.lvalue", type.getNameOrType()));
@@ -2717,14 +2730,14 @@ loop:
break;
}
- Node expression = leftHandSideExpression();
+ Expression expression = leftHandSideExpression();
if (last != EOL) {
switch (type) {
case INCPREFIX:
case DECPREFIX:
final TokenType opType = type;
- final Node lhs = expression;
+ final Expression lhs = expression;
// ++, -- without operand..
if (lhs == null) {
throw error(AbstractParser.message("expected.lvalue", type.getNameOrType()));
@@ -2849,16 +2862,16 @@ loop:
* Parse expression.
* @return Expression node.
*/
- private Node expression() {
+ private Expression expression() {
// TODO - Destructuring array.
// Include commas in expression parsing.
return expression(unaryExpression(), COMMARIGHT.getPrecedence(), false);
}
- private Node expression(final Node exprLhs, final int minPrecedence, final boolean noIn) {
+ private Expression expression(final Expression exprLhs, final int minPrecedence, final boolean noIn) {
// Get the precedence of the next operator.
int precedence = type.getPrecedence();
- Node lhs = exprLhs;
+ Expression lhs = exprLhs;
// While greater precedence.
while (type.isOperator(noIn) && precedence >= minPrecedence) {
@@ -2871,12 +2884,12 @@ loop:
// Pass expression. Middle expression of a conditional expression can be a "in"
// expression - even in the contexts where "in" is not permitted.
- final Node rhs = expression(unaryExpression(), ASSIGN.getPrecedence(), false);
+ final Expression rhs = expression(unaryExpression(), ASSIGN.getPrecedence(), false);
expect(COLON);
// Fail expression.
- final Node third = expression(unaryExpression(), ASSIGN.getPrecedence(), noIn);
+ final Expression third = expression(unaryExpression(), ASSIGN.getPrecedence(), noIn);
// Build up node.
lhs = new TernaryNode(op, lhs, rhs, third);
@@ -2885,7 +2898,7 @@ loop:
next();
// Get the next primary expression.
- Node rhs = unaryExpression();
+ Expression rhs = unaryExpression();
// Get precedence of next operator.
int nextPrecedence = type.getPrecedence();
@@ -2907,7 +2920,7 @@ loop:
return lhs;
}
- private Node assignmentExpression(final boolean noIn) {
+ private Expression assignmentExpression(final boolean noIn) {
// TODO - Handle decompose.
// Exclude commas in expression parsing.
return expression(unaryExpression(), ASSIGN.getPrecedence(), noIn);
@@ -2951,7 +2964,7 @@ loop:
} else {
lc.setFlag(fn, FunctionNode.HAS_NESTED_EVAL);
}
- lc.setFlag(lc.getFunctionBody(fn), Block.NEEDS_SCOPE);
+ lc.setBlockNeedsScope(lc.getFunctionBody(fn));
}
}
diff --git a/src/jdk/nashorn/internal/parser/TokenType.java b/src/jdk/nashorn/internal/parser/TokenType.java
index 92f3ad74..c92b9e98 100644
--- a/src/jdk/nashorn/internal/parser/TokenType.java
+++ b/src/jdk/nashorn/internal/parser/TokenType.java
@@ -93,7 +93,7 @@ public enum TokenType {
ASSIGN_BIT_OR (BINARY, "|=", 2, false),
OR (BINARY, "||", 4, true),
RBRACE (BRACKET, "}"),
- BIT_NOT (BINARY, "~", 14, false),
+ BIT_NOT (UNARY, "~", 14, false),
// ECMA 7.6.1.1 Keywords, 7.6.1.2 Future Reserved Words.
// All other Java keywords are commented out.
diff --git a/src/jdk/nashorn/internal/runtime/AccessorProperty.java b/src/jdk/nashorn/internal/runtime/AccessorProperty.java
index bfdfa719..c9d2a042 100644
--- a/src/jdk/nashorn/internal/runtime/AccessorProperty.java
+++ b/src/jdk/nashorn/internal/runtime/AccessorProperty.java
@@ -75,6 +75,8 @@ public class AccessorProperty extends Property {
private static final MethodType[] ACCESSOR_GETTER_TYPES = new MethodType[NOOF_TYPES];
private static final MethodType[] ACCESSOR_SETTER_TYPES = new MethodType[NOOF_TYPES];
+ private static final MethodType ACCESSOR_GETTER_PRIMITIVE_TYPE;
+ private static final MethodType ACCESSOR_SETTER_PRIMITIVE_TYPE;
private static final MethodHandle SPILL_ELEMENT_GETTER;
private static final MethodHandle SPILL_ELEMENT_SETTER;
@@ -82,17 +84,43 @@ public class AccessorProperty extends Property {
private static final MethodHandle[] SPILL_ACCESSORS = new MethodHandle[SPILL_CACHE_SIZE * 2];
static {
+ MethodType getterPrimitiveType = null;
+ MethodType setterPrimitiveType = null;
+
for (int i = 0; i < NOOF_TYPES; i++) {
final Type type = ACCESSOR_TYPES.get(i);
ACCESSOR_GETTER_TYPES[i] = MH.type(type.getTypeClass(), Object.class);
ACCESSOR_SETTER_TYPES[i] = MH.type(void.class, Object.class, type.getTypeClass());
+
+ if (type == PRIMITIVE_TYPE) {
+ getterPrimitiveType = ACCESSOR_GETTER_TYPES[i];
+ setterPrimitiveType = ACCESSOR_SETTER_TYPES[i];
+ }
}
- final MethodHandle spillGetter = MH.getter(MethodHandles.lookup(), ScriptObject.class, "spill", Object[].class);
+ ACCESSOR_GETTER_PRIMITIVE_TYPE = getterPrimitiveType;
+ ACCESSOR_SETTER_PRIMITIVE_TYPE = setterPrimitiveType;
+
+ final MethodType spillGetterType = MethodType.methodType(Object[].class, Object.class);
+ final MethodHandle spillGetter = MH.asType(MH.getter(MethodHandles.lookup(), ScriptObject.class, "spill", Object[].class), spillGetterType);
SPILL_ELEMENT_GETTER = MH.filterArguments(MH.arrayElementGetter(Object[].class), 0, spillGetter);
SPILL_ELEMENT_SETTER = MH.filterArguments(MH.arrayElementSetter(Object[].class), 0, spillGetter);
}
+ /**
+ * Create a new accessor property. Factory method used by nasgen generated code.
+ *
+ * @param key {@link Property} key.
+ * @param propertyFlags {@link Property} flags.
+ * @param getter {@link Property} get accessor method.
+ * @param setter {@link Property} set accessor method.
+ *
+ * @return New {@link AccessorProperty} created.
+ */
+ public static AccessorProperty create(final String key, final int propertyFlags, final MethodHandle getter, final MethodHandle setter) {
+ return new AccessorProperty(key, propertyFlags, -1, getter, setter);
+ }
+
/** Seed getter for the primitive version of this field (in -Dnashorn.fields.dual=true mode) */
private MethodHandle primitiveGetter;
@@ -119,15 +147,15 @@ public class AccessorProperty extends Property {
* and are thus rebound with that as receiver
*
* @param property accessor property to rebind
- * @param delegate delegate script object to rebind receiver to
+ * @param delegate delegate object to rebind receiver to
*/
- public AccessorProperty(final AccessorProperty property, final ScriptObject delegate) {
+ public AccessorProperty(final AccessorProperty property, final Object delegate) {
super(property);
this.primitiveGetter = bindTo(property.primitiveGetter, delegate);
this.primitiveSetter = bindTo(property.primitiveSetter, delegate);
- this.objectGetter = bindTo(property.objectGetter, delegate);
- this.objectSetter = bindTo(property.objectSetter, delegate);
+ this.objectGetter = bindTo(property.ensureObjectGetter(), delegate);
+ this.objectSetter = bindTo(property.ensureObjectSetter(), delegate);
setCurrentType(property.getCurrentType());
}
@@ -177,9 +205,8 @@ public class AccessorProperty extends Property {
ACCESSOR_GETTER_TYPES[i]);
}
} else {
- //this will work as the object setter and getter will be converted appropriately
- objectGetter = getter;
- objectSetter = setter;
+ objectGetter = getter.type() != Lookup.GET_OBJECT_TYPE ? MH.asType(getter, Lookup.GET_OBJECT_TYPE) : getter;
+ objectSetter = setter != null && setter.type() != Lookup.SET_OBJECT_TYPE ? MH.asType(setter, Lookup.SET_OBJECT_TYPE) : setter;
}
setCurrentType(getterType);
@@ -195,8 +222,8 @@ public class AccessorProperty extends Property {
setters = new MethodHandle[fieldCount];
for(int i = 0; i < fieldCount; ++i) {
final String fieldName = ObjectClassGenerator.getFieldName(i, Type.OBJECT);
- getters[i] = MH.getter(lookup, structure, fieldName, Type.OBJECT.getTypeClass());
- setters[i] = MH.setter(lookup, structure, fieldName, Type.OBJECT.getTypeClass());
+ getters[i] = MH.asType(MH.getter(lookup, structure, fieldName, Type.OBJECT.getTypeClass()), Lookup.GET_OBJECT_TYPE);
+ setters[i] = MH.asType(MH.setter(lookup, structure, fieldName, Type.OBJECT.getTypeClass()), Lookup.SET_OBJECT_TYPE);
}
}
}
@@ -221,20 +248,20 @@ public class AccessorProperty extends Property {
primitiveSetter = null;
if (isParameter() && hasArguments()) {
- final MethodHandle arguments = MH.getter(lookup, structure, "arguments", Object.class);
- final MethodHandle argumentsSO = MH.asType(arguments, arguments.type().changeReturnType(ScriptObject.class));
+ final MethodHandle arguments = MH.getter(lookup, structure, "arguments", ScriptObject.class);
- objectGetter = MH.insertArguments(MH.filterArguments(ScriptObject.GET_ARGUMENT.methodHandle(), 0, argumentsSO), 1, slot);
- objectSetter = MH.insertArguments(MH.filterArguments(ScriptObject.SET_ARGUMENT.methodHandle(), 0, argumentsSO), 1, slot);
+ objectGetter = MH.asType(MH.insertArguments(MH.filterArguments(ScriptObject.GET_ARGUMENT.methodHandle(), 0, arguments), 1, slot), Lookup.GET_OBJECT_TYPE);
+ objectSetter = MH.asType(MH.insertArguments(MH.filterArguments(ScriptObject.SET_ARGUMENT.methodHandle(), 0, arguments), 1, slot), Lookup.SET_OBJECT_TYPE);
} else {
final GettersSetters gs = GETTERS_SETTERS.get(structure);
objectGetter = gs.getters[slot];
objectSetter = gs.setters[slot];
if (!OBJECT_FIELDS_ONLY) {
- final String fieldNamePrimitive = ObjectClassGenerator.getFieldName(slot, ObjectClassGenerator.PRIMITIVE_TYPE);
- primitiveGetter = MH.getter(lookup, structure, fieldNamePrimitive, PRIMITIVE_TYPE.getTypeClass());
- primitiveSetter = MH.setter(lookup, structure, fieldNamePrimitive, PRIMITIVE_TYPE.getTypeClass());
+ final String fieldNamePrimitive = ObjectClassGenerator.getFieldName(slot, PRIMITIVE_TYPE);
+ final Class<?> typeClass = PRIMITIVE_TYPE.getTypeClass();
+ primitiveGetter = MH.asType(MH.getter(lookup, structure, fieldNamePrimitive, typeClass), ACCESSOR_GETTER_PRIMITIVE_TYPE);
+ primitiveSetter = MH.asType(MH.setter(lookup, structure, fieldNamePrimitive, typeClass), ACCESSOR_SETTER_PRIMITIVE_TYPE);
}
}
@@ -317,24 +344,30 @@ public class AccessorProperty extends Property {
}
}
- @Override
- public MethodHandle getGetter(final Class<?> type) {
+ // Spill getters and setters are lazily initialized, see JDK-8011630
+ private MethodHandle ensureObjectGetter() {
if (isSpill() && objectGetter == null) {
objectGetter = getSpillGetter();
}
+ return objectGetter;
+ }
+
+ private MethodHandle ensureObjectSetter() {
+ if (isSpill() && objectSetter == null) {
+ objectSetter = getSpillSetter();
+ }
+ return objectSetter;
+ }
+
+ @Override
+ public MethodHandle getGetter(final Class<?> type) {
final int i = getAccessorTypeIndex(type);
+ ensureObjectGetter();
+
if (getters[i] == null) {
getters[i] = debug(
- MH.asType(
- createGetter(
- currentType,
- type,
- primitiveGetter,
- objectGetter),
- ACCESSOR_GETTER_TYPES[i]),
- currentType,
- type,
- "get");
+ createGetter(currentType, type, primitiveGetter, objectGetter),
+ currentType, type, "get");
}
return getters[i];
@@ -366,11 +399,8 @@ public class AccessorProperty extends Property {
}
private MethodHandle generateSetter(final Class<?> forType, final Class<?> type) {
- if (isSpill() && objectSetter == null) {
- objectSetter = getSpillSetter();
- }
+ ensureObjectSetter();
MethodHandle mh = createSetter(forType, type, primitiveSetter, objectSetter);
- mh = MH.asType(mh, ACCESSOR_SETTER_TYPES[getAccessorTypeIndex(type)]); //has to be the case for invokeexact to work in ScriptObject
mh = debug(mh, currentType, type, "set");
return mh;
}
@@ -423,9 +453,9 @@ public class AccessorProperty extends Property {
final int slot = getSlot();
MethodHandle getter = slot < SPILL_CACHE_SIZE ? SPILL_ACCESSORS[slot * 2] : null;
if (getter == null) {
- getter = MH.asType(MH.insertArguments(SPILL_ELEMENT_GETTER, 1, slot), Lookup.GET_OBJECT_TYPE);
+ getter = MH.insertArguments(SPILL_ELEMENT_GETTER, 1, slot);
if (slot < SPILL_CACHE_SIZE) {
- SPILL_ACCESSORS[slot * 2] = getter;
+ SPILL_ACCESSORS[slot * 2 + 0] = getter;
}
}
return getter;
@@ -435,7 +465,7 @@ public class AccessorProperty extends Property {
final int slot = getSlot();
MethodHandle setter = slot < SPILL_CACHE_SIZE ? SPILL_ACCESSORS[slot * 2 + 1] : null;
if (setter == null) {
- setter = MH.asType(MH.insertArguments(SPILL_ELEMENT_SETTER, 1, slot), Lookup.SET_OBJECT_TYPE);
+ setter = MH.insertArguments(SPILL_ELEMENT_SETTER, 1, slot);
if (slot < SPILL_CACHE_SIZE) {
SPILL_ACCESSORS[slot * 2 + 1] = setter;
}
diff --git a/src/jdk/nashorn/internal/runtime/CodeInstaller.java b/src/jdk/nashorn/internal/runtime/CodeInstaller.java
index 80fac179..be9976e7 100644
--- a/src/jdk/nashorn/internal/runtime/CodeInstaller.java
+++ b/src/jdk/nashorn/internal/runtime/CodeInstaller.java
@@ -62,4 +62,10 @@ public interface CodeInstaller<T> {
* @param code bytecode to verify
*/
public void verify(final byte[] code);
+
+ /**
+ * Get next unique script id
+ * @return unique script id
+ */
+ public long getUniqueScriptId();
}
diff --git a/src/jdk/nashorn/internal/runtime/Context.java b/src/jdk/nashorn/internal/runtime/Context.java
index b39eb44a..6638ae60 100644
--- a/src/jdk/nashorn/internal/runtime/Context.java
+++ b/src/jdk/nashorn/internal/runtime/Context.java
@@ -36,16 +36,13 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
-import java.lang.reflect.Constructor;
+import java.util.concurrent.atomic.AtomicLong;
import java.net.MalformedURLException;
import java.net.URL;
-import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.CodeSigner;
import java.security.CodeSource;
-import java.security.Permissions;
import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
import java.util.Map;
import jdk.internal.org.objectweb.asm.ClassReader;
import jdk.internal.org.objectweb.asm.util.CheckClassAdapter;
@@ -55,6 +52,7 @@ import jdk.nashorn.internal.codegen.ObjectClassGenerator;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.debug.ASTWriter;
import jdk.nashorn.internal.ir.debug.PrintVisitor;
+import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.parser.Parser;
import jdk.nashorn.internal.runtime.options.Options;
@@ -96,6 +94,11 @@ public final class Context {
public void verify(final byte[] code) {
context.verify(code);
}
+
+ @Override
+ public long getUniqueScriptId() {
+ return context.getUniqueScriptId();
+ }
}
/** Is Context global debug mode enabled ? */
@@ -123,8 +126,8 @@ public final class Context {
sm.checkPermission(new RuntimePermission("nashorn.setGlobal"));
}
- if (global != null && !(global instanceof GlobalObject)) {
- throw new IllegalArgumentException("global does not implement GlobalObject!");
+ if (global != null && !(global instanceof Global)) {
+ throw new IllegalArgumentException("global is not an instance of Global!");
}
setGlobalTrusted(global);
@@ -197,6 +200,9 @@ public final class Context {
/** Current error manager. */
private final ErrorManager errors;
+ /** Unique id for script. Used only when --loader-per-compile=false */
+ private final AtomicLong uniqueScriptId;
+
private static final ClassLoader myLoader = Context.class.getClassLoader();
private static final StructureLoader sharedLoader;
@@ -253,14 +259,13 @@ public final class Context {
this.env = new ScriptEnvironment(options, out, err);
this._strict = env._strict;
this.appLoader = appLoader;
- this.scriptLoader = (ScriptLoader)AccessController.doPrivileged(
- new PrivilegedAction<ClassLoader>() {
- @Override
- public ClassLoader run() {
- final StructureLoader structureLoader = new StructureLoader(sharedLoader, Context.this);
- return new ScriptLoader(structureLoader, Context.this);
- }
- });
+ if (env._loader_per_compile) {
+ this.scriptLoader = null;
+ this.uniqueScriptId = null;
+ } else {
+ this.scriptLoader = createNewLoader();
+ this.uniqueScriptId = new AtomicLong();
+ }
this.errors = errors;
// if user passed -classpath option, make a class loader with that and set it as
@@ -521,11 +526,13 @@ public final class Context {
});
setGlobalTrusted(newGlobal);
- final Object[] wrapped = args == null? ScriptRuntime.EMPTY_ARRAY : ScriptObjectMirror.wrapArray(args, newGlobal);
+ final Object[] wrapped = args == null? ScriptRuntime.EMPTY_ARRAY : ScriptObjectMirror.wrapArray(args, oldGlobal);
newGlobal.put("arguments", ((GlobalObject)newGlobal).wrapAsObject(wrapped));
try {
- return ScriptObjectMirror.wrap(load(newGlobal, from), newGlobal);
+ // wrap objects from newGlobal's world as mirrors - but if result
+ // is from oldGlobal's world, unwrap it!
+ return ScriptObjectMirror.unwrap(ScriptObjectMirror.wrap(load(newGlobal, from), newGlobal), oldGlobal);
} finally {
setGlobalTrusted(oldGlobal);
}
@@ -550,6 +557,21 @@ public final class Context {
}
/**
+ * Checks that the given package can be accessed from current call stack.
+ *
+ * @param fullName fully qualified package name
+ */
+ public static void checkPackageAccess(final String fullName) {
+ final int index = fullName.lastIndexOf('.');
+ if (index != -1) {
+ final SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPackageAccess(fullName.substring(0, index));
+ }
+ }
+ }
+
+ /**
* Lookup a Java class. This is used for JSR-223 stuff linking in from
* {@code jdk.nashorn.internal.objects.NativeJava} and {@code jdk.nashorn.internal.runtime.NativeJavaPackage}
*
@@ -561,19 +583,7 @@ public final class Context {
*/
public Class<?> findClass(final String fullName) throws ClassNotFoundException {
// check package access as soon as possible!
- final int index = fullName.lastIndexOf('.');
- if (index != -1) {
- final SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override
- public Void run() {
- sm.checkPackageAccess(fullName.substring(0, index));
- return null;
- }
- }, createNoPermissionsContext());
- }
- }
+ checkPackageAccess(fullName);
// try the script -classpath loader, if that is set
if (classPathLoader != null) {
@@ -714,10 +724,6 @@ public final class Context {
return (context != null) ? context : Context.getContextTrusted();
}
- private static AccessControlContext createNoPermissionsContext() {
- return new AccessControlContext(new ProtectionDomain[] { new ProtectionDomain(null, new Permissions()) });
- }
-
private Object evaluateSource(final Source source, final ScriptObject scope, final ScriptObject thiz) {
ScriptFunction script = null;
@@ -817,25 +823,16 @@ public final class Context {
new PrivilegedAction<ScriptLoader>() {
@Override
public ScriptLoader run() {
- // Generated code won't refer to any class generated by context
- // script loader and so parent loader can be the structure
- // loader -- which is parent of the context script loader.
- return new ScriptLoader((StructureLoader)scriptLoader.getParent(), Context.this);
+ return new ScriptLoader(sharedLoader, Context.this);
}
});
}
private ScriptObject newGlobalTrusted() {
- try {
- final Class<?> clazz = Class.forName("jdk.nashorn.internal.objects.Global", true, scriptLoader);
- final Constructor<?> cstr = clazz.getConstructor(Context.class);
- return (ScriptObject) cstr.newInstance(this);
- } catch (final Exception e) {
- printStackTrace(e);
- if (e instanceof RuntimeException) {
- throw (RuntimeException)e;
- }
- throw new RuntimeException(e);
- }
+ return new Global(this);
+ }
+
+ private long getUniqueScriptId() {
+ return uniqueScriptId.getAndIncrement();
}
}
diff --git a/src/jdk/nashorn/internal/runtime/FunctionScope.java b/src/jdk/nashorn/internal/runtime/FunctionScope.java
index 59a9d5ed..b3872c45 100644
--- a/src/jdk/nashorn/internal/runtime/FunctionScope.java
+++ b/src/jdk/nashorn/internal/runtime/FunctionScope.java
@@ -41,7 +41,7 @@ package jdk.nashorn.internal.runtime;
public class FunctionScope extends ScriptObject implements Scope {
/** Area to store scope arguments. (public for access from scripts.) */
- public final Object arguments;
+ public final ScriptObject arguments;
/** Flag to indicate that a split method issued a return statement */
private int splitState = -1;
@@ -53,7 +53,7 @@ public class FunctionScope extends ScriptObject implements Scope {
* @param callerScope caller scope
* @param arguments arguments
*/
- public FunctionScope(final PropertyMap map, final ScriptObject callerScope, final Object arguments) {
+ public FunctionScope(final PropertyMap map, final ScriptObject callerScope, final ScriptObject arguments) {
super(callerScope, map);
this.arguments = arguments;
setIsScope();
diff --git a/src/jdk/nashorn/internal/runtime/GlobalFunctions.java b/src/jdk/nashorn/internal/runtime/GlobalFunctions.java
index 04211fc6..c504276f 100644
--- a/src/jdk/nashorn/internal/runtime/GlobalFunctions.java
+++ b/src/jdk/nashorn/internal/runtime/GlobalFunctions.java
@@ -34,9 +34,6 @@ import java.util.Locale;
/**
* Utilities used by Global class.
- *
- * These are actual implementation methods for functions exposed by global
- * scope. The code lives here to share the code across the contexts.
*/
public final class GlobalFunctions {
diff --git a/src/jdk/nashorn/internal/runtime/GlobalObject.java b/src/jdk/nashorn/internal/runtime/GlobalObject.java
index b802a1a1..7a118290 100644
--- a/src/jdk/nashorn/internal/runtime/GlobalObject.java
+++ b/src/jdk/nashorn/internal/runtime/GlobalObject.java
@@ -30,14 +30,7 @@ import jdk.internal.dynalink.linker.GuardedInvocation;
import jdk.internal.dynalink.linker.LinkRequest;
/**
- * Runtime interface to the global scope of the current context.
- * NOTE: never access {@code jdk.nashorn.internal.objects.Global} class directly
- * from runtime/parser/codegen/ir etc. Always go through this interface.
- * <p>
- * The reason for this is that all objects in the @{code jdk.nashorn.internal.objects.*} package
- * are different per Context and loaded separately by each Context class loader. Attempting
- * to directly refer to an object in this package from the rest of the runtime
- * will lead to {@code ClassNotFoundException} thrown upon link time
+ * Runtime interface to the global scope objects.
*/
public interface GlobalObject {
diff --git a/src/jdk/nashorn/internal/runtime/JSType.java b/src/jdk/nashorn/internal/runtime/JSType.java
index 9507f0d3..4d1d825c 100644
--- a/src/jdk/nashorn/internal/runtime/JSType.java
+++ b/src/jdk/nashorn/internal/runtime/JSType.java
@@ -29,7 +29,9 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.staticCall;
import static jdk.nashorn.internal.runtime.ECMAErrors.typeError;
import java.util.Locale;
+import jdk.internal.dynalink.beans.BeansLinker;
import jdk.internal.dynalink.beans.StaticClass;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
import jdk.nashorn.internal.codegen.CompilerConstants.Call;
import jdk.nashorn.internal.parser.Lexer;
@@ -151,6 +153,14 @@ public enum JSType {
return JSType.FUNCTION;
}
+ if (BeansLinker.isDynamicMethod(obj)) {
+ return JSType.FUNCTION;
+ }
+
+ if (obj instanceof ScriptObjectMirror) {
+ return ((ScriptObjectMirror)obj).isFunction()? JSType.FUNCTION : JSType.OBJECT;
+ }
+
return JSType.OBJECT;
}
diff --git a/src/jdk/nashorn/internal/runtime/ListAdapter.java b/src/jdk/nashorn/internal/runtime/ListAdapter.java
index 428cb555..194bd132 100644
--- a/src/jdk/nashorn/internal/runtime/ListAdapter.java
+++ b/src/jdk/nashorn/internal/runtime/ListAdapter.java
@@ -1,3 +1,28 @@
+/*
+ * 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. 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.
+ */
+
package jdk.nashorn.internal.runtime;
import java.util.AbstractList;
diff --git a/src/jdk/nashorn/internal/runtime/PropertyListenerManager.java b/src/jdk/nashorn/internal/runtime/PropertyListenerManager.java
index 34db0cb3..1ce18b63 100644
--- a/src/jdk/nashorn/internal/runtime/PropertyListenerManager.java
+++ b/src/jdk/nashorn/internal/runtime/PropertyListenerManager.java
@@ -41,6 +41,7 @@ public class PropertyListenerManager implements PropertyListener {
private static int listenersRemoved;
/**
+ * Return aggregate listeners added to all PropertyListenerManagers
* @return the listenersAdded
*/
public static int getListenersAdded() {
@@ -48,12 +49,21 @@ public class PropertyListenerManager implements PropertyListener {
}
/**
+ * Return aggregate listeners removed from all PropertyListenerManagers
* @return the listenersRemoved
*/
public static int getListenersRemoved() {
return listenersRemoved;
}
+ /**
+ * Return listeners added to this PropertyListenerManager.
+ * @return the listener count
+ */
+ public final int getListenerCount() {
+ return listeners != null? listeners.size() : 0;
+ }
+
// Property listener management methods
/**
diff --git a/src/jdk/nashorn/internal/runtime/PropertyMap.java b/src/jdk/nashorn/internal/runtime/PropertyMap.java
index e03a3ef8..511ff666 100644
--- a/src/jdk/nashorn/internal/runtime/PropertyMap.java
+++ b/src/jdk/nashorn/internal/runtime/PropertyMap.java
@@ -25,11 +25,8 @@
package jdk.nashorn.internal.runtime;
-import jdk.nashorn.internal.scripts.JO;
-
import static jdk.nashorn.internal.runtime.PropertyHashMap.EMPTY_HASHMAP;
-import java.lang.invoke.MethodHandle;
import java.lang.invoke.SwitchPoint;
import java.lang.ref.WeakReference;
import java.util.Arrays;
@@ -57,9 +54,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
private static final int CLONEABLE_FLAGS_MASK = 0b0000_1111;
/** Has a listener been added to this property map. This flag is not copied when cloning a map. See {@link PropertyListener} */
public static final int IS_LISTENER_ADDED = 0b0001_0000;
-
- /** Empty map used for seed map for JO$ objects */
- private static final PropertyMap EMPTY_MAP = new PropertyMap(EMPTY_HASHMAP);
+ /** Is this process wide "shared" map?. This flag is not copied when cloning a map */
+ public static final int IS_SHARED = 0b0010_0000;
/** Map status flags. */
private int flags;
@@ -91,14 +87,16 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
/**
* Constructor.
*
- * @param properties A {@link PropertyHashMap} with initial contents.
- * @param fieldCount Number of fields in use.
+ * @param properties A {@link PropertyHashMap} with initial contents.
+ * @param fieldCount Number of fields in use.
* @param fieldMaximum Number of fields available.
+ * @param spillLength Number of spill slots used.
*/
- private PropertyMap(final PropertyHashMap properties, final int fieldCount, final int fieldMaximum) {
+ private PropertyMap(final PropertyHashMap properties, final int fieldCount, final int fieldMaximum, final int spillLength) {
this.properties = properties;
this.fieldCount = fieldCount;
this.fieldMaximum = fieldMaximum;
+ this.spillLength = spillLength;
if (Context.DEBUG) {
count++;
@@ -111,7 +109,7 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
* @param properties A {@link PropertyHashMap} with initial contents.
*/
private PropertyMap(final PropertyHashMap properties) {
- this(properties, 0, 0);
+ this(properties, 0, 0, 0);
}
/**
@@ -143,58 +141,49 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
}
/**
- * Duplicates this PropertyMap instance. This is used by nasgen generated
- * prototype and constructor classes. {@link PropertyMap} used for singletons
- * like these (and global instance) are duplicated using this method and used.
- * The original filled map referenced by static fields of prototype and
- * constructor classes are not touched. This allows multiple independent global
- * instances to be used within a single context instance.
+ * Duplicates this PropertyMap instance. This is used to duplicate 'shared'
+ * maps {@link PropertyMap} used as process wide singletons. Shared maps are
+ * duplicated for every global scope object. That way listeners, proto and property
+ * histories are scoped within a global scope.
*
* @return Duplicated {@link PropertyMap}.
*/
public PropertyMap duplicate() {
+ if (Context.DEBUG) {
+ duplicatedCount++;
+ }
return new PropertyMap(this.properties);
}
/**
* Public property map allocator.
*
- * @param structure Class the map's {@link AccessorProperty}s apply to.
- * @param properties Collection of initial properties.
- * @param fieldCount Number of fields in use.
+ * @param properties Collection of initial properties.
+ * @param fieldCount Number of fields in use.
* @param fieldMaximum Number of fields available.
- *
+ * @param spillLength Number of used spill slots.
* @return New {@link PropertyMap}.
*/
- public static PropertyMap newMap(final Class<?> structure, final Collection<Property> properties, final int fieldCount, final int fieldMaximum) {
- // Reduce the number of empty maps in the context.
- if (structure == JO.class) {
- return EMPTY_MAP;
- }
-
+ public static PropertyMap newMap(final Collection<Property> properties, final int fieldCount, final int fieldMaximum, final int spillLength) {
PropertyHashMap newProperties = EMPTY_HASHMAP.immutableAdd(properties);
-
- return new PropertyMap(newProperties, fieldCount, fieldMaximum);
+ return new PropertyMap(newProperties, fieldCount, fieldMaximum, spillLength);
}
/**
- * Public property map factory allocator
- *
- * @param structure Class the map's {@link AccessorProperty}s apply to.
- *
+ * Public property map allocator. Used by nasgen generated code.
+ * @param properties Collection of initial properties.
* @return New {@link PropertyMap}.
*/
- public static PropertyMap newMap(final Class<?> structure) {
- return newMap(structure, null, 0, 0);
+ public static PropertyMap newMap(final Collection<Property> properties) {
+ return (properties == null || properties.isEmpty())? newMap() : newMap(properties, 0, 0, 0);
}
/**
* Return a sharable empty map.
*
- * @param context the context
* @return New empty {@link PropertyMap}.
*/
- public static PropertyMap newEmptyMap(final Context context) {
+ public static PropertyMap newMap() {
return new PropertyMap(EMPTY_HASHMAP);
}
@@ -216,6 +205,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
* @return A shared {@link SwitchPoint} for the property.
*/
public SwitchPoint getProtoGetSwitchPoint(final ScriptObject proto, final String key) {
+ assert !isShared() : "proto SwitchPoint from a shared PropertyMap";
+
if (proto == null) {
return null;
}
@@ -244,6 +235,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
* @param property {@link Property} to invalidate.
*/
private void invalidateProtoGetSwitchPoint(final Property property) {
+ assert !isShared() : "proto invalidation on a shared PropertyMap";
+
if (protoGetSwitches != null) {
final String key = property.getKey();
final SwitchPoint sp = protoGetSwitches.get(key);
@@ -258,17 +251,6 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
}
/**
- * Add a property to the map.
- *
- * @param property {@link Property} being added.
- *
- * @return New {@link PropertyMap} with {@link Property} added.
- */
- public PropertyMap newProperty(final Property property) {
- return addProperty(property);
- }
-
- /**
* Add a property to the map, re-binding its getters and setters,
* if available, to a given receiver. This is typically the global scope. See
* {@link ScriptObject#addBoundProperties(ScriptObject)}
@@ -278,23 +260,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
*
* @return New {@link PropertyMap} with {@link Property} added.
*/
- PropertyMap newPropertyBind(final AccessorProperty property, final ScriptObject bindTo) {
- return newProperty(new AccessorProperty(property, bindTo));
- }
-
- /**
- * Add a new accessor property to the map.
- *
- * @param key {@link Property} key.
- * @param propertyFlags {@link Property} flags.
- * @param slot {@link Property} slot.
- * @param getter {@link Property} get accessor method.
- * @param setter {@link Property} set accessor method.
- *
- * @return New {@link PropertyMap} with {@link AccessorProperty} added.
- */
- public PropertyMap newProperty(final String key, final int propertyFlags, final int slot, final MethodHandle getter, final MethodHandle setter) {
- return newProperty(new AccessorProperty(key, propertyFlags, slot, getter, setter));
+ PropertyMap addPropertyBind(final AccessorProperty property, final Object bindTo) {
+ return addProperty(new AccessorProperty(property, bindTo));
}
/**
@@ -496,6 +463,28 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
}
/**
+ * Make this property map 'shared' one. Shared property map instances are
+ * process wide singleton objects. A shaped map should never be added as a listener
+ * to a proto object. Nor it should have history or proto history. A shared map
+ * is just a template that is meant to be duplicated before use. All nasgen initialized
+ * property maps are shared.
+ *
+ * @return this map after making it as shared
+ */
+ public PropertyMap setIsShared() {
+ assert !isListenerAdded() : "making PropertyMap shared after listener added";
+ assert protoHistory == null : "making PropertyMap shared after associating a proto with it";
+ if (Context.DEBUG) {
+ sharedCount++;
+ }
+
+ flags |= IS_SHARED;
+ // clear any history on this PropertyMap, won't be used.
+ history = null;
+ return this;
+ }
+
+ /**
* Check for any configurable properties.
*
* @return {@code true} if any configurable.
@@ -561,6 +550,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
* @param newMap {@link PropertyMap} associated with prototype.
*/
private void addToProtoHistory(final ScriptObject newProto, final PropertyMap newMap) {
+ assert !isShared() : "proto history modified on a shared PropertyMap";
+
if (protoHistory == null) {
protoHistory = new WeakHashMap<>();
}
@@ -575,6 +566,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
* @param newMap Modified {@link PropertyMap}.
*/
private void addToHistory(final Property property, final PropertyMap newMap) {
+ assert !isShared() : "history modified on a shared PropertyMap";
+
if (!properties.isEmpty()) {
if (history == null) {
history = new LinkedHashMap<>();
@@ -700,6 +693,15 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
}
/**
+ * Check if this map shared or not.
+ *
+ * @return true if this map is shared.
+ */
+ public boolean isShared() {
+ return (flags & IS_SHARED) != 0;
+ }
+
+ /**
* Test to see if {@link PropertyMap} is extensible.
*
* @return {@code true} if {@link PropertyMap} can be added to.
@@ -762,6 +764,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
* @return New {@link PropertyMap} with prototype changed.
*/
PropertyMap changeProto(final ScriptObject oldProto, final ScriptObject newProto) {
+ assert !isShared() : "proto associated with a shared PropertyMap";
+
if (oldProto == newProto) {
return this;
}
@@ -877,6 +881,8 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
// counters updated only in debug mode
private static int count;
private static int clonedCount;
+ private static int sharedCount;
+ private static int duplicatedCount;
private static int historyHit;
private static int protoInvalidations;
private static int protoHistoryHit;
@@ -897,6 +903,20 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
}
/**
+ * @return The number of maps that are shared.
+ */
+ public static int getSharedCount() {
+ return sharedCount;
+ }
+
+ /**
+ * @return The number of maps that are duplicated.
+ */
+ public static int getDuplicatedCount() {
+ return duplicatedCount;
+ }
+
+ /**
* @return The number of times history was successfully used.
*/
public static int getHistoryHit() {
diff --git a/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java b/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java
index f04dedf0..a2f1f4a0 100644
--- a/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java
+++ b/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java
@@ -119,9 +119,15 @@ public final class ScriptEnvironment {
/** Create a new class loaded for each compilation */
public final boolean _loader_per_compile;
+ /** Do not support Java support extensions. */
+ public final boolean _no_java;
+
/** Do not support non-standard syntax extensions. */
public final boolean _no_syntax_extensions;
+ /** Do not support typed arrays. */
+ public final boolean _no_typed_arrays;
+
/** Package to which generated class files are added */
public final String _package;
@@ -207,7 +213,9 @@ public final class ScriptEnvironment {
_fx = options.getBoolean("fx");
_lazy_compilation = options.getBoolean("lazy.compilation");
_loader_per_compile = options.getBoolean("loader.per.compile");
+ _no_java = options.getBoolean("no.java");
_no_syntax_extensions = options.getBoolean("no.syntax.extensions");
+ _no_typed_arrays = options.getBoolean("no.typed.arrays");
_package = options.getString("package");
_parse_only = options.getBoolean("parse.only");
_print_ast = options.getBoolean("print.ast");
diff --git a/src/jdk/nashorn/internal/runtime/ScriptFunction.java b/src/jdk/nashorn/internal/runtime/ScriptFunction.java
index 5dca0e26..50f2b074 100644
--- a/src/jdk/nashorn/internal/runtime/ScriptFunction.java
+++ b/src/jdk/nashorn/internal/runtime/ScriptFunction.java
@@ -71,6 +71,8 @@ public abstract class ScriptFunction extends ScriptObject {
private static final MethodHandle IS_NONSTRICT_FUNCTION = findOwnMH("isNonStrictFunction", boolean.class, Object.class, Object.class, ScriptFunctionData.class);
+ private static final MethodHandle ADD_ZEROTH_ELEMENT = findOwnMH("addZerothElement", Object[].class, Object[].class, Object.class);
+
/** The parent scope. */
private final ScriptObject scope;
@@ -546,7 +548,21 @@ public abstract class ScriptFunction extends ScriptObject {
}
private static MethodHandle bindToNameIfNeeded(final MethodHandle methodHandle, final String bindName) {
- return bindName == null ? methodHandle : MH.insertArguments(methodHandle, 1, bindName);
+ if (bindName == null) {
+ return methodHandle;
+ } else {
+ // if it is vararg method, we need to extend argument array with
+ // a new zeroth element that is set to bindName value.
+ final MethodType methodType = methodHandle.type();
+ final int parameterCount = methodType.parameterCount();
+ final boolean isVarArg = parameterCount > 0 && methodType.parameterType(parameterCount - 1).isArray();
+
+ if (isVarArg) {
+ return MH.filterArguments(methodHandle, 1, MH.insertArguments(ADD_ZEROTH_ELEMENT, 1, bindName));
+ } else {
+ return MH.insertArguments(methodHandle, 1, bindName);
+ }
+ }
}
/**
@@ -586,6 +602,16 @@ public abstract class ScriptFunction extends ScriptObject {
return self instanceof ScriptFunction && ((ScriptFunction)self).data == data && arg instanceof ScriptObject;
}
+ @SuppressWarnings("unused")
+ private static Object[] addZerothElement(final Object[] args, final Object value) {
+ // extends input array with by adding new zeroth element
+ final Object[] src = (args == null)? ScriptRuntime.EMPTY_ARRAY : args;
+ final Object[] result = new Object[src.length + 1];
+ System.arraycopy(src, 0, result, 1, src.length);
+ result[0] = value;
+ return result;
+ }
+
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
final Class<?> own = ScriptFunction.class;
final MethodType mt = MH.type(rtype, types);
diff --git a/src/jdk/nashorn/internal/runtime/ScriptObject.java b/src/jdk/nashorn/internal/runtime/ScriptObject.java
index 1a081a1b..7ac47c84 100644
--- a/src/jdk/nashorn/internal/runtime/ScriptObject.java
+++ b/src/jdk/nashorn/internal/runtime/ScriptObject.java
@@ -170,7 +170,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
}
this.arrayData = ArrayData.EMPTY_ARRAY;
- this.setMap(map == null ? PropertyMap.newMap(getClass()) : map);
+ this.setMap(map == null ? PropertyMap.newMap() : map);
}
/**
@@ -188,7 +188,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
}
this.arrayData = ArrayData.EMPTY_ARRAY;
- this.setMap(map == null ? PropertyMap.newMap(getClass()) : map);
+ this.setMap(map == null ? PropertyMap.newMap() : map);
this.proto = proto;
if (proto != null) {
@@ -203,9 +203,19 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
* @param source The source object to copy from.
*/
public void addBoundProperties(final ScriptObject source) {
+ addBoundProperties(source, source.getMap().getProperties());
+ }
+
+ /**
+ * Copy all properties from the array with their receiver bound to the source.
+ *
+ * @param source The source object to copy from.
+ * @param properties The array of properties to copy.
+ */
+ public void addBoundProperties(final ScriptObject source, final Property[] properties) {
PropertyMap newMap = this.getMap();
- for (final Property property : source.getMap().getProperties()) {
+ for (final Property property : properties) {
final String key = property.getKey();
if (newMap.findProperty(key) == null) {
@@ -213,7 +223,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
final UserAccessorProperty prop = this.newUserAccessors(key, property.getFlags(), property.getGetterFunction(source), property.getSetterFunction(source));
newMap = newMap.addProperty(prop);
} else {
- newMap = newMap.newPropertyBind((AccessorProperty)property, source);
+ newMap = newMap.addPropertyBind((AccessorProperty)property, source);
}
}
}
@@ -222,6 +232,26 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
}
/**
+ * Copy all properties from the array with their receiver bound to the source.
+ *
+ * @param source The source object to copy from.
+ * @param properties The collection of accessor properties to copy.
+ */
+ public void addBoundProperties(final Object source, final AccessorProperty[] properties) {
+ PropertyMap newMap = this.getMap();
+
+ for (final AccessorProperty property : properties) {
+ final String key = property.getKey();
+
+ if (newMap.findProperty(key) == null) {
+ newMap = newMap.addPropertyBind(property, source);
+ }
+ }
+
+ this.setMap(newMap);
+ }
+
+ /**
* Bind the method handle to the specified receiver, while preserving its original type (it will just ignore the
* first argument in lieu of the bound argument).
* @param methodHandle Method handle to bind to.
@@ -1027,6 +1057,15 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
}
/**
+ * Set the current context.
+ * @param ctx context instance to set
+ */
+ protected final void setContext(final Context ctx) {
+ ctx.getClass();
+ this.context = ctx;
+ }
+
+ /**
* Return the map of an object.
* @return PropertyMap object.
*/
@@ -1939,7 +1978,12 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
return noSuchProperty(desc, request);
}
- final ScriptFunction func = (ScriptFunction)getObjectValue(find);
+ final Object value = getObjectValue(find);
+ if (! (value instanceof ScriptFunction)) {
+ return createEmptyGetter(desc, name);
+ }
+
+ final ScriptFunction func = (ScriptFunction)value;
final Object thiz = scopeCall && func.isStrict() ? ScriptRuntime.UNDEFINED : this;
// TODO: It'd be awesome if we could bind "name" without binding "this".
return new GuardedInvocation(MH.dropArguments(MH.constant(ScriptFunction.class,
@@ -1959,8 +2003,13 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr
final boolean scopeAccess = isScope() && NashornCallSiteDescriptor.isScope(desc);
if (find != null) {
- final ScriptFunction func = (ScriptFunction)getObjectValue(find);
- MethodHandle methodHandle = getCallMethodHandle(func, desc.getMethodType(), name);
+ final Object value = getObjectValue(find);
+ ScriptFunction func = null;
+ MethodHandle methodHandle = null;
+ if (value instanceof ScriptFunction) {
+ func = (ScriptFunction)value;
+ methodHandle = getCallMethodHandle(func, desc.getMethodType(), name);
+ }
if (methodHandle != null) {
if (scopeAccess && func.isStrict()) {
diff --git a/src/jdk/nashorn/internal/runtime/ScriptRuntime.java b/src/jdk/nashorn/internal/runtime/ScriptRuntime.java
index 15c915cf..f0b68c52 100644
--- a/src/jdk/nashorn/internal/runtime/ScriptRuntime.java
+++ b/src/jdk/nashorn/internal/runtime/ScriptRuntime.java
@@ -592,6 +592,8 @@ public final class ScriptRuntime {
throw typeError("cant.get.property", safeToString(property), "null");
} else if (JSType.isPrimitive(obj)) {
obj = ((ScriptObject)JSType.toScriptObject(obj)).get(property);
+ } else if (obj instanceof ScriptObjectMirror) {
+ obj = ((ScriptObjectMirror)obj).getMember(property.toString());
} else {
obj = UNDEFINED;
}
@@ -601,23 +603,6 @@ public final class ScriptRuntime {
}
/**
- * ECMA 11.4.2 - void operator
- *
- * @param object object to evaluate
- *
- * @return Undefined as the object type
- */
- public static Object VOID(final Object object) {
- if (object instanceof Number) {
- if (Double.isNaN(((Number)object).doubleValue())) {
- return Double.NaN;
- }
- }
-
- return UNDEFINED;
- }
-
- /**
* Throw ReferenceError when LHS of assignment or increment/decrement
* operator is not an assignable node (say a literal)
*
diff --git a/src/jdk/nashorn/internal/runtime/StructureLoader.java b/src/jdk/nashorn/internal/runtime/StructureLoader.java
index ff6973a9..bdc40edd 100644
--- a/src/jdk/nashorn/internal/runtime/StructureLoader.java
+++ b/src/jdk/nashorn/internal/runtime/StructureLoader.java
@@ -25,30 +25,19 @@
package jdk.nashorn.internal.runtime;
-import static jdk.nashorn.internal.codegen.Compiler.OBJECTS_PACKAGE;
import static jdk.nashorn.internal.codegen.Compiler.SCRIPTS_PACKAGE;
import static jdk.nashorn.internal.codegen.Compiler.binaryName;
import static jdk.nashorn.internal.codegen.CompilerConstants.JS_OBJECT_PREFIX;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.CodeSigner;
-import java.security.CodeSource;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.security.ProtectionDomain;
import jdk.nashorn.internal.codegen.ObjectClassGenerator;
/**
- * Responsible for on the fly construction of structure classes as well
- * as loading jdk.nashorn.internal.objects.* classes.
+ * Responsible for on the fly construction of structure classes.
*
*/
final class StructureLoader extends NashornLoader {
private static final String JS_OBJECT_PREFIX_EXTERNAL = binaryName(SCRIPTS_PACKAGE) + '.' + JS_OBJECT_PREFIX.symbolName();
- private static final String OBJECTS_PACKAGE_EXTERNAL = binaryName(OBJECTS_PACKAGE);
/**
* Constructor.
@@ -68,45 +57,9 @@ final class StructureLoader extends NashornLoader {
return loadedClass;
}
- if (name.startsWith(binaryName(OBJECTS_PACKAGE_EXTERNAL))) {
- try {
- return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
- @Override
- public Class<?> run() throws ClassNotFoundException {
- final String source = name.replace('.','/') + ".clazz";
- final URL url = getResource(source);
- try (final InputStream is = getResourceAsStream(source)) {
- if (is == null) {
- throw new ClassNotFoundException(name);
- }
-
- byte[] code;
- try {
- code = Source.readBytes(is);
- } catch (final IOException e) {
- Context.printStackTrace(e);
- throw new ClassNotFoundException(name, e);
- }
-
- final Class<?> cl = defineClass(name, code, 0, code.length, new CodeSource(url, (CodeSigner[])null));
- if (resolve) {
- resolveClass(cl);
- }
- return cl;
- } catch (final IOException e) {
- throw new RuntimeException(e);
- }
- }
- });
- } catch (final PrivilegedActionException e) {
- throw new ClassNotFoundException(name, e);
- }
- }
-
return super.loadClassTrusted(name, resolve);
}
-
@Override
protected Class<?> findClass(final String name) throws ClassNotFoundException {
if (name.startsWith(JS_OBJECT_PREFIX_EXTERNAL)) {
diff --git a/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java b/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
index d11059b2..9e3efeed 100644
--- a/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
+++ b/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
@@ -75,8 +75,13 @@ public abstract class ArrayData {
* @return ArrayData
*/
public static ArrayData allocate(final int length) {
- final ArrayData arrayData = new IntArrayData(length);
- return length == 0 ? arrayData : new DeletedRangeArrayFilter(arrayData, 0, length - 1);
+ if (length == 0) {
+ return new IntArrayData();
+ } else if (length >= SparseArrayData.MAX_DENSE_LENGTH) {
+ return new SparseArrayData(EMPTY_ARRAY, length);
+ } else {
+ return new DeletedRangeArrayFilter(new IntArrayData(length), 0, length - 1);
+ }
}
/**
diff --git a/src/jdk/nashorn/internal/runtime/arrays/IntArrayData.java b/src/jdk/nashorn/internal/runtime/arrays/IntArrayData.java
index 3c34081f..54d98d9b 100644
--- a/src/jdk/nashorn/internal/runtime/arrays/IntArrayData.java
+++ b/src/jdk/nashorn/internal/runtime/arrays/IntArrayData.java
@@ -75,7 +75,9 @@ public final class IntArrayData extends ArrayData {
}
private static Object[] toObjectArray(final int[] array, final int length) {
- final Object[] oarray = new Object[length];
+ assert length <= array.length : "length exceeds internal array size";
+ final Object[] oarray = new Object[array.length];
+
for (int index = 0; index < length; index++) {
oarray[index] = Integer.valueOf(array[index]);
}
@@ -83,18 +85,22 @@ public final class IntArrayData extends ArrayData {
return oarray;
}
- private static double[] toDoubleArray(final int[] array) {
+ private static double[] toDoubleArray(final int[] array, final int length) {
+ assert length <= array.length : "length exceeds internal array size";
final double[] darray = new double[array.length];
- for (int index = 0; index < array.length; index++) {
+
+ for (int index = 0; index < length; index++) {
darray[index] = array[index];
}
return darray;
}
- private static long[] toLongArray(final int[] array) {
+ private static long[] toLongArray(final int[] array, final int length) {
+ assert length <= array.length : "length exceeds internal array size";
final long[] larray = new long[array.length];
- for (int index = 0; index < array.length; index++) {
+
+ for (int index = 0; index < length; index++) {
larray[index] = array[index];
}
@@ -105,12 +111,14 @@ public final class IntArrayData extends ArrayData {
public ArrayData convert(final Class<?> type) {
if (type == Integer.class) {
return this;
- } else if (type == Long.class) {
- return new LongArrayData(IntArrayData.toLongArray(array), (int) length());
+ }
+ final int length = (int) length();
+ if (type == Long.class) {
+ return new LongArrayData(IntArrayData.toLongArray(array, length), length);
} else if (type == Double.class) {
- return new NumberArrayData(IntArrayData.toDoubleArray(array), (int) length());
+ return new NumberArrayData(IntArrayData.toDoubleArray(array, length), length);
} else {
- return new ObjectArrayData(IntArrayData.toObjectArray(array, array.length), (int) length());
+ return new ObjectArrayData(IntArrayData.toObjectArray(array, length), length);
}
}
@@ -161,26 +169,13 @@ public final class IntArrayData extends ArrayData {
@Override
public ArrayData set(final int index, final Object value, final boolean strict) {
- try {
- final int intValue = ((Integer)value).intValue();
- array[index] = intValue;
- setLength(Math.max(index + 1, length()));
- return this;
- } catch (final NullPointerException | ClassCastException e) {
- if (value instanceof Short || value instanceof Byte) {
- final int intValue = ((Number)value).intValue();
- array[index] = intValue;
- setLength(Math.max(index + 1, length()));
- return this;
- }
-
- if (value == ScriptRuntime.UNDEFINED) {
- return new UndefinedArrayFilter(this).set(index, value, strict);
- }
+ if (value instanceof Integer) {
+ return set(index, ((Number)value).intValue(), strict);
+ } else if (value == ScriptRuntime.UNDEFINED) {
+ return new UndefinedArrayFilter(this).set(index, value, strict);
}
final ArrayData newData = convert(value == null ? Object.class : value.getClass());
-
return newData.set(index, value, strict);
}
diff --git a/src/jdk/nashorn/internal/runtime/arrays/LongArrayData.java b/src/jdk/nashorn/internal/runtime/arrays/LongArrayData.java
index 800c7c67..f33c8638 100644
--- a/src/jdk/nashorn/internal/runtime/arrays/LongArrayData.java
+++ b/src/jdk/nashorn/internal/runtime/arrays/LongArrayData.java
@@ -55,7 +55,9 @@ final class LongArrayData extends ArrayData {
}
private static Object[] toObjectArray(final long[] array, final int length) {
- final Object[] oarray = new Object[length];
+ assert length <= array.length : "length exceeds internal array size";
+ final Object[] oarray = new Object[array.length];
+
for (int index = 0; index < length; index++) {
oarray[index] = Long.valueOf(array[index]);
}
@@ -71,9 +73,11 @@ final class LongArrayData extends ArrayData {
return super.asArrayOfType(componentType);
}
- private static double[] toDoubleArray(final long[] array) {
+ private static double[] toDoubleArray(final long[] array, final int length) {
+ assert length <= array.length : "length exceeds internal array size";
final double[] darray = new double[array.length];
- for (int index = 0; index < array.length; index++) {
+
+ for (int index = 0; index < length; index++) {
darray[index] = array[index];
}
@@ -84,10 +88,12 @@ final class LongArrayData extends ArrayData {
public ArrayData convert(final Class<?> type) {
if (type == Long.class) {
return this;
- } else if (type == Double.class) {
- return new NumberArrayData(LongArrayData.toDoubleArray(array), (int) length());
+ }
+ final int length = (int) length();
+ if (type == Double.class) {
+ return new NumberArrayData(LongArrayData.toDoubleArray(array, length), length);
} else {
- return new ObjectArrayData(LongArrayData.toObjectArray(array, array.length), (int) length());
+ return new ObjectArrayData(LongArrayData.toObjectArray(array, length), length);
}
}
@@ -138,19 +144,13 @@ final class LongArrayData extends ArrayData {
@Override
public ArrayData set(final int index, final Object value, final boolean strict) {
- try {
- final long longValue = ((Long)value).longValue();
- array[index] = longValue;
- setLength(Math.max(index + 1, length()));
- return this;
- } catch (final NullPointerException | ClassCastException e) {
- if (value == ScriptRuntime.UNDEFINED) {
- return new UndefinedArrayFilter(this).set(index, value, strict);
- }
+ if (value instanceof Long || value instanceof Integer) {
+ return set(index, ((Number)value).longValue(), strict);
+ } else if (value == ScriptRuntime.UNDEFINED) {
+ return new UndefinedArrayFilter(this).set(index, value, strict);
}
final ArrayData newData = convert(value == null ? Object.class : value.getClass());
-
return newData.set(index, value, strict);
}
diff --git a/src/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java b/src/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java
index 149cbf0c..e555ec45 100644
--- a/src/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java
+++ b/src/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java
@@ -58,7 +58,9 @@ final class NumberArrayData extends ArrayData {
}
private static Object[] toObjectArray(final double[] array, final int length) {
- final Object[] oarray = new Object[length];
+ assert length <= array.length : "length exceeds internal array size";
+ final Object[] oarray = new Object[array.length];
+
for (int index = 0; index < length; index++) {
oarray[index] = Double.valueOf(array[index]);
}
@@ -76,7 +78,8 @@ final class NumberArrayData extends ArrayData {
@Override
public ArrayData convert(final Class<?> type) {
if (type != Double.class && type != Integer.class && type != Long.class) {
- return new ObjectArrayData(NumberArrayData.toObjectArray(array, array.length), (int) length());
+ final int length = (int) length();
+ return new ObjectArrayData(NumberArrayData.toObjectArray(array, length), length);
}
return this;
}
@@ -127,16 +130,12 @@ final class NumberArrayData extends ArrayData {
@Override
public ArrayData set(final int index, final Object value, final boolean strict) {
- try {
- final double doubleValue = ((Number)value).doubleValue();
- array[index] = doubleValue;
- setLength(Math.max(index + 1, length()));
- return this;
- } catch (final NullPointerException | ClassCastException e) {
- if (value == UNDEFINED) {
- return new UndefinedArrayFilter(this).set(index, value, strict);
- }
+ if (value instanceof Double || value instanceof Integer || value instanceof Long) {
+ return set(index, ((Number)value).doubleValue(), strict);
+ } else if (value == UNDEFINED) {
+ return new UndefinedArrayFilter(this).set(index, value, strict);
}
+
final ArrayData newData = convert(value == null ? Object.class : value.getClass());
return newData.set(index, value, strict);
}
diff --git a/src/jdk/nashorn/internal/runtime/arrays/ObjectArrayData.java b/src/jdk/nashorn/internal/runtime/arrays/ObjectArrayData.java
index 4b1f58a4..41c4d5ce 100644
--- a/src/jdk/nashorn/internal/runtime/arrays/ObjectArrayData.java
+++ b/src/jdk/nashorn/internal/runtime/arrays/ObjectArrayData.java
@@ -146,7 +146,7 @@ final class ObjectArrayData extends ArrayData {
@Override
public ArrayData setEmpty(final long lo, final long hi) {
- Arrays.fill(array, (int)Math.max(lo, 0L), (int)Math.min(hi, (long)Integer.MAX_VALUE), ScriptRuntime.EMPTY);
+ Arrays.fill(array, (int)Math.max(lo, 0L), (int)Math.min(hi, Integer.MAX_VALUE), ScriptRuntime.EMPTY);
return this;
}
diff --git a/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java b/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
index 6b55656b..4007393b 100644
--- a/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
+++ b/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
@@ -57,7 +57,7 @@ public final class Bootstrap {
static {
final DynamicLinkerFactory factory = new DynamicLinkerFactory();
factory.setPrioritizedLinkers(new NashornLinker(), new NashornPrimitiveLinker(), new NashornStaticClassLinker(),
- new JSObjectLinker(), new ReflectionCheckLinker());
+ new BoundDynamicMethodLinker(), new JSObjectLinker(), new ReflectionCheckLinker());
factory.setFallbackLinkers(new BeansLinker(), new NashornBottomLinker());
factory.setSyncOnRelink(true);
final int relinkThreshold = Options.getIntProperty("nashorn.unstable.relink.threshold", -1);
@@ -78,7 +78,7 @@ public final class Bootstrap {
* @return CallSite with MethodHandle to appropriate method or null if not found.
*/
public static CallSite bootstrap(final Lookup lookup, final String opDesc, final MethodType type, final int flags) {
- return dynamicLinker.link(LinkerCallSite.newLinkerCallSite(opDesc, type, flags));
+ return dynamicLinker.link(LinkerCallSite.newLinkerCallSite(lookup, opDesc, type, flags));
}
/**
@@ -94,12 +94,12 @@ public final class Bootstrap {
return new RuntimeCallSite(type, initialName);
}
-
/**
- * Returns a dynamic invoker for a specified dynamic operation. You can use this method to create a method handle
- * that when invoked acts completely as if it were a Nashorn-linked call site. An overview of available dynamic
- * operations can be found in the <a href="https://github.com/szegedi/dynalink/wiki/User-Guide-0.4">Dynalink User Guide</a>,
- * but we'll show few examples here:
+ * Returns a dynamic invoker for a specified dynamic operation using the public lookup. You can use this method to
+ * create a method handle that when invoked acts completely as if it were a Nashorn-linked call site. An overview of
+ * available dynamic operations can be found in the
+ * <a href="https://github.com/szegedi/dynalink/wiki/User-Guide-0.6">Dynalink User Guide</a>, but we'll show few
+ * examples here:
* <ul>
* <li>Get a named property with fixed name:
* <pre>
@@ -196,7 +196,7 @@ public final class Bootstrap {
}
/**
- * Returns a dynamic invoker for a specified dynamic operation. Similar to
+ * Returns a dynamic invoker for a specified dynamic operation using the public lookup. Similar to
* {@link #createDynamicInvoker(String, Class, Class...)} but with return and parameter types composed into a
* method type in the signature. See the discussion of that method for details.
* @param opDesc Dynalink dynamic operation descriptor.
@@ -204,7 +204,28 @@ public final class Bootstrap {
* @return MethodHandle for invoking the operation.
*/
public static MethodHandle createDynamicInvoker(final String opDesc, final MethodType type) {
- return bootstrap(null, opDesc, type, 0).dynamicInvoker();
+ return bootstrap(MethodHandles.publicLookup(), opDesc, type, 0).dynamicInvoker();
+ }
+
+ /**
+ * Binds a bean dynamic method (returned by invoking {@code dyn:getMethod} on an object linked with
+ * {@code BeansLinker} to a receiver.
+ * @param dynamicMethod the dynamic method to bind
+ * @param boundThis the bound "this" value.
+ * @return a bound dynamic method.
+ */
+ public static Object bindDynamicMethod(Object dynamicMethod, Object boundThis) {
+ return new BoundDynamicMethod(dynamicMethod, boundThis);
+ }
+
+ /**
+ * If the given class is a reflection-specific class (anything in {@code java.lang.reflect} and
+ * {@code java.lang.invoke} package, as well a {@link Class} and any subclass of {@link ClassLoader}) and there is
+ * a security manager in the system, then it checks the {@code nashorn.JavaReflection} {@code RuntimePermission}.
+ * @param clazz the class being tested
+ */
+ public static void checkReflectionAccess(Class<?> clazz) {
+ ReflectionCheckLinker.checkReflectionAccess(clazz);
}
/**
diff --git a/src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethod.java b/src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethod.java
new file mode 100644
index 00000000..213f2b4f
--- /dev/null
+++ b/src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethod.java
@@ -0,0 +1,51 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.runtime.linker;
+
+import jdk.internal.dynalink.beans.BeansLinker;
+
+/**
+ * Represents a Dynalink dynamic method bound to a receiver. Note that objects of this class are just the tuples of
+ * a method and a bound this, without any behavior. All the behavior is defined in the {@link BoundDynamicMethodLinker}.
+ */
+final class BoundDynamicMethod {
+ private final Object dynamicMethod;
+ private final Object boundThis;
+
+ BoundDynamicMethod(final Object dynamicMethod, final Object boundThis) {
+ assert BeansLinker.isDynamicMethod(dynamicMethod);
+ this.dynamicMethod = dynamicMethod;
+ this.boundThis = boundThis;
+ }
+
+ Object getDynamicMethod() {
+ return dynamicMethod;
+ }
+
+ Object getBoundThis() {
+ return boundThis;
+ }
+}
diff --git a/src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethodLinker.java b/src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethodLinker.java
new file mode 100644
index 00000000..03bde629
--- /dev/null
+++ b/src/jdk/nashorn/internal/runtime/linker/BoundDynamicMethodLinker.java
@@ -0,0 +1,90 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.internal.runtime.linker;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import jdk.internal.dynalink.CallSiteDescriptor;
+import jdk.internal.dynalink.beans.BeansLinker;
+import jdk.internal.dynalink.linker.GuardedInvocation;
+import jdk.internal.dynalink.linker.LinkRequest;
+import jdk.internal.dynalink.linker.LinkerServices;
+import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
+import jdk.internal.dynalink.support.Guards;
+
+/**
+ * Links {@link BoundDynamicMethod} objects. Passes through to Dynalink's BeansLinker for linking a dynamic method
+ * (they only respond to "dyn:call"), and modifies the returned invocation to deal with the receiver binding.
+ */
+final class BoundDynamicMethodLinker implements TypeBasedGuardingDynamicLinker {
+ @Override
+ public boolean canLinkType(Class<?> type) {
+ return type == BoundDynamicMethod.class;
+ }
+
+ @Override
+ public GuardedInvocation getGuardedInvocation(LinkRequest linkRequest, LinkerServices linkerServices) throws Exception {
+ final Object objBoundDynamicMethod = linkRequest.getReceiver();
+ if(!(objBoundDynamicMethod instanceof BoundDynamicMethod)) {
+ return null;
+ }
+
+ final BoundDynamicMethod boundDynamicMethod = (BoundDynamicMethod)objBoundDynamicMethod;
+ final Object dynamicMethod = boundDynamicMethod.getDynamicMethod();
+ final Object boundThis = boundDynamicMethod.getBoundThis();
+
+ // Replace arguments (boundDynamicMethod, this, ...) => (dynamicMethod, boundThis, ...) when delegating to
+ // BeansLinker
+ final Object[] args = linkRequest.getArguments();
+ args[0] = dynamicMethod;
+ args[1] = boundThis;
+
+ // Use R(T0, T1, ...) => R(dynamicMethod.class, boundThis.class, ...) call site type when delegating to
+ // BeansLinker.
+ final CallSiteDescriptor descriptor = linkRequest.getCallSiteDescriptor();
+ final MethodType type = descriptor.getMethodType();
+ final CallSiteDescriptor newDescriptor = descriptor.changeMethodType(
+ type.changeParameterType(0, dynamicMethod.getClass()).changeParameterType(1, boundThis.getClass()));
+
+ // Delegate to BeansLinker
+ final GuardedInvocation inv = BeansLinker.getLinkerForClass(dynamicMethod.getClass()).getGuardedInvocation(
+ linkRequest.replaceArguments(newDescriptor, args), linkerServices);
+ if(inv == null) {
+ return null;
+ }
+
+ // Bind (dynamicMethod, boundThis) to the handle
+ final MethodHandle boundHandle = MethodHandles.insertArguments(inv.getInvocation(), 0, dynamicMethod, boundThis);
+ final Class<?> p0Type = type.parameterType(0);
+ // Ignore incoming (boundDynamicMethod, this)
+ final MethodHandle droppingHandle = MethodHandles.dropArguments(boundHandle, 0, p0Type, type.parameterType(1));
+ // Identity guard on boundDynamicMethod object
+ final MethodHandle newGuard = Guards.getIdentityGuard(boundDynamicMethod);
+
+ return inv.replaceMethods(droppingHandle, newGuard.asType(newGuard.type().changeParameterType(0, p0Type)));
+ }
+}
diff --git a/src/jdk/nashorn/internal/runtime/linker/InvokeByName.java b/src/jdk/nashorn/internal/runtime/linker/InvokeByName.java
index 4bfb6851..efec5b44 100644
--- a/src/jdk/nashorn/internal/runtime/linker/InvokeByName.java
+++ b/src/jdk/nashorn/internal/runtime/linker/InvokeByName.java
@@ -83,7 +83,7 @@ public class InvokeByName {
*/
public InvokeByName(final String name, final Class<?> targetClass, final Class<?> rtype, final Class<?>... ptypes) {
this.name = name;
- getter = Bootstrap.createDynamicInvoker("dyn:getMethod|getProp|getItem:" + name, Object.class, targetClass);
+ getter = Bootstrap.createDynamicInvoker("dyn:getMethod|getProp|getElem:" + name, Object.class, targetClass);
final Class<?>[] finalPtypes;
final int plength = ptypes.length;
diff --git a/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java b/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
index ecec63bc..472b8dcd 100644
--- a/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
+++ b/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
@@ -28,6 +28,7 @@ package jdk.nashorn.internal.runtime.linker;
import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Modifier;
import java.security.AccessController;
@@ -39,10 +40,10 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import jdk.internal.dynalink.beans.StaticClass;
import jdk.internal.dynalink.support.LinkRequestImpl;
import jdk.nashorn.internal.objects.NativeJava;
+import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ECMAException;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
@@ -99,6 +100,13 @@ public final class JavaAdapterFactory {
*/
public static StaticClass getAdapterClassFor(final Class<?>[] types, ScriptObject classOverrides) {
assert types != null && types.length > 0;
+ final SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ for (Class<?> type : types) {
+ // check for restricted package access
+ Context.checkPackageAccess(type.getName());
+ }
+ }
return getAdapterInfo(types).getAdapterClassFor(classOverrides);
}
@@ -119,9 +127,12 @@ public final class JavaAdapterFactory {
return AccessController.doPrivileged(new PrivilegedExceptionAction<MethodHandle>() {
@Override
public MethodHandle run() throws Exception {
- return MH.bindTo(Bootstrap.getLinkerServices().getGuardedInvocation(new LinkRequestImpl(NashornCallSiteDescriptor.get(
- "dyn:new", MethodType.methodType(targetType, StaticClass.class, sourceType), 0), false,
- adapterClass, null)).getInvocation(), adapterClass);
+ // NOTE: we use publicLookup(), but none of our adapter constructors are caller sensitive, so this is
+ // okay, we won't artificially limit access.
+ return MH.bindTo(Bootstrap.getLinkerServices().getGuardedInvocation(new LinkRequestImpl(
+ NashornCallSiteDescriptor.get(MethodHandles.publicLookup(), "dyn:new",
+ MethodType.methodType(targetType, StaticClass.class, sourceType), 0), false,
+ adapterClass, null)).getInvocation(), adapterClass);
}
});
}
diff --git a/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java b/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
index 7457641e..271bee5f 100644
--- a/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
+++ b/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
@@ -25,7 +25,6 @@
package jdk.nashorn.internal.runtime.linker;
-import jdk.nashorn.internal.lookup.MethodHandleFactory;
import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.io.FileNotFoundException;
@@ -47,6 +46,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import jdk.internal.dynalink.ChainedCallSite;
import jdk.internal.dynalink.DynamicLinker;
import jdk.internal.dynalink.linker.GuardedInvocation;
+import jdk.nashorn.internal.lookup.MethodHandleFactory;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.Debug;
import jdk.nashorn.internal.runtime.ScriptObject;
@@ -79,8 +79,9 @@ public class LinkerCallSite extends ChainedCallSite {
* @param flags Call site specific flags.
* @return New LinkerCallSite.
*/
- static LinkerCallSite newLinkerCallSite(final String name, final MethodType type, final int flags) {
- final NashornCallSiteDescriptor desc = NashornCallSiteDescriptor.get(name, type, flags);
+ static LinkerCallSite newLinkerCallSite(final MethodHandles.Lookup lookup, final String name, final MethodType type,
+ final int flags) {
+ final NashornCallSiteDescriptor desc = NashornCallSiteDescriptor.get(lookup, name, type, flags);
if (desc.isProfile()) {
return ProfilingLinkerCallSite.newProfilingLinkerCallSite(desc);
@@ -132,7 +133,7 @@ public class LinkerCallSite extends ChainedCallSite {
}
private static String getScriptLocation() {
- final StackTraceElement caller = DynamicLinker.getRelinkedCallSiteLocation();
+ final StackTraceElement caller = DynamicLinker.getLinkedCallSiteLocation();
return caller == null ? "unknown location" : (caller.getFileName() + ":" + caller.getLineNumber());
}
@@ -316,7 +317,7 @@ public class LinkerCallSite extends ChainedCallSite {
private static final MethodHandle TRACEOBJECT = findOwnMH("traceObject", Object.class, MethodHandle.class, Object[].class);
private static final MethodHandle TRACEVOID = findOwnMH("traceVoid", void.class, MethodHandle.class, Object[].class);
- private static final MethodHandle TRACEMISS = findOwnMH("traceMiss", void.class, Object[].class);
+ private static final MethodHandle TRACEMISS = findOwnMH("traceMiss", void.class, String.class, Object[].class);
TracingLinkerCallSite(final NashornCallSiteDescriptor desc) {
super(desc);
@@ -362,7 +363,7 @@ public class LinkerCallSite extends ChainedCallSite {
return relink;
}
final MethodType type = relink.type();
- return MH.foldArguments(relink, MH.asType(MH.asCollector(MH.bindTo(TRACEMISS, this), Object[].class, type.parameterCount()), type.changeReturnType(void.class)));
+ return MH.foldArguments(relink, MH.asType(MH.asCollector(MH.insertArguments(TRACEMISS, 0, this, "MISS " + getScriptLocation() + " "), Object[].class, type.parameterCount()), type.changeReturnType(void.class)));
}
private void printObject(final PrintWriter out, final Object arg) {
@@ -481,8 +482,8 @@ public class LinkerCallSite extends ChainedCallSite {
* @throws Throwable if invocation failes or throws exception/error
*/
@SuppressWarnings("unused")
- public void traceMiss(final Object... args) throws Throwable {
- tracePrint(Context.getCurrentErr(), "MISS ", args, null);
+ public void traceMiss(final String desc, final Object... args) throws Throwable {
+ tracePrint(Context.getCurrentErr(), desc, args, null);
}
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
diff --git a/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java b/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
index 8cb360c4..fe720c18 100644
--- a/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
+++ b/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
@@ -25,9 +25,11 @@
package jdk.nashorn.internal.runtime.linker;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
-import java.lang.ref.WeakReference;
-import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.support.AbstractCallSiteDescriptor;
import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
@@ -70,9 +72,15 @@ public class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor {
* set. */
public static final int CALLSITE_TRACE_SCOPE = 0x200;
- private static final WeakHashMap<NashornCallSiteDescriptor, WeakReference<NashornCallSiteDescriptor>> canonicals =
- new WeakHashMap<>();
+ private static final ClassValue<ConcurrentMap<NashornCallSiteDescriptor, NashornCallSiteDescriptor>> canonicals =
+ new ClassValue<ConcurrentMap<NashornCallSiteDescriptor,NashornCallSiteDescriptor>>() {
+ @Override
+ protected ConcurrentMap<NashornCallSiteDescriptor, NashornCallSiteDescriptor> computeValue(Class<?> type) {
+ return new ConcurrentHashMap<>();
+ }
+ };
+ private final MethodHandles.Lookup lookup;
private final String operator;
private final String operand;
private final MethodType methodType;
@@ -81,39 +89,35 @@ public class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor {
/**
* Retrieves a Nashorn call site descriptor with the specified values. Since call site descriptors are immutable
* this method is at liberty to retrieve canonicalized instances (although it is not guaranteed it will do so).
+ * @param lookup the lookup describing the script
* @param name the name at the call site, e.g. {@code "dyn:getProp|getElem|getMethod:color"}.
* @param methodType the method type at the call site
* @param flags Nashorn-specific call site flags
* @return a call site descriptor with the specified values.
*/
- public static NashornCallSiteDescriptor get(final String name, final MethodType methodType, final int flags) {
+ public static NashornCallSiteDescriptor get(final MethodHandles.Lookup lookup, final String name,
+ final MethodType methodType, final int flags) {
final String[] tokenizedName = CallSiteDescriptorFactory.tokenizeName(name);
assert tokenizedName.length == 2 || tokenizedName.length == 3;
assert "dyn".equals(tokenizedName[0]);
assert tokenizedName[1] != null;
// TODO: see if we can move mangling/unmangling into Dynalink
- return get(tokenizedName[1], tokenizedName.length == 3 ? tokenizedName[2].intern() : null,
+ return get(lookup, tokenizedName[1], tokenizedName.length == 3 ? tokenizedName[2].intern() : null,
methodType, flags);
}
- private static NashornCallSiteDescriptor get(final String operator, final String operand, final MethodType methodType, final int flags) {
- final NashornCallSiteDescriptor csd = new NashornCallSiteDescriptor(operator, operand, methodType, flags);
+ private static NashornCallSiteDescriptor get(final MethodHandles.Lookup lookup, final String operator, final String operand, final MethodType methodType, final int flags) {
+ final NashornCallSiteDescriptor csd = new NashornCallSiteDescriptor(lookup, operator, operand, methodType, flags);
// Many of these call site descriptors are identical (e.g. every getter for a property color will be
- // "dyn:getProp:color(Object)Object", so it makes sense canonicalizing them in a weak map
- synchronized(canonicals) {
- final WeakReference<NashornCallSiteDescriptor> ref = canonicals.get(csd);
- if(ref != null) {
- final NashornCallSiteDescriptor canonical = ref.get();
- if(canonical != null) {
- return canonical;
- }
- }
- canonicals.put(csd, new WeakReference<>(csd));
- }
- return csd;
+ // "dyn:getProp:color(Object)Object", so it makes sense canonicalizing them.
+ final ConcurrentMap<NashornCallSiteDescriptor, NashornCallSiteDescriptor> classCanonicals = canonicals.get(lookup.lookupClass());
+ final NashornCallSiteDescriptor canonical = classCanonicals.putIfAbsent(csd, csd);
+ return canonical != null ? canonical : csd;
}
- private NashornCallSiteDescriptor(final String operator, final String operand, final MethodType methodType, final int flags) {
+ private NashornCallSiteDescriptor(final MethodHandles.Lookup lookup, final String operator, final String operand,
+ final MethodType methodType, final int flags) {
+ this.lookup = lookup;
this.operator = operator;
this.operand = operand;
this.methodType = methodType;
@@ -142,6 +146,11 @@ public class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor {
}
@Override
+ public Lookup getLookup() {
+ return lookup;
+ }
+
+ @Override
public boolean equals(final CallSiteDescriptor csd) {
return super.equals(csd) && flags == getFlags(csd);
}
@@ -279,6 +288,6 @@ public class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor {
@Override
public CallSiteDescriptor changeMethodType(final MethodType newMethodType) {
- return get(operator, operand, newMethodType, flags);
+ return get(getLookup(), operator, operand, newMethodType, flags);
}
}
diff --git a/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java b/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java
index eb8837a8..79d1195f 100644
--- a/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java
+++ b/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java
@@ -25,10 +25,14 @@
package jdk.nashorn.internal.runtime.linker;
+import java.lang.reflect.Modifier;
+import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.linker.GuardedInvocation;
import jdk.internal.dynalink.linker.LinkRequest;
import jdk.internal.dynalink.linker.LinkerServices;
import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
+import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
+import jdk.nashorn.internal.runtime.Context;
/**
* Check java reflection permission for java reflective and java.lang.invoke access from scripts
@@ -36,10 +40,10 @@ import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
final class ReflectionCheckLinker implements TypeBasedGuardingDynamicLinker{
@Override
public boolean canLinkType(final Class<?> type) {
- return canLinkTypeStatic(type);
+ return isReflectionClass(type);
}
- private static boolean canLinkTypeStatic(final Class<?> type) {
+ private static boolean isReflectionClass(final Class<?> type) {
if (type == Class.class || ClassLoader.class.isAssignableFrom(type)) {
return true;
}
@@ -50,11 +54,39 @@ final class ReflectionCheckLinker implements TypeBasedGuardingDynamicLinker{
@Override
public GuardedInvocation getGuardedInvocation(final LinkRequest origRequest, final LinkerServices linkerServices)
throws Exception {
+ checkLinkRequest(origRequest);
+ // let the next linker deal with actual linking
+ return null;
+ }
+
+ static void checkReflectionAccess(Class<?> clazz) {
+ final SecurityManager sm = System.getSecurityManager();
+ if (sm != null && isReflectionClass(clazz)) {
+ checkReflectionPermission(sm);
+ }
+ }
+
+ private static void checkLinkRequest(final LinkRequest origRequest) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkPermission(new RuntimePermission("nashorn.JavaReflection"));
+ final LinkRequest requestWithoutContext = origRequest.withoutRuntimeContext(); // Nashorn has no runtime context
+ final Object self = requestWithoutContext.getReceiver();
+ // allow 'static' access on Class objects representing public classes of non-restricted packages
+ if ((self instanceof Class) && Modifier.isPublic(((Class<?>)self).getModifiers())) {
+ final CallSiteDescriptor desc = requestWithoutContext.getCallSiteDescriptor();
+ if(CallSiteDescriptorFactory.tokenizeOperators(desc).contains("getProp")) {
+ if ("static".equals(desc.getNameToken(CallSiteDescriptor.NAME_OPERAND))) {
+ Context.checkPackageAccess(((Class)self).getName());
+ // If "getProp:static" passes package access, allow access.
+ return;
+ }
+ }
+ }
+ checkReflectionPermission(sm);
}
- // let the next linker deal with actual linking
- return null;
+ }
+
+ private static void checkReflectionPermission(final SecurityManager sm) {
+ sm.checkPermission(new RuntimePermission("nashorn.JavaReflection"));
}
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java b/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java
index f797b051..5ff98ac5 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java
@@ -84,9 +84,7 @@ public class JoniRegExp extends RegExp {
this.regex = new Regex(javaPattern, 0, javaPattern.length, option, Syntax.JAVASCRIPT);
this.groupsInNegativeLookahead = parsed.getGroupsInNegativeLookahead();
}
- } catch (final PatternSyntaxException e2) {
- throwParserException("syntax", e2.getMessage());
- } catch (JOniException e2) {
+ } catch (final PatternSyntaxException | JOniException e2) {
throwParserException("syntax", e2.getMessage());
}
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java b/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java
index 52829fac..68df99f3 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java
@@ -57,7 +57,10 @@ final class RegExpScanner extends Scanner {
private final LinkedList<Integer> forwardReferences = new LinkedList<>();
/** Current level of zero-width negative lookahead assertions. */
- private int negativeLookaheadLevel;
+ private int negLookaheadLevel;
+
+ /** Sequential id of current top-level zero-width negative lookahead assertion. */
+ private int negLookaheadGroup;
/** Are we currently inside a character class? */
private boolean inCharClass = false;
@@ -68,17 +71,18 @@ final class RegExpScanner extends Scanner {
private static final String NON_IDENT_ESCAPES = "$^*+(){}[]|\\.?-";
private static class Capture {
- /**
- * Zero-width negative lookaheads enclosing the capture.
- */
- private final int negativeLookaheadLevel;
+ /** Zero-width negative lookaheads enclosing the capture. */
+ private final int negLookaheadLevel;
+ /** Sequential id of top-level negative lookaheads containing the capture. */
+ private final int negLookaheadGroup;
- Capture(final int negativeLookaheadLevel) {
- this.negativeLookaheadLevel = negativeLookaheadLevel;
+ Capture(final int negLookaheadGroup, final int negLookaheadLevel) {
+ this.negLookaheadGroup = negLookaheadGroup;
+ this.negLookaheadLevel = negLookaheadLevel;
}
- public int getNegativeLookaheadLevel() {
- return negativeLookaheadLevel;
+ boolean isContained(final int group, final int level) {
+ return group == this.negLookaheadGroup && level >= this.negLookaheadLevel;
}
}
@@ -152,7 +156,7 @@ final class RegExpScanner extends Scanner {
BitVector vec = null;
for (int i = 0; i < caps.size(); i++) {
final Capture cap = caps.get(i);
- if (cap.getNegativeLookaheadLevel() > 0) {
+ if (cap.negLookaheadLevel > 0) {
if (vec == null) {
vec = new BitVector(caps.size() + 1);
}
@@ -311,11 +315,14 @@ final class RegExpScanner extends Scanner {
commit(3);
if (isNegativeLookahead) {
- negativeLookaheadLevel++;
+ if (negLookaheadLevel == 0) {
+ negLookaheadGroup++;
+ }
+ negLookaheadLevel++;
}
disjunction();
if (isNegativeLookahead) {
- negativeLookaheadLevel--;
+ negLookaheadLevel--;
}
if (ch0 == ')') {
@@ -432,20 +439,17 @@ final class RegExpScanner extends Scanner {
}
if (ch0 == '(') {
- boolean capturingParens = true;
commit(1);
if (ch0 == '?' && ch1 == ':') {
- capturingParens = false;
commit(2);
+ } else {
+ caps.add(new Capture(negLookaheadGroup, negLookaheadLevel));
}
disjunction();
if (ch0 == ')') {
commit(1);
- if (capturingParens) {
- caps.add(new Capture(negativeLookaheadLevel));
- }
return true;
}
}
@@ -675,24 +679,22 @@ final class RegExpScanner extends Scanner {
sb.setLength(sb.length() - 1);
octalOrLiteral(Integer.toString(decimalValue), sb);
- } else if (decimalValue <= caps.size() && caps.get(decimalValue - 1).getNegativeLookaheadLevel() > 0) {
- // Captures that live inside a negative lookahead are dead after the
- // lookahead and will be undefined if referenced from outside.
- if (caps.get(decimalValue - 1).getNegativeLookaheadLevel() > negativeLookaheadLevel) {
+ } else if (decimalValue <= caps.size()) {
+ // Captures inside a negative lookahead are undefined when referenced from the outside.
+ if (!caps.get(decimalValue - 1).isContained(negLookaheadGroup, negLookaheadLevel)) {
+ // Reference to capture in negative lookahead, omit from output buffer.
sb.setLength(sb.length() - 1);
} else {
+ // Append backreference to output buffer.
sb.append(decimalValue);
}
- } else if (decimalValue > caps.size()) {
- // Forward reference to a capture group. Forward references are always undefined so we can omit
- // it from the output buffer. However, if the target capture does not exist, we need to rewrite
- // the reference as hex escape or literal string, so register the reference for later processing.
+ } else {
+ // Forward references to a capture group are always undefined so we can omit it from the output buffer.
+ // However, if the target capture does not exist, we need to rewrite the reference as hex escape
+ // or literal string, so register the reference for later processing.
sb.setLength(sb.length() - 1);
forwardReferences.add(decimalValue);
forwardReferences.add(sb.length());
- } else {
- // Append as backreference
- sb.append(decimalValue);
}
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java b/src/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java
index c0dbf0d8..a75e84ca 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Analyser.java
@@ -41,10 +41,12 @@ import jdk.nashorn.internal.runtime.regexp.joni.ast.StringNode;
import jdk.nashorn.internal.runtime.regexp.joni.constants.AnchorType;
import jdk.nashorn.internal.runtime.regexp.joni.constants.EncloseType;
import jdk.nashorn.internal.runtime.regexp.joni.constants.NodeType;
-import jdk.nashorn.internal.runtime.regexp.joni.constants.RegexState;
import jdk.nashorn.internal.runtime.regexp.joni.constants.StackPopLevel;
import jdk.nashorn.internal.runtime.regexp.joni.constants.TargetInfo;
import jdk.nashorn.internal.runtime.regexp.joni.encoding.ObjPtr;
+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;
final class Analyser extends Parser {
@@ -53,8 +55,6 @@ final class Analyser extends Parser {
}
protected final void compile() {
- regex.state = RegexState.COMPILING;
-
if (Config.DEBUG) {
Config.log.println(new String(chars, getBegin(), getEnd()));
}
@@ -115,8 +115,6 @@ final class Analyser extends Parser {
Config.log.println(new ByteCodePrinter(regex).byteCodeListToString());
} // DEBUG_COMPILE
-
- regex.state = RegexState.NORMAL;
}
private void swap(Node a, Node b) {
@@ -187,14 +185,11 @@ final class Analyser extends Parser {
BackRefNode br = (BackRefNode)node;
if (br.isRecursion()) break;
- if (br.back[0] > env.numMem) newValueException(ERR_INVALID_BACKREF);
- min = getMinMatchLength(env.memNodes[br.back[0]]);
-
- for (int i=1; i<br.backNum; i++) {
- if (br.back[i] > env.numMem) newValueException(ERR_INVALID_BACKREF);
- int tmin = getMinMatchLength(env.memNodes[br.back[i]]);
- if (min > tmin) min = tmin;
+ if (br.backRef > env.numMem) {
+ throw new ValueException(ERR_INVALID_BACKREF);
}
+ min = getMinMatchLength(env.memNodes[br.backRef]);
+
break;
case NodeType.LIST:
@@ -306,11 +301,11 @@ final class Analyser extends Parser {
break;
}
- for (int i=0; i<br.backNum; i++) {
- if (br.back[i] > env.numMem) newValueException(ERR_INVALID_BACKREF);
- int tmax = getMaxMatchLength(env.memNodes[br.back[i]]);
- if (max < tmax) max = tmax;
+ if (br.backRef > env.numMem) {
+ throw new ValueException(ERR_INVALID_BACKREF);
}
+ int tmax = getMaxMatchLength(env.memNodes[br.backRef]);
+ if (max < tmax) max = tmax;
break;
case NodeType.QTFR:
@@ -417,8 +412,6 @@ final class Analyser extends Parser {
break;
case NodeType.CTYPE:
- len = 1;
-
case NodeType.CCLASS:
case NodeType.CANY:
len = 1;
@@ -712,13 +705,12 @@ final class Analyser extends Parser {
an.charLength = len;
break;
case GET_CHAR_LEN_VARLEN:
- newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
- break;
+ throw new SyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
case GET_CHAR_LEN_TOP_ALT_VARLEN:
if (syntax.differentLengthAltLookBehind()) {
return divideLookBehindAlternatives(node);
} else {
- newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+ throw new SyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
}
}
return node;
@@ -955,12 +947,12 @@ final class Analyser extends Parser {
case NodeType.BREF:
BackRefNode br = (BackRefNode)node;
- for (int i=0; i<br.backNum; i++) {
- if (br.back[i] > env.numMem) newValueException(ERR_INVALID_BACKREF);
- env.backrefedMem = bsOnAt(env.backrefedMem, br.back[i]);
- env.btMemStart = bsOnAt(env.btMemStart, br.back[i]);
- ((EncloseNode)env.memNodes[br.back[i]]).setMemBackrefed();
+ if (br.backRef > env.numMem) {
+ throw new ValueException(ERR_INVALID_BACKREF);
}
+ env.backrefedMem = bsOnAt(env.backrefedMem, br.backRef);
+ env.btMemStart = bsOnAt(env.btMemStart, br.backRef);
+ ((EncloseNode)env.memNodes[br.backRef]).setMemBackrefed();
break;
case NodeType.QTFR:
@@ -1064,14 +1056,18 @@ final class Analyser extends Parser {
break;
case AnchorType.LOOK_BEHIND:
- if (checkTypeTree(an.target, NodeType.ALLOWED_IN_LB, EncloseType.ALLOWED_IN_LB, AnchorType.ALLOWED_IN_LB)) newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+ if (checkTypeTree(an.target, NodeType.ALLOWED_IN_LB, EncloseType.ALLOWED_IN_LB, AnchorType.ALLOWED_IN_LB)) {
+ throw new SyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+ }
node = setupLookBehind(node);
if (node.getType() != NodeType.ANCHOR) continue restart;
setupTree(((AnchorNode)node).target, state);
break;
case AnchorType.LOOK_BEHIND_NOT:
- if (checkTypeTree(an.target, NodeType.ALLOWED_IN_LB, EncloseType.ALLOWED_IN_LB, AnchorType.ALLOWED_IN_LB)) newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+ if (checkTypeTree(an.target, NodeType.ALLOWED_IN_LB, EncloseType.ALLOWED_IN_LB, AnchorType.ALLOWED_IN_LB)) {
+ throw new SyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+ }
node = setupLookBehind(node);
if (node.getType() != NodeType.ANCHOR) continue restart;
setupTree(((AnchorNode)node).target, (state | IN_NOT));
@@ -1218,15 +1214,9 @@ final class Analyser extends Parser {
Node[]nodes = oenv.scanEnv.memNodes;
- int min = getMinMatchLength(nodes[br.back[0]]);
- int max = getMaxMatchLength(nodes[br.back[0]]);
+ int min = getMinMatchLength(nodes[br.backRef]);
+ int max = getMaxMatchLength(nodes[br.backRef]);
- for (int i=1; i<br.backNum; i++) {
- int tmin = getMinMatchLength(nodes[br.back[i]]);
- int tmax = getMaxMatchLength(nodes[br.back[i]]);
- if (min > tmin) min = tmin;
- if (max < tmax) max = tmax;
- }
opt.length.set(min, max);
break;
}
@@ -1314,7 +1304,7 @@ final class Analyser extends Parser {
}
default:
- newInternalException(ERR_PARSER_BUG);
+ throw new InternalException(ERR_PARSER_BUG);
} // switch
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java
index f348a205..aefa9d83 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ArrayCompiler.java
@@ -100,12 +100,7 @@ final class ArrayCompiler extends Compiler {
}
private boolean isNeedStrLenOpExact(int op) {
- return op == OPCode.EXACTN ||
- op == OPCode.EXACTMB2N ||
- op == OPCode.EXACTMB3N ||
- op == OPCode.EXACTMBN ||
- op == OPCode.EXACTN_IC ||
- op == OPCode.EXACTN_IC_SB;
+ return op == OPCode.EXACTN || op == OPCode.EXACTN_IC;
}
private boolean opTemplated(int op) {
@@ -172,7 +167,6 @@ final class ArrayCompiler extends Compiler {
if (isNeedStrLenOpExact(op)) len += OPSize.LENGTH;
len += strLength;
}
- if (op == OPCode.EXACTMBN) len += OPSize.LENGTH;
return len;
}
@@ -181,8 +175,6 @@ final class ArrayCompiler extends Compiler {
int op = selectStrOpcode(strLength, ignoreCase);
addOpcode(op);
- if (op == OPCode.EXACTMBN) addLength(1);
-
if (isNeedStrLenOpExact(op)) {
addLength(strLength);
}
@@ -294,35 +286,22 @@ final class ArrayCompiler extends Compiler {
@Override
protected void compileBackrefNode(BackRefNode node) {
- BackRefNode br = node;
- // USE_BACKREF_AT_LEVEL
- if (br.backNum == 1) {
- if (isIgnoreCase(regex.options)) {
- addOpcode(OPCode.BACKREFN_IC);
- addMemNum(br.back[0]);
- } else {
- switch (br.back[0]) {
- case 1:
- addOpcode(OPCode.BACKREF1);
- break;
- case 2:
- addOpcode(OPCode.BACKREF2);
- break;
- default:
- addOpcode(OPCode.BACKREFN);
- addOpcode(br.back[0]);
- break;
- } // switch
- }
+ if (isIgnoreCase(regex.options)) {
+ addOpcode(OPCode.BACKREFN_IC);
+ addMemNum(node.backRef);
} else {
- if (isIgnoreCase(regex.options)) {
- addOpcode(OPCode.BACKREF_MULTI_IC);
- } else {
- addOpcode(OPCode.BACKREF_MULTI);
- }
- // !add_bacref_mems:!
- addLength(br.backNum);
- for (int i=br.backNum-1; i>=0; i--) addMemNum(br.back[i]);
+ switch (node.backRef) {
+ case 1:
+ addOpcode(OPCode.BACKREF1);
+ break;
+ case 2:
+ addOpcode(OPCode.BACKREF2);
+ break;
+ default:
+ addOpcode(OPCode.BACKREFN);
+ addOpcode(node.backRef);
+ break;
+ } // switch
}
}
@@ -791,13 +770,8 @@ final class ArrayCompiler extends Compiler {
case NodeType.BREF:
BackRefNode br = (BackRefNode)node;
- // USE_BACKREF_AT_LEVEL
- if (br.backNum == 1) {
- len = ((!isIgnoreCase(regex.options) && br.back[0] <= 2)
- ? OPSize.OPCODE : (OPSize.OPCODE + OPSize.MEMNUM));
- } else {
- len = OPSize.OPCODE + OPSize.LENGTH + (OPSize.MEMNUM * br.backNum);
- }
+ len = ((!isIgnoreCase(regex.options) && br.backRef <= 2)
+ ? OPSize.OPCODE : (OPSize.OPCODE + OPSize.MEMNUM));
break;
case NodeType.QTFR:
@@ -873,15 +847,10 @@ final class ArrayCompiler extends Compiler {
switch(opcode) {
case OPCode.ANYCHAR_STAR:
- case OPCode.ANYCHAR_STAR_SB:
case OPCode.ANYCHAR_ML_STAR:
- case OPCode.ANYCHAR_ML_STAR_SB:
case OPCode.ANYCHAR_STAR_PEEK_NEXT:
- case OPCode.ANYCHAR_STAR_PEEK_NEXT_SB:
case OPCode.ANYCHAR_ML_STAR_PEEK_NEXT:
- case OPCode.ANYCHAR_ML_STAR_PEEK_NEXT_SB:
case OPCode.STATE_CHECK_ANYCHAR_STAR:
- case OPCode.STATE_CHECK_ANYCHAR_STAR_SB:
case OPCode.STATE_CHECK_ANYCHAR_ML_STAR:
case OPCode.MEMORY_START_PUSH:
case OPCode.MEMORY_END_PUSH:
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java
index 855e1ced..bd997535 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodeMachine.java
@@ -45,7 +45,7 @@ class ByteCodeMachine extends StackMachine {
private int sstart;
private int sbegin;
- private final int[]code; // byte code
+ private final int[] code; // byte code
private int ip; // instruction pointer
ByteCodeMachine(Regex regex, char[] chars, int p, int end) {
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodePrinter.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodePrinter.java
index d56164d1..a01e414c 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodePrinter.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ByteCodePrinter.java
@@ -26,13 +26,11 @@ import jdk.nashorn.internal.runtime.regexp.joni.constants.OPSize;
import jdk.nashorn.internal.runtime.regexp.joni.exception.InternalException;
class ByteCodePrinter {
- final int[]code;
+ final int[] code;
final int codeLength;
final char[][] templates;
- Object[]operands;
- int operantCount;
- WarnCallback warnings;
+ Object[] operands;
private final static String OpCodeNames[] = new String[] {
"finish", /*OP_FINISH*/
@@ -123,32 +121,6 @@ class ByteCodePrinter {
"state-check-anychar-ml*", /*OP_STATE_CHECK_ANYCHAR_ML_STAR*/
"set-option-push", /*OP_SET_OPTION_PUSH*/
"set-option", /*OP_SET_OPTION*/
-
- // single byte versions
- "anychar-sb", /*OP_ANYCHAR*/
- "anychar-ml-sb", /*OP_ANYCHAR_ML*/
- "anychar*-sb", /*OP_ANYCHAR_STAR*/
- "anychar-ml*-sb", /*OP_ANYCHAR_ML_STAR*/
- "anychar*-peek-next-sb", /*OP_ANYCHAR_STAR_PEEK_NEXT*/
- "anychar-ml*-peek-next-sb", /*OP_ANYCHAR_ML_STAR_PEEK_NEXT*/
- "state-check-anychar*-sb", /*OP_STATE_CHECK_ANYCHAR_STAR*/
- "state-check-anychar-ml*-sb", /*OP_STATE_CHECK_ANYCHAR_ML_STAR*/
-
- "cclass-sb", /*OP_CCLASS*/
- "cclass-not-sb", /*OP_CCLASS_NOT*/
-
- "word-sb", /*OP_WORD*/
- "not-word-sb", /*OP_NOT_WORD*/
- "word-bound-sb", /*OP_WORD_BOUND*/
- "not-word-bound-sb", /*OP_NOT_WORD_BOUND*/
- "word-begin-sb", /*OP_WORD_BEGIN*/
- "word-end-sb", /*OP_WORD_END*/
-
- "look-behind-sb", /*OP_LOOK_BEHIND*/
-
- "exact1-ic-sb", /*OP_EXACT1_IC*/
- "exactn-ic-sb", /*OP_EXACTN_IC*/
-
};
private final static int OpCodeArgTypes[] = new int[] {
@@ -240,41 +212,14 @@ class ByteCodePrinter {
Arguments.STATE_CHECK, /*OP_STATE_CHECK_ANYCHAR_ML_STAR*/
Arguments.OPTION, /*OP_SET_OPTION_PUSH*/
Arguments.OPTION, /*OP_SET_OPTION*/
-
- // single byte versions
- Arguments.NON, /*OP_ANYCHAR*/
- Arguments.NON, /*OP_ANYCHAR_ML*/
- Arguments.NON, /*OP_ANYCHAR_STAR*/
- Arguments.NON, /*OP_ANYCHAR_ML_STAR*/
- Arguments.SPECIAL, /*OP_ANYCHAR_STAR_PEEK_NEXT*/
- Arguments.SPECIAL, /*OP_ANYCHAR_ML_STAR_PEEK_NEXT*/
- Arguments.STATE_CHECK, /*OP_STATE_CHECK_ANYCHAR_STAR*/
- Arguments.STATE_CHECK, /*OP_STATE_CHECK_ANYCHAR_ML_STAR*/
-
- Arguments.SPECIAL, /*OP_CCLASS*/
- Arguments.SPECIAL, /*OP_CCLASS_NOT*/
-
- Arguments.NON, /*OP_WORD*/
- Arguments.NON, /*OP_NOT_WORD*/
- Arguments.NON, /*OP_WORD_BOUND*/
- Arguments.NON, /*OP_NOT_WORD_BOUND*/
- Arguments.NON, /*OP_WORD_BEGIN*/
- Arguments.NON, /*OP_WORD_END*/
-
- Arguments.SPECIAL, /*OP_LOOK_BEHIND*/
-
- Arguments.SPECIAL, /*OP_EXACT1_IC*/
- Arguments.SPECIAL, /*OP_EXACTN_IC*/
};
public ByteCodePrinter(Regex regex) {
code = regex.code;
codeLength = regex.codeLength;
operands = regex.operands;
- operantCount = regex.operandLength;
templates = regex.templates;
- warnings = regex.warnings;
}
public String byteCodeListToString() {
@@ -283,24 +228,17 @@ class ByteCodePrinter {
private void pString(StringBuilder sb, int len, int s) {
sb.append(":");
- while (len-- > 0) sb.append(new String(new byte[]{(byte)code[s++]}));
- }
-
- private void pStringFromTemplate(StringBuilder sb, int len, byte[]tm, int idx) {
- sb.append(":T:");
- while (len-- > 0) sb.append(new String(new byte[]{tm[idx++]}));
+ sb.append(new String(code, s, len));
}
- private void pLenString(StringBuilder sb, int len, int mbLen, int s) {
- int x = len * mbLen;
- sb.append(":" + len + ":");
- while (x-- > 0) sb.append(new String(new byte[]{(byte)code[s++]}));
+ private void pLenString(StringBuilder sb, int len, int s) {
+ sb.append(":").append(len).append(":");
+ sb.append(new String(code, s, len));
}
- private void pLenStringFromTemplate(StringBuilder sb, int len, int mbLen, char[] tm, int idx) {
- int x = len * mbLen;
- sb.append(":T:" + len + ":");
- while (x-- > 0) sb.append(new String(new byte[]{(byte)tm[idx++]}));
+ private void pLenStringFromTemplate(StringBuilder sb, int len, char[] tm, int idx) {
+ sb.append(":T:").append(len).append(":");
+ sb.append(tm, idx, len);
}
public int compiledByteCodeToString(StringBuilder sb, int bp) {
@@ -309,7 +247,7 @@ class ByteCodePrinter {
CClassNode cc;
int tm, idx;
- sb.append("[" + OpCodeNames[code[bp]]);
+ sb.append("[").append(OpCodeNames[code[bp]]);
int argType = OpCodeArgTypes[code[bp]];
int ip = bp;
if (argType != Arguments.SPECIAL) {
@@ -319,32 +257,32 @@ class ByteCodePrinter {
break;
case Arguments.RELADDR:
- sb.append(":(" + code[bp] + ")");
+ sb.append(":(").append(code[bp]).append(")");
bp += OPSize.RELADDR;
break;
case Arguments.ABSADDR:
- sb.append(":(" + code[bp] + ")");
+ sb.append(":(").append(code[bp]).append(")");
bp += OPSize.ABSADDR;
break;
case Arguments.LENGTH:
- sb.append(":" + code[bp]);
+ sb.append(":").append(code[bp]);
bp += OPSize.LENGTH;
break;
case Arguments.MEMNUM:
- sb.append(":" + code[bp]);
+ sb.append(":").append(code[bp]);
bp += OPSize.MEMNUM;
break;
case Arguments.OPTION:
- sb.append(":" + code[bp]);
+ sb.append(":").append(code[bp]);
bp += OPSize.OPTION;
break;
case Arguments.STATE_CHECK:
- sb.append(":" + code[bp]);
+ sb.append(":").append(code[bp]);
bp += OPSize.STATE_CHECK;
break;
}
@@ -353,8 +291,6 @@ class ByteCodePrinter {
case OPCode.EXACT1:
case OPCode.ANYCHAR_STAR_PEEK_NEXT:
case OPCode.ANYCHAR_ML_STAR_PEEK_NEXT:
- case OPCode.ANYCHAR_STAR_PEEK_NEXT_SB:
- case OPCode.ANYCHAR_ML_STAR_PEEK_NEXT_SB:
pString(sb, 1, bp++);
break;
@@ -386,92 +322,19 @@ class ByteCodePrinter {
bp += OPSize.INDEX;
idx = code[bp];
bp += OPSize.INDEX;
- pLenStringFromTemplate(sb, len, 1, templates[tm], idx);
+ pLenStringFromTemplate(sb, len, templates[tm], idx);
} else {
- pLenString(sb, len, 1, bp);
+ pLenString(sb, len, bp);
bp += len;
}
break;
- case OPCode.EXACTMB2N1:
- pString(sb, 2, bp);
- bp += 2;
- break;
-
- case OPCode.EXACTMB2N2:
- pString(sb, 4, bp);
- bp += 4;
- break;
-
- case OPCode.EXACTMB2N3:
- pString(sb, 6, bp);
- bp += 6;
- break;
-
- case OPCode.EXACTMB2N:
- len = code[bp];
- bp += OPSize.LENGTH;
- if (Config.USE_STRING_TEMPLATES) {
- tm = code[bp];
- bp += OPSize.INDEX;
- idx = code[bp];
- bp += OPSize.INDEX;
- pLenStringFromTemplate(sb, len, 2, templates[tm], idx);
- } else {
- pLenString(sb, len, 2, bp);
- bp += len * 2;
- }
- break;
-
- case OPCode.EXACTMB3N:
- len = code[bp];
- bp += OPSize.LENGTH;
- if (Config.USE_STRING_TEMPLATES) {
- tm = code[bp];
- bp += OPSize.INDEX;
- idx = code[bp];
- bp += OPSize.INDEX;
- pLenStringFromTemplate(sb, len, 3, templates[tm], idx);
- } else {
- pLenString(sb, len, 3, bp);
- bp += len * 3;
- }
- break;
-
- case OPCode.EXACTMBN:
- int mbLen = code[bp];
- bp += OPSize.LENGTH;
- len = code[bp];
- bp += OPSize.LENGTH;
- n = len * mbLen;
-
- if (Config.USE_STRING_TEMPLATES) {
- tm = code[bp];
- bp += OPSize.INDEX;
- idx = code[bp];
- bp += OPSize.INDEX;
- sb.append(":T:" + mbLen + ":" + len + ":");
-
- while (n-- > 0) sb.append(new String(new char[]{templates[tm][idx++]}));
- } else {
- sb.append(":" + mbLen + ":" + len + ":");
-
- while (n-- > 0) sb.append(new String(new byte[]{(byte)code[bp++]}));
- }
-
- break;
-
case OPCode.EXACT1_IC:
- case OPCode.EXACT1_IC_SB:
- final int MAX_CHAR_LENGTH = 6;
- byte[]bytes = new byte[MAX_CHAR_LENGTH];
- for (int i = 0; bp + i < code.length && i < MAX_CHAR_LENGTH; i++) bytes[i] = (byte)code[bp + i];
pString(sb, 1, bp);
bp++;
break;
case OPCode.EXACTN_IC:
- case OPCode.EXACTN_IC_SB:
len = code[bp];
bp += OPSize.LENGTH;
if (Config.USE_STRING_TEMPLATES) {
@@ -479,29 +342,27 @@ class ByteCodePrinter {
bp += OPSize.INDEX;
idx = code[bp];
bp += OPSize.INDEX;
- pLenStringFromTemplate(sb, len, 1, templates[tm], idx);
+ pLenStringFromTemplate(sb, len, templates[tm], idx);
} else {
- pLenString(sb, len, 1, bp);
+ pLenString(sb, len, bp);
bp += len;
}
break;
case OPCode.CCLASS:
- case OPCode.CCLASS_SB:
bs = new BitSet();
System.arraycopy(code, bp, bs.bits, 0, BitSet.BITSET_SIZE);
n = bs.numOn();
bp += BitSet.BITSET_SIZE;
- sb.append(":" + n);
+ sb.append(":").append(n);
break;
case OPCode.CCLASS_NOT:
- case OPCode.CCLASS_NOT_SB:
bs = new BitSet();
System.arraycopy(code, bp, bs.bits, 0, BitSet.BITSET_SIZE);
n = bs.numOn();
bp += BitSet.BITSET_SIZE;
- sb.append(":" + n);
+ sb.append(":").append(n);
break;
case OPCode.CCLASS_MB:
@@ -511,7 +372,7 @@ class ByteCodePrinter {
cod = code[bp];
//bp += OPSize.CODE_POINT;
bp += len;
- sb.append(":" + cod + ":" + len);
+ sb.append(":").append(cod).append(":").append(len);
break;
case OPCode.CCLASS_MIX:
@@ -525,20 +386,20 @@ class ByteCodePrinter {
cod = code[bp];
//bp += OPSize.CODE_POINT;
bp += len;
- sb.append(":" + n + ":" + cod + ":" + len);
+ sb.append(":").append(n).append(":").append(cod).append(":").append(len);
break;
case OPCode.CCLASS_NODE:
cc = (CClassNode)operands[code[bp]];
bp += OPSize.POINTER;
n = cc.bs.numOn();
- sb.append(":" + cc + ":" + n);
+ sb.append(":").append(cc).append(":").append(n);
break;
case OPCode.BACKREFN_IC:
mem = code[bp];
bp += OPSize.MEMNUM;
- sb.append(":" + mem);
+ sb.append(":").append(mem);
break;
case OPCode.BACKREF_MULTI_IC:
@@ -557,10 +418,10 @@ class ByteCodePrinter {
case OPCode.BACKREF_WITH_LEVEL: {
int option = code[bp];
bp += OPSize.OPTION;
- sb.append(":" + option);
+ sb.append(":").append(option);
int level = code[bp];
bp += OPSize.LENGTH;
- sb.append(":" + level);
+ sb.append(":").append(level);
sb.append(" ");
len = code[bp];
bp += OPSize.LENGTH;
@@ -579,23 +440,22 @@ class ByteCodePrinter {
bp += OPSize.MEMNUM;
addr = code[bp];
bp += OPSize.RELADDR;
- sb.append(":" + mem + ":" + addr);
+ sb.append(":").append(mem).append(":").append(addr);
break;
case OPCode.PUSH_OR_JUMP_EXACT1:
case OPCode.PUSH_IF_PEEK_NEXT:
addr = code[bp];
bp += OPSize.RELADDR;
- sb.append(":(" + addr + ")");
+ sb.append(":(").append(addr).append(")");
pString(sb, 1, bp);
bp++;
break;
case OPCode.LOOK_BEHIND:
- case OPCode.LOOK_BEHIND_SB:
len = code[bp];
bp += OPSize.LENGTH;
- sb.append(":" + len);
+ sb.append(":").append(len);
break;
case OPCode.PUSH_LOOK_BEHIND_NOT:
@@ -603,7 +463,7 @@ class ByteCodePrinter {
bp += OPSize.RELADDR;
len = code[bp];
bp += OPSize.LENGTH;
- sb.append(":" + len + ":(" + addr + ")");
+ sb.append(":").append(len).append(":(").append(addr).append(")");
break;
case OPCode.STATE_CHECK_PUSH:
@@ -612,7 +472,7 @@ class ByteCodePrinter {
bp += OPSize.STATE_CHECK_NUM;
addr = code[bp];
bp += OPSize.RELADDR;
- sb.append(":" + scn + ":(" + addr + ")");
+ sb.append(":").append(scn).append(":(").append(addr).append(")");
break;
default:
@@ -623,14 +483,16 @@ class ByteCodePrinter {
sb.append("]");
// @opcode_address(opcode_size)
- if (Config.DEBUG_COMPILE_BYTE_CODE_INFO) sb.append("@" + ip + "(" + (bp - ip) + ")");
+ if (Config.DEBUG_COMPILE_BYTE_CODE_INFO) {
+ sb.append("@").append(ip).append("(").append((bp - ip)).append(")");
+ }
return bp;
}
private String compiledByteCodeListToString() {
StringBuilder sb = new StringBuilder();
- sb.append("code length: " + codeLength + "\n");
+ sb.append("code length: ").append(codeLength).append("\n");
int ncode = 0;
int bp = 0;
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java b/src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java
index 87e0f8e1..d61a03a5 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/CodeRangeBuffer.java
@@ -22,25 +22,34 @@ package jdk.nashorn.internal.runtime.regexp.joni;
import jdk.nashorn.internal.runtime.regexp.joni.exception.ErrorMessages;
import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException;
-public final class CodeRangeBuffer {
+public final class CodeRangeBuffer implements Cloneable {
private static final int INIT_MULTI_BYTE_RANGE_SIZE = 5;
private static final int ALL_MULTI_BYTE_RANGE = 0x7fffffff;
- int[]p;
+ int[] p;
int used;
- public CodeRangeBuffer(int[]ranges) {
- p = ranges;
- used = ranges[0] + 1;
- }
public CodeRangeBuffer() {
p = new int[INIT_MULTI_BYTE_RANGE_SIZE];
writeCodePoint(0, 0);
}
- public int[]getCodeRange() {
- return p;
+ // CodeRange.isInCodeRange
+ public boolean isInCodeRange(int code) {
+ int low = 0;
+ int n = p[0];
+ int high = n;
+
+ while (low < high) {
+ int x = (low + high) >> 1;
+ if (code > p[(x << 1) + 2]) {
+ low = x + 1;
+ } else {
+ high = x;
+ }
+ }
+ return low < n && code >= p[(low << 1) + 1];
}
private CodeRangeBuffer(CodeRangeBuffer orig) {
@@ -52,12 +61,12 @@ public final class CodeRangeBuffer {
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("CodeRange");
- buf.append("\n used: " + used);
- buf.append("\n code point: " + p[0]);
+ buf.append("\n used: ").append(used);
+ buf.append("\n code point: ").append(p[0]);
buf.append("\n ranges: ");
for (int i=0; i<p[0]; i++) {
- buf.append("[" + rangeNumToString(p[i * 2 + 1]) + ".." + rangeNumToString(p[i * 2 + 2]) + "]");
+ buf.append("[").append(rangeNumToString(p[i * 2 + 1])).append("..").append(rangeNumToString(p[i * 2 + 2])).append("]");
if (i > 0 && i % 6 == 0) buf.append("\n ");
}
@@ -108,6 +117,7 @@ public final class CodeRangeBuffer {
if (used < u) used = u;
}
+ @Override
public CodeRangeBuffer clone() {
return new CodeRangeBuffer(this);
}
@@ -183,7 +193,7 @@ public final class CodeRangeBuffer {
// add_code_range, be aware of it returning null!
public static CodeRangeBuffer addCodeRange(CodeRangeBuffer pbuf, ScanEnvironment env, int from, int to) {
- if (from >to) {
+ if (from > to) {
if (env.syntax.allowEmptyRangeInCC()) {
return pbuf;
} else {
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java b/src/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java
index 8c274fe0..d6d697aa 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java
@@ -132,23 +132,6 @@ public class EncodingHelper {
}
}
- // CodeRange.isInCodeRange
- public static boolean isInCodeRange(int[]p, int code) {
- int low = 0;
- int n = p[0];
- int high = n;
-
- while (low < high) {
- int x = (low + high) >> 1;
- if (code > p[(x << 1) + 2]) {
- low = x + 1;
- } else {
- high = x;
- }
- }
- return low < n && code >= p[(low << 1) + 1];
- }
-
public static int[] ctypeCodeRange(int ctype, IntHolder sbOut) {
sbOut.value = 0x100; // use bitset for codes smaller than 256
int[] range = null;
@@ -188,7 +171,7 @@ public class EncodingHelper {
}
// CodeRange.isInCodeRange
- public static boolean isInCodeRange(int[]p, int offset, int code) {
+ public static boolean isInCodeRange(int[] p, int offset, int code) {
int low = 0;
int n = p[offset];
int high = n ;
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java b/src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java
index 53ab3ec0..24dea8cb 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Lexer.java
@@ -28,6 +28,8 @@ import jdk.nashorn.internal.runtime.regexp.joni.constants.MetaChar;
import jdk.nashorn.internal.runtime.regexp.joni.constants.TokenType;
import jdk.nashorn.internal.runtime.regexp.joni.encoding.CharacterType;
import jdk.nashorn.internal.runtime.regexp.joni.exception.ErrorMessages;
+import jdk.nashorn.internal.runtime.regexp.joni.exception.SyntaxException;
+import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException;
class Lexer extends ScannerSupport {
protected final ScanEnvironment env;
@@ -52,20 +54,24 @@ class Lexer extends ScannerSupport {
if (synAllow) {
return 1; /* "....{" : OK! */
} else {
- newSyntaxException(ERR_END_PATTERN_AT_LEFT_BRACE);
+ throw new SyntaxException(ERR_END_PATTERN_AT_LEFT_BRACE);
}
}
if (!synAllow) {
c = peek();
if (c == ')' || c == '(' || c == '|') {
- newSyntaxException(ERR_END_PATTERN_AT_LEFT_BRACE);
+ throw new SyntaxException(ERR_END_PATTERN_AT_LEFT_BRACE);
}
}
int low = scanUnsignedNumber();
- if (low < 0) newSyntaxException(ErrorMessages.ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
- if (low > Config.MAX_REPEAT_NUM) newSyntaxException(ErrorMessages.ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
+ if (low < 0) {
+ throw new SyntaxException(ErrorMessages.ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
+ }
+ if (low > Config.MAX_REPEAT_NUM) {
+ throw new SyntaxException(ErrorMessages.ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
+ }
boolean nonLow = false;
if (p == _p) { /* can't read low */
@@ -85,8 +91,12 @@ class Lexer extends ScannerSupport {
if (c == ',') {
int prev = p; // ??? last
up = scanUnsignedNumber();
- if (up < 0) newValueException(ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
- if (up > Config.MAX_REPEAT_NUM) newValueException(ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
+ if (up < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
+ }
+ if (up > Config.MAX_REPEAT_NUM) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE);
+ }
if (p == prev) {
if (nonLow) return invalidRangeQuantifier(synAllow);
@@ -110,7 +120,7 @@ class Lexer extends ScannerSupport {
if (c != '}') return invalidRangeQuantifier(synAllow);
if (!isRepeatInfinite(up) && low > up) {
- newValueException(ERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE);
+ throw new ValueException(ERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE);
}
token.type = TokenType.INTERVAL;
@@ -125,24 +135,31 @@ class Lexer extends ScannerSupport {
restore();
return 1;
} else {
- newSyntaxException(ERR_INVALID_REPEAT_RANGE_PATTERN);
- return 0; // not reached
+ throw new SyntaxException(ERR_INVALID_REPEAT_RANGE_PATTERN);
}
}
/* \M-, \C-, \c, or \... */
private int fetchEscapedValue() {
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_ESCAPE);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_ESCAPE);
+ }
fetch();
switch(c) {
case 'M':
if (syntax.op2EscCapitalMBarMeta()) {
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_META);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_META);
+ }
fetch();
- if (c != '-') newSyntaxException(ERR_META_CODE_SYNTAX);
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_META);
+ if (c != '-') {
+ throw new SyntaxException(ERR_META_CODE_SYNTAX);
+ }
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_META);
+ }
fetch();
if (c == syntax.metaCharTable.esc) {
c = fetchEscapedValue();
@@ -155,9 +172,13 @@ class Lexer extends ScannerSupport {
case 'C':
if (syntax.op2EscCapitalCBarControl()) {
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_CONTROL);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_CONTROL);
+ }
fetch();
- if (c != '-') newSyntaxException(ERR_CONTROL_CODE_SYNTAX);
+ if (c != '-') {
+ throw new SyntaxException(ERR_CONTROL_CODE_SYNTAX);
+ }
fetchEscapedValueControl();
} else {
fetchEscapedValueBackSlash();
@@ -182,7 +203,9 @@ class Lexer extends ScannerSupport {
}
private void fetchEscapedValueControl() {
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_CONTROL);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_CONTROL);
+ }
fetch();
if (c == '?') {
c = 0177;
@@ -205,115 +228,6 @@ class Lexer extends ScannerSupport {
}
}
- // USE_NAMED_GROUP && USE_BACKREF_AT_LEVEL
- /*
- \k<name+n>, \k<name-n>
- \k<num+n>, \k<num-n>
- \k<-num+n>, \k<-num-n>
- */
-
- // #else USE_NAMED_GROUP
- // make it return nameEnd!
- private final int fetchNameForNoNamedGroup(int startCode, boolean ref) {
- int src = p;
- value = 0;
-
- int isNum = 0;
- int sign = 1;
-
- int endCode = nameEndCodePoint(startCode);
- int pnumHead = p;
- int nameEnd = stop;
-
- String err = null;
- if (!left()) {
- newValueException(ERR_EMPTY_GROUP_NAME);
- } else {
- fetch();
- if (c == endCode) newValueException(ERR_EMPTY_GROUP_NAME);
-
- if (EncodingHelper.isDigit(c)) {
- isNum = 1;
- } else if (c == '-') {
- isNum = 2;
- sign = -1;
- pnumHead = p;
- } else {
- err = ERR_INVALID_CHAR_IN_GROUP_NAME;
- }
- }
-
- while(left()) {
- nameEnd = p;
-
- fetch();
- if (c == endCode || c == ')') break;
- if (!EncodingHelper.isDigit(c)) err = ERR_INVALID_CHAR_IN_GROUP_NAME;
- }
-
- if (err == null && c != endCode) {
- err = ERR_INVALID_GROUP_NAME;
- nameEnd = stop;
- }
-
- if (err == null) {
- mark();
- p = pnumHead;
- int backNum = scanUnsignedNumber();
- restore();
- if (backNum < 0) {
- newValueException(ERR_TOO_BIG_NUMBER);
- } else if (backNum == 0){
- newValueException(ERR_INVALID_GROUP_NAME, src, nameEnd);
- }
- backNum *= sign;
-
- value = nameEnd;
- return backNum;
- } else {
- newValueException(err, src, nameEnd);
- return 0; // not reached
- }
- }
-
- protected final int fetchName(int startCode, boolean ref) {
- return fetchNameForNoNamedGroup(startCode, ref);
- }
-
- private boolean strExistCheckWithEsc(int[]s, int n, int bad) {
- int p = this.p;
- int to = this.stop;
-
- boolean inEsc = false;
- int i=0;
- while(p < to) {
- if (inEsc) {
- inEsc = false;
- p ++;
- } else {
- int x = chars[p];
- int q = p + 1;
- if (x == s[0]) {
- for (i=1; i<n && q < to; i++) {
- x = chars[q];
- if (x != s[i]) break;
- q++;
- }
- if (i >= n) return true;
- p++;
- } else {
- x = chars[p];
- if (x == bad) return false;
- else if (x == syntax.metaCharTable.esc) inEsc = true;
- p = q;
- }
- }
- }
- return false;
- }
-
- private static final int send[] = new int[]{':', ']'};
-
private void fetchTokenInCCFor_charType(boolean flag, int type) {
token.type = TokenType.CHAR_TYPE;
token.setPropCType(type);
@@ -327,16 +241,19 @@ class Lexer extends ScannerSupport {
if (peekIs('{') && syntax.opEscXBraceHex8()) {
inc();
int num = scanUnsignedHexadecimalNumber(8);
- if (num < 0) newValueException(ERR_TOO_BIG_WIDE_CHAR_VALUE);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_WIDE_CHAR_VALUE);
+ }
if (left()) {
int c2 = peek();
- if (EncodingHelper.isXDigit(c2)) newValueException(ERR_TOO_LONG_WIDE_CHAR_VALUE);
+ if (EncodingHelper.isXDigit(c2)) {
+ throw new ValueException(ERR_TOO_LONG_WIDE_CHAR_VALUE);
+ }
}
if (p > last + 1 && left() && peekIs('}')) {
inc();
token.type = TokenType.CODE_POINT;
- token.base = 16;
token.setCode(num);
} else {
/* can't read nothing or invalid format */
@@ -344,12 +261,13 @@ class Lexer extends ScannerSupport {
}
} else if (syntax.opEscXHex2()) {
int num = scanUnsignedHexadecimalNumber(2);
- if (num < 0) newValueException(ERR_TOO_BIG_NUMBER);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER);
+ }
if (p == last) { /* can't read nothing. */
num = 0; /* but, it's not error */
}
token.type = TokenType.RAW_BYTE;
- token.base = 16;
token.setC(num);
}
}
@@ -360,12 +278,13 @@ class Lexer extends ScannerSupport {
if (syntax.op2EscUHex4()) {
int num = scanUnsignedHexadecimalNumber(4);
- if (num < 0) newValueException(ERR_TOO_BIG_NUMBER);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER);
+ }
if (p == last) { /* can't read nothing. */
num = 0; /* but, it's not error */
}
token.type = TokenType.CODE_POINT;
- token.base = 16;
token.setCode(num);
}
}
@@ -375,12 +294,13 @@ class Lexer extends ScannerSupport {
unfetch();
int last = p;
int num = scanUnsignedOctalNumber(3);
- if (num < 0) newValueException(ERR_TOO_BIG_NUMBER);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER);
+ }
if (p == last) { /* can't read nothing. */
num = 0; /* but, it's not error */
}
token.type = TokenType.RAW_BYTE;
- token.base = 8;
token.setC(num);
}
}
@@ -400,7 +320,6 @@ class Lexer extends ScannerSupport {
fetch();
token.type = TokenType.CHAR;
- token.base = 0;
token.setC(c);
token.escaped = false;
@@ -410,7 +329,9 @@ class Lexer extends ScannerSupport {
token.type = TokenType.CC_RANGE;
} else if (c == syntax.metaCharTable.esc) {
if (!syntax.backSlashEscapeInCC()) return token.type;
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_ESCAPE);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_ESCAPE);
+ }
fetch();
token.escaped = true;
token.setC(c);
@@ -508,9 +429,13 @@ class Lexer extends ScannerSupport {
if (peekIs('{') && syntax.opEscXBraceHex8()) {
inc();
int num = scanUnsignedHexadecimalNumber(8);
- if (num < 0) newValueException(ERR_TOO_BIG_WIDE_CHAR_VALUE);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_WIDE_CHAR_VALUE);
+ }
if (left()) {
- if (EncodingHelper.isXDigit(peek())) newValueException(ERR_TOO_LONG_WIDE_CHAR_VALUE);
+ if (EncodingHelper.isXDigit(peek())) {
+ throw new ValueException(ERR_TOO_LONG_WIDE_CHAR_VALUE);
+ }
}
if (p > last + 1 && left() && peekIs('}')) {
@@ -523,12 +448,13 @@ class Lexer extends ScannerSupport {
}
} else if (syntax.opEscXHex2()) {
int num = scanUnsignedHexadecimalNumber(2);
- if (num < 0) newValueException(ERR_TOO_BIG_NUMBER);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER);
+ }
if (p == last) { /* can't read nothing. */
num = 0; /* but, it's not error */
}
token.type = TokenType.RAW_BYTE;
- token.base = 16;
token.setC(num);
}
}
@@ -539,12 +465,13 @@ class Lexer extends ScannerSupport {
if (syntax.op2EscUHex4()) {
int num = scanUnsignedHexadecimalNumber(4);
- if (num < 0) newValueException(ERR_TOO_BIG_NUMBER);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER);
+ }
if (p == last) { /* can't read nothing. */
num = 0; /* but, it's not error */
}
token.type = TokenType.CODE_POINT;
- token.base = 16;
token.setCode(num);
}
}
@@ -556,12 +483,12 @@ class Lexer extends ScannerSupport {
if (num < 0 || num > Config.MAX_BACKREF_NUM) { // goto skip_backref
} else if (syntax.opDecimalBackref() && (num <= env.numMem || num <= 9)) { /* This spec. from GNU regex */
if (syntax.strictCheckBackref()) {
- if (num > env.numMem || env.memNodes == null || env.memNodes[num] == null) newValueException(ERR_INVALID_BACKREF);
+ if (num > env.numMem || env.memNodes == null || env.memNodes[num] == null) {
+ throw new ValueException(ERR_INVALID_BACKREF);
+ }
}
token.type = TokenType.BACKREF;
- token.setBackrefNum(1);
- token.setBackrefRef1(num);
- token.setBackrefByName(false);
+ token.setBackrefRef(num);
return;
}
@@ -579,40 +506,19 @@ class Lexer extends ScannerSupport {
if (syntax.opEscOctal3()) {
int last = p;
int num = scanUnsignedOctalNumber(c == '0' ? 2 : 3);
- if (num < 0) newValueException(ERR_TOO_BIG_NUMBER);
+ if (num < 0) {
+ throw new ValueException(ERR_TOO_BIG_NUMBER);
+ }
if (p == last) { /* can't read nothing. */
num = 0; /* but, it's not error */
}
token.type = TokenType.RAW_BYTE;
- token.base = 8;
token.setC(num);
} else if (c != '0') {
inc();
}
}
- private void fetchTokenFor_subexpCall() {
- if (syntax.op2EscGSubexpCall()) {
- if (left()) {
- fetch();
- if (c == '<' || c == '\'') {
- int last = p;
- int gNum = fetchName(c, true);
- int nameEnd = value;
- token.type = TokenType.CALL;
- token.setCallNameP(last);
- token.setCallNameEnd(nameEnd);
- token.setCallGNum(gNum);
- } else {
- unfetch();
- syntaxWarn(Warnings.INVALID_SUBEXP_CALL);
- }
- } else {
- syntaxWarn(Warnings.INVALID_SUBEXP_CALL);
- }
- }
- }
-
private void fetchTokenFor_metaChars() {
if (c == syntax.metaCharTable.anyChar) {
token.type = TokenType.ANYCHAR;
@@ -638,13 +544,14 @@ class Lexer extends ScannerSupport {
}
token.type = TokenType.STRING;
- token.base = 0;
token.backP = p;
fetch();
if (c == syntax.metaCharTable.esc && !syntax.op2IneffectiveEscape()) { // IS_MC_ESC_CODE(code, syn)
- if (!left()) newSyntaxException(ERR_END_PATTERN_AT_ESCAPE);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_AT_ESCAPE);
+ }
token.backP = p;
fetch();
@@ -800,7 +707,9 @@ class Lexer extends ScannerSupport {
if (peekIs('#')) {
fetch();
while (true) {
- if (!left()) newSyntaxException(ERR_END_PATTERN_IN_GROUP);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_IN_GROUP);
+ }
fetch();
if (c == syntax.metaCharTable.esc) {
if (left()) fetch();
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java b/src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java
index 03c99a3c..09d4dcd6 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java
@@ -40,6 +40,9 @@ import jdk.nashorn.internal.runtime.regexp.joni.constants.EncloseType;
import jdk.nashorn.internal.runtime.regexp.joni.constants.NodeType;
import jdk.nashorn.internal.runtime.regexp.joni.constants.TokenType;
import jdk.nashorn.internal.runtime.regexp.joni.encoding.CharacterType;
+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;
class Parser extends Lexer {
@@ -94,7 +97,9 @@ class Parser extends Lexer {
}
if (token.type == TokenType.CC_CLOSE) {
- if (!codeExistCheck(']', true)) newSyntaxException(ERR_EMPTY_CHAR_CLASS);
+ if (!codeExistCheck(']', true)) {
+ throw new SyntaxException(ERR_EMPTY_CHAR_CLASS);
+ }
env.ccEscWarn("]");
token.type = TokenType.CHAR; /* allow []...] */
}
@@ -125,32 +130,8 @@ class Parser extends Lexer {
break;
case RAW_BYTE:
- if (token.base != 0) { /* tok->base != 0 : octal or hexadec. */
- byte[] buf = new byte[4];
- int psave = p;
- int base = token.base;
- buf[0] = (byte)token.getC();
- int i;
- for (i=1; i<4; i++) {
- fetchTokenInCC();
- if (token.type != TokenType.RAW_BYTE || token.base != base) {
- fetched = true;
- break;
- }
- buf[i] = (byte)token.getC();
- }
-
- if (i == 1) {
- arg.v = buf[0] & 0xff;
- arg.inType = CCVALTYPE.SB; // goto raw_single
- } else {
- arg.v = EncodingHelper.mbcToCode(buf, 0, buf.length);
- arg.inType = CCVALTYPE.CODE_POINT;
- }
- } else {
- arg.v = token.getC();
- arg.inType = CCVALTYPE.SB; // raw_single:
- }
+ arg.v = token.getC();
+ arg.inType = CCVALTYPE.SB; // raw_single:
arg.vIsRaw = true;
parseCharClassValEntry2(cc, arg); // goto val_entry2
break;
@@ -211,7 +192,7 @@ class Parser extends Lexer {
parseCharClassValEntry2(cc, arg); // goto val_entry2 /* [0-9-a] is allowed as [0-9\-a] */
break;
}
- newSyntaxException(ERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS);
+ throw new SyntaxException(ERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS);
}
break;
@@ -240,10 +221,10 @@ class Parser extends Lexer {
break;
case EOT:
- newSyntaxException(ERR_PREMATURE_END_OF_CHAR_CLASS);
+ throw new SyntaxException(ERR_PREMATURE_END_OF_CHAR_CLASS);
default:
- newInternalException(ERR_PARSER_BUG);
+ throw new InternalException(ERR_PARSER_BUG);
} // switch
if (!fetched) fetchTokenInCC();
@@ -304,13 +285,17 @@ class Parser extends Lexer {
private Node parseEnclose(TokenType term) {
Node node = null;
- if (!left()) newSyntaxException(ERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS);
+ }
int option = env.option;
if (peekIs('?') && syntax.op2QMarkGroupEffect()) {
inc();
- if (!left()) newSyntaxException(ERR_END_PATTERN_IN_GROUP);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_IN_GROUP);
+ }
boolean listCapture = false;
@@ -339,18 +324,20 @@ class Parser extends Lexer {
} else if (c == '!') {
node = new AnchorNode(AnchorType.LOOK_BEHIND_NOT);
} else {
- newSyntaxException(ERR_UNDEFINED_GROUP_OPTION);
+ throw new SyntaxException(ERR_UNDEFINED_GROUP_OPTION);
}
break;
case '@':
if (syntax.op2AtMarkCaptureHistory()) {
EncloseNode en = new EncloseNode(); // node_new_enclose_memory
int num = env.addMemEntry();
- if (num >= BitStatus.BIT_STATUS_BITS_NUM) newValueException(ERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY);
+ if (num >= BitStatus.BIT_STATUS_BITS_NUM) {
+ throw new ValueException(ERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY);
+ }
en.regNum = num;
node = en;
} else {
- newSyntaxException(ERR_UNDEFINED_GROUP_OPTION);
+ throw new SyntaxException(ERR_UNDEFINED_GROUP_OPTION);
}
break;
@@ -379,7 +366,7 @@ class Parser extends Lexer {
if (syntax.op2OptionPerl()) {
option = bsOnOff(option, Option.MULTILINE, neg);
} else {
- newSyntaxException(ERR_UNDEFINED_GROUP_OPTION);
+ throw new SyntaxException(ERR_UNDEFINED_GROUP_OPTION);
}
break;
case 'm':
@@ -388,7 +375,7 @@ class Parser extends Lexer {
} else if (syntax.op2OptionRuby()) {
option = bsOnOff(option, Option.MULTILINE, neg);
} else {
- newSyntaxException(ERR_UNDEFINED_GROUP_OPTION);
+ throw new SyntaxException(ERR_UNDEFINED_GROUP_OPTION);
}
break;
// case 'p': #ifdef USE_POSIXLINE_OPTION // not defined
@@ -396,7 +383,7 @@ class Parser extends Lexer {
// break;
default:
- newSyntaxException(ERR_UNDEFINED_GROUP_OPTION);
+ throw new SyntaxException(ERR_UNDEFINED_GROUP_OPTION);
} // switch
if (c == ')') {
@@ -416,12 +403,14 @@ class Parser extends Lexer {
returnCode = 0;
return node;
}
- if (!left()) newSyntaxException(ERR_END_PATTERN_IN_GROUP);
+ if (!left()) {
+ throw new SyntaxException(ERR_END_PATTERN_IN_GROUP);
+ }
fetch();
} // while
default:
- newSyntaxException(ERR_UNDEFINED_GROUP_OPTION);
+ throw new SyntaxException(ERR_UNDEFINED_GROUP_OPTION);
} // switch
} else {
@@ -482,7 +471,9 @@ class Parser extends Lexer {
}
break;
case SUBEXP_CLOSE:
- if (!syntax.allowUnmatchedCloseSubexp()) newSyntaxException(ERR_UNMATCHED_CLOSE_PARENTHESIS);
+ if (!syntax.allowUnmatchedCloseSubexp()) {
+ throw new SyntaxException(ERR_UNMATCHED_CLOSE_PARENTHESIS);
+ }
if (token.escaped) {
return parseExpTkRawByte(group); // goto tk_raw_byte
} else {
@@ -523,7 +514,7 @@ class Parser extends Lexer {
break;
default:
- newInternalException(ERR_PARSER_BUG);
+ throw new InternalException(ERR_PARSER_BUG);
} // inner switch
break;
@@ -553,13 +544,8 @@ class Parser extends Lexer {
break;
case BACKREF:
- int[]backRefs = token.getBackrefNum() > 1 ? token.getBackrefRefs() : new int[]{token.getBackrefRef1()};
- node = new BackRefNode(token.getBackrefNum(),
- backRefs,
- token.getBackrefByName(),
- token.getBackrefExistLevel(), // #ifdef USE_BACKREF_AT_LEVEL
- token.getBackrefLevel(), // ...
- env);
+ int backRef = token.getBackrefRef();
+ node = new BackRefNode(backRef, env);
break;
case ANCHOR:
@@ -570,7 +556,7 @@ class Parser extends Lexer {
case INTERVAL:
if (syntax.contextIndepRepeatOps()) {
if (syntax.contextInvalidRepeatOps()) {
- newSyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED);
+ throw new SyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED);
} else {
node = StringNode.EMPTY; // node_new_empty
}
@@ -580,7 +566,7 @@ class Parser extends Lexer {
break;
default:
- newInternalException(ERR_PARSER_BUG);
+ throw new InternalException(ERR_PARSER_BUG);
} //switch
//targetp = node;
@@ -615,36 +601,17 @@ class Parser extends Lexer {
StringNode node = new StringNode((char)token.getC());
node.setRaw();
- int len = 1;
- while (true) {
- if (len >= 1) {
- if (len == 1) {
- fetchToken();
- node.clearRaw();
- // !goto string_end;!
- return parseExpRepeat(node, group);
- }
- }
-
- fetchToken();
- if (token.type != TokenType.RAW_BYTE) {
- /* Don't use this, it is wrong for little endian encodings. */
- // USE_PAD_TO_SHORT_BYTE_CHAR ...
-
- newValueException(ERR_TOO_SHORT_MULTI_BYTE_STRING);
- }
-
- // important: we don't use 0xff mask here neither in the compiler
- // (in the template string) so we won't have to mask target
- // strings when comparing against them in the matcher
- node.cat((char)token.getC());
- len++;
- } // while
+ fetchToken();
+ node.clearRaw();
+ // !goto string_end;!
+ return parseExpRepeat(node, group);
}
private Node parseExpRepeat(Node target, boolean group) {
while (token.type == TokenType.OP_REPEAT || token.type == TokenType.INTERVAL) { // repeat:
- if (target.isInvalidQuantifier()) newSyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_INVALID);
+ if (target.isInvalidQuantifier()) {
+ throw new SyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_INVALID);
+ }
QuantifierNode qtfr = new QuantifierNode(token.getRepeatLower(),
token.getRepeatUpper(),
@@ -676,7 +643,9 @@ class Parser extends Lexer {
private Node parseExpRepeatForCar(Node top, ConsAltNode target, boolean group) {
while (token.type == TokenType.OP_REPEAT || token.type == TokenType.INTERVAL) { // repeat:
- if (target.car.isInvalidQuantifier()) newSyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_INVALID);
+ if (target.car.isInvalidQuantifier()) {
+ throw new SyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_INVALID);
+ }
QuantifierNode qtfr = new QuantifierNode(token.getRepeatLower(),
token.getRepeatUpper(),
@@ -754,9 +723,9 @@ class Parser extends Lexer {
private void parseSubExpError(TokenType term) {
if (term == TokenType.SUBEXP_CLOSE) {
- newSyntaxException(ERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS);
+ throw new SyntaxException(ERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS);
} else {
- newInternalException(ERR_PARSER_BUG);
+ throw new InternalException(ERR_PARSER_BUG);
}
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/Regex.java b/src/jdk/nashorn/internal/runtime/regexp/joni/Regex.java
index b27814a7..360c11eb 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/Regex.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Regex.java
@@ -19,19 +19,9 @@
*/
package jdk.nashorn.internal.runtime.regexp.joni;
-import static jdk.nashorn.internal.runtime.regexp.joni.BitStatus.bsAt;
-import static jdk.nashorn.internal.runtime.regexp.joni.Option.isCaptureGroup;
-import static jdk.nashorn.internal.runtime.regexp.joni.Option.isDontCaptureGroup;
-
-import java.nio.file.Files;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import jdk.nashorn.internal.runtime.regexp.joni.ast.Node;
import jdk.nashorn.internal.runtime.regexp.joni.constants.AnchorType;
import jdk.nashorn.internal.runtime.regexp.joni.constants.RegexState;
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.ValueException;
public final class Regex implements RegexState {
@@ -39,31 +29,26 @@ public final class Regex implements RegexState {
int[] code; /* compiled pattern */
int codeLength;
boolean stackNeeded;
- Object[]operands; /* e.g. shared CClassNode */
+ Object[] operands; /* e.g. shared CClassNode */
int operandLength;
- int state; /* normal, searching, compiling */ // remove
int numMem; /* used memory(...) num counted from 1 */
int numRepeat; /* OP_REPEAT/OP_REPEAT_NG id-counter */
int numNullCheck; /* OP_NULL_CHECK_START/END id counter */
- int numCall; /* number of subexp call */
int captureHistory; /* (?@...) flag (1-31) */
int btMemStart; /* need backtrack flag */
int btMemEnd; /* need backtrack flag */
int stackPopLevel;
- int[]repeatRangeLo;
- int[]repeatRangeHi;
+ int[] repeatRangeLo;
+ int[] repeatRangeHi;
WarnCallback warnings;
MatcherFactory factory;
protected Analyser analyser;
int options;
- int userOptions;
- Object userObject;
- //final Syntax syntax;
final int caseFoldFlag;
/* optimization info (string search, char-map and anchors) */
@@ -247,46 +232,48 @@ public final class Regex implements RegexState {
}
public String optimizeInfoToString() {
- String s = "";
- s += "optimize: " + searchAlgorithm.getName() + "\n";
- s += " anchor: " + OptAnchorInfo.anchorToString(anchor);
+ StringBuilder s = new StringBuilder();
+ s.append("optimize: ").append(searchAlgorithm.getName()).append("\n");
+ s.append(" anchor: ").append(OptAnchorInfo.anchorToString(anchor));
if ((anchor & AnchorType.END_BUF_MASK) != 0) {
- s += MinMaxLen.distanceRangeToString(anchorDmin, anchorDmax);
+ s.append(MinMaxLen.distanceRangeToString(anchorDmin, anchorDmax));
}
- s += "\n";
+ s.append("\n");
if (searchAlgorithm != SearchAlgorithm.NONE) {
- s += " sub anchor: " + OptAnchorInfo.anchorToString(subAnchor) + "\n";
+ s.append(" sub anchor: ").append(OptAnchorInfo.anchorToString(subAnchor)).append("\n");
}
- s += "dmin: " + dMin + " dmax: " + dMax + "\n";
- s += "threshold length: " + thresholdLength + "\n";
+ s.append("dmin: ").append(dMin).append(" dmax: ").append(dMax).append("\n");
+ s.append("threshold length: ").append(thresholdLength).append("\n");
if (exact != null) {
- s += "exact: [" + new String(exact, exactP, exactEnd - exactP) + "]: length: " + (exactEnd - exactP) + "\n";
+ s.append("exact: [").append(exact, exactP, exactEnd - exactP).append("]: length: ").append(exactEnd - exactP).append("\n");
} else if (searchAlgorithm == SearchAlgorithm.MAP) {
int n=0;
for (int i=0; i<Config.CHAR_TABLE_SIZE; i++) if (map[i] != 0) n++;
- s += "map: n = " + n + "\n";
+ s.append("map: n = ").append(n).append("\n");
if (n > 0) {
int c=0;
- s += "[";
+ s.append("[");
for (int i=0; i<Config.CHAR_TABLE_SIZE; i++) {
if (map[i] != 0) {
- if (c > 0) s += ", ";
+ if (c > 0) {
+ s.append(", ");
+ }
c++;
// TODO if (enc.isPrint(i)
- s += ((char)i);
+ s.append((char)i);
}
}
- s += "]\n";
+ s.append("]\n");
}
}
- return s;
+ return s.toString();
}
public int getOptions() {
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ScanEnvironment.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ScanEnvironment.java
index dd65939d..adecb1d0 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ScanEnvironment.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ScanEnvironment.java
@@ -39,13 +39,10 @@ public final class ScanEnvironment {
final public Regex reg;
- int numCall;
public int numMem;
public Node memNodes[];
- int currMaxRegNum;
- boolean hasRecursion;
public ScanEnvironment(Regex regex, Syntax syntax) {
this.reg = regex;
@@ -60,13 +57,8 @@ public final class ScanEnvironment {
btMemEnd = bsClear();
backrefedMem = bsClear();
- numCall = 0;
numMem = 0;
-
memNodes = null;
-
- currMaxRegNum = 0;
- hasRecursion = false;
}
public int addMemEntry() {
@@ -117,11 +109,4 @@ public final class ScanEnvironment {
}
}
- void closeBracketWithoutEscapeWarn(String s) {
- if (Config.USE_WARN) {
- if (syntax.warnCCOpNotEscaped()) {
- reg.warnings.warn("regular expression has '" + s + "' without escape");
- }
- }
- }
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java
index abe51be2..1135f766 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ScannerSupport.java
@@ -155,24 +155,4 @@ abstract class ScannerSupport extends IntHolder implements ErrorMessages {
return p < stop;
}
- protected void newSyntaxException(String message) {
- throw new SyntaxException(message);
- }
-
- protected void newValueException(String message) {
- throw new ValueException(message);
- }
-
- protected void newValueException(String message, String str) {
- throw new ValueException(message, str);
- }
-
- protected void newValueException(String message, int p, int end) {
- throw new ValueException(message, new String(chars, p, end - p));
- }
-
- protected void newInternalException(String message) {
- throw new InternalException(message);
- }
-
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/Token.java b/src/jdk/nashorn/internal/runtime/regexp/joni/Token.java
index bcaf352c..5ac22db6 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/Token.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Token.java
@@ -24,12 +24,10 @@ import jdk.nashorn.internal.runtime.regexp.joni.constants.TokenType;
final class Token {
TokenType type;
boolean escaped;
- int base; /* is number: 8, 16 (used in [....]) */
int backP;
// union fields
- private int INT1, INT2, INT3, INT4, INT5;
- private int []INTA1;
+ private int INT1, INT2, INT3, INT4;
// union accessors
int getC() {
@@ -53,13 +51,6 @@ final class Token {
INT1 = anchor;
}
- int getSubtype() {
- return INT1;
- }
- void setSubtype(int subtype) {
- INT1 = subtype;
- }
-
// repeat union member
int getRepeatLower() {
return INT1;
@@ -89,72 +80,13 @@ final class Token {
INT4 = possessive ? 1 : 0;
}
- // backref union member
- int getBackrefNum() {
- return INT1;
- }
- void setBackrefNum(int num) {
- INT1 = num;
- }
-
- int getBackrefRef1() {
+ int getBackrefRef() {
return INT2;
}
- void setBackrefRef1(int ref1) {
+ void setBackrefRef(int ref1) {
INT2 = ref1;
}
- int[]getBackrefRefs() {
- return INTA1;
- }
- void setBackrefRefs(int[]refs) {
- INTA1 = refs;
- }
-
- boolean getBackrefByName() {
- return INT3 != 0;
- }
- void setBackrefByName(boolean byName) {
- INT3 = byName ? 1 : 0;
- }
-
- // USE_BACKREF_AT_LEVEL
- boolean getBackrefExistLevel() {
- return INT4 != 0;
- }
- void setBackrefExistLevel(boolean existLevel) {
- INT4 = existLevel ? 1 : 0;
- }
-
- int getBackrefLevel() {
- return INT5;
- }
- void setBackrefLevel(int level) {
- INT5 = level;
- }
-
- // call union member
- int getCallNameP() {
- return INT1;
- }
- void setCallNameP(int nameP) {
- INT1 = nameP;
- }
-
- int getCallNameEnd() {
- return INT2;
- }
- void setCallNameEnd(int nameEnd) {
- INT2 = nameEnd;
- }
-
- int getCallGNum() {
- return INT3;
- }
- void setCallGNum(int gnum) {
- INT3 = gnum;
- }
-
// prop union member
int getPropCType() {
return INT1;
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/BackRefNode.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/BackRefNode.java
index dde4f88d..478222fd 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/BackRefNode.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/BackRefNode.java
@@ -20,41 +20,15 @@
package jdk.nashorn.internal.runtime.regexp.joni.ast;
import jdk.nashorn.internal.runtime.regexp.joni.ScanEnvironment;
-import jdk.nashorn.internal.runtime.regexp.joni.exception.ErrorMessages;
-import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException;
public final class BackRefNode extends StateNode {
- //private static int NODE_BACKREFS_SIZE = 6;
+ public final int backRef;
- //int state;
- public int backNum;
- public int back[];
+ public BackRefNode(int backRef, ScanEnvironment env) {
+ this.backRef = backRef;
- public int nestLevel;
-
- public BackRefNode(int backNum, int[]backRefs, boolean byName, ScanEnvironment env) {
- this.backNum = backNum;
- if (byName) setNameRef();
-
- for (int i=0; i<backNum; i++) {
- if (backRefs[i] <= env.numMem && env.memNodes[backRefs[i]] == null) {
- setRecursion(); /* /...(\1).../ */
- break;
- }
- }
-
- back = new int[backNum];
- System.arraycopy(backRefs, 0, back, 0, backNum); // shall we really dup it ???
- }
-
- // #ifdef USE_BACKREF_AT_LEVEL
- public BackRefNode(int backNum, int[]backRefs, boolean byName, boolean existLevel, int nestLevel, ScanEnvironment env) {
- this(backNum, backRefs, byName, env);
-
- if (existLevel) {
- //state |= NST_NEST_LEVEL;
- setNestLevel();
- this.nestLevel = nestLevel;
+ if (backRef <= env.numMem && env.memNodes[backRef] == null) {
+ setRecursion(); /* /...(\1).../ */
}
}
@@ -71,28 +45,7 @@ public final class BackRefNode extends StateNode {
@Override
public String toString(int level) {
StringBuilder value = new StringBuilder(super.toString(level));
- value.append("\n backNum: " + backNum);
- String backs = "";
- for (int i=0; i<back.length; i++) backs += back[i] + ", ";
- value.append("\n back: " + backs);
- value.append("\n nextLevel: " + nestLevel);
+ value.append("\n back: ").append(backRef);
return value.toString();
}
-
- public void renumber(int[]map) {
- if (!isNameRef()) throw new ValueException(ErrorMessages.ERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED);
-
- int oldNum = backNum;
-
- int pos = 0;
- for (int i=0; i<oldNum; i++) {
- int n = map[back[i]];
- if (n > 0) {
- back[pos] = n;
- pos++;
- }
- }
- backNum = pos;
- }
-
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/CClassNode.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/CClassNode.java
index f60c21a3..b33eeee0 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/CClassNode.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/CClassNode.java
@@ -77,39 +77,12 @@ public final class CClassNode extends Node {
// node_new_cclass
public CClassNode() {}
- public CClassNode(int ctype, boolean not, int sbOut, int[]ranges) {
- this(not, sbOut, ranges);
- this.ctype = ctype;
- }
-
public void clear() {
bs.clear();
flags = 0;
mbuf = null;
}
- // node_new_cclass_by_codepoint_range, only used by shared Char Classes
- public CClassNode(boolean not, int sbOut, int[]ranges) {
- if (not) setNot();
- // bs.clear();
-
- if (sbOut > 0 && ranges != null) {
- int n = ranges[0];
- for (int i=0; i<n; i++) {
- int from = ranges[i * 2 + 1];
- int to = ranges[i * 2 + 2];
- for (int j=from; j<=to; j++) {
- if (j >= sbOut) {
- setupBuffer(ranges);
- return;
- }
- bs.set(j);
- }
- }
- }
- setupBuffer(ranges);
- }
-
@Override
public int getType() {
return CCLASS;
@@ -156,13 +129,6 @@ public final class CClassNode extends Node {
return flags.toString();
}
- private void setupBuffer(int[]ranges) {
- if (ranges != null) {
- if (ranges[0] == 0) return;
- mbuf = new CodeRangeBuffer(ranges);
- }
- }
-
public boolean isEmpty() {
return mbuf == null && bs.isEmpty();
}
@@ -531,11 +497,7 @@ public final class CClassNode extends Node {
boolean found;
if (code > 0xff) {
- if (mbuf == null) {
- found = false;
- } else {
- found = EncodingHelper.isInCodeRange(mbuf.getCodeRange(), code);
- }
+ found = mbuf != null && mbuf.isInCodeRange(code);
} else {
found = bs.at(code);
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StateNode.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StateNode.java
index 3f75f863..d2b3c954 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StateNode.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StateNode.java
@@ -40,7 +40,6 @@ public abstract class StateNode extends Node implements NodeStatus {
if (isRecursion()) states.append("RECURSION ");
if (isCalled()) states.append("CALLED ");
if (isAddrFixed()) states.append("ADDR_FIXED ");
- if (isNameRef()) states.append("NAME_REF ");
if (isInRepeat()) states.append("IN_REPEAT ");
if (isNestLevel()) states.append("NEST_LEVEL ");
if (isByNumber()) states.append("BY_NUMBER ");
@@ -132,14 +131,6 @@ public abstract class StateNode extends Node implements NodeStatus {
state |= NST_ADDR_FIXED;
}
- public boolean isNameRef() {
- return (state & NST_NAME_REF) != 0;
- }
-
- public void setNameRef() {
- state |= NST_NAME_REF;
- }
-
public boolean isInRepeat() {
return (state & NST_IN_REPEAT) != 0;
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java
index 941b5c00..0618ddf3 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java
@@ -96,7 +96,7 @@ public final class StringNode extends Node implements StringType {
if (chars[i] >= 0x20 && chars[i] < 0x7f) {
value.append(chars[i]);
} else {
- value.append(String.format("[0x%04x]", chars[i]));
+ value.append(String.format("[0x%04x]", (int)chars[i]));
}
}
value.append("'");
@@ -122,10 +122,7 @@ public final class StringNode extends Node implements StringType {
}
public boolean canBeSplit() {
- if (end > p) {
- return 1 < (end - p);
- }
- return false;
+ return end > p && 1 < (end - p);
}
public void set(char[] chars, int p, int end) {
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/constants/OPCode.java b/src/jdk/nashorn/internal/runtime/regexp/joni/constants/OPCode.java
index 06c50117..cb5f3d10 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/joni/constants/OPCode.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/joni/constants/OPCode.java
@@ -29,12 +29,6 @@ public interface OPCode {
final int EXACT4 = 5; /* single byte, N = 4 */
final int EXACT5 = 6; /* single byte, N = 5 */
final int EXACTN = 7; /* single byte */
- final int EXACTMB2N1 = 8; /* mb-length = 2 N = 1 */
- final int EXACTMB2N2 = 9; /* mb-length = 2 N = 2 */
- final int EXACTMB2N3 = 10; /* mb-length = 2 N = 3 */
- final int EXACTMB2N = 11; /* mb-length = 2 */
- final int EXACTMB3N = 12; /* mb-length = 3 */
- final int EXACTMBN = 13; /* other length */
final int EXACT1_IC = 14; /* single byte, N = 1, ignore case */
final int EXACTN_IC = 15; /* single byte, ignore case */
@@ -125,28 +119,4 @@ public interface OPCode {
final int SET_OPTION_PUSH = 86; /* set option and push recover option */
final int SET_OPTION = 87; /* set option */
- // single byte versions
- final int ANYCHAR_SB = 88; /* "." */
- final int ANYCHAR_ML_SB = 89; /* "." multi-line */
- final int ANYCHAR_STAR_SB = 90; /* ".*" */
- final int ANYCHAR_ML_STAR_SB = 91; /* ".*" multi-line */
- final int ANYCHAR_STAR_PEEK_NEXT_SB = 92;
- final int ANYCHAR_ML_STAR_PEEK_NEXT_SB = 93;
- final int STATE_CHECK_ANYCHAR_STAR_SB = 94;
- final int STATE_CHECK_ANYCHAR_ML_STAR_SB= 95;
-
- final int CCLASS_SB = 96;
- final int CCLASS_NOT_SB = 97;
- final int WORD_SB = 98;
- final int NOT_WORD_SB = 99;
- final int WORD_BOUND_SB = 100;
- final int NOT_WORD_BOUND_SB = 101;
- final int WORD_BEGIN_SB = 102;
- final int WORD_END_SB = 103;
-
- final int LOOK_BEHIND_SB = 104;
-
- final int EXACT1_IC_SB = 105; /* single byte, N = 1, ignore case */
- final int EXACTN_IC_SB = 106; /* single byte, ignore case */
-
}
diff --git a/src/jdk/nashorn/internal/runtime/resources/Messages.properties b/src/jdk/nashorn/internal/runtime/resources/Messages.properties
index 83c0a5ab..8ec4f7e1 100644
--- a/src/jdk/nashorn/internal/runtime/resources/Messages.properties
+++ b/src/jdk/nashorn/internal/runtime/resources/Messages.properties
@@ -50,6 +50,7 @@ parser.error.no.func.decl.here=Function declarations can only occur at program o
parser.error.no.func.decl.here.warn=Function declarations should only occur at program or function body level. Function declaration in nested block was converted to a function expression.
parser.error.property.redefinition=Property "{0}" already defined
parser.error.unexpected.token=Unexpected token: {0}
+parser.error.for.each.without.in=for each can only be used with for..in
parser.error.many.vars.in.for.in.loop=Only one variable allowed in for..in loop
parser.error.not.lvalue.for.in.loop=Invalid left side value of for..in loop
parser.error.missing.catch.or.finally=Missing catch or finally after try
diff --git a/src/jdk/nashorn/internal/runtime/resources/Options.properties b/src/jdk/nashorn/internal/runtime/resources/Options.properties
index 4d7be62b..452ae88c 100644
--- a/src/jdk/nashorn/internal/runtime/resources/Options.properties
+++ b/src/jdk/nashorn/internal/runtime/resources/Options.properties
@@ -192,6 +192,14 @@ nashorn.option.loader.per.compile = { \
default=true \
}
+nashorn.option.no.java = { \
+ name="--no-java", \
+ short_name="-nj", \
+ is_undocumented=true, \
+ desc="No Java support", \
+ default=false \
+}
+
nashorn.option.no.syntax.extensions = { \
name="--no-syntax-extensions", \
short_name="-nse", \
@@ -200,6 +208,14 @@ nashorn.option.no.syntax.extensions = { \
default=false \
}
+nashorn.option.no.typed.arrays = { \
+ name="--no-typed-arrays", \
+ short_name="-nta", \
+ is_undocumented=true, \
+ desc="No Typed arrays support", \
+ default=false \
+}
+
nashorn.option.package = { \
name="--package", \
is_undocumented=true, \
diff --git a/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js b/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js
index 206a193f..8a9fcc7d 100644
--- a/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js
+++ b/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js
@@ -48,7 +48,7 @@ Object.defineProperty(this, "importPackage", {
var _packages = [];
var global = this;
var oldNoSuchProperty = global.__noSuchProperty__;
- global.__noSuchProperty__ = function(name) {
+ var __noSuchProperty__ = function(name) {
'use strict';
for (var i in _packages) {
try {
@@ -69,6 +69,11 @@ Object.defineProperty(this, "importPackage", {
}
}
+ Object.defineProperty(global, "__noSuchProperty__", {
+ writable: true, configurable: true, enumerable: false,
+ value: __noSuchProperty__
+ });
+
var prefix = "[JavaPackage ";
return function() {
for (var i in arguments) {
diff --git a/src/jdk/nashorn/internal/scripts/JO.java b/src/jdk/nashorn/internal/scripts/JO.java
index b31df1ae..f2f00062 100644
--- a/src/jdk/nashorn/internal/scripts/JO.java
+++ b/src/jdk/nashorn/internal/scripts/JO.java
@@ -33,13 +33,14 @@ import jdk.nashorn.internal.runtime.ScriptObject;
*/
public class JO extends ScriptObject {
- private static final PropertyMap map$ = PropertyMap.newMap(JO.class);
+ private static final PropertyMap map$ = PropertyMap.newMap().setIsShared();
/**
- * Constructor
+ * Returns the initial property map to be used.
+ * @return the initial property map.
*/
- public JO() {
- super(map$);
+ public static PropertyMap getInitialMap() {
+ return map$;
}
/**
@@ -52,16 +53,17 @@ public class JO extends ScriptObject {
}
/**
- * Constructor given an initial prototype using the default property map
+ * Constructor given an initial prototype and an initial property map.
*
* @param proto the prototype object
+ * @param map the property map
*/
- public JO(final ScriptObject proto) {
- super(proto, map$);
+ public JO(final ScriptObject proto, final PropertyMap map) {
+ super(proto, map);
}
/**
- * Used by FunctionObjectCreator. A method handle of this method is passed to the ScriptFunction constructor.
+ * A method handle of this method is passed to the ScriptFunction constructor.
*
* @param map the property map to use for allocatorMap
*
diff --git a/src/jdk/nashorn/tools/Shell.java b/src/jdk/nashorn/tools/Shell.java
index 708fecc5..55840078 100644
--- a/src/jdk/nashorn/tools/Shell.java
+++ b/src/jdk/nashorn/tools/Shell.java
@@ -47,6 +47,7 @@ import jdk.nashorn.internal.ir.debug.PrintVisitor;
import jdk.nashorn.internal.parser.Parser;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ErrorManager;
+import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.ScriptEnvironment;
import jdk.nashorn.internal.runtime.ScriptFunction;
@@ -434,6 +435,10 @@ public class Shell {
break;
}
+ if (source.isEmpty()) {
+ continue;
+ }
+
Object res;
try {
res = context.eval(global, source, global, "<shell>", env._strict);
@@ -446,7 +451,7 @@ public class Shell {
}
if (res != null && res != ScriptRuntime.UNDEFINED) {
- err.println(ScriptRuntime.safeToString(res));
+ err.println(JSType.toString(res));
}
}
} finally {
diff --git a/test/script/basic/JDK-8010946-2.js b/test/script/basic/JDK-8010946-2.js
new file mode 100644
index 00000000..c3dc2889
--- /dev/null
+++ b/test/script/basic/JDK-8010946-2.js
@@ -0,0 +1,38 @@
+/*
+ * 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-8010946: AccessController.doPrivileged() doesn't work as expected.
+ * This is actually a broader issue of having Dynalink correctly handle
+ * caller-sensitive methods.
+ *
+ * @test
+ * @run
+ */
+
+// Ensure these are CallerSensitiveDynamicMethods
+print(java.security.AccessController["doPrivileged(PrivilegedAction)"])
+print(java.lang.Class["forName(String)"])
+
+// Ensure this is not
+print(java.lang.String["valueOf(char)"])
diff --git a/test/script/basic/JDK-8010946-2.js.EXPECTED b/test/script/basic/JDK-8010946-2.js.EXPECTED
new file mode 100644
index 00000000..d573510c
--- /dev/null
+++ b/test/script/basic/JDK-8010946-2.js.EXPECTED
@@ -0,0 +1,3 @@
+[jdk.internal.dynalink.beans.CallerSensitiveDynamicMethod Object java.security.AccessController.doPrivileged(PrivilegedAction)]
+[jdk.internal.dynalink.beans.CallerSensitiveDynamicMethod Class java.lang.Class.forName(String)]
+[jdk.internal.dynalink.beans.SimpleDynamicMethod String java.lang.String.valueOf(char)]
diff --git a/test/script/basic/JDK-8010946-privileged.js b/test/script/basic/JDK-8010946-privileged.js
new file mode 100644
index 00000000..fc409f97
--- /dev/null
+++ b/test/script/basic/JDK-8010946-privileged.js
@@ -0,0 +1,47 @@
+/*
+ * 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-8010946: AccessController.doPrivileged() doesn't work as expected.
+ * This is actually a broader issue of having Dynalink correctly handle
+ * caller-sensitive methods.
+ *
+ * NOTE: This is not a standalone test file, it is loaded by JDK-801946.js
+ * @subtest
+ */
+
+(function() {
+ var getProperty = java.lang.System.getProperty
+ var doPrivileged = java.security.AccessController["doPrivileged(PrivilegedAction)"]
+
+ this.executeUnprivileged = function() {
+ var x = getProperty("java.security.policy")
+ if(x != null) {
+ print("Successfully retrieved restricted system property.")
+ }
+ }
+
+ this.executePrivileged = function() {
+ doPrivileged(executeUnprivileged)
+ }
+})();
diff --git a/test/script/basic/JDK-8010946.js b/test/script/basic/JDK-8010946.js
new file mode 100644
index 00000000..4f012427
--- /dev/null
+++ b/test/script/basic/JDK-8010946.js
@@ -0,0 +1,51 @@
+/*
+ * 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-8010946: AccessController.doPrivileged() doesn't work as expected.
+ * This is actually a broader issue of having Dynalink correctly handle
+ * caller-sensitive methods.
+ *
+ * @test
+ * @run
+ */
+
+// This is unprivileged code that loads privileged code.
+load(__DIR__ + "JDK-8010946-privileged.js")
+
+try {
+ // This should fail, even though the code itself resides in the
+ // privileged script, as we're invoking it without going through
+ // doPrivileged()
+ print("Attempting unprivileged execution...")
+ executeUnprivileged()
+ print("FAIL: Unprivileged execution succeeded!")
+} catch(e) {
+ print("Unprivileged execution failed with " + e)
+}
+
+print()
+
+// This should succeed, as it's going through doPrivileged().
+print("Attempting privileged execution...")
+executePrivileged()
diff --git a/test/script/basic/JDK-8010946.js.EXPECTED b/test/script/basic/JDK-8010946.js.EXPECTED
new file mode 100644
index 00000000..f78956a8
--- /dev/null
+++ b/test/script/basic/JDK-8010946.js.EXPECTED
@@ -0,0 +1,5 @@
+Attempting unprivileged execution...
+Unprivileged execution failed with java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.security.policy" "read")
+
+Attempting privileged execution...
+Successfully retrieved restricted system property.
diff --git a/test/script/basic/JDK-8012191.js b/test/script/basic/JDK-8012191.js
new file mode 100644
index 00000000..8d1d2848
--- /dev/null
+++ b/test/script/basic/JDK-8012191.js
@@ -0,0 +1,53 @@
+/*
+ * 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-8012191: noSuchProperty can't cope with vararg functions
+ *
+ * @test
+ * @run
+ */
+
+// ClassCastException: Cannot cast java.lang.String to [Ljava.lang.Object;
+__noSuchProperty__ = function() {
+ print("obj.__noSuchProperty__ invoked for " + arguments[0]);
+}
+
+nonExistent;
+
+// related issue was seen in JSAdapter __get__, __set__ too
+var obj = new JSAdapter() {
+ __put__: function() {
+ print("JSAdapter.__put__");
+ print(arguments[0]);
+ print(arguments[1]);
+ },
+
+ __get__: function() {
+ print("JSAdapter.__get__");
+ print(arguments[0]);
+ }
+};
+
+obj.x = 343;
+obj.y
diff --git a/test/script/basic/JDK-8012191.js.EXPECTED b/test/script/basic/JDK-8012191.js.EXPECTED
new file mode 100644
index 00000000..6c7e4ebf
--- /dev/null
+++ b/test/script/basic/JDK-8012191.js.EXPECTED
@@ -0,0 +1,6 @@
+obj.__noSuchProperty__ invoked for nonExistent
+JSAdapter.__put__
+x
+343
+JSAdapter.__get__
+y
diff --git a/test/script/basic/JDK-8014785.js b/test/script/basic/JDK-8014785.js
new file mode 100644
index 00000000..27b05bd1
--- /dev/null
+++ b/test/script/basic/JDK-8014785.js
@@ -0,0 +1,62 @@
+/*
+ * 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-8014785: Ability to extend global instance by binding properties of another object
+ *
+ * @test
+ * @run
+ */
+
+var obj = { x: 34, y: 100 };
+var foo = {}
+
+// bind properties of "obj" to "foo" obj
+Object.bindProperties(foo, obj);
+
+// now we can access/write on foo properties
+print("foo.x = " + foo.x); // prints obj.x which is 34
+
+// update obj.x via foo.x
+foo.x = "hello";
+print("obj.x = " + obj.x); // prints "hello" now
+
+obj.x = 42; // foo.x also becomes 42
+print("obj.x = " + obj.x); // prints 42
+print("foo.x = " + foo.x); // prints 42
+
+// now bind a mirror object to an object
+var obj = loadWithNewGlobal({
+ name: "test",
+ script: "obj = { x: 33, y: 'hello' }"
+});
+
+Object.bindProperties(this, obj);
+print("x = " + x); // prints 33
+print("y = " + y); // prints "hello"
+
+x = Math.PI; // changes obj.x to Math.PI
+print("obj.x = " +obj.x); // prints Math.PI
+
+obj.y = 32;
+print("y = " + y); // should print 32
diff --git a/test/script/basic/JDK-8014785.js.EXPECTED b/test/script/basic/JDK-8014785.js.EXPECTED
new file mode 100644
index 00000000..cb2b154c
--- /dev/null
+++ b/test/script/basic/JDK-8014785.js.EXPECTED
@@ -0,0 +1,8 @@
+foo.x = 34
+obj.x = hello
+obj.x = 42
+foo.x = 42
+x = 33
+y = hello
+obj.x = 3.141592653589793
+y = 32
diff --git a/test/script/basic/JDK-8015356.js b/test/script/basic/JDK-8015356.js
new file mode 100644
index 00000000..edc77c0c
--- /dev/null
+++ b/test/script/basic/JDK-8015356.js
@@ -0,0 +1,44 @@
+/*
+ * 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-8015355: Array concatenation should ignore empty array elements.
+ *
+ * @test
+ * @run
+ */
+
+print("***")
+print([].concat([,]).hasOwnProperty("0"))
+
+print("***")
+var x = [].concat([,'a',,'b',,'c'])
+for(var i in x) {
+ print(i + ": " + x[i])
+}
+
+print("***")
+x = x.concat(['d',,'e',,'f',,])
+for(var i in x) {
+ print(i + ": " + x[i])
+}
diff --git a/test/script/basic/JDK-8015356.js.EXPECTED b/test/script/basic/JDK-8015356.js.EXPECTED
new file mode 100644
index 00000000..3e9e80d1
--- /dev/null
+++ b/test/script/basic/JDK-8015356.js.EXPECTED
@@ -0,0 +1,13 @@
+***
+false
+***
+1: a
+3: b
+5: c
+***
+1: a
+3: b
+5: c
+6: d
+8: e
+10: f
diff --git a/test/script/basic/JDK-8016667.js b/test/script/basic/JDK-8016667.js
index 7ac1bb6b..169a8f35 100644
--- a/test/script/basic/JDK-8016667.js
+++ b/test/script/basic/JDK-8016667.js
@@ -32,3 +32,23 @@ function toto() {
var friends = 1;
(joe = friends) == null;
}
+
+//JDK-8019476 duplicate case of this
+Function("with(\nnull == (this % {}))( /x/g );");
+
+function f() {
+ with(null == (this % {}))(/x/g);
+}
+
+Function("return (null != [,,] <= this);");
+
+function f2() {
+ return (null != [,,] <= this);
+}
+
+Function("/*infloop*/L:for(var x; ([+(function (window)[,,])(function(q) { return q; }, -0)].some(new Function)); [11,12,13,14].some) {/*infloop*/do {;return this; } while(x); }");
+
+function f3() {
+ /*infloop*/L:for(var x; ([+(function (window)[,,])(function(q) { return q; }, -0)].some(new Function)); [11,12,13,14].some) {/*infloop*/do {;return this; } while(x); }
+}
+
diff --git a/test/script/basic/JDK-8016681.js b/test/script/basic/JDK-8016681.js
new file mode 100644
index 00000000..9596b0dd
--- /dev/null
+++ b/test/script/basic/JDK-8016681.js
@@ -0,0 +1,42 @@
+/*
+ * 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-8016681: regex capture behaves differently than on V8
+ *
+ * @test
+ * @run
+ */
+
+// regexp similar to the one used in marked.js
+/^((?:[^\n]+\n?(?!( *[-*_]){3,} *(?:\n+|$)| *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)|([^\n]+)\n *(=|-){3,} *\n*))+)\n*/
+ .exec("a\n\nb")
+ .forEach(function(e) { print(e); });
+
+// simplified regexp
+/(x(?!(a))(?!(b))y)/
+ .exec("xy")
+ .forEach(function(e) { print(e); });
+
+// should not match as cross-negative-lookeahead backreference \2 should be undefined
+print(/(x(?!(a))(?!(b)\2))/.exec("xbc"));
diff --git a/test/script/basic/JDK-8016681.js.EXPECTED b/test/script/basic/JDK-8016681.js.EXPECTED
new file mode 100644
index 00000000..06b85507
--- /dev/null
+++ b/test/script/basic/JDK-8016681.js.EXPECTED
@@ -0,0 +1,15 @@
+a
+
+
+a
+
+undefined
+undefined
+undefined
+undefined
+undefined
+xy
+xy
+undefined
+undefined
+null
diff --git a/test/script/basic/JDK-8017084.js b/test/script/basic/JDK-8017084.js
new file mode 100644
index 00000000..ceac68ee
--- /dev/null
+++ b/test/script/basic/JDK-8017084.js
@@ -0,0 +1,17625 @@
+/*
+ * 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-8017084: Use spill properties for large object literals
+ *
+ * @test
+ * @run
+ */
+
+var x = {
+ a: 1,
+ b: 2,
+ c: 3,
+ d: 4,
+ e: 5,
+ f: 6,
+ g: 7,
+ h: 8,
+ i: 9,
+ j: 10,
+ k: 11,
+ l: 12,
+ m: 13,
+ n: 14,
+ o: 15,
+ p: 16,
+ q: 17,
+ r: 18,
+ s: 19,
+ t: 20,
+ u: 21,
+ v: 22,
+ w: 23,
+ x: 24,
+ y: 25,
+ az: 26,
+ aa: 27,
+ ab: 28,
+ ac: 29,
+ ad: 30,
+ ae: 31,
+ af: 32,
+ ag: 33,
+ ah: 34,
+ ai: 35,
+ aj: 36,
+ ak: 37,
+ al: 38,
+ am: 39,
+ an: 40,
+ ao: 41,
+ ap: 42,
+ aq: 43,
+ ar: 44,
+ as: 45,
+ at: 46,
+ au: 47,
+ av: 48,
+ aw: 49,
+ ax: 50,
+ ay: 51,
+ bz: 52,
+ ba: 53,
+ bb: 54,
+ bc: 55,
+ bd: 56,
+ be: 57,
+ bf: 58,
+ bg: 59,
+ bh: 60,
+ bi: 61,
+ bj: 62,
+ bk: 63,
+ bl: 64,
+ bm: 65,
+ bn: 66,
+ bo: 67,
+ bp: 68,
+ bq: 69,
+ br: 70,
+ bs: 71,
+ bt: 72,
+ bu: 73,
+ bv: 74,
+ bw: 75,
+ bx: 76,
+ by: 77,
+ cz: 78,
+ ca: 79,
+ cb: 80,
+ cc: 81,
+ cd: 82,
+ ce: 83,
+ cf: 84,
+ cg: 85,
+ ch: 86,
+ ci: 87,
+ cj: 88,
+ ck: 89,
+ cl: 90,
+ cm: 91,
+ cn: 92,
+ co: 93,
+ cp: 94,
+ cq: 95,
+ cr: 96,
+ cs: 97,
+ ct: 98,
+ cu: 99,
+ cv: 100,
+ cw: 101,
+ cx: 102,
+ cy: 103,
+ dz: 104,
+ da: 105,
+ db: 106,
+ dc: 107,
+ dd: 108,
+ de: 109,
+ df: 110,
+ dg: 111,
+ dh: 112,
+ di: 113,
+ dj: 114,
+ dk: 115,
+ dl: 116,
+ dm: 117,
+ dn: 118,
+ do: 119,
+ dp: 120,
+ dq: 121,
+ dr: 122,
+ ds: 123,
+ dt: 124,
+ du: 125,
+ dv: 126,
+ dw: 127,
+ dx: 128,
+ dy: 129,
+ ez: 130,
+ ea: 131,
+ eb: 132,
+ ec: 133,
+ ed: 134,
+ ee: 135,
+ ef: 136,
+ eg: 137,
+ eh: 138,
+ ei: 139,
+ ej: 140,
+ ek: 141,
+ el: 142,
+ em: 143,
+ en: 144,
+ eo: 145,
+ ep: 146,
+ eq: 147,
+ er: 148,
+ es: 149,
+ et: 150,
+ eu: 151,
+ ev: 152,
+ ew: 153,
+ ex: 154,
+ ey: 155,
+ fz: 156,
+ fa: 157,
+ fb: 158,
+ fc: 159,
+ fd: 160,
+ fe: 161,
+ ff: 162,
+ fg: 163,
+ fh: 164,
+ fi: 165,
+ fj: 166,
+ fk: 167,
+ fl: 168,
+ fm: 169,
+ fn: 170,
+ fo: 171,
+ fp: 172,
+ fq: 173,
+ fr: 174,
+ fs: 175,
+ ft: 176,
+ fu: 177,
+ fv: 178,
+ fw: 179,
+ fx: 180,
+ fy: 181,
+ gz: 182,
+ ga: 183,
+ gb: 184,
+ gc: 185,
+ gd: 186,
+ ge: 187,
+ gf: 188,
+ gg: 189,
+ gh: 190,
+ gi: 191,
+ gj: 192,
+ gk: 193,
+ gl: 194,
+ gm: 195,
+ gn: 196,
+ go: 197,
+ gp: 198,
+ gq: 199,
+ gr: 200,
+ gs: 201,
+ gt: 202,
+ gu: 203,
+ gv: 204,
+ gw: 205,
+ gx: 206,
+ gy: 207,
+ hz: 208,
+ ha: 209,
+ hb: 210,
+ hc: 211,
+ hd: 212,
+ he: 213,
+ hf: 214,
+ hg: 215,
+ hh: 216,
+ hi: 217,
+ hj: 218,
+ hk: 219,
+ hl: 220,
+ hm: 221,
+ hn: 222,
+ ho: 223,
+ hp: 224,
+ hq: 225,
+ hr: 226,
+ hs: 227,
+ ht: 228,
+ hu: 229,
+ hv: 230,
+ hw: 231,
+ hx: 232,
+ hy: 233,
+ iz: 234,
+ ia: 235,
+ ib: 236,
+ ic: 237,
+ id: 238,
+ ie: 239,
+ if: 240,
+ ig: 241,
+ ih: 242,
+ ii: 243,
+ ij: 244,
+ ik: 245,
+ il: 246,
+ im: 247,
+ in: 248,
+ io: 249,
+ ip: 250,
+ iq: 251,
+ ir: 252,
+ is: 253,
+ it: 254,
+ iu: 255,
+ iv: 256,
+ iw: 257,
+ ix: 258,
+ iy: 259,
+ jz: 260,
+ ja: 261,
+ jb: 262,
+ jc: 263,
+ jd: 264,
+ je: 265,
+ jf: 266,
+ jg: 267,
+ jh: 268,
+ ji: 269,
+ jj: 270,
+ jk: 271,
+ jl: 272,
+ jm: 273,
+ jn: 274,
+ jo: 275,
+ jp: 276,
+ jq: 277,
+ jr: 278,
+ js: 279,
+ jt: 280,
+ ju: 281,
+ jv: 282,
+ jw: 283,
+ jx: 284,
+ jy: 285,
+ kz: 286,
+ ka: 287,
+ kb: 288,
+ kc: 289,
+ kd: 290,
+ ke: 291,
+ kf: 292,
+ kg: 293,
+ kh: 294,
+ ki: 295,
+ kj: 296,
+ kk: 297,
+ kl: 298,
+ km: 299,
+ kn: 300,
+ ko: 301,
+ kp: 302,
+ kq: 303,
+ kr: 304,
+ ks: 305,
+ kt: 306,
+ ku: 307,
+ kv: 308,
+ kw: 309,
+ kx: 310,
+ ky: 311,
+ lz: 312,
+ la: 313,
+ lb: 314,
+ lc: 315,
+ ld: 316,
+ le: 317,
+ lf: 318,
+ lg: 319,
+ lh: 320,
+ li: 321,
+ lj: 322,
+ lk: 323,
+ ll: 324,
+ lm: 325,
+ ln: 326,
+ lo: 327,
+ lp: 328,
+ lq: 329,
+ lr: 330,
+ ls: 331,
+ lt: 332,
+ lu: 333,
+ lv: 334,
+ lw: 335,
+ lx: 336,
+ ly: 337,
+ mz: 338,
+ ma: 339,
+ mb: 340,
+ mc: 341,
+ md: 342,
+ me: 343,
+ mf: 344,
+ mg: 345,
+ mh: 346,
+ mi: 347,
+ mj: 348,
+ mk: 349,
+ ml: 350,
+ mm: 351,
+ mn: 352,
+ mo: 353,
+ mp: 354,
+ mq: 355,
+ mr: 356,
+ ms: 357,
+ mt: 358,
+ mu: 359,
+ mv: 360,
+ mw: 361,
+ mx: 362,
+ my: 363,
+ nz: 364,
+ na: 365,
+ nb: 366,
+ nc: 367,
+ nd: 368,
+ ne: 369,
+ nf: 370,
+ ng: 371,
+ nh: 372,
+ ni: 373,
+ nj: 374,
+ nk: 375,
+ nl: 376,
+ nm: 377,
+ nn: 378,
+ no: 379,
+ np: 380,
+ nq: 381,
+ nr: 382,
+ ns: 383,
+ nt: 384,
+ nu: 385,
+ nv: 386,
+ nw: 387,
+ nx: 388,
+ ny: 389,
+ oz: 390,
+ oa: 391,
+ ob: 392,
+ oc: 393,
+ od: 394,
+ oe: 395,
+ of: 396,
+ og: 397,
+ oh: 398,
+ oi: 399,
+ oj: 400,
+ ok: 401,
+ ol: 402,
+ om: 403,
+ on: 404,
+ oo: 405,
+ op: 406,
+ oq: 407,
+ or: 408,
+ os: 409,
+ ot: 410,
+ ou: 411,
+ ov: 412,
+ ow: 413,
+ ox: 414,
+ oy: 415,
+ pz: 416,
+ pa: 417,
+ pb: 418,
+ pc: 419,
+ pd: 420,
+ pe: 421,
+ pf: 422,
+ pg: 423,
+ ph: 424,
+ pi: 425,
+ pj: 426,
+ pk: 427,
+ pl: 428,
+ pm: 429,
+ pn: 430,
+ po: 431,
+ pp: 432,
+ pq: 433,
+ pr: 434,
+ ps: 435,
+ pt: 436,
+ pu: 437,
+ pv: 438,
+ pw: 439,
+ px: 440,
+ py: 441,
+ qz: 442,
+ qa: 443,
+ qb: 444,
+ qc: 445,
+ qd: 446,
+ qe: 447,
+ qf: 448,
+ qg: 449,
+ qh: 450,
+ qi: 451,
+ qj: 452,
+ qk: 453,
+ ql: 454,
+ qm: 455,
+ qn: 456,
+ qo: 457,
+ qp: 458,
+ qq: 459,
+ qr: 460,
+ qs: 461,
+ qt: 462,
+ qu: 463,
+ qv: 464,
+ qw: 465,
+ qx: 466,
+ qy: 467,
+ rz: 468,
+ ra: 469,
+ rb: 470,
+ rc: 471,
+ rd: 472,
+ re: 473,
+ rf: 474,
+ rg: 475,
+ rh: 476,
+ ri: 477,
+ rj: 478,
+ rk: 479,
+ rl: 480,
+ rm: 481,
+ rn: 482,
+ ro: 483,
+ rp: 484,
+ rq: 485,
+ rr: 486,
+ rs: 487,
+ rt: 488,
+ ru: 489,
+ rv: 490,
+ rw: 491,
+ rx: 492,
+ ry: 493,
+ sz: 494,
+ sa: 495,
+ sb: 496,
+ sc: 497,
+ sd: 498,
+ se: 499,
+ sf: 500,
+ sg: 501,
+ sh: 502,
+ si: 503,
+ sj: 504,
+ sk: 505,
+ sl: 506,
+ sm: 507,
+ sn: 508,
+ so: 509,
+ sp: 510,
+ sq: 511,
+ sr: 512,
+ ss: 513,
+ st: 514,
+ su: 515,
+ sv: 516,
+ sw: 517,
+ sx: 518,
+ sy: 519,
+ tz: 520,
+ ta: 521,
+ tb: 522,
+ tc: 523,
+ td: 524,
+ te: 525,
+ tf: 526,
+ tg: 527,
+ th: 528,
+ ti: 529,
+ tj: 530,
+ tk: 531,
+ tl: 532,
+ tm: 533,
+ tn: 534,
+ to: 535,
+ tp: 536,
+ tq: 537,
+ tr: 538,
+ ts: 539,
+ tt: 540,
+ tu: 541,
+ tv: 542,
+ tw: 543,
+ tx: 544,
+ ty: 545,
+ uz: 546,
+ ua: 547,
+ ub: 548,
+ uc: 549,
+ ud: 550,
+ ue: 551,
+ uf: 552,
+ ug: 553,
+ uh: 554,
+ ui: 555,
+ uj: 556,
+ uk: 557,
+ ul: 558,
+ um: 559,
+ un: 560,
+ uo: 561,
+ up: 562,
+ uq: 563,
+ ur: 564,
+ us: 565,
+ ut: 566,
+ uu: 567,
+ uv: 568,
+ uw: 569,
+ ux: 570,
+ uy: 571,
+ vz: 572,
+ va: 573,
+ vb: 574,
+ vc: 575,
+ vd: 576,
+ ve: 577,
+ vf: 578,
+ vg: 579,
+ vh: 580,
+ vi: 581,
+ vj: 582,
+ vk: 583,
+ vl: 584,
+ vm: 585,
+ vn: 586,
+ vo: 587,
+ vp: 588,
+ vq: 589,
+ vr: 590,
+ vs: 591,
+ vt: 592,
+ vu: 593,
+ vv: 594,
+ vw: 595,
+ vx: 596,
+ vy: 597,
+ wz: 598,
+ wa: 599,
+ wb: 600,
+ wc: 601,
+ wd: 602,
+ we: 603,
+ wf: 604,
+ wg: 605,
+ wh: 606,
+ wi: 607,
+ wj: 608,
+ wk: 609,
+ wl: 610,
+ wm: 611,
+ wn: 612,
+ wo: 613,
+ wp: 614,
+ wq: 615,
+ wr: 616,
+ ws: 617,
+ wt: 618,
+ wu: 619,
+ wv: 620,
+ ww: 621,
+ wx: 622,
+ wy: 623,
+ xz: 624,
+ xa: 625,
+ xb: 626,
+ xc: 627,
+ xd: 628,
+ xe: 629,
+ xf: 630,
+ xg: 631,
+ xh: 632,
+ xi: 633,
+ xj: 634,
+ xk: 635,
+ xl: 636,
+ xm: 637,
+ xn: 638,
+ xo: 639,
+ xp: 640,
+ xq: 641,
+ xr: 642,
+ xs: 643,
+ xt: 644,
+ xu: 645,
+ xv: 646,
+ xw: 647,
+ xx: 648,
+ xy: 649,
+ yz: 650,
+ ya: 651,
+ yb: 652,
+ yc: 653,
+ yd: 654,
+ ye: 655,
+ yf: 656,
+ yg: 657,
+ yh: 658,
+ yi: 659,
+ yj: 660,
+ yk: 661,
+ yl: 662,
+ ym: 663,
+ yn: 664,
+ yo: 665,
+ yp: 666,
+ yq: 667,
+ yr: 668,
+ ys: 669,
+ yt: 670,
+ yu: 671,
+ yv: 672,
+ yw: 673,
+ yx: 674,
+ yy: 675,
+ azz: 676,
+ aza: 677,
+ azb: 678,
+ azc: 679,
+ azd: 680,
+ aze: 681,
+ azf: 682,
+ azg: 683,
+ azh: 684,
+ azi: 685,
+ azj: 686,
+ azk: 687,
+ azl: 688,
+ azm: 689,
+ azn: 690,
+ azo: 691,
+ azp: 692,
+ azq: 693,
+ azr: 694,
+ azs: 695,
+ azt: 696,
+ azu: 697,
+ azv: 698,
+ azw: 699,
+ azx: 700,
+ azy: 701,
+ aaz: 702,
+ aaa: 703,
+ aab: 704,
+ aac: 705,
+ aad: 706,
+ aae: 707,
+ aaf: 708,
+ aag: 709,
+ aah: 710,
+ aai: 711,
+ aaj: 712,
+ aak: 713,
+ aal: 714,
+ aam: 715,
+ aan: 716,
+ aao: 717,
+ aap: 718,
+ aaq: 719,
+ aar: 720,
+ aas: 721,
+ aat: 722,
+ aau: 723,
+ aav: 724,
+ aaw: 725,
+ aax: 726,
+ aay: 727,
+ abz: 728,
+ aba: 729,
+ abb: 730,
+ abc: 731,
+ abd: 732,
+ abe: 733,
+ abf: 734,
+ abg: 735,
+ abh: 736,
+ abi: 737,
+ abj: 738,
+ abk: 739,
+ abl: 740,
+ abm: 741,
+ abn: 742,
+ abo: 743,
+ abp: 744,
+ abq: 745,
+ abr: 746,
+ abs: 747,
+ abt: 748,
+ abu: 749,
+ abv: 750,
+ abw: 751,
+ abx: 752,
+ aby: 753,
+ acz: 754,
+ aca: 755,
+ acb: 756,
+ acc: 757,
+ acd: 758,
+ ace: 759,
+ acf: 760,
+ acg: 761,
+ ach: 762,
+ aci: 763,
+ acj: 764,
+ ack: 765,
+ acl: 766,
+ acm: 767,
+ acn: 768,
+ aco: 769,
+ acp: 770,
+ acq: 771,
+ acr: 772,
+ acs: 773,
+ act: 774,
+ acu: 775,
+ acv: 776,
+ acw: 777,
+ acx: 778,
+ acy: 779,
+ adz: 780,
+ ada: 781,
+ adb: 782,
+ adc: 783,
+ add: 784,
+ ade: 785,
+ adf: 786,
+ adg: 787,
+ adh: 788,
+ adi: 789,
+ adj: 790,
+ adk: 791,
+ adl: 792,
+ adm: 793,
+ adn: 794,
+ ado: 795,
+ adp: 796,
+ adq: 797,
+ adr: 798,
+ ads: 799,
+ adt: 800,
+ adu: 801,
+ adv: 802,
+ adw: 803,
+ adx: 804,
+ ady: 805,
+ aez: 806,
+ aea: 807,
+ aeb: 808,
+ aec: 809,
+ aed: 810,
+ aee: 811,
+ aef: 812,
+ aeg: 813,
+ aeh: 814,
+ aei: 815,
+ aej: 816,
+ aek: 817,
+ ael: 818,
+ aem: 819,
+ aen: 820,
+ aeo: 821,
+ aep: 822,
+ aeq: 823,
+ aer: 824,
+ aes: 825,
+ aet: 826,
+ aeu: 827,
+ aev: 828,
+ aew: 829,
+ aex: 830,
+ aey: 831,
+ afz: 832,
+ afa: 833,
+ afb: 834,
+ afc: 835,
+ afd: 836,
+ afe: 837,
+ aff: 838,
+ afg: 839,
+ afh: 840,
+ afi: 841,
+ afj: 842,
+ afk: 843,
+ afl: 844,
+ afm: 845,
+ afn: 846,
+ afo: 847,
+ afp: 848,
+ afq: 849,
+ afr: 850,
+ afs: 851,
+ aft: 852,
+ afu: 853,
+ afv: 854,
+ afw: 855,
+ afx: 856,
+ afy: 857,
+ agz: 858,
+ aga: 859,
+ agb: 860,
+ agc: 861,
+ agd: 862,
+ age: 863,
+ agf: 864,
+ agg: 865,
+ agh: 866,
+ agi: 867,
+ agj: 868,
+ agk: 869,
+ agl: 870,
+ agm: 871,
+ agn: 872,
+ ago: 873,
+ agp: 874,
+ agq: 875,
+ agr: 876,
+ ags: 877,
+ agt: 878,
+ agu: 879,
+ agv: 880,
+ agw: 881,
+ agx: 882,
+ agy: 883,
+ ahz: 884,
+ aha: 885,
+ ahb: 886,
+ ahc: 887,
+ ahd: 888,
+ ahe: 889,
+ ahf: 890,
+ ahg: 891,
+ ahh: 892,
+ ahi: 893,
+ ahj: 894,
+ ahk: 895,
+ ahl: 896,
+ ahm: 897,
+ ahn: 898,
+ aho: 899,
+ ahp: 900,
+ ahq: 901,
+ ahr: 902,
+ ahs: 903,
+ aht: 904,
+ ahu: 905,
+ ahv: 906,
+ ahw: 907,
+ ahx: 908,
+ ahy: 909,
+ aiz: 910,
+ aia: 911,
+ aib: 912,
+ aic: 913,
+ aid: 914,
+ aie: 915,
+ aif: 916,
+ aig: 917,
+ aih: 918,
+ aii: 919,
+ aij: 920,
+ aik: 921,
+ ail: 922,
+ aim: 923,
+ ain: 924,
+ aio: 925,
+ aip: 926,
+ aiq: 927,
+ air: 928,
+ ais: 929,
+ ait: 930,
+ aiu: 931,
+ aiv: 932,
+ aiw: 933,
+ aix: 934,
+ aiy: 935,
+ ajz: 936,
+ aja: 937,
+ ajb: 938,
+ ajc: 939,
+ ajd: 940,
+ aje: 941,
+ ajf: 942,
+ ajg: 943,
+ ajh: 944,
+ aji: 945,
+ ajj: 946,
+ ajk: 947,
+ ajl: 948,
+ ajm: 949,
+ ajn: 950,
+ ajo: 951,
+ ajp: 952,
+ ajq: 953,
+ ajr: 954,
+ ajs: 955,
+ ajt: 956,
+ aju: 957,
+ ajv: 958,
+ ajw: 959,
+ ajx: 960,
+ ajy: 961,
+ akz: 962,
+ aka: 963,
+ akb: 964,
+ akc: 965,
+ akd: 966,
+ ake: 967,
+ akf: 968,
+ akg: 969,
+ akh: 970,
+ aki: 971,
+ akj: 972,
+ akk: 973,
+ akl: 974,
+ akm: 975,
+ akn: 976,
+ ako: 977,
+ akp: 978,
+ akq: 979,
+ akr: 980,
+ aks: 981,
+ akt: 982,
+ aku: 983,
+ akv: 984,
+ akw: 985,
+ akx: 986,
+ aky: 987,
+ alz: 988,
+ ala: 989,
+ alb: 990,
+ alc: 991,
+ ald: 992,
+ ale: 993,
+ alf: 994,
+ alg: 995,
+ alh: 996,
+ ali: 997,
+ alj: 998,
+ alk: 999,
+ all: 1000,
+ alm: 1001,
+ aln: 1002,
+ alo: 1003,
+ alp: 1004,
+ alq: 1005,
+ alr: 1006,
+ als: 1007,
+ alt: 1008,
+ alu: 1009,
+ alv: 1010,
+ alw: 1011,
+ alx: 1012,
+ aly: 1013,
+ amz: 1014,
+ ama: 1015,
+ amb: 1016,
+ amc: 1017,
+ amd: 1018,
+ ame: 1019,
+ amf: 1020,
+ amg: 1021,
+ amh: 1022,
+ ami: 1023,
+ amj: 1024,
+ amk: 1025,
+ aml: 1026,
+ amm: 1027,
+ amn: 1028,
+ amo: 1029,
+ amp: 1030,
+ amq: 1031,
+ amr: 1032,
+ ams: 1033,
+ amt: 1034,
+ amu: 1035,
+ amv: 1036,
+ amw: 1037,
+ amx: 1038,
+ amy: 1039,
+ anz: 1040,
+ ana: 1041,
+ anb: 1042,
+ anc: 1043,
+ and: 1044,
+ ane: 1045,
+ anf: 1046,
+ ang: 1047,
+ anh: 1048,
+ ani: 1049,
+ anj: 1050,
+ ank: 1051,
+ anl: 1052,
+ anm: 1053,
+ ann: 1054,
+ ano: 1055,
+ anp: 1056,
+ anq: 1057,
+ anr: 1058,
+ ans: 1059,
+ ant: 1060,
+ anu: 1061,
+ anv: 1062,
+ anw: 1063,
+ anx: 1064,
+ any: 1065,
+ aoz: 1066,
+ aoa: 1067,
+ aob: 1068,
+ aoc: 1069,
+ aod: 1070,
+ aoe: 1071,
+ aof: 1072,
+ aog: 1073,
+ aoh: 1074,
+ aoi: 1075,
+ aoj: 1076,
+ aok: 1077,
+ aol: 1078,
+ aom: 1079,
+ aon: 1080,
+ aoo: 1081,
+ aop: 1082,
+ aoq: 1083,
+ aor: 1084,
+ aos: 1085,
+ aot: 1086,
+ aou: 1087,
+ aov: 1088,
+ aow: 1089,
+ aox: 1090,
+ aoy: 1091,
+ apz: 1092,
+ apa: 1093,
+ apb: 1094,
+ apc: 1095,
+ apd: 1096,
+ ape: 1097,
+ apf: 1098,
+ apg: 1099,
+ aph: 1100,
+ api: 1101,
+ apj: 1102,
+ apk: 1103,
+ apl: 1104,
+ apm: 1105,
+ apn: 1106,
+ apo: 1107,
+ app: 1108,
+ apq: 1109,
+ apr: 1110,
+ aps: 1111,
+ apt: 1112,
+ apu: 1113,
+ apv: 1114,
+ apw: 1115,
+ apx: 1116,
+ apy: 1117,
+ aqz: 1118,
+ aqa: 1119,
+ aqb: 1120,
+ aqc: 1121,
+ aqd: 1122,
+ aqe: 1123,
+ aqf: 1124,
+ aqg: 1125,
+ aqh: 1126,
+ aqi: 1127,
+ aqj: 1128,
+ aqk: 1129,
+ aql: 1130,
+ aqm: 1131,
+ aqn: 1132,
+ aqo: 1133,
+ aqp: 1134,
+ aqq: 1135,
+ aqr: 1136,
+ aqs: 1137,
+ aqt: 1138,
+ aqu: 1139,
+ aqv: 1140,
+ aqw: 1141,
+ aqx: 1142,
+ aqy: 1143,
+ arz: 1144,
+ ara: 1145,
+ arb: 1146,
+ arc: 1147,
+ ard: 1148,
+ are: 1149,
+ arf: 1150,
+ arg: 1151,
+ arh: 1152,
+ ari: 1153,
+ arj: 1154,
+ ark: 1155,
+ arl: 1156,
+ arm: 1157,
+ arn: 1158,
+ aro: 1159,
+ arp: 1160,
+ arq: 1161,
+ arr: 1162,
+ ars: 1163,
+ art: 1164,
+ aru: 1165,
+ arv: 1166,
+ arw: 1167,
+ arx: 1168,
+ ary: 1169,
+ asz: 1170,
+ asa: 1171,
+ asb: 1172,
+ asc: 1173,
+ asd: 1174,
+ ase: 1175,
+ asf: 1176,
+ asg: 1177,
+ ash: 1178,
+ asi: 1179,
+ asj: 1180,
+ ask: 1181,
+ asl: 1182,
+ asm: 1183,
+ asn: 1184,
+ aso: 1185,
+ asp: 1186,
+ asq: 1187,
+ asr: 1188,
+ ass: 1189,
+ ast: 1190,
+ asu: 1191,
+ asv: 1192,
+ asw: 1193,
+ asx: 1194,
+ asy: 1195,
+ atz: 1196,
+ ata: 1197,
+ atb: 1198,
+ atc: 1199,
+ atd: 1200,
+ ate: 1201,
+ atf: 1202,
+ atg: 1203,
+ ath: 1204,
+ ati: 1205,
+ atj: 1206,
+ atk: 1207,
+ atl: 1208,
+ atm: 1209,
+ atn: 1210,
+ ato: 1211,
+ atp: 1212,
+ atq: 1213,
+ atr: 1214,
+ ats: 1215,
+ att: 1216,
+ atu: 1217,
+ atv: 1218,
+ atw: 1219,
+ atx: 1220,
+ aty: 1221,
+ auz: 1222,
+ aua: 1223,
+ aub: 1224,
+ auc: 1225,
+ aud: 1226,
+ aue: 1227,
+ auf: 1228,
+ aug: 1229,
+ auh: 1230,
+ aui: 1231,
+ auj: 1232,
+ auk: 1233,
+ aul: 1234,
+ aum: 1235,
+ aun: 1236,
+ auo: 1237,
+ aup: 1238,
+ auq: 1239,
+ aur: 1240,
+ aus: 1241,
+ aut: 1242,
+ auu: 1243,
+ auv: 1244,
+ auw: 1245,
+ aux: 1246,
+ auy: 1247,
+ avz: 1248,
+ ava: 1249,
+ avb: 1250,
+ avc: 1251,
+ avd: 1252,
+ ave: 1253,
+ avf: 1254,
+ avg: 1255,
+ avh: 1256,
+ avi: 1257,
+ avj: 1258,
+ avk: 1259,
+ avl: 1260,
+ avm: 1261,
+ avn: 1262,
+ avo: 1263,
+ avp: 1264,
+ avq: 1265,
+ avr: 1266,
+ avs: 1267,
+ avt: 1268,
+ avu: 1269,
+ avv: 1270,
+ avw: 1271,
+ avx: 1272,
+ avy: 1273,
+ awz: 1274,
+ awa: 1275,
+ awb: 1276,
+ awc: 1277,
+ awd: 1278,
+ awe: 1279,
+ awf: 1280,
+ awg: 1281,
+ awh: 1282,
+ awi: 1283,
+ awj: 1284,
+ awk: 1285,
+ awl: 1286,
+ awm: 1287,
+ awn: 1288,
+ awo: 1289,
+ awp: 1290,
+ awq: 1291,
+ awr: 1292,
+ aws: 1293,
+ awt: 1294,
+ awu: 1295,
+ awv: 1296,
+ aww: 1297,
+ awx: 1298,
+ awy: 1299,
+ axz: 1300,
+ axa: 1301,
+ axb: 1302,
+ axc: 1303,
+ axd: 1304,
+ axe: 1305,
+ axf: 1306,
+ axg: 1307,
+ axh: 1308,
+ axi: 1309,
+ axj: 1310,
+ axk: 1311,
+ axl: 1312,
+ axm: 1313,
+ axn: 1314,
+ axo: 1315,
+ axp: 1316,
+ axq: 1317,
+ axr: 1318,
+ axs: 1319,
+ axt: 1320,
+ axu: 1321,
+ axv: 1322,
+ axw: 1323,
+ axx: 1324,
+ axy: 1325,
+ ayz: 1326,
+ aya: 1327,
+ ayb: 1328,
+ ayc: 1329,
+ ayd: 1330,
+ aye: 1331,
+ ayf: 1332,
+ ayg: 1333,
+ ayh: 1334,
+ ayi: 1335,
+ ayj: 1336,
+ ayk: 1337,
+ ayl: 1338,
+ aym: 1339,
+ ayn: 1340,
+ ayo: 1341,
+ ayp: 1342,
+ ayq: 1343,
+ ayr: 1344,
+ ays: 1345,
+ ayt: 1346,
+ ayu: 1347,
+ ayv: 1348,
+ ayw: 1349,
+ ayx: 1350,
+ ayy: 1351,
+ bzz: 1352,
+ bza: 1353,
+ bzb: 1354,
+ bzc: 1355,
+ bzd: 1356,
+ bze: 1357,
+ bzf: 1358,
+ bzg: 1359,
+ bzh: 1360,
+ bzi: 1361,
+ bzj: 1362,
+ bzk: 1363,
+ bzl: 1364,
+ bzm: 1365,
+ bzn: 1366,
+ bzo: 1367,
+ bzp: 1368,
+ bzq: 1369,
+ bzr: 1370,
+ bzs: 1371,
+ bzt: 1372,
+ bzu: 1373,
+ bzv: 1374,
+ bzw: 1375,
+ bzx: 1376,
+ bzy: 1377,
+ baz: 1378,
+ baa: 1379,
+ bab: 1380,
+ bac: 1381,
+ bad: 1382,
+ bae: 1383,
+ baf: 1384,
+ bag: 1385,
+ bah: 1386,
+ bai: 1387,
+ baj: 1388,
+ bak: 1389,
+ bal: 1390,
+ bam: 1391,
+ ban: 1392,
+ bao: 1393,
+ bap: 1394,
+ baq: 1395,
+ bar: 1396,
+ bas: 1397,
+ bat: 1398,
+ bau: 1399,
+ bav: 1400,
+ baw: 1401,
+ bax: 1402,
+ bay: 1403,
+ bbz: 1404,
+ bba: 1405,
+ bbb: 1406,
+ bbc: 1407,
+ bbd: 1408,
+ bbe: 1409,
+ bbf: 1410,
+ bbg: 1411,
+ bbh: 1412,
+ bbi: 1413,
+ bbj: 1414,
+ bbk: 1415,
+ bbl: 1416,
+ bbm: 1417,
+ bbn: 1418,
+ bbo: 1419,
+ bbp: 1420,
+ bbq: 1421,
+ bbr: 1422,
+ bbs: 1423,
+ bbt: 1424,
+ bbu: 1425,
+ bbv: 1426,
+ bbw: 1427,
+ bbx: 1428,
+ bby: 1429,
+ bcz: 1430,
+ bca: 1431,
+ bcb: 1432,
+ bcc: 1433,
+ bcd: 1434,
+ bce: 1435,
+ bcf: 1436,
+ bcg: 1437,
+ bch: 1438,
+ bci: 1439,
+ bcj: 1440,
+ bck: 1441,
+ bcl: 1442,
+ bcm: 1443,
+ bcn: 1444,
+ bco: 1445,
+ bcp: 1446,
+ bcq: 1447,
+ bcr: 1448,
+ bcs: 1449,
+ bct: 1450,
+ bcu: 1451,
+ bcv: 1452,
+ bcw: 1453,
+ bcx: 1454,
+ bcy: 1455,
+ bdz: 1456,
+ bda: 1457,
+ bdb: 1458,
+ bdc: 1459,
+ bdd: 1460,
+ bde: 1461,
+ bdf: 1462,
+ bdg: 1463,
+ bdh: 1464,
+ bdi: 1465,
+ bdj: 1466,
+ bdk: 1467,
+ bdl: 1468,
+ bdm: 1469,
+ bdn: 1470,
+ bdo: 1471,
+ bdp: 1472,
+ bdq: 1473,
+ bdr: 1474,
+ bds: 1475,
+ bdt: 1476,
+ bdu: 1477,
+ bdv: 1478,
+ bdw: 1479,
+ bdx: 1480,
+ bdy: 1481,
+ bez: 1482,
+ bea: 1483,
+ beb: 1484,
+ bec: 1485,
+ bed: 1486,
+ bee: 1487,
+ bef: 1488,
+ beg: 1489,
+ beh: 1490,
+ bei: 1491,
+ bej: 1492,
+ bek: 1493,
+ bel: 1494,
+ bem: 1495,
+ ben: 1496,
+ beo: 1497,
+ bep: 1498,
+ beq: 1499,
+ ber: 1500,
+ bes: 1501,
+ bet: 1502,
+ beu: 1503,
+ bev: 1504,
+ bew: 1505,
+ bex: 1506,
+ bey: 1507,
+ bfz: 1508,
+ bfa: 1509,
+ bfb: 1510,
+ bfc: 1511,
+ bfd: 1512,
+ bfe: 1513,
+ bff: 1514,
+ bfg: 1515,
+ bfh: 1516,
+ bfi: 1517,
+ bfj: 1518,
+ bfk: 1519,
+ bfl: 1520,
+ bfm: 1521,
+ bfn: 1522,
+ bfo: 1523,
+ bfp: 1524,
+ bfq: 1525,
+ bfr: 1526,
+ bfs: 1527,
+ bft: 1528,
+ bfu: 1529,
+ bfv: 1530,
+ bfw: 1531,
+ bfx: 1532,
+ bfy: 1533,
+ bgz: 1534,
+ bga: 1535,
+ bgb: 1536,
+ bgc: 1537,
+ bgd: 1538,
+ bge: 1539,
+ bgf: 1540,
+ bgg: 1541,
+ bgh: 1542,
+ bgi: 1543,
+ bgj: 1544,
+ bgk: 1545,
+ bgl: 1546,
+ bgm: 1547,
+ bgn: 1548,
+ bgo: 1549,
+ bgp: 1550,
+ bgq: 1551,
+ bgr: 1552,
+ bgs: 1553,
+ bgt: 1554,
+ bgu: 1555,
+ bgv: 1556,
+ bgw: 1557,
+ bgx: 1558,
+ bgy: 1559,
+ bhz: 1560,
+ bha: 1561,
+ bhb: 1562,
+ bhc: 1563,
+ bhd: 1564,
+ bhe: 1565,
+ bhf: 1566,
+ bhg: 1567,
+ bhh: 1568,
+ bhi: 1569,
+ bhj: 1570,
+ bhk: 1571,
+ bhl: 1572,
+ bhm: 1573,
+ bhn: 1574,
+ bho: 1575,
+ bhp: 1576,
+ bhq: 1577,
+ bhr: 1578,
+ bhs: 1579,
+ bht: 1580,
+ bhu: 1581,
+ bhv: 1582,
+ bhw: 1583,
+ bhx: 1584,
+ bhy: 1585,
+ biz: 1586,
+ bia: 1587,
+ bib: 1588,
+ bic: 1589,
+ bid: 1590,
+ bie: 1591,
+ bif: 1592,
+ big: 1593,
+ bih: 1594,
+ bii: 1595,
+ bij: 1596,
+ bik: 1597,
+ bil: 1598,
+ bim: 1599,
+ bin: 1600,
+ bio: 1601,
+ bip: 1602,
+ biq: 1603,
+ bir: 1604,
+ bis: 1605,
+ bit: 1606,
+ biu: 1607,
+ biv: 1608,
+ biw: 1609,
+ bix: 1610,
+ biy: 1611,
+ bjz: 1612,
+ bja: 1613,
+ bjb: 1614,
+ bjc: 1615,
+ bjd: 1616,
+ bje: 1617,
+ bjf: 1618,
+ bjg: 1619,
+ bjh: 1620,
+ bji: 1621,
+ bjj: 1622,
+ bjk: 1623,
+ bjl: 1624,
+ bjm: 1625,
+ bjn: 1626,
+ bjo: 1627,
+ bjp: 1628,
+ bjq: 1629,
+ bjr: 1630,
+ bjs: 1631,
+ bjt: 1632,
+ bju: 1633,
+ bjv: 1634,
+ bjw: 1635,
+ bjx: 1636,
+ bjy: 1637,
+ bkz: 1638,
+ bka: 1639,
+ bkb: 1640,
+ bkc: 1641,
+ bkd: 1642,
+ bke: 1643,
+ bkf: 1644,
+ bkg: 1645,
+ bkh: 1646,
+ bki: 1647,
+ bkj: 1648,
+ bkk: 1649,
+ bkl: 1650,
+ bkm: 1651,
+ bkn: 1652,
+ bko: 1653,
+ bkp: 1654,
+ bkq: 1655,
+ bkr: 1656,
+ bks: 1657,
+ bkt: 1658,
+ bku: 1659,
+ bkv: 1660,
+ bkw: 1661,
+ bkx: 1662,
+ bky: 1663,
+ blz: 1664,
+ bla: 1665,
+ blb: 1666,
+ blc: 1667,
+ bld: 1668,
+ ble: 1669,
+ blf: 1670,
+ blg: 1671,
+ blh: 1672,
+ bli: 1673,
+ blj: 1674,
+ blk: 1675,
+ bll: 1676,
+ blm: 1677,
+ bln: 1678,
+ blo: 1679,
+ blp: 1680,
+ blq: 1681,
+ blr: 1682,
+ bls: 1683,
+ blt: 1684,
+ blu: 1685,
+ blv: 1686,
+ blw: 1687,
+ blx: 1688,
+ bly: 1689,
+ bmz: 1690,
+ bma: 1691,
+ bmb: 1692,
+ bmc: 1693,
+ bmd: 1694,
+ bme: 1695,
+ bmf: 1696,
+ bmg: 1697,
+ bmh: 1698,
+ bmi: 1699,
+ bmj: 1700,
+ bmk: 1701,
+ bml: 1702,
+ bmm: 1703,
+ bmn: 1704,
+ bmo: 1705,
+ bmp: 1706,
+ bmq: 1707,
+ bmr: 1708,
+ bms: 1709,
+ bmt: 1710,
+ bmu: 1711,
+ bmv: 1712,
+ bmw: 1713,
+ bmx: 1714,
+ bmy: 1715,
+ bnz: 1716,
+ bna: 1717,
+ bnb: 1718,
+ bnc: 1719,
+ bnd: 1720,
+ bne: 1721,
+ bnf: 1722,
+ bng: 1723,
+ bnh: 1724,
+ bni: 1725,
+ bnj: 1726,
+ bnk: 1727,
+ bnl: 1728,
+ bnm: 1729,
+ bnn: 1730,
+ bno: 1731,
+ bnp: 1732,
+ bnq: 1733,
+ bnr: 1734,
+ bns: 1735,
+ bnt: 1736,
+ bnu: 1737,
+ bnv: 1738,
+ bnw: 1739,
+ bnx: 1740,
+ bny: 1741,
+ boz: 1742,
+ boa: 1743,
+ bob: 1744,
+ boc: 1745,
+ bod: 1746,
+ boe: 1747,
+ bof: 1748,
+ bog: 1749,
+ boh: 1750,
+ boi: 1751,
+ boj: 1752,
+ bok: 1753,
+ bol: 1754,
+ bom: 1755,
+ bon: 1756,
+ boo: 1757,
+ bop: 1758,
+ boq: 1759,
+ bor: 1760,
+ bos: 1761,
+ bot: 1762,
+ bou: 1763,
+ bov: 1764,
+ bow: 1765,
+ box: 1766,
+ boy: 1767,
+ bpz: 1768,
+ bpa: 1769,
+ bpb: 1770,
+ bpc: 1771,
+ bpd: 1772,
+ bpe: 1773,
+ bpf: 1774,
+ bpg: 1775,
+ bph: 1776,
+ bpi: 1777,
+ bpj: 1778,
+ bpk: 1779,
+ bpl: 1780,
+ bpm: 1781,
+ bpn: 1782,
+ bpo: 1783,
+ bpp: 1784,
+ bpq: 1785,
+ bpr: 1786,
+ bps: 1787,
+ bpt: 1788,
+ bpu: 1789,
+ bpv: 1790,
+ bpw: 1791,
+ bpx: 1792,
+ bpy: 1793,
+ bqz: 1794,
+ bqa: 1795,
+ bqb: 1796,
+ bqc: 1797,
+ bqd: 1798,
+ bqe: 1799,
+ bqf: 1800,
+ bqg: 1801,
+ bqh: 1802,
+ bqi: 1803,
+ bqj: 1804,
+ bqk: 1805,
+ bql: 1806,
+ bqm: 1807,
+ bqn: 1808,
+ bqo: 1809,
+ bqp: 1810,
+ bqq: 1811,
+ bqr: 1812,
+ bqs: 1813,
+ bqt: 1814,
+ bqu: 1815,
+ bqv: 1816,
+ bqw: 1817,
+ bqx: 1818,
+ bqy: 1819,
+ brz: 1820,
+ bra: 1821,
+ brb: 1822,
+ brc: 1823,
+ brd: 1824,
+ bre: 1825,
+ brf: 1826,
+ brg: 1827,
+ brh: 1828,
+ bri: 1829,
+ brj: 1830,
+ brk: 1831,
+ brl: 1832,
+ brm: 1833,
+ brn: 1834,
+ bro: 1835,
+ brp: 1836,
+ brq: 1837,
+ brr: 1838,
+ brs: 1839,
+ brt: 1840,
+ bru: 1841,
+ brv: 1842,
+ brw: 1843,
+ brx: 1844,
+ bry: 1845,
+ bsz: 1846,
+ bsa: 1847,
+ bsb: 1848,
+ bsc: 1849,
+ bsd: 1850,
+ bse: 1851,
+ bsf: 1852,
+ bsg: 1853,
+ bsh: 1854,
+ bsi: 1855,
+ bsj: 1856,
+ bsk: 1857,
+ bsl: 1858,
+ bsm: 1859,
+ bsn: 1860,
+ bso: 1861,
+ bsp: 1862,
+ bsq: 1863,
+ bsr: 1864,
+ bss: 1865,
+ bst: 1866,
+ bsu: 1867,
+ bsv: 1868,
+ bsw: 1869,
+ bsx: 1870,
+ bsy: 1871,
+ btz: 1872,
+ bta: 1873,
+ btb: 1874,
+ btc: 1875,
+ btd: 1876,
+ bte: 1877,
+ btf: 1878,
+ btg: 1879,
+ bth: 1880,
+ bti: 1881,
+ btj: 1882,
+ btk: 1883,
+ btl: 1884,
+ btm: 1885,
+ btn: 1886,
+ bto: 1887,
+ btp: 1888,
+ btq: 1889,
+ btr: 1890,
+ bts: 1891,
+ btt: 1892,
+ btu: 1893,
+ btv: 1894,
+ btw: 1895,
+ btx: 1896,
+ bty: 1897,
+ buz: 1898,
+ bua: 1899,
+ bub: 1900,
+ buc: 1901,
+ bud: 1902,
+ bue: 1903,
+ buf: 1904,
+ bug: 1905,
+ buh: 1906,
+ bui: 1907,
+ buj: 1908,
+ buk: 1909,
+ bul: 1910,
+ bum: 1911,
+ bun: 1912,
+ buo: 1913,
+ bup: 1914,
+ buq: 1915,
+ bur: 1916,
+ bus: 1917,
+ but: 1918,
+ buu: 1919,
+ buv: 1920,
+ buw: 1921,
+ bux: 1922,
+ buy: 1923,
+ bvz: 1924,
+ bva: 1925,
+ bvb: 1926,
+ bvc: 1927,
+ bvd: 1928,
+ bve: 1929,
+ bvf: 1930,
+ bvg: 1931,
+ bvh: 1932,
+ bvi: 1933,
+ bvj: 1934,
+ bvk: 1935,
+ bvl: 1936,
+ bvm: 1937,
+ bvn: 1938,
+ bvo: 1939,
+ bvp: 1940,
+ bvq: 1941,
+ bvr: 1942,
+ bvs: 1943,
+ bvt: 1944,
+ bvu: 1945,
+ bvv: 1946,
+ bvw: 1947,
+ bvx: 1948,
+ bvy: 1949,
+ bwz: 1950,
+ bwa: 1951,
+ bwb: 1952,
+ bwc: 1953,
+ bwd: 1954,
+ bwe: 1955,
+ bwf: 1956,
+ bwg: 1957,
+ bwh: 1958,
+ bwi: 1959,
+ bwj: 1960,
+ bwk: 1961,
+ bwl: 1962,
+ bwm: 1963,
+ bwn: 1964,
+ bwo: 1965,
+ bwp: 1966,
+ bwq: 1967,
+ bwr: 1968,
+ bws: 1969,
+ bwt: 1970,
+ bwu: 1971,
+ bwv: 1972,
+ bww: 1973,
+ bwx: 1974,
+ bwy: 1975,
+ bxz: 1976,
+ bxa: 1977,
+ bxb: 1978,
+ bxc: 1979,
+ bxd: 1980,
+ bxe: 1981,
+ bxf: 1982,
+ bxg: 1983,
+ bxh: 1984,
+ bxi: 1985,
+ bxj: 1986,
+ bxk: 1987,
+ bxl: 1988,
+ bxm: 1989,
+ bxn: 1990,
+ bxo: 1991,
+ bxp: 1992,
+ bxq: 1993,
+ bxr: 1994,
+ bxs: 1995,
+ bxt: 1996,
+ bxu: 1997,
+ bxv: 1998,
+ bxw: 1999,
+ bxx: 2000,
+ bxy: 2001,
+ byz: 2002,
+ bya: 2003,
+ byb: 2004,
+ byc: 2005,
+ byd: 2006,
+ bye: 2007,
+ byf: 2008,
+ byg: 2009,
+ byh: 2010,
+ byi: 2011,
+ byj: 2012,
+ byk: 2013,
+ byl: 2014,
+ bym: 2015,
+ byn: 2016,
+ byo: 2017,
+ byp: 2018,
+ byq: 2019,
+ byr: 2020,
+ bys: 2021,
+ byt: 2022,
+ byu: 2023,
+ byv: 2024,
+ byw: 2025,
+ byx: 2026,
+ byy: 2027,
+ czz: 2028,
+ cza: 2029,
+ czb: 2030,
+ czc: 2031,
+ czd: 2032,
+ cze: 2033,
+ czf: 2034,
+ czg: 2035,
+ czh: 2036,
+ czi: 2037,
+ czj: 2038,
+ czk: 2039,
+ czl: 2040,
+ czm: 2041,
+ czn: 2042,
+ czo: 2043,
+ czp: 2044,
+ czq: 2045,
+ czr: 2046,
+ czs: 2047,
+ czt: 2048,
+ czu: 2049,
+ czv: 2050,
+ czw: 2051,
+ czx: 2052,
+ czy: 2053,
+ caz: 2054,
+ caa: 2055,
+ cab: 2056,
+ cac: 2057,
+ cad: 2058,
+ cae: 2059,
+ caf: 2060,
+ cag: 2061,
+ cah: 2062,
+ cai: 2063,
+ caj: 2064,
+ cak: 2065,
+ cal: 2066,
+ cam: 2067,
+ can: 2068,
+ cao: 2069,
+ cap: 2070,
+ caq: 2071,
+ car: 2072,
+ cas: 2073,
+ cat: 2074,
+ cau: 2075,
+ cav: 2076,
+ caw: 2077,
+ cax: 2078,
+ cay: 2079,
+ cbz: 2080,
+ cba: 2081,
+ cbb: 2082,
+ cbc: 2083,
+ cbd: 2084,
+ cbe: 2085,
+ cbf: 2086,
+ cbg: 2087,
+ cbh: 2088,
+ cbi: 2089,
+ cbj: 2090,
+ cbk: 2091,
+ cbl: 2092,
+ cbm: 2093,
+ cbn: 2094,
+ cbo: 2095,
+ cbp: 2096,
+ cbq: 2097,
+ cbr: 2098,
+ cbs: 2099,
+ cbt: 2100,
+ cbu: 2101,
+ cbv: 2102,
+ cbw: 2103,
+ cbx: 2104,
+ cby: 2105,
+ ccz: 2106,
+ cca: 2107,
+ ccb: 2108,
+ ccc: 2109,
+ ccd: 2110,
+ cce: 2111,
+ ccf: 2112,
+ ccg: 2113,
+ cch: 2114,
+ cci: 2115,
+ ccj: 2116,
+ cck: 2117,
+ ccl: 2118,
+ ccm: 2119,
+ ccn: 2120,
+ cco: 2121,
+ ccp: 2122,
+ ccq: 2123,
+ ccr: 2124,
+ ccs: 2125,
+ cct: 2126,
+ ccu: 2127,
+ ccv: 2128,
+ ccw: 2129,
+ ccx: 2130,
+ ccy: 2131,
+ cdz: 2132,
+ cda: 2133,
+ cdb: 2134,
+ cdc: 2135,
+ cdd: 2136,
+ cde: 2137,
+ cdf: 2138,
+ cdg: 2139,
+ cdh: 2140,
+ cdi: 2141,
+ cdj: 2142,
+ cdk: 2143,
+ cdl: 2144,
+ cdm: 2145,
+ cdn: 2146,
+ cdo: 2147,
+ cdp: 2148,
+ cdq: 2149,
+ cdr: 2150,
+ cds: 2151,
+ cdt: 2152,
+ cdu: 2153,
+ cdv: 2154,
+ cdw: 2155,
+ cdx: 2156,
+ cdy: 2157,
+ cez: 2158,
+ cea: 2159,
+ ceb: 2160,
+ cec: 2161,
+ ced: 2162,
+ cee: 2163,
+ cef: 2164,
+ ceg: 2165,
+ ceh: 2166,
+ cei: 2167,
+ cej: 2168,
+ cek: 2169,
+ cel: 2170,
+ cem: 2171,
+ cen: 2172,
+ ceo: 2173,
+ cep: 2174,
+ ceq: 2175,
+ cer: 2176,
+ ces: 2177,
+ cet: 2178,
+ ceu: 2179,
+ cev: 2180,
+ cew: 2181,
+ cex: 2182,
+ cey: 2183,
+ cfz: 2184,
+ cfa: 2185,
+ cfb: 2186,
+ cfc: 2187,
+ cfd: 2188,
+ cfe: 2189,
+ cff: 2190,
+ cfg: 2191,
+ cfh: 2192,
+ cfi: 2193,
+ cfj: 2194,
+ cfk: 2195,
+ cfl: 2196,
+ cfm: 2197,
+ cfn: 2198,
+ cfo: 2199,
+ cfp: 2200,
+ cfq: 2201,
+ cfr: 2202,
+ cfs: 2203,
+ cft: 2204,
+ cfu: 2205,
+ cfv: 2206,
+ cfw: 2207,
+ cfx: 2208,
+ cfy: 2209,
+ cgz: 2210,
+ cga: 2211,
+ cgb: 2212,
+ cgc: 2213,
+ cgd: 2214,
+ cge: 2215,
+ cgf: 2216,
+ cgg: 2217,
+ cgh: 2218,
+ cgi: 2219,
+ cgj: 2220,
+ cgk: 2221,
+ cgl: 2222,
+ cgm: 2223,
+ cgn: 2224,
+ cgo: 2225,
+ cgp: 2226,
+ cgq: 2227,
+ cgr: 2228,
+ cgs: 2229,
+ cgt: 2230,
+ cgu: 2231,
+ cgv: 2232,
+ cgw: 2233,
+ cgx: 2234,
+ cgy: 2235,
+ chz: 2236,
+ cha: 2237,
+ chb: 2238,
+ chc: 2239,
+ chd: 2240,
+ che: 2241,
+ chf: 2242,
+ chg: 2243,
+ chh: 2244,
+ chi: 2245,
+ chj: 2246,
+ chk: 2247,
+ chl: 2248,
+ chm: 2249,
+ chn: 2250,
+ cho: 2251,
+ chp: 2252,
+ chq: 2253,
+ chr: 2254,
+ chs: 2255,
+ cht: 2256,
+ chu: 2257,
+ chv: 2258,
+ chw: 2259,
+ chx: 2260,
+ chy: 2261,
+ ciz: 2262,
+ cia: 2263,
+ cib: 2264,
+ cic: 2265,
+ cid: 2266,
+ cie: 2267,
+ cif: 2268,
+ cig: 2269,
+ cih: 2270,
+ cii: 2271,
+ cij: 2272,
+ cik: 2273,
+ cil: 2274,
+ cim: 2275,
+ cin: 2276,
+ cio: 2277,
+ cip: 2278,
+ ciq: 2279,
+ cir: 2280,
+ cis: 2281,
+ cit: 2282,
+ ciu: 2283,
+ civ: 2284,
+ ciw: 2285,
+ cix: 2286,
+ ciy: 2287,
+ cjz: 2288,
+ cja: 2289,
+ cjb: 2290,
+ cjc: 2291,
+ cjd: 2292,
+ cje: 2293,
+ cjf: 2294,
+ cjg: 2295,
+ cjh: 2296,
+ cji: 2297,
+ cjj: 2298,
+ cjk: 2299,
+ cjl: 2300,
+ cjm: 2301,
+ cjn: 2302,
+ cjo: 2303,
+ cjp: 2304,
+ cjq: 2305,
+ cjr: 2306,
+ cjs: 2307,
+ cjt: 2308,
+ cju: 2309,
+ cjv: 2310,
+ cjw: 2311,
+ cjx: 2312,
+ cjy: 2313,
+ ckz: 2314,
+ cka: 2315,
+ ckb: 2316,
+ ckc: 2317,
+ ckd: 2318,
+ cke: 2319,
+ ckf: 2320,
+ ckg: 2321,
+ ckh: 2322,
+ cki: 2323,
+ ckj: 2324,
+ ckk: 2325,
+ ckl: 2326,
+ ckm: 2327,
+ ckn: 2328,
+ cko: 2329,
+ ckp: 2330,
+ ckq: 2331,
+ ckr: 2332,
+ cks: 2333,
+ ckt: 2334,
+ cku: 2335,
+ ckv: 2336,
+ ckw: 2337,
+ ckx: 2338,
+ cky: 2339,
+ clz: 2340,
+ cla: 2341,
+ clb: 2342,
+ clc: 2343,
+ cld: 2344,
+ cle: 2345,
+ clf: 2346,
+ clg: 2347,
+ clh: 2348,
+ cli: 2349,
+ clj: 2350,
+ clk: 2351,
+ cll: 2352,
+ clm: 2353,
+ cln: 2354,
+ clo: 2355,
+ clp: 2356,
+ clq: 2357,
+ clr: 2358,
+ cls: 2359,
+ clt: 2360,
+ clu: 2361,
+ clv: 2362,
+ clw: 2363,
+ clx: 2364,
+ cly: 2365,
+ cmz: 2366,
+ cma: 2367,
+ cmb: 2368,
+ cmc: 2369,
+ cmd: 2370,
+ cme: 2371,
+ cmf: 2372,
+ cmg: 2373,
+ cmh: 2374,
+ cmi: 2375,
+ cmj: 2376,
+ cmk: 2377,
+ cml: 2378,
+ cmm: 2379,
+ cmn: 2380,
+ cmo: 2381,
+ cmp: 2382,
+ cmq: 2383,
+ cmr: 2384,
+ cms: 2385,
+ cmt: 2386,
+ cmu: 2387,
+ cmv: 2388,
+ cmw: 2389,
+ cmx: 2390,
+ cmy: 2391,
+ cnz: 2392,
+ cna: 2393,
+ cnb: 2394,
+ cnc: 2395,
+ cnd: 2396,
+ cne: 2397,
+ cnf: 2398,
+ cng: 2399,
+ cnh: 2400,
+ cni: 2401,
+ cnj: 2402,
+ cnk: 2403,
+ cnl: 2404,
+ cnm: 2405,
+ cnn: 2406,
+ cno: 2407,
+ cnp: 2408,
+ cnq: 2409,
+ cnr: 2410,
+ cns: 2411,
+ cnt: 2412,
+ cnu: 2413,
+ cnv: 2414,
+ cnw: 2415,
+ cnx: 2416,
+ cny: 2417,
+ coz: 2418,
+ coa: 2419,
+ cob: 2420,
+ coc: 2421,
+ cod: 2422,
+ coe: 2423,
+ cof: 2424,
+ cog: 2425,
+ coh: 2426,
+ coi: 2427,
+ coj: 2428,
+ cok: 2429,
+ col: 2430,
+ com: 2431,
+ con: 2432,
+ coo: 2433,
+ cop: 2434,
+ coq: 2435,
+ cor: 2436,
+ cos: 2437,
+ cot: 2438,
+ cou: 2439,
+ cov: 2440,
+ cow: 2441,
+ cox: 2442,
+ coy: 2443,
+ cpz: 2444,
+ cpa: 2445,
+ cpb: 2446,
+ cpc: 2447,
+ cpd: 2448,
+ cpe: 2449,
+ cpf: 2450,
+ cpg: 2451,
+ cph: 2452,
+ cpi: 2453,
+ cpj: 2454,
+ cpk: 2455,
+ cpl: 2456,
+ cpm: 2457,
+ cpn: 2458,
+ cpo: 2459,
+ cpp: 2460,
+ cpq: 2461,
+ cpr: 2462,
+ cps: 2463,
+ cpt: 2464,
+ cpu: 2465,
+ cpv: 2466,
+ cpw: 2467,
+ cpx: 2468,
+ cpy: 2469,
+ cqz: 2470,
+ cqa: 2471,
+ cqb: 2472,
+ cqc: 2473,
+ cqd: 2474,
+ cqe: 2475,
+ cqf: 2476,
+ cqg: 2477,
+ cqh: 2478,
+ cqi: 2479,
+ cqj: 2480,
+ cqk: 2481,
+ cql: 2482,
+ cqm: 2483,
+ cqn: 2484,
+ cqo: 2485,
+ cqp: 2486,
+ cqq: 2487,
+ cqr: 2488,
+ cqs: 2489,
+ cqt: 2490,
+ cqu: 2491,
+ cqv: 2492,
+ cqw: 2493,
+ cqx: 2494,
+ cqy: 2495,
+ crz: 2496,
+ cra: 2497,
+ crb: 2498,
+ crc: 2499,
+ crd: 2500,
+ cre: 2501,
+ crf: 2502,
+ crg: 2503,
+ crh: 2504,
+ cri: 2505,
+ crj: 2506,
+ crk: 2507,
+ crl: 2508,
+ crm: 2509,
+ crn: 2510,
+ cro: 2511,
+ crp: 2512,
+ crq: 2513,
+ crr: 2514,
+ crs: 2515,
+ crt: 2516,
+ cru: 2517,
+ crv: 2518,
+ crw: 2519,
+ crx: 2520,
+ cry: 2521,
+ csz: 2522,
+ csa: 2523,
+ csb: 2524,
+ csc: 2525,
+ csd: 2526,
+ cse: 2527,
+ csf: 2528,
+ csg: 2529,
+ csh: 2530,
+ csi: 2531,
+ csj: 2532,
+ csk: 2533,
+ csl: 2534,
+ csm: 2535,
+ csn: 2536,
+ cso: 2537,
+ csp: 2538,
+ csq: 2539,
+ csr: 2540,
+ css: 2541,
+ cst: 2542,
+ csu: 2543,
+ csv: 2544,
+ csw: 2545,
+ csx: 2546,
+ csy: 2547,
+ ctz: 2548,
+ cta: 2549,
+ ctb: 2550,
+ ctc: 2551,
+ ctd: 2552,
+ cte: 2553,
+ ctf: 2554,
+ ctg: 2555,
+ cth: 2556,
+ cti: 2557,
+ ctj: 2558,
+ ctk: 2559,
+ ctl: 2560,
+ ctm: 2561,
+ ctn: 2562,
+ cto: 2563,
+ ctp: 2564,
+ ctq: 2565,
+ ctr: 2566,
+ cts: 2567,
+ ctt: 2568,
+ ctu: 2569,
+ ctv: 2570,
+ ctw: 2571,
+ ctx: 2572,
+ cty: 2573,
+ cuz: 2574,
+ cua: 2575,
+ cub: 2576,
+ cuc: 2577,
+ cud: 2578,
+ cue: 2579,
+ cuf: 2580,
+ cug: 2581,
+ cuh: 2582,
+ cui: 2583,
+ cuj: 2584,
+ cuk: 2585,
+ cul: 2586,
+ cum: 2587,
+ cun: 2588,
+ cuo: 2589,
+ cup: 2590,
+ cuq: 2591,
+ cur: 2592,
+ cus: 2593,
+ cut: 2594,
+ cuu: 2595,
+ cuv: 2596,
+ cuw: 2597,
+ cux: 2598,
+ cuy: 2599,
+ cvz: 2600,
+ cva: 2601,
+ cvb: 2602,
+ cvc: 2603,
+ cvd: 2604,
+ cve: 2605,
+ cvf: 2606,
+ cvg: 2607,
+ cvh: 2608,
+ cvi: 2609,
+ cvj: 2610,
+ cvk: 2611,
+ cvl: 2612,
+ cvm: 2613,
+ cvn: 2614,
+ cvo: 2615,
+ cvp: 2616,
+ cvq: 2617,
+ cvr: 2618,
+ cvs: 2619,
+ cvt: 2620,
+ cvu: 2621,
+ cvv: 2622,
+ cvw: 2623,
+ cvx: 2624,
+ cvy: 2625,
+ cwz: 2626,
+ cwa: 2627,
+ cwb: 2628,
+ cwc: 2629,
+ cwd: 2630,
+ cwe: 2631,
+ cwf: 2632,
+ cwg: 2633,
+ cwh: 2634,
+ cwi: 2635,
+ cwj: 2636,
+ cwk: 2637,
+ cwl: 2638,
+ cwm: 2639,
+ cwn: 2640,
+ cwo: 2641,
+ cwp: 2642,
+ cwq: 2643,
+ cwr: 2644,
+ cws: 2645,
+ cwt: 2646,
+ cwu: 2647,
+ cwv: 2648,
+ cww: 2649,
+ cwx: 2650,
+ cwy: 2651,
+ cxz: 2652,
+ cxa: 2653,
+ cxb: 2654,
+ cxc: 2655,
+ cxd: 2656,
+ cxe: 2657,
+ cxf: 2658,
+ cxg: 2659,
+ cxh: 2660,
+ cxi: 2661,
+ cxj: 2662,
+ cxk: 2663,
+ cxl: 2664,
+ cxm: 2665,
+ cxn: 2666,
+ cxo: 2667,
+ cxp: 2668,
+ cxq: 2669,
+ cxr: 2670,
+ cxs: 2671,
+ cxt: 2672,
+ cxu: 2673,
+ cxv: 2674,
+ cxw: 2675,
+ cxx: 2676,
+ cxy: 2677,
+ cyz: 2678,
+ cya: 2679,
+ cyb: 2680,
+ cyc: 2681,
+ cyd: 2682,
+ cye: 2683,
+ cyf: 2684,
+ cyg: 2685,
+ cyh: 2686,
+ cyi: 2687,
+ cyj: 2688,
+ cyk: 2689,
+ cyl: 2690,
+ cym: 2691,
+ cyn: 2692,
+ cyo: 2693,
+ cyp: 2694,
+ cyq: 2695,
+ cyr: 2696,
+ cys: 2697,
+ cyt: 2698,
+ cyu: 2699,
+ cyv: 2700,
+ cyw: 2701,
+ cyx: 2702,
+ cyy: 2703,
+ dzz: 2704,
+ dza: 2705,
+ dzb: 2706,
+ dzc: 2707,
+ dzd: 2708,
+ dze: 2709,
+ dzf: 2710,
+ dzg: 2711,
+ dzh: 2712,
+ dzi: 2713,
+ dzj: 2714,
+ dzk: 2715,
+ dzl: 2716,
+ dzm: 2717,
+ dzn: 2718,
+ dzo: 2719,
+ dzp: 2720,
+ dzq: 2721,
+ dzr: 2722,
+ dzs: 2723,
+ dzt: 2724,
+ dzu: 2725,
+ dzv: 2726,
+ dzw: 2727,
+ dzx: 2728,
+ dzy: 2729,
+ daz: 2730,
+ daa: 2731,
+ dab: 2732,
+ dac: 2733,
+ dad: 2734,
+ dae: 2735,
+ daf: 2736,
+ dag: 2737,
+ dah: 2738,
+ dai: 2739,
+ daj: 2740,
+ dak: 2741,
+ dal: 2742,
+ dam: 2743,
+ dan: 2744,
+ dao: 2745,
+ dap: 2746,
+ daq: 2747,
+ dar: 2748,
+ das: 2749,
+ dat: 2750,
+ dau: 2751,
+ dav: 2752,
+ daw: 2753,
+ dax: 2754,
+ day: 2755,
+ dbz: 2756,
+ dba: 2757,
+ dbb: 2758,
+ dbc: 2759,
+ dbd: 2760,
+ dbe: 2761,
+ dbf: 2762,
+ dbg: 2763,
+ dbh: 2764,
+ dbi: 2765,
+ dbj: 2766,
+ dbk: 2767,
+ dbl: 2768,
+ dbm: 2769,
+ dbn: 2770,
+ dbo: 2771,
+ dbp: 2772,
+ dbq: 2773,
+ dbr: 2774,
+ dbs: 2775,
+ dbt: 2776,
+ dbu: 2777,
+ dbv: 2778,
+ dbw: 2779,
+ dbx: 2780,
+ dby: 2781,
+ dcz: 2782,
+ dca: 2783,
+ dcb: 2784,
+ dcc: 2785,
+ dcd: 2786,
+ dce: 2787,
+ dcf: 2788,
+ dcg: 2789,
+ dch: 2790,
+ dci: 2791,
+ dcj: 2792,
+ dck: 2793,
+ dcl: 2794,
+ dcm: 2795,
+ dcn: 2796,
+ dco: 2797,
+ dcp: 2798,
+ dcq: 2799,
+ dcr: 2800,
+ dcs: 2801,
+ dct: 2802,
+ dcu: 2803,
+ dcv: 2804,
+ dcw: 2805,
+ dcx: 2806,
+ dcy: 2807,
+ ddz: 2808,
+ dda: 2809,
+ ddb: 2810,
+ ddc: 2811,
+ ddd: 2812,
+ dde: 2813,
+ ddf: 2814,
+ ddg: 2815,
+ ddh: 2816,
+ ddi: 2817,
+ ddj: 2818,
+ ddk: 2819,
+ ddl: 2820,
+ ddm: 2821,
+ ddn: 2822,
+ ddo: 2823,
+ ddp: 2824,
+ ddq: 2825,
+ ddr: 2826,
+ dds: 2827,
+ ddt: 2828,
+ ddu: 2829,
+ ddv: 2830,
+ ddw: 2831,
+ ddx: 2832,
+ ddy: 2833,
+ dez: 2834,
+ dea: 2835,
+ deb: 2836,
+ dec: 2837,
+ ded: 2838,
+ dee: 2839,
+ def: 2840,
+ deg: 2841,
+ deh: 2842,
+ dei: 2843,
+ dej: 2844,
+ dek: 2845,
+ del: 2846,
+ dem: 2847,
+ den: 2848,
+ deo: 2849,
+ dep: 2850,
+ deq: 2851,
+ der: 2852,
+ des: 2853,
+ det: 2854,
+ deu: 2855,
+ dev: 2856,
+ dew: 2857,
+ dex: 2858,
+ dey: 2859,
+ dfz: 2860,
+ dfa: 2861,
+ dfb: 2862,
+ dfc: 2863,
+ dfd: 2864,
+ dfe: 2865,
+ dff: 2866,
+ dfg: 2867,
+ dfh: 2868,
+ dfi: 2869,
+ dfj: 2870,
+ dfk: 2871,
+ dfl: 2872,
+ dfm: 2873,
+ dfn: 2874,
+ dfo: 2875,
+ dfp: 2876,
+ dfq: 2877,
+ dfr: 2878,
+ dfs: 2879,
+ dft: 2880,
+ dfu: 2881,
+ dfv: 2882,
+ dfw: 2883,
+ dfx: 2884,
+ dfy: 2885,
+ dgz: 2886,
+ dga: 2887,
+ dgb: 2888,
+ dgc: 2889,
+ dgd: 2890,
+ dge: 2891,
+ dgf: 2892,
+ dgg: 2893,
+ dgh: 2894,
+ dgi: 2895,
+ dgj: 2896,
+ dgk: 2897,
+ dgl: 2898,
+ dgm: 2899,
+ dgn: 2900,
+ dgo: 2901,
+ dgp: 2902,
+ dgq: 2903,
+ dgr: 2904,
+ dgs: 2905,
+ dgt: 2906,
+ dgu: 2907,
+ dgv: 2908,
+ dgw: 2909,
+ dgx: 2910,
+ dgy: 2911,
+ dhz: 2912,
+ dha: 2913,
+ dhb: 2914,
+ dhc: 2915,
+ dhd: 2916,
+ dhe: 2917,
+ dhf: 2918,
+ dhg: 2919,
+ dhh: 2920,
+ dhi: 2921,
+ dhj: 2922,
+ dhk: 2923,
+ dhl: 2924,
+ dhm: 2925,
+ dhn: 2926,
+ dho: 2927,
+ dhp: 2928,
+ dhq: 2929,
+ dhr: 2930,
+ dhs: 2931,
+ dht: 2932,
+ dhu: 2933,
+ dhv: 2934,
+ dhw: 2935,
+ dhx: 2936,
+ dhy: 2937,
+ diz: 2938,
+ dia: 2939,
+ dib: 2940,
+ dic: 2941,
+ did: 2942,
+ die: 2943,
+ dif: 2944,
+ dig: 2945,
+ dih: 2946,
+ dii: 2947,
+ dij: 2948,
+ dik: 2949,
+ dil: 2950,
+ dim: 2951,
+ din: 2952,
+ dio: 2953,
+ dip: 2954,
+ diq: 2955,
+ dir: 2956,
+ dis: 2957,
+ dit: 2958,
+ diu: 2959,
+ div: 2960,
+ diw: 2961,
+ dix: 2962,
+ diy: 2963,
+ djz: 2964,
+ dja: 2965,
+ djb: 2966,
+ djc: 2967,
+ djd: 2968,
+ dje: 2969,
+ djf: 2970,
+ djg: 2971,
+ djh: 2972,
+ dji: 2973,
+ djj: 2974,
+ djk: 2975,
+ djl: 2976,
+ djm: 2977,
+ djn: 2978,
+ djo: 2979,
+ djp: 2980,
+ djq: 2981,
+ djr: 2982,
+ djs: 2983,
+ djt: 2984,
+ dju: 2985,
+ djv: 2986,
+ djw: 2987,
+ djx: 2988,
+ djy: 2989,
+ dkz: 2990,
+ dka: 2991,
+ dkb: 2992,
+ dkc: 2993,
+ dkd: 2994,
+ dke: 2995,
+ dkf: 2996,
+ dkg: 2997,
+ dkh: 2998,
+ dki: 2999,
+ dkj: 3000,
+ dkk: 3001,
+ dkl: 3002,
+ dkm: 3003,
+ dkn: 3004,
+ dko: 3005,
+ dkp: 3006,
+ dkq: 3007,
+ dkr: 3008,
+ dks: 3009,
+ dkt: 3010,
+ dku: 3011,
+ dkv: 3012,
+ dkw: 3013,
+ dkx: 3014,
+ dky: 3015,
+ dlz: 3016,
+ dla: 3017,
+ dlb: 3018,
+ dlc: 3019,
+ dld: 3020,
+ dle: 3021,
+ dlf: 3022,
+ dlg: 3023,
+ dlh: 3024,
+ dli: 3025,
+ dlj: 3026,
+ dlk: 3027,
+ dll: 3028,
+ dlm: 3029,
+ dln: 3030,
+ dlo: 3031,
+ dlp: 3032,
+ dlq: 3033,
+ dlr: 3034,
+ dls: 3035,
+ dlt: 3036,
+ dlu: 3037,
+ dlv: 3038,
+ dlw: 3039,
+ dlx: 3040,
+ dly: 3041,
+ dmz: 3042,
+ dma: 3043,
+ dmb: 3044,
+ dmc: 3045,
+ dmd: 3046,
+ dme: 3047,
+ dmf: 3048,
+ dmg: 3049,
+ dmh: 3050,
+ dmi: 3051,
+ dmj: 3052,
+ dmk: 3053,
+ dml: 3054,
+ dmm: 3055,
+ dmn: 3056,
+ dmo: 3057,
+ dmp: 3058,
+ dmq: 3059,
+ dmr: 3060,
+ dms: 3061,
+ dmt: 3062,
+ dmu: 3063,
+ dmv: 3064,
+ dmw: 3065,
+ dmx: 3066,
+ dmy: 3067,
+ dnz: 3068,
+ dna: 3069,
+ dnb: 3070,
+ dnc: 3071,
+ dnd: 3072,
+ dne: 3073,
+ dnf: 3074,
+ dng: 3075,
+ dnh: 3076,
+ dni: 3077,
+ dnj: 3078,
+ dnk: 3079,
+ dnl: 3080,
+ dnm: 3081,
+ dnn: 3082,
+ dno: 3083,
+ dnp: 3084,
+ dnq: 3085,
+ dnr: 3086,
+ dns: 3087,
+ dnt: 3088,
+ dnu: 3089,
+ dnv: 3090,
+ dnw: 3091,
+ dnx: 3092,
+ dny: 3093,
+ doz: 3094,
+ doa: 3095,
+ dob: 3096,
+ doc: 3097,
+ dod: 3098,
+ doe: 3099,
+ dof: 3100,
+ dog: 3101,
+ doh: 3102,
+ doi: 3103,
+ doj: 3104,
+ dok: 3105,
+ dol: 3106,
+ dom: 3107,
+ don: 3108,
+ doo: 3109,
+ dop: 3110,
+ doq: 3111,
+ dor: 3112,
+ dos: 3113,
+ dot: 3114,
+ dou: 3115,
+ dov: 3116,
+ dow: 3117,
+ dox: 3118,
+ doy: 3119,
+ dpz: 3120,
+ dpa: 3121,
+ dpb: 3122,
+ dpc: 3123,
+ dpd: 3124,
+ dpe: 3125,
+ dpf: 3126,
+ dpg: 3127,
+ dph: 3128,
+ dpi: 3129,
+ dpj: 3130,
+ dpk: 3131,
+ dpl: 3132,
+ dpm: 3133,
+ dpn: 3134,
+ dpo: 3135,
+ dpp: 3136,
+ dpq: 3137,
+ dpr: 3138,
+ dps: 3139,
+ dpt: 3140,
+ dpu: 3141,
+ dpv: 3142,
+ dpw: 3143,
+ dpx: 3144,
+ dpy: 3145,
+ dqz: 3146,
+ dqa: 3147,
+ dqb: 3148,
+ dqc: 3149,
+ dqd: 3150,
+ dqe: 3151,
+ dqf: 3152,
+ dqg: 3153,
+ dqh: 3154,
+ dqi: 3155,
+ dqj: 3156,
+ dqk: 3157,
+ dql: 3158,
+ dqm: 3159,
+ dqn: 3160,
+ dqo: 3161,
+ dqp: 3162,
+ dqq: 3163,
+ dqr: 3164,
+ dqs: 3165,
+ dqt: 3166,
+ dqu: 3167,
+ dqv: 3168,
+ dqw: 3169,
+ dqx: 3170,
+ dqy: 3171,
+ drz: 3172,
+ dra: 3173,
+ drb: 3174,
+ drc: 3175,
+ drd: 3176,
+ dre: 3177,
+ drf: 3178,
+ drg: 3179,
+ drh: 3180,
+ dri: 3181,
+ drj: 3182,
+ drk: 3183,
+ drl: 3184,
+ drm: 3185,
+ drn: 3186,
+ dro: 3187,
+ drp: 3188,
+ drq: 3189,
+ drr: 3190,
+ drs: 3191,
+ drt: 3192,
+ dru: 3193,
+ drv: 3194,
+ drw: 3195,
+ drx: 3196,
+ dry: 3197,
+ dsz: 3198,
+ dsa: 3199,
+ dsb: 3200,
+ dsc: 3201,
+ dsd: 3202,
+ dse: 3203,
+ dsf: 3204,
+ dsg: 3205,
+ dsh: 3206,
+ dsi: 3207,
+ dsj: 3208,
+ dsk: 3209,
+ dsl: 3210,
+ dsm: 3211,
+ dsn: 3212,
+ dso: 3213,
+ dsp: 3214,
+ dsq: 3215,
+ dsr: 3216,
+ dss: 3217,
+ dst: 3218,
+ dsu: 3219,
+ dsv: 3220,
+ dsw: 3221,
+ dsx: 3222,
+ dsy: 3223,
+ dtz: 3224,
+ dta: 3225,
+ dtb: 3226,
+ dtc: 3227,
+ dtd: 3228,
+ dte: 3229,
+ dtf: 3230,
+ dtg: 3231,
+ dth: 3232,
+ dti: 3233,
+ dtj: 3234,
+ dtk: 3235,
+ dtl: 3236,
+ dtm: 3237,
+ dtn: 3238,
+ dto: 3239,
+ dtp: 3240,
+ dtq: 3241,
+ dtr: 3242,
+ dts: 3243,
+ dtt: 3244,
+ dtu: 3245,
+ dtv: 3246,
+ dtw: 3247,
+ dtx: 3248,
+ dty: 3249,
+ duz: 3250,
+ dua: 3251,
+ dub: 3252,
+ duc: 3253,
+ dud: 3254,
+ due: 3255,
+ duf: 3256,
+ dug: 3257,
+ duh: 3258,
+ dui: 3259,
+ duj: 3260,
+ duk: 3261,
+ dul: 3262,
+ dum: 3263,
+ dun: 3264,
+ duo: 3265,
+ dup: 3266,
+ duq: 3267,
+ dur: 3268,
+ dus: 3269,
+ dut: 3270,
+ duu: 3271,
+ duv: 3272,
+ duw: 3273,
+ dux: 3274,
+ duy: 3275,
+ dvz: 3276,
+ dva: 3277,
+ dvb: 3278,
+ dvc: 3279,
+ dvd: 3280,
+ dve: 3281,
+ dvf: 3282,
+ dvg: 3283,
+ dvh: 3284,
+ dvi: 3285,
+ dvj: 3286,
+ dvk: 3287,
+ dvl: 3288,
+ dvm: 3289,
+ dvn: 3290,
+ dvo: 3291,
+ dvp: 3292,
+ dvq: 3293,
+ dvr: 3294,
+ dvs: 3295,
+ dvt: 3296,
+ dvu: 3297,
+ dvv: 3298,
+ dvw: 3299,
+ dvx: 3300,
+ dvy: 3301,
+ dwz: 3302,
+ dwa: 3303,
+ dwb: 3304,
+ dwc: 3305,
+ dwd: 3306,
+ dwe: 3307,
+ dwf: 3308,
+ dwg: 3309,
+ dwh: 3310,
+ dwi: 3311,
+ dwj: 3312,
+ dwk: 3313,
+ dwl: 3314,
+ dwm: 3315,
+ dwn: 3316,
+ dwo: 3317,
+ dwp: 3318,
+ dwq: 3319,
+ dwr: 3320,
+ dws: 3321,
+ dwt: 3322,
+ dwu: 3323,
+ dwv: 3324,
+ dww: 3325,
+ dwx: 3326,
+ dwy: 3327,
+ dxz: 3328,
+ dxa: 3329,
+ dxb: 3330,
+ dxc: 3331,
+ dxd: 3332,
+ dxe: 3333,
+ dxf: 3334,
+ dxg: 3335,
+ dxh: 3336,
+ dxi: 3337,
+ dxj: 3338,
+ dxk: 3339,
+ dxl: 3340,
+ dxm: 3341,
+ dxn: 3342,
+ dxo: 3343,
+ dxp: 3344,
+ dxq: 3345,
+ dxr: 3346,
+ dxs: 3347,
+ dxt: 3348,
+ dxu: 3349,
+ dxv: 3350,
+ dxw: 3351,
+ dxx: 3352,
+ dxy: 3353,
+ dyz: 3354,
+ dya: 3355,
+ dyb: 3356,
+ dyc: 3357,
+ dyd: 3358,
+ dye: 3359,
+ dyf: 3360,
+ dyg: 3361,
+ dyh: 3362,
+ dyi: 3363,
+ dyj: 3364,
+ dyk: 3365,
+ dyl: 3366,
+ dym: 3367,
+ dyn: 3368,
+ dyo: 3369,
+ dyp: 3370,
+ dyq: 3371,
+ dyr: 3372,
+ dys: 3373,
+ dyt: 3374,
+ dyu: 3375,
+ dyv: 3376,
+ dyw: 3377,
+ dyx: 3378,
+ dyy: 3379,
+ ezz: 3380,
+ eza: 3381,
+ ezb: 3382,
+ ezc: 3383,
+ ezd: 3384,
+ eze: 3385,
+ ezf: 3386,
+ ezg: 3387,
+ ezh: 3388,
+ ezi: 3389,
+ ezj: 3390,
+ ezk: 3391,
+ ezl: 3392,
+ ezm: 3393,
+ ezn: 3394,
+ ezo: 3395,
+ ezp: 3396,
+ ezq: 3397,
+ ezr: 3398,
+ ezs: 3399,
+ ezt: 3400,
+ ezu: 3401,
+ ezv: 3402,
+ ezw: 3403,
+ ezx: 3404,
+ ezy: 3405,
+ eaz: 3406,
+ eaa: 3407,
+ eab: 3408,
+ eac: 3409,
+ ead: 3410,
+ eae: 3411,
+ eaf: 3412,
+ eag: 3413,
+ eah: 3414,
+ eai: 3415,
+ eaj: 3416,
+ eak: 3417,
+ eal: 3418,
+ eam: 3419,
+ ean: 3420,
+ eao: 3421,
+ eap: 3422,
+ eaq: 3423,
+ ear: 3424,
+ eas: 3425,
+ eat: 3426,
+ eau: 3427,
+ eav: 3428,
+ eaw: 3429,
+ eax: 3430,
+ eay: 3431,
+ ebz: 3432,
+ eba: 3433,
+ ebb: 3434,
+ ebc: 3435,
+ ebd: 3436,
+ ebe: 3437,
+ ebf: 3438,
+ ebg: 3439,
+ ebh: 3440,
+ ebi: 3441,
+ ebj: 3442,
+ ebk: 3443,
+ ebl: 3444,
+ ebm: 3445,
+ ebn: 3446,
+ ebo: 3447,
+ ebp: 3448,
+ ebq: 3449,
+ ebr: 3450,
+ ebs: 3451,
+ ebt: 3452,
+ ebu: 3453,
+ ebv: 3454,
+ ebw: 3455,
+ ebx: 3456,
+ eby: 3457,
+ ecz: 3458,
+ eca: 3459,
+ ecb: 3460,
+ ecc: 3461,
+ ecd: 3462,
+ ece: 3463,
+ ecf: 3464,
+ ecg: 3465,
+ ech: 3466,
+ eci: 3467,
+ ecj: 3468,
+ eck: 3469,
+ ecl: 3470,
+ ecm: 3471,
+ ecn: 3472,
+ eco: 3473,
+ ecp: 3474,
+ ecq: 3475,
+ ecr: 3476,
+ ecs: 3477,
+ ect: 3478,
+ ecu: 3479,
+ ecv: 3480,
+ ecw: 3481,
+ ecx: 3482,
+ ecy: 3483,
+ edz: 3484,
+ eda: 3485,
+ edb: 3486,
+ edc: 3487,
+ edd: 3488,
+ ede: 3489,
+ edf: 3490,
+ edg: 3491,
+ edh: 3492,
+ edi: 3493,
+ edj: 3494,
+ edk: 3495,
+ edl: 3496,
+ edm: 3497,
+ edn: 3498,
+ edo: 3499,
+ edp: 3500,
+ edq: 3501,
+ edr: 3502,
+ eds: 3503,
+ edt: 3504,
+ edu: 3505,
+ edv: 3506,
+ edw: 3507,
+ edx: 3508,
+ edy: 3509,
+ eez: 3510,
+ eea: 3511,
+ eeb: 3512,
+ eec: 3513,
+ eed: 3514,
+ eee: 3515,
+ eef: 3516,
+ eeg: 3517,
+ eeh: 3518,
+ eei: 3519,
+ eej: 3520,
+ eek: 3521,
+ eel: 3522,
+ eem: 3523,
+ een: 3524,
+ eeo: 3525,
+ eep: 3526,
+ eeq: 3527,
+ eer: 3528,
+ ees: 3529,
+ eet: 3530,
+ eeu: 3531,
+ eev: 3532,
+ eew: 3533,
+ eex: 3534,
+ eey: 3535,
+ efz: 3536,
+ efa: 3537,
+ efb: 3538,
+ efc: 3539,
+ efd: 3540,
+ efe: 3541,
+ eff: 3542,
+ efg: 3543,
+ efh: 3544,
+ efi: 3545,
+ efj: 3546,
+ efk: 3547,
+ efl: 3548,
+ efm: 3549,
+ efn: 3550,
+ efo: 3551,
+ efp: 3552,
+ efq: 3553,
+ efr: 3554,
+ efs: 3555,
+ eft: 3556,
+ efu: 3557,
+ efv: 3558,
+ efw: 3559,
+ efx: 3560,
+ efy: 3561,
+ egz: 3562,
+ ega: 3563,
+ egb: 3564,
+ egc: 3565,
+ egd: 3566,
+ ege: 3567,
+ egf: 3568,
+ egg: 3569,
+ egh: 3570,
+ egi: 3571,
+ egj: 3572,
+ egk: 3573,
+ egl: 3574,
+ egm: 3575,
+ egn: 3576,
+ ego: 3577,
+ egp: 3578,
+ egq: 3579,
+ egr: 3580,
+ egs: 3581,
+ egt: 3582,
+ egu: 3583,
+ egv: 3584,
+ egw: 3585,
+ egx: 3586,
+ egy: 3587,
+ ehz: 3588,
+ eha: 3589,
+ ehb: 3590,
+ ehc: 3591,
+ ehd: 3592,
+ ehe: 3593,
+ ehf: 3594,
+ ehg: 3595,
+ ehh: 3596,
+ ehi: 3597,
+ ehj: 3598,
+ ehk: 3599,
+ ehl: 3600,
+ ehm: 3601,
+ ehn: 3602,
+ eho: 3603,
+ ehp: 3604,
+ ehq: 3605,
+ ehr: 3606,
+ ehs: 3607,
+ eht: 3608,
+ ehu: 3609,
+ ehv: 3610,
+ ehw: 3611,
+ ehx: 3612,
+ ehy: 3613,
+ eiz: 3614,
+ eia: 3615,
+ eib: 3616,
+ eic: 3617,
+ eid: 3618,
+ eie: 3619,
+ eif: 3620,
+ eig: 3621,
+ eih: 3622,
+ eii: 3623,
+ eij: 3624,
+ eik: 3625,
+ eil: 3626,
+ eim: 3627,
+ ein: 3628,
+ eio: 3629,
+ eip: 3630,
+ eiq: 3631,
+ eir: 3632,
+ eis: 3633,
+ eit: 3634,
+ eiu: 3635,
+ eiv: 3636,
+ eiw: 3637,
+ eix: 3638,
+ eiy: 3639,
+ ejz: 3640,
+ eja: 3641,
+ ejb: 3642,
+ ejc: 3643,
+ ejd: 3644,
+ eje: 3645,
+ ejf: 3646,
+ ejg: 3647,
+ ejh: 3648,
+ eji: 3649,
+ ejj: 3650,
+ ejk: 3651,
+ ejl: 3652,
+ ejm: 3653,
+ ejn: 3654,
+ ejo: 3655,
+ ejp: 3656,
+ ejq: 3657,
+ ejr: 3658,
+ ejs: 3659,
+ ejt: 3660,
+ eju: 3661,
+ ejv: 3662,
+ ejw: 3663,
+ ejx: 3664,
+ ejy: 3665,
+ ekz: 3666,
+ eka: 3667,
+ ekb: 3668,
+ ekc: 3669,
+ ekd: 3670,
+ eke: 3671,
+ ekf: 3672,
+ ekg: 3673,
+ ekh: 3674,
+ eki: 3675,
+ ekj: 3676,
+ ekk: 3677,
+ ekl: 3678,
+ ekm: 3679,
+ ekn: 3680,
+ eko: 3681,
+ ekp: 3682,
+ ekq: 3683,
+ ekr: 3684,
+ eks: 3685,
+ ekt: 3686,
+ eku: 3687,
+ ekv: 3688,
+ ekw: 3689,
+ ekx: 3690,
+ eky: 3691,
+ elz: 3692,
+ ela: 3693,
+ elb: 3694,
+ elc: 3695,
+ eld: 3696,
+ ele: 3697,
+ elf: 3698,
+ elg: 3699,
+ elh: 3700,
+ eli: 3701,
+ elj: 3702,
+ elk: 3703,
+ ell: 3704,
+ elm: 3705,
+ eln: 3706,
+ elo: 3707,
+ elp: 3708,
+ elq: 3709,
+ elr: 3710,
+ els: 3711,
+ elt: 3712,
+ elu: 3713,
+ elv: 3714,
+ elw: 3715,
+ elx: 3716,
+ ely: 3717,
+ emz: 3718,
+ ema: 3719,
+ emb: 3720,
+ emc: 3721,
+ emd: 3722,
+ eme: 3723,
+ emf: 3724,
+ emg: 3725,
+ emh: 3726,
+ emi: 3727,
+ emj: 3728,
+ emk: 3729,
+ eml: 3730,
+ emm: 3731,
+ emn: 3732,
+ emo: 3733,
+ emp: 3734,
+ emq: 3735,
+ emr: 3736,
+ ems: 3737,
+ emt: 3738,
+ emu: 3739,
+ emv: 3740,
+ emw: 3741,
+ emx: 3742,
+ emy: 3743,
+ enz: 3744,
+ ena: 3745,
+ enb: 3746,
+ enc: 3747,
+ end: 3748,
+ ene: 3749,
+ enf: 3750,
+ eng: 3751,
+ enh: 3752,
+ eni: 3753,
+ enj: 3754,
+ enk: 3755,
+ enl: 3756,
+ enm: 3757,
+ enn: 3758,
+ eno: 3759,
+ enp: 3760,
+ enq: 3761,
+ enr: 3762,
+ ens: 3763,
+ ent: 3764,
+ enu: 3765,
+ env: 3766,
+ enw: 3767,
+ enx: 3768,
+ eny: 3769,
+ eoz: 3770,
+ eoa: 3771,
+ eob: 3772,
+ eoc: 3773,
+ eod: 3774,
+ eoe: 3775,
+ eof: 3776,
+ eog: 3777,
+ eoh: 3778,
+ eoi: 3779,
+ eoj: 3780,
+ eok: 3781,
+ eol: 3782,
+ eom: 3783,
+ eon: 3784,
+ eoo: 3785,
+ eop: 3786,
+ eoq: 3787,
+ eor: 3788,
+ eos: 3789,
+ eot: 3790,
+ eou: 3791,
+ eov: 3792,
+ eow: 3793,
+ eox: 3794,
+ eoy: 3795,
+ epz: 3796,
+ epa: 3797,
+ epb: 3798,
+ epc: 3799,
+ epd: 3800,
+ epe: 3801,
+ epf: 3802,
+ epg: 3803,
+ eph: 3804,
+ epi: 3805,
+ epj: 3806,
+ epk: 3807,
+ epl: 3808,
+ epm: 3809,
+ epn: 3810,
+ epo: 3811,
+ epp: 3812,
+ epq: 3813,
+ epr: 3814,
+ eps: 3815,
+ ept: 3816,
+ epu: 3817,
+ epv: 3818,
+ epw: 3819,
+ epx: 3820,
+ epy: 3821,
+ eqz: 3822,
+ eqa: 3823,
+ eqb: 3824,
+ eqc: 3825,
+ eqd: 3826,
+ eqe: 3827,
+ eqf: 3828,
+ eqg: 3829,
+ eqh: 3830,
+ eqi: 3831,
+ eqj: 3832,
+ eqk: 3833,
+ eql: 3834,
+ eqm: 3835,
+ eqn: 3836,
+ eqo: 3837,
+ eqp: 3838,
+ eqq: 3839,
+ eqr: 3840,
+ eqs: 3841,
+ eqt: 3842,
+ equ: 3843,
+ eqv: 3844,
+ eqw: 3845,
+ eqx: 3846,
+ eqy: 3847,
+ erz: 3848,
+ era: 3849,
+ erb: 3850,
+ erc: 3851,
+ erd: 3852,
+ ere: 3853,
+ erf: 3854,
+ erg: 3855,
+ erh: 3856,
+ eri: 3857,
+ erj: 3858,
+ erk: 3859,
+ erl: 3860,
+ erm: 3861,
+ ern: 3862,
+ ero: 3863,
+ erp: 3864,
+ erq: 3865,
+ err: 3866,
+ ers: 3867,
+ ert: 3868,
+ eru: 3869,
+ erv: 3870,
+ erw: 3871,
+ erx: 3872,
+ ery: 3873,
+ esz: 3874,
+ esa: 3875,
+ esb: 3876,
+ esc: 3877,
+ esd: 3878,
+ ese: 3879,
+ esf: 3880,
+ esg: 3881,
+ esh: 3882,
+ esi: 3883,
+ esj: 3884,
+ esk: 3885,
+ esl: 3886,
+ esm: 3887,
+ esn: 3888,
+ eso: 3889,
+ esp: 3890,
+ esq: 3891,
+ esr: 3892,
+ ess: 3893,
+ est: 3894,
+ esu: 3895,
+ esv: 3896,
+ esw: 3897,
+ esx: 3898,
+ esy: 3899,
+ etz: 3900,
+ eta: 3901,
+ etb: 3902,
+ etc: 3903,
+ etd: 3904,
+ ete: 3905,
+ etf: 3906,
+ etg: 3907,
+ eth: 3908,
+ eti: 3909,
+ etj: 3910,
+ etk: 3911,
+ etl: 3912,
+ etm: 3913,
+ etn: 3914,
+ eto: 3915,
+ etp: 3916,
+ etq: 3917,
+ etr: 3918,
+ ets: 3919,
+ ett: 3920,
+ etu: 3921,
+ etv: 3922,
+ etw: 3923,
+ etx: 3924,
+ ety: 3925,
+ euz: 3926,
+ eua: 3927,
+ eub: 3928,
+ euc: 3929,
+ eud: 3930,
+ eue: 3931,
+ euf: 3932,
+ eug: 3933,
+ euh: 3934,
+ eui: 3935,
+ euj: 3936,
+ euk: 3937,
+ eul: 3938,
+ eum: 3939,
+ eun: 3940,
+ euo: 3941,
+ eup: 3942,
+ euq: 3943,
+ eur: 3944,
+ eus: 3945,
+ eut: 3946,
+ euu: 3947,
+ euv: 3948,
+ euw: 3949,
+ eux: 3950,
+ euy: 3951,
+ evz: 3952,
+ eva: 3953,
+ evb: 3954,
+ evc: 3955,
+ evd: 3956,
+ eve: 3957,
+ evf: 3958,
+ evg: 3959,
+ evh: 3960,
+ evi: 3961,
+ evj: 3962,
+ evk: 3963,
+ evl: 3964,
+ evm: 3965,
+ evn: 3966,
+ evo: 3967,
+ evp: 3968,
+ evq: 3969,
+ evr: 3970,
+ evs: 3971,
+ evt: 3972,
+ evu: 3973,
+ evv: 3974,
+ evw: 3975,
+ evx: 3976,
+ evy: 3977,
+ ewz: 3978,
+ ewa: 3979,
+ ewb: 3980,
+ ewc: 3981,
+ ewd: 3982,
+ ewe: 3983,
+ ewf: 3984,
+ ewg: 3985,
+ ewh: 3986,
+ ewi: 3987,
+ ewj: 3988,
+ ewk: 3989,
+ ewl: 3990,
+ ewm: 3991,
+ ewn: 3992,
+ ewo: 3993,
+ ewp: 3994,
+ ewq: 3995,
+ ewr: 3996,
+ ews: 3997,
+ ewt: 3998,
+ ewu: 3999,
+ ewv: 4000,
+ eww: 4001,
+ ewx: 4002,
+ ewy: 4003,
+ exz: 4004,
+ exa: 4005,
+ exb: 4006,
+ exc: 4007,
+ exd: 4008,
+ exe: 4009,
+ exf: 4010,
+ exg: 4011,
+ exh: 4012,
+ exi: 4013,
+ exj: 4014,
+ exk: 4015,
+ exl: 4016,
+ exm: 4017,
+ exn: 4018,
+ exo: 4019,
+ exp: 4020,
+ exq: 4021,
+ exr: 4022,
+ exs: 4023,
+ ext: 4024,
+ exu: 4025,
+ exv: 4026,
+ exw: 4027,
+ exx: 4028,
+ exy: 4029,
+ eyz: 4030,
+ eya: 4031,
+ eyb: 4032,
+ eyc: 4033,
+ eyd: 4034,
+ eye: 4035,
+ eyf: 4036,
+ eyg: 4037,
+ eyh: 4038,
+ eyi: 4039,
+ eyj: 4040,
+ eyk: 4041,
+ eyl: 4042,
+ eym: 4043,
+ eyn: 4044,
+ eyo: 4045,
+ eyp: 4046,
+ eyq: 4047,
+ eyr: 4048,
+ eys: 4049,
+ eyt: 4050,
+ eyu: 4051,
+ eyv: 4052,
+ eyw: 4053,
+ eyx: 4054,
+ eyy: 4055,
+ fzz: 4056,
+ fza: 4057,
+ fzb: 4058,
+ fzc: 4059,
+ fzd: 4060,
+ fze: 4061,
+ fzf: 4062,
+ fzg: 4063,
+ fzh: 4064,
+ fzi: 4065,
+ fzj: 4066,
+ fzk: 4067,
+ fzl: 4068,
+ fzm: 4069,
+ fzn: 4070,
+ fzo: 4071,
+ fzp: 4072,
+ fzq: 4073,
+ fzr: 4074,
+ fzs: 4075,
+ fzt: 4076,
+ fzu: 4077,
+ fzv: 4078,
+ fzw: 4079,
+ fzx: 4080,
+ fzy: 4081,
+ faz: 4082,
+ faa: 4083,
+ fab: 4084,
+ fac: 4085,
+ fad: 4086,
+ fae: 4087,
+ faf: 4088,
+ fag: 4089,
+ fah: 4090,
+ fai: 4091,
+ faj: 4092,
+ fak: 4093,
+ fal: 4094,
+ fam: 4095,
+ fan: 4096,
+ fao: 4097,
+ fap: 4098,
+ faq: 4099,
+ far: 4100,
+ fas: 4101,
+ fat: 4102,
+ fau: 4103,
+ fav: 4104,
+ faw: 4105,
+ fax: 4106,
+ fay: 4107,
+ fbz: 4108,
+ fba: 4109,
+ fbb: 4110,
+ fbc: 4111,
+ fbd: 4112,
+ fbe: 4113,
+ fbf: 4114,
+ fbg: 4115,
+ fbh: 4116,
+ fbi: 4117,
+ fbj: 4118,
+ fbk: 4119,
+ fbl: 4120,
+ fbm: 4121,
+ fbn: 4122,
+ fbo: 4123,
+ fbp: 4124,
+ fbq: 4125,
+ fbr: 4126,
+ fbs: 4127,
+ fbt: 4128,
+ fbu: 4129,
+ fbv: 4130,
+ fbw: 4131,
+ fbx: 4132,
+ fby: 4133,
+ fcz: 4134,
+ fca: 4135,
+ fcb: 4136,
+ fcc: 4137,
+ fcd: 4138,
+ fce: 4139,
+ fcf: 4140,
+ fcg: 4141,
+ fch: 4142,
+ fci: 4143,
+ fcj: 4144,
+ fck: 4145,
+ fcl: 4146,
+ fcm: 4147,
+ fcn: 4148,
+ fco: 4149,
+ fcp: 4150,
+ fcq: 4151,
+ fcr: 4152,
+ fcs: 4153,
+ fct: 4154,
+ fcu: 4155,
+ fcv: 4156,
+ fcw: 4157,
+ fcx: 4158,
+ fcy: 4159,
+ fdz: 4160,
+ fda: 4161,
+ fdb: 4162,
+ fdc: 4163,
+ fdd: 4164,
+ fde: 4165,
+ fdf: 4166,
+ fdg: 4167,
+ fdh: 4168,
+ fdi: 4169,
+ fdj: 4170,
+ fdk: 4171,
+ fdl: 4172,
+ fdm: 4173,
+ fdn: 4174,
+ fdo: 4175,
+ fdp: 4176,
+ fdq: 4177,
+ fdr: 4178,
+ fds: 4179,
+ fdt: 4180,
+ fdu: 4181,
+ fdv: 4182,
+ fdw: 4183,
+ fdx: 4184,
+ fdy: 4185,
+ fez: 4186,
+ fea: 4187,
+ feb: 4188,
+ fec: 4189,
+ fed: 4190,
+ fee: 4191,
+ fef: 4192,
+ feg: 4193,
+ feh: 4194,
+ fei: 4195,
+ fej: 4196,
+ fek: 4197,
+ fel: 4198,
+ fem: 4199,
+ fen: 4200,
+ feo: 4201,
+ fep: 4202,
+ feq: 4203,
+ fer: 4204,
+ fes: 4205,
+ fet: 4206,
+ feu: 4207,
+ fev: 4208,
+ few: 4209,
+ fex: 4210,
+ fey: 4211,
+ ffz: 4212,
+ ffa: 4213,
+ ffb: 4214,
+ ffc: 4215,
+ ffd: 4216,
+ ffe: 4217,
+ fff: 4218,
+ ffg: 4219,
+ ffh: 4220,
+ ffi: 4221,
+ ffj: 4222,
+ ffk: 4223,
+ ffl: 4224,
+ ffm: 4225,
+ ffn: 4226,
+ ffo: 4227,
+ ffp: 4228,
+ ffq: 4229,
+ ffr: 4230,
+ ffs: 4231,
+ fft: 4232,
+ ffu: 4233,
+ ffv: 4234,
+ ffw: 4235,
+ ffx: 4236,
+ ffy: 4237,
+ fgz: 4238,
+ fga: 4239,
+ fgb: 4240,
+ fgc: 4241,
+ fgd: 4242,
+ fge: 4243,
+ fgf: 4244,
+ fgg: 4245,
+ fgh: 4246,
+ fgi: 4247,
+ fgj: 4248,
+ fgk: 4249,
+ fgl: 4250,
+ fgm: 4251,
+ fgn: 4252,
+ fgo: 4253,
+ fgp: 4254,
+ fgq: 4255,
+ fgr: 4256,
+ fgs: 4257,
+ fgt: 4258,
+ fgu: 4259,
+ fgv: 4260,
+ fgw: 4261,
+ fgx: 4262,
+ fgy: 4263,
+ fhz: 4264,
+ fha: 4265,
+ fhb: 4266,
+ fhc: 4267,
+ fhd: 4268,
+ fhe: 4269,
+ fhf: 4270,
+ fhg: 4271,
+ fhh: 4272,
+ fhi: 4273,
+ fhj: 4274,
+ fhk: 4275,
+ fhl: 4276,
+ fhm: 4277,
+ fhn: 4278,
+ fho: 4279,
+ fhp: 4280,
+ fhq: 4281,
+ fhr: 4282,
+ fhs: 4283,
+ fht: 4284,
+ fhu: 4285,
+ fhv: 4286,
+ fhw: 4287,
+ fhx: 4288,
+ fhy: 4289,
+ fiz: 4290,
+ fia: 4291,
+ fib: 4292,
+ fic: 4293,
+ fid: 4294,
+ fie: 4295,
+ fif: 4296,
+ fig: 4297,
+ fih: 4298,
+ fii: 4299,
+ fij: 4300,
+ fik: 4301,
+ fil: 4302,
+ fim: 4303,
+ fin: 4304,
+ fio: 4305,
+ fip: 4306,
+ fiq: 4307,
+ fir: 4308,
+ fis: 4309,
+ fit: 4310,
+ fiu: 4311,
+ fiv: 4312,
+ fiw: 4313,
+ fix: 4314,
+ fiy: 4315,
+ fjz: 4316,
+ fja: 4317,
+ fjb: 4318,
+ fjc: 4319,
+ fjd: 4320,
+ fje: 4321,
+ fjf: 4322,
+ fjg: 4323,
+ fjh: 4324,
+ fji: 4325,
+ fjj: 4326,
+ fjk: 4327,
+ fjl: 4328,
+ fjm: 4329,
+ fjn: 4330,
+ fjo: 4331,
+ fjp: 4332,
+ fjq: 4333,
+ fjr: 4334,
+ fjs: 4335,
+ fjt: 4336,
+ fju: 4337,
+ fjv: 4338,
+ fjw: 4339,
+ fjx: 4340,
+ fjy: 4341,
+ fkz: 4342,
+ fka: 4343,
+ fkb: 4344,
+ fkc: 4345,
+ fkd: 4346,
+ fke: 4347,
+ fkf: 4348,
+ fkg: 4349,
+ fkh: 4350,
+ fki: 4351,
+ fkj: 4352,
+ fkk: 4353,
+ fkl: 4354,
+ fkm: 4355,
+ fkn: 4356,
+ fko: 4357,
+ fkp: 4358,
+ fkq: 4359,
+ fkr: 4360,
+ fks: 4361,
+ fkt: 4362,
+ fku: 4363,
+ fkv: 4364,
+ fkw: 4365,
+ fkx: 4366,
+ fky: 4367,
+ flz: 4368,
+ fla: 4369,
+ flb: 4370,
+ flc: 4371,
+ fld: 4372,
+ fle: 4373,
+ flf: 4374,
+ flg: 4375,
+ flh: 4376,
+ fli: 4377,
+ flj: 4378,
+ flk: 4379,
+ fll: 4380,
+ flm: 4381,
+ fln: 4382,
+ flo: 4383,
+ flp: 4384,
+ flq: 4385,
+ flr: 4386,
+ fls: 4387,
+ flt: 4388,
+ flu: 4389,
+ flv: 4390,
+ flw: 4391,
+ flx: 4392,
+ fly: 4393,
+ fmz: 4394,
+ fma: 4395,
+ fmb: 4396,
+ fmc: 4397,
+ fmd: 4398,
+ fme: 4399,
+ fmf: 4400,
+ fmg: 4401,
+ fmh: 4402,
+ fmi: 4403,
+ fmj: 4404,
+ fmk: 4405,
+ fml: 4406,
+ fmm: 4407,
+ fmn: 4408,
+ fmo: 4409,
+ fmp: 4410,
+ fmq: 4411,
+ fmr: 4412,
+ fms: 4413,
+ fmt: 4414,
+ fmu: 4415,
+ fmv: 4416,
+ fmw: 4417,
+ fmx: 4418,
+ fmy: 4419,
+ fnz: 4420,
+ fna: 4421,
+ fnb: 4422,
+ fnc: 4423,
+ fnd: 4424,
+ fne: 4425,
+ fnf: 4426,
+ fng: 4427,
+ fnh: 4428,
+ fni: 4429,
+ fnj: 4430,
+ fnk: 4431,
+ fnl: 4432,
+ fnm: 4433,
+ fnn: 4434,
+ fno: 4435,
+ fnp: 4436,
+ fnq: 4437,
+ fnr: 4438,
+ fns: 4439,
+ fnt: 4440,
+ fnu: 4441,
+ fnv: 4442,
+ fnw: 4443,
+ fnx: 4444,
+ fny: 4445,
+ foz: 4446,
+ foa: 4447,
+ fob: 4448,
+ foc: 4449,
+ fod: 4450,
+ foe: 4451,
+ fof: 4452,
+ fog: 4453,
+ foh: 4454,
+ foi: 4455,
+ foj: 4456,
+ fok: 4457,
+ fol: 4458,
+ fom: 4459,
+ fon: 4460,
+ foo: 4461,
+ fop: 4462,
+ foq: 4463,
+ for: 4464,
+ fos: 4465,
+ fot: 4466,
+ fou: 4467,
+ fov: 4468,
+ fow: 4469,
+ fox: 4470,
+ foy: 4471,
+ fpz: 4472,
+ fpa: 4473,
+ fpb: 4474,
+ fpc: 4475,
+ fpd: 4476,
+ fpe: 4477,
+ fpf: 4478,
+ fpg: 4479,
+ fph: 4480,
+ fpi: 4481,
+ fpj: 4482,
+ fpk: 4483,
+ fpl: 4484,
+ fpm: 4485,
+ fpn: 4486,
+ fpo: 4487,
+ fpp: 4488,
+ fpq: 4489,
+ fpr: 4490,
+ fps: 4491,
+ fpt: 4492,
+ fpu: 4493,
+ fpv: 4494,
+ fpw: 4495,
+ fpx: 4496,
+ fpy: 4497,
+ fqz: 4498,
+ fqa: 4499,
+ fqb: 4500,
+ fqc: 4501,
+ fqd: 4502,
+ fqe: 4503,
+ fqf: 4504,
+ fqg: 4505,
+ fqh: 4506,
+ fqi: 4507,
+ fqj: 4508,
+ fqk: 4509,
+ fql: 4510,
+ fqm: 4511,
+ fqn: 4512,
+ fqo: 4513,
+ fqp: 4514,
+ fqq: 4515,
+ fqr: 4516,
+ fqs: 4517,
+ fqt: 4518,
+ fqu: 4519,
+ fqv: 4520,
+ fqw: 4521,
+ fqx: 4522,
+ fqy: 4523,
+ frz: 4524,
+ fra: 4525,
+ frb: 4526,
+ frc: 4527,
+ frd: 4528,
+ fre: 4529,
+ frf: 4530,
+ frg: 4531,
+ frh: 4532,
+ fri: 4533,
+ frj: 4534,
+ frk: 4535,
+ frl: 4536,
+ frm: 4537,
+ frn: 4538,
+ fro: 4539,
+ frp: 4540,
+ frq: 4541,
+ frr: 4542,
+ frs: 4543,
+ frt: 4544,
+ fru: 4545,
+ frv: 4546,
+ frw: 4547,
+ frx: 4548,
+ fry: 4549,
+ fsz: 4550,
+ fsa: 4551,
+ fsb: 4552,
+ fsc: 4553,
+ fsd: 4554,
+ fse: 4555,
+ fsf: 4556,
+ fsg: 4557,
+ fsh: 4558,
+ fsi: 4559,
+ fsj: 4560,
+ fsk: 4561,
+ fsl: 4562,
+ fsm: 4563,
+ fsn: 4564,
+ fso: 4565,
+ fsp: 4566,
+ fsq: 4567,
+ fsr: 4568,
+ fss: 4569,
+ fst: 4570,
+ fsu: 4571,
+ fsv: 4572,
+ fsw: 4573,
+ fsx: 4574,
+ fsy: 4575,
+ ftz: 4576,
+ fta: 4577,
+ ftb: 4578,
+ ftc: 4579,
+ ftd: 4580,
+ fte: 4581,
+ ftf: 4582,
+ ftg: 4583,
+ fth: 4584,
+ fti: 4585,
+ ftj: 4586,
+ ftk: 4587,
+ ftl: 4588,
+ ftm: 4589,
+ ftn: 4590,
+ fto: 4591,
+ ftp: 4592,
+ ftq: 4593,
+ ftr: 4594,
+ fts: 4595,
+ ftt: 4596,
+ ftu: 4597,
+ ftv: 4598,
+ ftw: 4599,
+ ftx: 4600,
+ fty: 4601,
+ fuz: 4602,
+ fua: 4603,
+ fub: 4604,
+ fuc: 4605,
+ fud: 4606,
+ fue: 4607,
+ fuf: 4608,
+ fug: 4609,
+ fuh: 4610,
+ fui: 4611,
+ fuj: 4612,
+ fuk: 4613,
+ ful: 4614,
+ fum: 4615,
+ fun: 4616,
+ fuo: 4617,
+ fup: 4618,
+ fuq: 4619,
+ fur: 4620,
+ fus: 4621,
+ fut: 4622,
+ fuu: 4623,
+ fuv: 4624,
+ fuw: 4625,
+ fux: 4626,
+ fuy: 4627,
+ fvz: 4628,
+ fva: 4629,
+ fvb: 4630,
+ fvc: 4631,
+ fvd: 4632,
+ fve: 4633,
+ fvf: 4634,
+ fvg: 4635,
+ fvh: 4636,
+ fvi: 4637,
+ fvj: 4638,
+ fvk: 4639,
+ fvl: 4640,
+ fvm: 4641,
+ fvn: 4642,
+ fvo: 4643,
+ fvp: 4644,
+ fvq: 4645,
+ fvr: 4646,
+ fvs: 4647,
+ fvt: 4648,
+ fvu: 4649,
+ fvv: 4650,
+ fvw: 4651,
+ fvx: 4652,
+ fvy: 4653,
+ fwz: 4654,
+ fwa: 4655,
+ fwb: 4656,
+ fwc: 4657,
+ fwd: 4658,
+ fwe: 4659,
+ fwf: 4660,
+ fwg: 4661,
+ fwh: 4662,
+ fwi: 4663,
+ fwj: 4664,
+ fwk: 4665,
+ fwl: 4666,
+ fwm: 4667,
+ fwn: 4668,
+ fwo: 4669,
+ fwp: 4670,
+ fwq: 4671,
+ fwr: 4672,
+ fws: 4673,
+ fwt: 4674,
+ fwu: 4675,
+ fwv: 4676,
+ fww: 4677,
+ fwx: 4678,
+ fwy: 4679,
+ fxz: 4680,
+ fxa: 4681,
+ fxb: 4682,
+ fxc: 4683,
+ fxd: 4684,
+ fxe: 4685,
+ fxf: 4686,
+ fxg: 4687,
+ fxh: 4688,
+ fxi: 4689,
+ fxj: 4690,
+ fxk: 4691,
+ fxl: 4692,
+ fxm: 4693,
+ fxn: 4694,
+ fxo: 4695,
+ fxp: 4696,
+ fxq: 4697,
+ fxr: 4698,
+ fxs: 4699,
+ fxt: 4700,
+ fxu: 4701,
+ fxv: 4702,
+ fxw: 4703,
+ fxx: 4704,
+ fxy: 4705,
+ fyz: 4706,
+ fya: 4707,
+ fyb: 4708,
+ fyc: 4709,
+ fyd: 4710,
+ fye: 4711,
+ fyf: 4712,
+ fyg: 4713,
+ fyh: 4714,
+ fyi: 4715,
+ fyj: 4716,
+ fyk: 4717,
+ fyl: 4718,
+ fym: 4719,
+ fyn: 4720,
+ fyo: 4721,
+ fyp: 4722,
+ fyq: 4723,
+ fyr: 4724,
+ fys: 4725,
+ fyt: 4726,
+ fyu: 4727,
+ fyv: 4728,
+ fyw: 4729,
+ fyx: 4730,
+ fyy: 4731,
+ gzz: 4732,
+ gza: 4733,
+ gzb: 4734,
+ gzc: 4735,
+ gzd: 4736,
+ gze: 4737,
+ gzf: 4738,
+ gzg: 4739,
+ gzh: 4740,
+ gzi: 4741,
+ gzj: 4742,
+ gzk: 4743,
+ gzl: 4744,
+ gzm: 4745,
+ gzn: 4746,
+ gzo: 4747,
+ gzp: 4748,
+ gzq: 4749,
+ gzr: 4750,
+ gzs: 4751,
+ gzt: 4752,
+ gzu: 4753,
+ gzv: 4754,
+ gzw: 4755,
+ gzx: 4756,
+ gzy: 4757,
+ gaz: 4758,
+ gaa: 4759,
+ gab: 4760,
+ gac: 4761,
+ gad: 4762,
+ gae: 4763,
+ gaf: 4764,
+ gag: 4765,
+ gah: 4766,
+ gai: 4767,
+ gaj: 4768,
+ gak: 4769,
+ gal: 4770,
+ gam: 4771,
+ gan: 4772,
+ gao: 4773,
+ gap: 4774,
+ gaq: 4775,
+ gar: 4776,
+ gas: 4777,
+ gat: 4778,
+ gau: 4779,
+ gav: 4780,
+ gaw: 4781,
+ gax: 4782,
+ gay: 4783,
+ gbz: 4784,
+ gba: 4785,
+ gbb: 4786,
+ gbc: 4787,
+ gbd: 4788,
+ gbe: 4789,
+ gbf: 4790,
+ gbg: 4791,
+ gbh: 4792,
+ gbi: 4793,
+ gbj: 4794,
+ gbk: 4795,
+ gbl: 4796,
+ gbm: 4797,
+ gbn: 4798,
+ gbo: 4799,
+ gbp: 4800,
+ gbq: 4801,
+ gbr: 4802,
+ gbs: 4803,
+ gbt: 4804,
+ gbu: 4805,
+ gbv: 4806,
+ gbw: 4807,
+ gbx: 4808,
+ gby: 4809,
+ gcz: 4810,
+ gca: 4811,
+ gcb: 4812,
+ gcc: 4813,
+ gcd: 4814,
+ gce: 4815,
+ gcf: 4816,
+ gcg: 4817,
+ gch: 4818,
+ gci: 4819,
+ gcj: 4820,
+ gck: 4821,
+ gcl: 4822,
+ gcm: 4823,
+ gcn: 4824,
+ gco: 4825,
+ gcp: 4826,
+ gcq: 4827,
+ gcr: 4828,
+ gcs: 4829,
+ gct: 4830,
+ gcu: 4831,
+ gcv: 4832,
+ gcw: 4833,
+ gcx: 4834,
+ gcy: 4835,
+ gdz: 4836,
+ gda: 4837,
+ gdb: 4838,
+ gdc: 4839,
+ gdd: 4840,
+ gde: 4841,
+ gdf: 4842,
+ gdg: 4843,
+ gdh: 4844,
+ gdi: 4845,
+ gdj: 4846,
+ gdk: 4847,
+ gdl: 4848,
+ gdm: 4849,
+ gdn: 4850,
+ gdo: 4851,
+ gdp: 4852,
+ gdq: 4853,
+ gdr: 4854,
+ gds: 4855,
+ gdt: 4856,
+ gdu: 4857,
+ gdv: 4858,
+ gdw: 4859,
+ gdx: 4860,
+ gdy: 4861,
+ gez: 4862,
+ gea: 4863,
+ geb: 4864,
+ gec: 4865,
+ ged: 4866,
+ gee: 4867,
+ gef: 4868,
+ geg: 4869,
+ geh: 4870,
+ gei: 4871,
+ gej: 4872,
+ gek: 4873,
+ gel: 4874,
+ gem: 4875,
+ gen: 4876,
+ geo: 4877,
+ gep: 4878,
+ geq: 4879,
+ ger: 4880,
+ ges: 4881,
+ get: 4882,
+ geu: 4883,
+ gev: 4884,
+ gew: 4885,
+ gex: 4886,
+ gey: 4887,
+ gfz: 4888,
+ gfa: 4889,
+ gfb: 4890,
+ gfc: 4891,
+ gfd: 4892,
+ gfe: 4893,
+ gff: 4894,
+ gfg: 4895,
+ gfh: 4896,
+ gfi: 4897,
+ gfj: 4898,
+ gfk: 4899,
+ gfl: 4900,
+ gfm: 4901,
+ gfn: 4902,
+ gfo: 4903,
+ gfp: 4904,
+ gfq: 4905,
+ gfr: 4906,
+ gfs: 4907,
+ gft: 4908,
+ gfu: 4909,
+ gfv: 4910,
+ gfw: 4911,
+ gfx: 4912,
+ gfy: 4913,
+ ggz: 4914,
+ gga: 4915,
+ ggb: 4916,
+ ggc: 4917,
+ ggd: 4918,
+ gge: 4919,
+ ggf: 4920,
+ ggg: 4921,
+ ggh: 4922,
+ ggi: 4923,
+ ggj: 4924,
+ ggk: 4925,
+ ggl: 4926,
+ ggm: 4927,
+ ggn: 4928,
+ ggo: 4929,
+ ggp: 4930,
+ ggq: 4931,
+ ggr: 4932,
+ ggs: 4933,
+ ggt: 4934,
+ ggu: 4935,
+ ggv: 4936,
+ ggw: 4937,
+ ggx: 4938,
+ ggy: 4939,
+ ghz: 4940,
+ gha: 4941,
+ ghb: 4942,
+ ghc: 4943,
+ ghd: 4944,
+ ghe: 4945,
+ ghf: 4946,
+ ghg: 4947,
+ ghh: 4948,
+ ghi: 4949,
+ ghj: 4950,
+ ghk: 4951,
+ ghl: 4952,
+ ghm: 4953,
+ ghn: 4954,
+ gho: 4955,
+ ghp: 4956,
+ ghq: 4957,
+ ghr: 4958,
+ ghs: 4959,
+ ght: 4960,
+ ghu: 4961,
+ ghv: 4962,
+ ghw: 4963,
+ ghx: 4964,
+ ghy: 4965,
+ giz: 4966,
+ gia: 4967,
+ gib: 4968,
+ gic: 4969,
+ gid: 4970,
+ gie: 4971,
+ gif: 4972,
+ gig: 4973,
+ gih: 4974,
+ gii: 4975,
+ gij: 4976,
+ gik: 4977,
+ gil: 4978,
+ gim: 4979,
+ gin: 4980,
+ gio: 4981,
+ gip: 4982,
+ giq: 4983,
+ gir: 4984,
+ gis: 4985,
+ git: 4986,
+ giu: 4987,
+ giv: 4988,
+ giw: 4989,
+ gix: 4990,
+ giy: 4991,
+ gjz: 4992,
+ gja: 4993,
+ gjb: 4994,
+ gjc: 4995,
+ gjd: 4996,
+ gje: 4997,
+ gjf: 4998,
+ gjg: 4999,
+ gjh: 5000,
+ gji: 5001,
+ gjj: 5002,
+ gjk: 5003,
+ gjl: 5004,
+ gjm: 5005,
+ gjn: 5006,
+ gjo: 5007,
+ gjp: 5008,
+ gjq: 5009,
+ gjr: 5010,
+ gjs: 5011,
+ gjt: 5012,
+ gju: 5013,
+ gjv: 5014,
+ gjw: 5015,
+ gjx: 5016,
+ gjy: 5017,
+ gkz: 5018,
+ gka: 5019,
+ gkb: 5020,
+ gkc: 5021,
+ gkd: 5022,
+ gke: 5023,
+ gkf: 5024,
+ gkg: 5025,
+ gkh: 5026,
+ gki: 5027,
+ gkj: 5028,
+ gkk: 5029,
+ gkl: 5030,
+ gkm: 5031,
+ gkn: 5032,
+ gko: 5033,
+ gkp: 5034,
+ gkq: 5035,
+ gkr: 5036,
+ gks: 5037,
+ gkt: 5038,
+ gku: 5039,
+ gkv: 5040,
+ gkw: 5041,
+ gkx: 5042,
+ gky: 5043,
+ glz: 5044,
+ gla: 5045,
+ glb: 5046,
+ glc: 5047,
+ gld: 5048,
+ gle: 5049,
+ glf: 5050,
+ glg: 5051,
+ glh: 5052,
+ gli: 5053,
+ glj: 5054,
+ glk: 5055,
+ gll: 5056,
+ glm: 5057,
+ gln: 5058,
+ glo: 5059,
+ glp: 5060,
+ glq: 5061,
+ glr: 5062,
+ gls: 5063,
+ glt: 5064,
+ glu: 5065,
+ glv: 5066,
+ glw: 5067,
+ glx: 5068,
+ gly: 5069,
+ gmz: 5070,
+ gma: 5071,
+ gmb: 5072,
+ gmc: 5073,
+ gmd: 5074,
+ gme: 5075,
+ gmf: 5076,
+ gmg: 5077,
+ gmh: 5078,
+ gmi: 5079,
+ gmj: 5080,
+ gmk: 5081,
+ gml: 5082,
+ gmm: 5083,
+ gmn: 5084,
+ gmo: 5085,
+ gmp: 5086,
+ gmq: 5087,
+ gmr: 5088,
+ gms: 5089,
+ gmt: 5090,
+ gmu: 5091,
+ gmv: 5092,
+ gmw: 5093,
+ gmx: 5094,
+ gmy: 5095,
+ gnz: 5096,
+ gna: 5097,
+ gnb: 5098,
+ gnc: 5099,
+ gnd: 5100,
+ gne: 5101,
+ gnf: 5102,
+ gng: 5103,
+ gnh: 5104,
+ gni: 5105,
+ gnj: 5106,
+ gnk: 5107,
+ gnl: 5108,
+ gnm: 5109,
+ gnn: 5110,
+ gno: 5111,
+ gnp: 5112,
+ gnq: 5113,
+ gnr: 5114,
+ gns: 5115,
+ gnt: 5116,
+ gnu: 5117,
+ gnv: 5118,
+ gnw: 5119,
+ gnx: 5120,
+ gny: 5121,
+ goz: 5122,
+ goa: 5123,
+ gob: 5124,
+ goc: 5125,
+ god: 5126,
+ goe: 5127,
+ gof: 5128,
+ gog: 5129,
+ goh: 5130,
+ goi: 5131,
+ goj: 5132,
+ gok: 5133,
+ gol: 5134,
+ gom: 5135,
+ gon: 5136,
+ goo: 5137,
+ gop: 5138,
+ goq: 5139,
+ gor: 5140,
+ gos: 5141,
+ got: 5142,
+ gou: 5143,
+ gov: 5144,
+ gow: 5145,
+ gox: 5146,
+ goy: 5147,
+ gpz: 5148,
+ gpa: 5149,
+ gpb: 5150,
+ gpc: 5151,
+ gpd: 5152,
+ gpe: 5153,
+ gpf: 5154,
+ gpg: 5155,
+ gph: 5156,
+ gpi: 5157,
+ gpj: 5158,
+ gpk: 5159,
+ gpl: 5160,
+ gpm: 5161,
+ gpn: 5162,
+ gpo: 5163,
+ gpp: 5164,
+ gpq: 5165,
+ gpr: 5166,
+ gps: 5167,
+ gpt: 5168,
+ gpu: 5169,
+ gpv: 5170,
+ gpw: 5171,
+ gpx: 5172,
+ gpy: 5173,
+ gqz: 5174,
+ gqa: 5175,
+ gqb: 5176,
+ gqc: 5177,
+ gqd: 5178,
+ gqe: 5179,
+ gqf: 5180,
+ gqg: 5181,
+ gqh: 5182,
+ gqi: 5183,
+ gqj: 5184,
+ gqk: 5185,
+ gql: 5186,
+ gqm: 5187,
+ gqn: 5188,
+ gqo: 5189,
+ gqp: 5190,
+ gqq: 5191,
+ gqr: 5192,
+ gqs: 5193,
+ gqt: 5194,
+ gqu: 5195,
+ gqv: 5196,
+ gqw: 5197,
+ gqx: 5198,
+ gqy: 5199,
+ grz: 5200,
+ gra: 5201,
+ grb: 5202,
+ grc: 5203,
+ grd: 5204,
+ gre: 5205,
+ grf: 5206,
+ grg: 5207,
+ grh: 5208,
+ gri: 5209,
+ grj: 5210,
+ grk: 5211,
+ grl: 5212,
+ grm: 5213,
+ grn: 5214,
+ gro: 5215,
+ grp: 5216,
+ grq: 5217,
+ grr: 5218,
+ grs: 5219,
+ grt: 5220,
+ gru: 5221,
+ grv: 5222,
+ grw: 5223,
+ grx: 5224,
+ gry: 5225,
+ gsz: 5226,
+ gsa: 5227,
+ gsb: 5228,
+ gsc: 5229,
+ gsd: 5230,
+ gse: 5231,
+ gsf: 5232,
+ gsg: 5233,
+ gsh: 5234,
+ gsi: 5235,
+ gsj: 5236,
+ gsk: 5237,
+ gsl: 5238,
+ gsm: 5239,
+ gsn: 5240,
+ gso: 5241,
+ gsp: 5242,
+ gsq: 5243,
+ gsr: 5244,
+ gss: 5245,
+ gst: 5246,
+ gsu: 5247,
+ gsv: 5248,
+ gsw: 5249,
+ gsx: 5250,
+ gsy: 5251,
+ gtz: 5252,
+ gta: 5253,
+ gtb: 5254,
+ gtc: 5255,
+ gtd: 5256,
+ gte: 5257,
+ gtf: 5258,
+ gtg: 5259,
+ gth: 5260,
+ gti: 5261,
+ gtj: 5262,
+ gtk: 5263,
+ gtl: 5264,
+ gtm: 5265,
+ gtn: 5266,
+ gto: 5267,
+ gtp: 5268,
+ gtq: 5269,
+ gtr: 5270,
+ gts: 5271,
+ gtt: 5272,
+ gtu: 5273,
+ gtv: 5274,
+ gtw: 5275,
+ gtx: 5276,
+ gty: 5277,
+ guz: 5278,
+ gua: 5279,
+ gub: 5280,
+ guc: 5281,
+ gud: 5282,
+ gue: 5283,
+ guf: 5284,
+ gug: 5285,
+ guh: 5286,
+ gui: 5287,
+ guj: 5288,
+ guk: 5289,
+ gul: 5290,
+ gum: 5291,
+ gun: 5292,
+ guo: 5293,
+ gup: 5294,
+ guq: 5295,
+ gur: 5296,
+ gus: 5297,
+ gut: 5298,
+ guu: 5299,
+ guv: 5300,
+ guw: 5301,
+ gux: 5302,
+ guy: 5303,
+ gvz: 5304,
+ gva: 5305,
+ gvb: 5306,
+ gvc: 5307,
+ gvd: 5308,
+ gve: 5309,
+ gvf: 5310,
+ gvg: 5311,
+ gvh: 5312,
+ gvi: 5313,
+ gvj: 5314,
+ gvk: 5315,
+ gvl: 5316,
+ gvm: 5317,
+ gvn: 5318,
+ gvo: 5319,
+ gvp: 5320,
+ gvq: 5321,
+ gvr: 5322,
+ gvs: 5323,
+ gvt: 5324,
+ gvu: 5325,
+ gvv: 5326,
+ gvw: 5327,
+ gvx: 5328,
+ gvy: 5329,
+ gwz: 5330,
+ gwa: 5331,
+ gwb: 5332,
+ gwc: 5333,
+ gwd: 5334,
+ gwe: 5335,
+ gwf: 5336,
+ gwg: 5337,
+ gwh: 5338,
+ gwi: 5339,
+ gwj: 5340,
+ gwk: 5341,
+ gwl: 5342,
+ gwm: 5343,
+ gwn: 5344,
+ gwo: 5345,
+ gwp: 5346,
+ gwq: 5347,
+ gwr: 5348,
+ gws: 5349,
+ gwt: 5350,
+ gwu: 5351,
+ gwv: 5352,
+ gww: 5353,
+ gwx: 5354,
+ gwy: 5355,
+ gxz: 5356,
+ gxa: 5357,
+ gxb: 5358,
+ gxc: 5359,
+ gxd: 5360,
+ gxe: 5361,
+ gxf: 5362,
+ gxg: 5363,
+ gxh: 5364,
+ gxi: 5365,
+ gxj: 5366,
+ gxk: 5367,
+ gxl: 5368,
+ gxm: 5369,
+ gxn: 5370,
+ gxo: 5371,
+ gxp: 5372,
+ gxq: 5373,
+ gxr: 5374,
+ gxs: 5375,
+ gxt: 5376,
+ gxu: 5377,
+ gxv: 5378,
+ gxw: 5379,
+ gxx: 5380,
+ gxy: 5381,
+ gyz: 5382,
+ gya: 5383,
+ gyb: 5384,
+ gyc: 5385,
+ gyd: 5386,
+ gye: 5387,
+ gyf: 5388,
+ gyg: 5389,
+ gyh: 5390,
+ gyi: 5391,
+ gyj: 5392,
+ gyk: 5393,
+ gyl: 5394,
+ gym: 5395,
+ gyn: 5396,
+ gyo: 5397,
+ gyp: 5398,
+ gyq: 5399,
+ gyr: 5400,
+ gys: 5401,
+ gyt: 5402,
+ gyu: 5403,
+ gyv: 5404,
+ gyw: 5405,
+ gyx: 5406,
+ gyy: 5407,
+ hzz: 5408,
+ hza: 5409,
+ hzb: 5410,
+ hzc: 5411,
+ hzd: 5412,
+ hze: 5413,
+ hzf: 5414,
+ hzg: 5415,
+ hzh: 5416,
+ hzi: 5417,
+ hzj: 5418,
+ hzk: 5419,
+ hzl: 5420,
+ hzm: 5421,
+ hzn: 5422,
+ hzo: 5423,
+ hzp: 5424,
+ hzq: 5425,
+ hzr: 5426,
+ hzs: 5427,
+ hzt: 5428,
+ hzu: 5429,
+ hzv: 5430,
+ hzw: 5431,
+ hzx: 5432,
+ hzy: 5433,
+ haz: 5434,
+ haa: 5435,
+ hab: 5436,
+ hac: 5437,
+ had: 5438,
+ hae: 5439,
+ haf: 5440,
+ hag: 5441,
+ hah: 5442,
+ hai: 5443,
+ haj: 5444,
+ hak: 5445,
+ hal: 5446,
+ ham: 5447,
+ han: 5448,
+ hao: 5449,
+ hap: 5450,
+ haq: 5451,
+ har: 5452,
+ has: 5453,
+ hat: 5454,
+ hau: 5455,
+ hav: 5456,
+ haw: 5457,
+ hax: 5458,
+ hay: 5459,
+ hbz: 5460,
+ hba: 5461,
+ hbb: 5462,
+ hbc: 5463,
+ hbd: 5464,
+ hbe: 5465,
+ hbf: 5466,
+ hbg: 5467,
+ hbh: 5468,
+ hbi: 5469,
+ hbj: 5470,
+ hbk: 5471,
+ hbl: 5472,
+ hbm: 5473,
+ hbn: 5474,
+ hbo: 5475,
+ hbp: 5476,
+ hbq: 5477,
+ hbr: 5478,
+ hbs: 5479,
+ hbt: 5480,
+ hbu: 5481,
+ hbv: 5482,
+ hbw: 5483,
+ hbx: 5484,
+ hby: 5485,
+ hcz: 5486,
+ hca: 5487,
+ hcb: 5488,
+ hcc: 5489,
+ hcd: 5490,
+ hce: 5491,
+ hcf: 5492,
+ hcg: 5493,
+ hch: 5494,
+ hci: 5495,
+ hcj: 5496,
+ hck: 5497,
+ hcl: 5498,
+ hcm: 5499,
+ hcn: 5500,
+ hco: 5501,
+ hcp: 5502,
+ hcq: 5503,
+ hcr: 5504,
+ hcs: 5505,
+ hct: 5506,
+ hcu: 5507,
+ hcv: 5508,
+ hcw: 5509,
+ hcx: 5510,
+ hcy: 5511,
+ hdz: 5512,
+ hda: 5513,
+ hdb: 5514,
+ hdc: 5515,
+ hdd: 5516,
+ hde: 5517,
+ hdf: 5518,
+ hdg: 5519,
+ hdh: 5520,
+ hdi: 5521,
+ hdj: 5522,
+ hdk: 5523,
+ hdl: 5524,
+ hdm: 5525,
+ hdn: 5526,
+ hdo: 5527,
+ hdp: 5528,
+ hdq: 5529,
+ hdr: 5530,
+ hds: 5531,
+ hdt: 5532,
+ hdu: 5533,
+ hdv: 5534,
+ hdw: 5535,
+ hdx: 5536,
+ hdy: 5537,
+ hez: 5538,
+ hea: 5539,
+ heb: 5540,
+ hec: 5541,
+ hed: 5542,
+ hee: 5543,
+ hef: 5544,
+ heg: 5545,
+ heh: 5546,
+ hei: 5547,
+ hej: 5548,
+ hek: 5549,
+ hel: 5550,
+ hem: 5551,
+ hen: 5552,
+ heo: 5553,
+ hep: 5554,
+ heq: 5555,
+ her: 5556,
+ hes: 5557,
+ het: 5558,
+ heu: 5559,
+ hev: 5560,
+ hew: 5561,
+ hex: 5562,
+ hey: 5563,
+ hfz: 5564,
+ hfa: 5565,
+ hfb: 5566,
+ hfc: 5567,
+ hfd: 5568,
+ hfe: 5569,
+ hff: 5570,
+ hfg: 5571,
+ hfh: 5572,
+ hfi: 5573,
+ hfj: 5574,
+ hfk: 5575,
+ hfl: 5576,
+ hfm: 5577,
+ hfn: 5578,
+ hfo: 5579,
+ hfp: 5580,
+ hfq: 5581,
+ hfr: 5582,
+ hfs: 5583,
+ hft: 5584,
+ hfu: 5585,
+ hfv: 5586,
+ hfw: 5587,
+ hfx: 5588,
+ hfy: 5589,
+ hgz: 5590,
+ hga: 5591,
+ hgb: 5592,
+ hgc: 5593,
+ hgd: 5594,
+ hge: 5595,
+ hgf: 5596,
+ hgg: 5597,
+ hgh: 5598,
+ hgi: 5599,
+ hgj: 5600,
+ hgk: 5601,
+ hgl: 5602,
+ hgm: 5603,
+ hgn: 5604,
+ hgo: 5605,
+ hgp: 5606,
+ hgq: 5607,
+ hgr: 5608,
+ hgs: 5609,
+ hgt: 5610,
+ hgu: 5611,
+ hgv: 5612,
+ hgw: 5613,
+ hgx: 5614,
+ hgy: 5615,
+ hhz: 5616,
+ hha: 5617,
+ hhb: 5618,
+ hhc: 5619,
+ hhd: 5620,
+ hhe: 5621,
+ hhf: 5622,
+ hhg: 5623,
+ hhh: 5624,
+ hhi: 5625,
+ hhj: 5626,
+ hhk: 5627,
+ hhl: 5628,
+ hhm: 5629,
+ hhn: 5630,
+ hho: 5631,
+ hhp: 5632,
+ hhq: 5633,
+ hhr: 5634,
+ hhs: 5635,
+ hht: 5636,
+ hhu: 5637,
+ hhv: 5638,
+ hhw: 5639,
+ hhx: 5640,
+ hhy: 5641,
+ hiz: 5642,
+ hia: 5643,
+ hib: 5644,
+ hic: 5645,
+ hid: 5646,
+ hie: 5647,
+ hif: 5648,
+ hig: 5649,
+ hih: 5650,
+ hii: 5651,
+ hij: 5652,
+ hik: 5653,
+ hil: 5654,
+ him: 5655,
+ hin: 5656,
+ hio: 5657,
+ hip: 5658,
+ hiq: 5659,
+ hir: 5660,
+ his: 5661,
+ hit: 5662,
+ hiu: 5663,
+ hiv: 5664,
+ hiw: 5665,
+ hix: 5666,
+ hiy: 5667,
+ hjz: 5668,
+ hja: 5669,
+ hjb: 5670,
+ hjc: 5671,
+ hjd: 5672,
+ hje: 5673,
+ hjf: 5674,
+ hjg: 5675,
+ hjh: 5676,
+ hji: 5677,
+ hjj: 5678,
+ hjk: 5679,
+ hjl: 5680,
+ hjm: 5681,
+ hjn: 5682,
+ hjo: 5683,
+ hjp: 5684,
+ hjq: 5685,
+ hjr: 5686,
+ hjs: 5687,
+ hjt: 5688,
+ hju: 5689,
+ hjv: 5690,
+ hjw: 5691,
+ hjx: 5692,
+ hjy: 5693,
+ hkz: 5694,
+ hka: 5695,
+ hkb: 5696,
+ hkc: 5697,
+ hkd: 5698,
+ hke: 5699,
+ hkf: 5700,
+ hkg: 5701,
+ hkh: 5702,
+ hki: 5703,
+ hkj: 5704,
+ hkk: 5705,
+ hkl: 5706,
+ hkm: 5707,
+ hkn: 5708,
+ hko: 5709,
+ hkp: 5710,
+ hkq: 5711,
+ hkr: 5712,
+ hks: 5713,
+ hkt: 5714,
+ hku: 5715,
+ hkv: 5716,
+ hkw: 5717,
+ hkx: 5718,
+ hky: 5719,
+ hlz: 5720,
+ hla: 5721,
+ hlb: 5722,
+ hlc: 5723,
+ hld: 5724,
+ hle: 5725,
+ hlf: 5726,
+ hlg: 5727,
+ hlh: 5728,
+ hli: 5729,
+ hlj: 5730,
+ hlk: 5731,
+ hll: 5732,
+ hlm: 5733,
+ hln: 5734,
+ hlo: 5735,
+ hlp: 5736,
+ hlq: 5737,
+ hlr: 5738,
+ hls: 5739,
+ hlt: 5740,
+ hlu: 5741,
+ hlv: 5742,
+ hlw: 5743,
+ hlx: 5744,
+ hly: 5745,
+ hmz: 5746,
+ hma: 5747,
+ hmb: 5748,
+ hmc: 5749,
+ hmd: 5750,
+ hme: 5751,
+ hmf: 5752,
+ hmg: 5753,
+ hmh: 5754,
+ hmi: 5755,
+ hmj: 5756,
+ hmk: 5757,
+ hml: 5758,
+ hmm: 5759,
+ hmn: 5760,
+ hmo: 5761,
+ hmp: 5762,
+ hmq: 5763,
+ hmr: 5764,
+ hms: 5765,
+ hmt: 5766,
+ hmu: 5767,
+ hmv: 5768,
+ hmw: 5769,
+ hmx: 5770,
+ hmy: 5771,
+ hnz: 5772,
+ hna: 5773,
+ hnb: 5774,
+ hnc: 5775,
+ hnd: 5776,
+ hne: 5777,
+ hnf: 5778,
+ hng: 5779,
+ hnh: 5780,
+ hni: 5781,
+ hnj: 5782,
+ hnk: 5783,
+ hnl: 5784,
+ hnm: 5785,
+ hnn: 5786,
+ hno: 5787,
+ hnp: 5788,
+ hnq: 5789,
+ hnr: 5790,
+ hns: 5791,
+ hnt: 5792,
+ hnu: 5793,
+ hnv: 5794,
+ hnw: 5795,
+ hnx: 5796,
+ hny: 5797,
+ hoz: 5798,
+ hoa: 5799,
+ hob: 5800,
+ hoc: 5801,
+ hod: 5802,
+ hoe: 5803,
+ hof: 5804,
+ hog: 5805,
+ hoh: 5806,
+ hoi: 5807,
+ hoj: 5808,
+ hok: 5809,
+ hol: 5810,
+ hom: 5811,
+ hon: 5812,
+ hoo: 5813,
+ hop: 5814,
+ hoq: 5815,
+ hor: 5816,
+ hos: 5817,
+ hot: 5818,
+ hou: 5819,
+ hov: 5820,
+ how: 5821,
+ hox: 5822,
+ hoy: 5823,
+ hpz: 5824,
+ hpa: 5825,
+ hpb: 5826,
+ hpc: 5827,
+ hpd: 5828,
+ hpe: 5829,
+ hpf: 5830,
+ hpg: 5831,
+ hph: 5832,
+ hpi: 5833,
+ hpj: 5834,
+ hpk: 5835,
+ hpl: 5836,
+ hpm: 5837,
+ hpn: 5838,
+ hpo: 5839,
+ hpp: 5840,
+ hpq: 5841,
+ hpr: 5842,
+ hps: 5843,
+ hpt: 5844,
+ hpu: 5845,
+ hpv: 5846,
+ hpw: 5847,
+ hpx: 5848,
+ hpy: 5849,
+ hqz: 5850,
+ hqa: 5851,
+ hqb: 5852,
+ hqc: 5853,
+ hqd: 5854,
+ hqe: 5855,
+ hqf: 5856,
+ hqg: 5857,
+ hqh: 5858,
+ hqi: 5859,
+ hqj: 5860,
+ hqk: 5861,
+ hql: 5862,
+ hqm: 5863,
+ hqn: 5864,
+ hqo: 5865,
+ hqp: 5866,
+ hqq: 5867,
+ hqr: 5868,
+ hqs: 5869,
+ hqt: 5870,
+ hqu: 5871,
+ hqv: 5872,
+ hqw: 5873,
+ hqx: 5874,
+ hqy: 5875,
+ hrz: 5876,
+ hra: 5877,
+ hrb: 5878,
+ hrc: 5879,
+ hrd: 5880,
+ hre: 5881,
+ hrf: 5882,
+ hrg: 5883,
+ hrh: 5884,
+ hri: 5885,
+ hrj: 5886,
+ hrk: 5887,
+ hrl: 5888,
+ hrm: 5889,
+ hrn: 5890,
+ hro: 5891,
+ hrp: 5892,
+ hrq: 5893,
+ hrr: 5894,
+ hrs: 5895,
+ hrt: 5896,
+ hru: 5897,
+ hrv: 5898,
+ hrw: 5899,
+ hrx: 5900,
+ hry: 5901,
+ hsz: 5902,
+ hsa: 5903,
+ hsb: 5904,
+ hsc: 5905,
+ hsd: 5906,
+ hse: 5907,
+ hsf: 5908,
+ hsg: 5909,
+ hsh: 5910,
+ hsi: 5911,
+ hsj: 5912,
+ hsk: 5913,
+ hsl: 5914,
+ hsm: 5915,
+ hsn: 5916,
+ hso: 5917,
+ hsp: 5918,
+ hsq: 5919,
+ hsr: 5920,
+ hss: 5921,
+ hst: 5922,
+ hsu: 5923,
+ hsv: 5924,
+ hsw: 5925,
+ hsx: 5926,
+ hsy: 5927,
+ htz: 5928,
+ hta: 5929,
+ htb: 5930,
+ htc: 5931,
+ htd: 5932,
+ hte: 5933,
+ htf: 5934,
+ htg: 5935,
+ hth: 5936,
+ hti: 5937,
+ htj: 5938,
+ htk: 5939,
+ htl: 5940,
+ htm: 5941,
+ htn: 5942,
+ hto: 5943,
+ htp: 5944,
+ htq: 5945,
+ htr: 5946,
+ hts: 5947,
+ htt: 5948,
+ htu: 5949,
+ htv: 5950,
+ htw: 5951,
+ htx: 5952,
+ hty: 5953,
+ huz: 5954,
+ hua: 5955,
+ hub: 5956,
+ huc: 5957,
+ hud: 5958,
+ hue: 5959,
+ huf: 5960,
+ hug: 5961,
+ huh: 5962,
+ hui: 5963,
+ huj: 5964,
+ huk: 5965,
+ hul: 5966,
+ hum: 5967,
+ hun: 5968,
+ huo: 5969,
+ hup: 5970,
+ huq: 5971,
+ hur: 5972,
+ hus: 5973,
+ hut: 5974,
+ huu: 5975,
+ huv: 5976,
+ huw: 5977,
+ hux: 5978,
+ huy: 5979,
+ hvz: 5980,
+ hva: 5981,
+ hvb: 5982,
+ hvc: 5983,
+ hvd: 5984,
+ hve: 5985,
+ hvf: 5986,
+ hvg: 5987,
+ hvh: 5988,
+ hvi: 5989,
+ hvj: 5990,
+ hvk: 5991,
+ hvl: 5992,
+ hvm: 5993,
+ hvn: 5994,
+ hvo: 5995,
+ hvp: 5996,
+ hvq: 5997,
+ hvr: 5998,
+ hvs: 5999,
+ hvt: 6000,
+ hvu: 6001,
+ hvv: 6002,
+ hvw: 6003,
+ hvx: 6004,
+ hvy: 6005,
+ hwz: 6006,
+ hwa: 6007,
+ hwb: 6008,
+ hwc: 6009,
+ hwd: 6010,
+ hwe: 6011,
+ hwf: 6012,
+ hwg: 6013,
+ hwh: 6014,
+ hwi: 6015,
+ hwj: 6016,
+ hwk: 6017,
+ hwl: 6018,
+ hwm: 6019,
+ hwn: 6020,
+ hwo: 6021,
+ hwp: 6022,
+ hwq: 6023,
+ hwr: 6024,
+ hws: 6025,
+ hwt: 6026,
+ hwu: 6027,
+ hwv: 6028,
+ hww: 6029,
+ hwx: 6030,
+ hwy: 6031,
+ hxz: 6032,
+ hxa: 6033,
+ hxb: 6034,
+ hxc: 6035,
+ hxd: 6036,
+ hxe: 6037,
+ hxf: 6038,
+ hxg: 6039,
+ hxh: 6040,
+ hxi: 6041,
+ hxj: 6042,
+ hxk: 6043,
+ hxl: 6044,
+ hxm: 6045,
+ hxn: 6046,
+ hxo: 6047,
+ hxp: 6048,
+ hxq: 6049,
+ hxr: 6050,
+ hxs: 6051,
+ hxt: 6052,
+ hxu: 6053,
+ hxv: 6054,
+ hxw: 6055,
+ hxx: 6056,
+ hxy: 6057,
+ hyz: 6058,
+ hya: 6059,
+ hyb: 6060,
+ hyc: 6061,
+ hyd: 6062,
+ hye: 6063,
+ hyf: 6064,
+ hyg: 6065,
+ hyh: 6066,
+ hyi: 6067,
+ hyj: 6068,
+ hyk: 6069,
+ hyl: 6070,
+ hym: 6071,
+ hyn: 6072,
+ hyo: 6073,
+ hyp: 6074,
+ hyq: 6075,
+ hyr: 6076,
+ hys: 6077,
+ hyt: 6078,
+ hyu: 6079,
+ hyv: 6080,
+ hyw: 6081,
+ hyx: 6082,
+ hyy: 6083,
+ izz: 6084,
+ iza: 6085,
+ izb: 6086,
+ izc: 6087,
+ izd: 6088,
+ ize: 6089,
+ izf: 6090,
+ izg: 6091,
+ izh: 6092,
+ izi: 6093,
+ izj: 6094,
+ izk: 6095,
+ izl: 6096,
+ izm: 6097,
+ izn: 6098,
+ izo: 6099,
+ izp: 6100,
+ izq: 6101,
+ izr: 6102,
+ izs: 6103,
+ izt: 6104,
+ izu: 6105,
+ izv: 6106,
+ izw: 6107,
+ izx: 6108,
+ izy: 6109,
+ iaz: 6110,
+ iaa: 6111,
+ iab: 6112,
+ iac: 6113,
+ iad: 6114,
+ iae: 6115,
+ iaf: 6116,
+ iag: 6117,
+ iah: 6118,
+ iai: 6119,
+ iaj: 6120,
+ iak: 6121,
+ ial: 6122,
+ iam: 6123,
+ ian: 6124,
+ iao: 6125,
+ iap: 6126,
+ iaq: 6127,
+ iar: 6128,
+ ias: 6129,
+ iat: 6130,
+ iau: 6131,
+ iav: 6132,
+ iaw: 6133,
+ iax: 6134,
+ iay: 6135,
+ ibz: 6136,
+ iba: 6137,
+ ibb: 6138,
+ ibc: 6139,
+ ibd: 6140,
+ ibe: 6141,
+ ibf: 6142,
+ ibg: 6143,
+ ibh: 6144,
+ ibi: 6145,
+ ibj: 6146,
+ ibk: 6147,
+ ibl: 6148,
+ ibm: 6149,
+ ibn: 6150,
+ ibo: 6151,
+ ibp: 6152,
+ ibq: 6153,
+ ibr: 6154,
+ ibs: 6155,
+ ibt: 6156,
+ ibu: 6157,
+ ibv: 6158,
+ ibw: 6159,
+ ibx: 6160,
+ iby: 6161,
+ icz: 6162,
+ ica: 6163,
+ icb: 6164,
+ icc: 6165,
+ icd: 6166,
+ ice: 6167,
+ icf: 6168,
+ icg: 6169,
+ ich: 6170,
+ ici: 6171,
+ icj: 6172,
+ ick: 6173,
+ icl: 6174,
+ icm: 6175,
+ icn: 6176,
+ ico: 6177,
+ icp: 6178,
+ icq: 6179,
+ icr: 6180,
+ ics: 6181,
+ ict: 6182,
+ icu: 6183,
+ icv: 6184,
+ icw: 6185,
+ icx: 6186,
+ icy: 6187,
+ idz: 6188,
+ ida: 6189,
+ idb: 6190,
+ idc: 6191,
+ idd: 6192,
+ ide: 6193,
+ idf: 6194,
+ idg: 6195,
+ idh: 6196,
+ idi: 6197,
+ idj: 6198,
+ idk: 6199,
+ idl: 6200,
+ idm: 6201,
+ idn: 6202,
+ ido: 6203,
+ idp: 6204,
+ idq: 6205,
+ idr: 6206,
+ ids: 6207,
+ idt: 6208,
+ idu: 6209,
+ idv: 6210,
+ idw: 6211,
+ idx: 6212,
+ idy: 6213,
+ iez: 6214,
+ iea: 6215,
+ ieb: 6216,
+ iec: 6217,
+ ied: 6218,
+ iee: 6219,
+ ief: 6220,
+ ieg: 6221,
+ ieh: 6222,
+ iei: 6223,
+ iej: 6224,
+ iek: 6225,
+ iel: 6226,
+ iem: 6227,
+ ien: 6228,
+ ieo: 6229,
+ iep: 6230,
+ ieq: 6231,
+ ier: 6232,
+ ies: 6233,
+ iet: 6234,
+ ieu: 6235,
+ iev: 6236,
+ iew: 6237,
+ iex: 6238,
+ iey: 6239,
+ ifz: 6240,
+ ifa: 6241,
+ ifb: 6242,
+ ifc: 6243,
+ ifd: 6244,
+ ife: 6245,
+ iff: 6246,
+ ifg: 6247,
+ ifh: 6248,
+ ifi: 6249,
+ ifj: 6250,
+ ifk: 6251,
+ ifl: 6252,
+ ifm: 6253,
+ ifn: 6254,
+ ifo: 6255,
+ ifp: 6256,
+ ifq: 6257,
+ ifr: 6258,
+ ifs: 6259,
+ ift: 6260,
+ ifu: 6261,
+ ifv: 6262,
+ ifw: 6263,
+ ifx: 6264,
+ ify: 6265,
+ igz: 6266,
+ iga: 6267,
+ igb: 6268,
+ igc: 6269,
+ igd: 6270,
+ ige: 6271,
+ igf: 6272,
+ igg: 6273,
+ igh: 6274,
+ igi: 6275,
+ igj: 6276,
+ igk: 6277,
+ igl: 6278,
+ igm: 6279,
+ ign: 6280,
+ igo: 6281,
+ igp: 6282,
+ igq: 6283,
+ igr: 6284,
+ igs: 6285,
+ igt: 6286,
+ igu: 6287,
+ igv: 6288,
+ igw: 6289,
+ igx: 6290,
+ igy: 6291,
+ ihz: 6292,
+ iha: 6293,
+ ihb: 6294,
+ ihc: 6295,
+ ihd: 6296,
+ ihe: 6297,
+ ihf: 6298,
+ ihg: 6299,
+ ihh: 6300,
+ ihi: 6301,
+ ihj: 6302,
+ ihk: 6303,
+ ihl: 6304,
+ ihm: 6305,
+ ihn: 6306,
+ iho: 6307,
+ ihp: 6308,
+ ihq: 6309,
+ ihr: 6310,
+ ihs: 6311,
+ iht: 6312,
+ ihu: 6313,
+ ihv: 6314,
+ ihw: 6315,
+ ihx: 6316,
+ ihy: 6317,
+ iiz: 6318,
+ iia: 6319,
+ iib: 6320,
+ iic: 6321,
+ iid: 6322,
+ iie: 6323,
+ iif: 6324,
+ iig: 6325,
+ iih: 6326,
+ iii: 6327,
+ iij: 6328,
+ iik: 6329,
+ iil: 6330,
+ iim: 6331,
+ iin: 6332,
+ iio: 6333,
+ iip: 6334,
+ iiq: 6335,
+ iir: 6336,
+ iis: 6337,
+ iit: 6338,
+ iiu: 6339,
+ iiv: 6340,
+ iiw: 6341,
+ iix: 6342,
+ iiy: 6343,
+ ijz: 6344,
+ ija: 6345,
+ ijb: 6346,
+ ijc: 6347,
+ ijd: 6348,
+ ije: 6349,
+ ijf: 6350,
+ ijg: 6351,
+ ijh: 6352,
+ iji: 6353,
+ ijj: 6354,
+ ijk: 6355,
+ ijl: 6356,
+ ijm: 6357,
+ ijn: 6358,
+ ijo: 6359,
+ ijp: 6360,
+ ijq: 6361,
+ ijr: 6362,
+ ijs: 6363,
+ ijt: 6364,
+ iju: 6365,
+ ijv: 6366,
+ ijw: 6367,
+ ijx: 6368,
+ ijy: 6369,
+ ikz: 6370,
+ ika: 6371,
+ ikb: 6372,
+ ikc: 6373,
+ ikd: 6374,
+ ike: 6375,
+ ikf: 6376,
+ ikg: 6377,
+ ikh: 6378,
+ iki: 6379,
+ ikj: 6380,
+ ikk: 6381,
+ ikl: 6382,
+ ikm: 6383,
+ ikn: 6384,
+ iko: 6385,
+ ikp: 6386,
+ ikq: 6387,
+ ikr: 6388,
+ iks: 6389,
+ ikt: 6390,
+ iku: 6391,
+ ikv: 6392,
+ ikw: 6393,
+ ikx: 6394,
+ iky: 6395,
+ ilz: 6396,
+ ila: 6397,
+ ilb: 6398,
+ ilc: 6399,
+ ild: 6400,
+ ile: 6401,
+ ilf: 6402,
+ ilg: 6403,
+ ilh: 6404,
+ ili: 6405,
+ ilj: 6406,
+ ilk: 6407,
+ ill: 6408,
+ ilm: 6409,
+ iln: 6410,
+ ilo: 6411,
+ ilp: 6412,
+ ilq: 6413,
+ ilr: 6414,
+ ils: 6415,
+ ilt: 6416,
+ ilu: 6417,
+ ilv: 6418,
+ ilw: 6419,
+ ilx: 6420,
+ ily: 6421,
+ imz: 6422,
+ ima: 6423,
+ imb: 6424,
+ imc: 6425,
+ imd: 6426,
+ ime: 6427,
+ imf: 6428,
+ img: 6429,
+ imh: 6430,
+ imi: 6431,
+ imj: 6432,
+ imk: 6433,
+ iml: 6434,
+ imm: 6435,
+ imn: 6436,
+ imo: 6437,
+ imp: 6438,
+ imq: 6439,
+ imr: 6440,
+ ims: 6441,
+ imt: 6442,
+ imu: 6443,
+ imv: 6444,
+ imw: 6445,
+ imx: 6446,
+ imy: 6447,
+ inz: 6448,
+ ina: 6449,
+ inb: 6450,
+ inc: 6451,
+ ind: 6452,
+ ine: 6453,
+ inf: 6454,
+ ing: 6455,
+ inh: 6456,
+ ini: 6457,
+ inj: 6458,
+ ink: 6459,
+ inl: 6460,
+ inm: 6461,
+ inn: 6462,
+ ino: 6463,
+ inp: 6464,
+ inq: 6465,
+ inr: 6466,
+ ins: 6467,
+ int: 6468,
+ inu: 6469,
+ inv: 6470,
+ inw: 6471,
+ inx: 6472,
+ iny: 6473,
+ ioz: 6474,
+ ioa: 6475,
+ iob: 6476,
+ ioc: 6477,
+ iod: 6478,
+ ioe: 6479,
+ iof: 6480,
+ iog: 6481,
+ ioh: 6482,
+ ioi: 6483,
+ ioj: 6484,
+ iok: 6485,
+ iol: 6486,
+ iom: 6487,
+ ion: 6488,
+ ioo: 6489,
+ iop: 6490,
+ ioq: 6491,
+ ior: 6492,
+ ios: 6493,
+ iot: 6494,
+ iou: 6495,
+ iov: 6496,
+ iow: 6497,
+ iox: 6498,
+ ioy: 6499,
+ ipz: 6500,
+ ipa: 6501,
+ ipb: 6502,
+ ipc: 6503,
+ ipd: 6504,
+ ipe: 6505,
+ ipf: 6506,
+ ipg: 6507,
+ iph: 6508,
+ ipi: 6509,
+ ipj: 6510,
+ ipk: 6511,
+ ipl: 6512,
+ ipm: 6513,
+ ipn: 6514,
+ ipo: 6515,
+ ipp: 6516,
+ ipq: 6517,
+ ipr: 6518,
+ ips: 6519,
+ ipt: 6520,
+ ipu: 6521,
+ ipv: 6522,
+ ipw: 6523,
+ ipx: 6524,
+ ipy: 6525,
+ iqz: 6526,
+ iqa: 6527,
+ iqb: 6528,
+ iqc: 6529,
+ iqd: 6530,
+ iqe: 6531,
+ iqf: 6532,
+ iqg: 6533,
+ iqh: 6534,
+ iqi: 6535,
+ iqj: 6536,
+ iqk: 6537,
+ iql: 6538,
+ iqm: 6539,
+ iqn: 6540,
+ iqo: 6541,
+ iqp: 6542,
+ iqq: 6543,
+ iqr: 6544,
+ iqs: 6545,
+ iqt: 6546,
+ iqu: 6547,
+ iqv: 6548,
+ iqw: 6549,
+ iqx: 6550,
+ iqy: 6551,
+ irz: 6552,
+ ira: 6553,
+ irb: 6554,
+ irc: 6555,
+ ird: 6556,
+ ire: 6557,
+ irf: 6558,
+ irg: 6559,
+ irh: 6560,
+ iri: 6561,
+ irj: 6562,
+ irk: 6563,
+ irl: 6564,
+ irm: 6565,
+ irn: 6566,
+ iro: 6567,
+ irp: 6568,
+ irq: 6569,
+ irr: 6570,
+ irs: 6571,
+ irt: 6572,
+ iru: 6573,
+ irv: 6574,
+ irw: 6575,
+ irx: 6576,
+ iry: 6577,
+ isz: 6578,
+ isa: 6579,
+ isb: 6580,
+ isc: 6581,
+ isd: 6582,
+ ise: 6583,
+ isf: 6584,
+ isg: 6585,
+ ish: 6586,
+ isi: 6587,
+ isj: 6588,
+ isk: 6589,
+ isl: 6590,
+ ism: 6591,
+ isn: 6592,
+ iso: 6593,
+ isp: 6594,
+ isq: 6595,
+ isr: 6596,
+ iss: 6597,
+ ist: 6598,
+ isu: 6599,
+ isv: 6600,
+ isw: 6601,
+ isx: 6602,
+ isy: 6603,
+ itz: 6604,
+ ita: 6605,
+ itb: 6606,
+ itc: 6607,
+ itd: 6608,
+ ite: 6609,
+ itf: 6610,
+ itg: 6611,
+ ith: 6612,
+ iti: 6613,
+ itj: 6614,
+ itk: 6615,
+ itl: 6616,
+ itm: 6617,
+ itn: 6618,
+ ito: 6619,
+ itp: 6620,
+ itq: 6621,
+ itr: 6622,
+ its: 6623,
+ itt: 6624,
+ itu: 6625,
+ itv: 6626,
+ itw: 6627,
+ itx: 6628,
+ ity: 6629,
+ iuz: 6630,
+ iua: 6631,
+ iub: 6632,
+ iuc: 6633,
+ iud: 6634,
+ iue: 6635,
+ iuf: 6636,
+ iug: 6637,
+ iuh: 6638,
+ iui: 6639,
+ iuj: 6640,
+ iuk: 6641,
+ iul: 6642,
+ ium: 6643,
+ iun: 6644,
+ iuo: 6645,
+ iup: 6646,
+ iuq: 6647,
+ iur: 6648,
+ ius: 6649,
+ iut: 6650,
+ iuu: 6651,
+ iuv: 6652,
+ iuw: 6653,
+ iux: 6654,
+ iuy: 6655,
+ ivz: 6656,
+ iva: 6657,
+ ivb: 6658,
+ ivc: 6659,
+ ivd: 6660,
+ ive: 6661,
+ ivf: 6662,
+ ivg: 6663,
+ ivh: 6664,
+ ivi: 6665,
+ ivj: 6666,
+ ivk: 6667,
+ ivl: 6668,
+ ivm: 6669,
+ ivn: 6670,
+ ivo: 6671,
+ ivp: 6672,
+ ivq: 6673,
+ ivr: 6674,
+ ivs: 6675,
+ ivt: 6676,
+ ivu: 6677,
+ ivv: 6678,
+ ivw: 6679,
+ ivx: 6680,
+ ivy: 6681,
+ iwz: 6682,
+ iwa: 6683,
+ iwb: 6684,
+ iwc: 6685,
+ iwd: 6686,
+ iwe: 6687,
+ iwf: 6688,
+ iwg: 6689,
+ iwh: 6690,
+ iwi: 6691,
+ iwj: 6692,
+ iwk: 6693,
+ iwl: 6694,
+ iwm: 6695,
+ iwn: 6696,
+ iwo: 6697,
+ iwp: 6698,
+ iwq: 6699,
+ iwr: 6700,
+ iws: 6701,
+ iwt: 6702,
+ iwu: 6703,
+ iwv: 6704,
+ iww: 6705,
+ iwx: 6706,
+ iwy: 6707,
+ ixz: 6708,
+ ixa: 6709,
+ ixb: 6710,
+ ixc: 6711,
+ ixd: 6712,
+ ixe: 6713,
+ ixf: 6714,
+ ixg: 6715,
+ ixh: 6716,
+ ixi: 6717,
+ ixj: 6718,
+ ixk: 6719,
+ ixl: 6720,
+ ixm: 6721,
+ ixn: 6722,
+ ixo: 6723,
+ ixp: 6724,
+ ixq: 6725,
+ ixr: 6726,
+ ixs: 6727,
+ ixt: 6728,
+ ixu: 6729,
+ ixv: 6730,
+ ixw: 6731,
+ ixx: 6732,
+ ixy: 6733,
+ iyz: 6734,
+ iya: 6735,
+ iyb: 6736,
+ iyc: 6737,
+ iyd: 6738,
+ iye: 6739,
+ iyf: 6740,
+ iyg: 6741,
+ iyh: 6742,
+ iyi: 6743,
+ iyj: 6744,
+ iyk: 6745,
+ iyl: 6746,
+ iym: 6747,
+ iyn: 6748,
+ iyo: 6749,
+ iyp: 6750,
+ iyq: 6751,
+ iyr: 6752,
+ iys: 6753,
+ iyt: 6754,
+ iyu: 6755,
+ iyv: 6756,
+ iyw: 6757,
+ iyx: 6758,
+ iyy: 6759,
+ jzz: 6760,
+ jza: 6761,
+ jzb: 6762,
+ jzc: 6763,
+ jzd: 6764,
+ jze: 6765,
+ jzf: 6766,
+ jzg: 6767,
+ jzh: 6768,
+ jzi: 6769,
+ jzj: 6770,
+ jzk: 6771,
+ jzl: 6772,
+ jzm: 6773,
+ jzn: 6774,
+ jzo: 6775,
+ jzp: 6776,
+ jzq: 6777,
+ jzr: 6778,
+ jzs: 6779,
+ jzt: 6780,
+ jzu: 6781,
+ jzv: 6782,
+ jzw: 6783,
+ jzx: 6784,
+ jzy: 6785,
+ jaz: 6786,
+ jaa: 6787,
+ jab: 6788,
+ jac: 6789,
+ jad: 6790,
+ jae: 6791,
+ jaf: 6792,
+ jag: 6793,
+ jah: 6794,
+ jai: 6795,
+ jaj: 6796,
+ jak: 6797,
+ jal: 6798,
+ jam: 6799,
+ jan: 6800,
+ jao: 6801,
+ jap: 6802,
+ jaq: 6803,
+ jar: 6804,
+ jas: 6805,
+ jat: 6806,
+ jau: 6807,
+ jav: 6808,
+ jaw: 6809,
+ jax: 6810,
+ jay: 6811,
+ jbz: 6812,
+ jba: 6813,
+ jbb: 6814,
+ jbc: 6815,
+ jbd: 6816,
+ jbe: 6817,
+ jbf: 6818,
+ jbg: 6819,
+ jbh: 6820,
+ jbi: 6821,
+ jbj: 6822,
+ jbk: 6823,
+ jbl: 6824,
+ jbm: 6825,
+ jbn: 6826,
+ jbo: 6827,
+ jbp: 6828,
+ jbq: 6829,
+ jbr: 6830,
+ jbs: 6831,
+ jbt: 6832,
+ jbu: 6833,
+ jbv: 6834,
+ jbw: 6835,
+ jbx: 6836,
+ jby: 6837,
+ jcz: 6838,
+ jca: 6839,
+ jcb: 6840,
+ jcc: 6841,
+ jcd: 6842,
+ jce: 6843,
+ jcf: 6844,
+ jcg: 6845,
+ jch: 6846,
+ jci: 6847,
+ jcj: 6848,
+ jck: 6849,
+ jcl: 6850,
+ jcm: 6851,
+ jcn: 6852,
+ jco: 6853,
+ jcp: 6854,
+ jcq: 6855,
+ jcr: 6856,
+ jcs: 6857,
+ jct: 6858,
+ jcu: 6859,
+ jcv: 6860,
+ jcw: 6861,
+ jcx: 6862,
+ jcy: 6863,
+ jdz: 6864,
+ jda: 6865,
+ jdb: 6866,
+ jdc: 6867,
+ jdd: 6868,
+ jde: 6869,
+ jdf: 6870,
+ jdg: 6871,
+ jdh: 6872,
+ jdi: 6873,
+ jdj: 6874,
+ jdk: 6875,
+ jdl: 6876,
+ jdm: 6877,
+ jdn: 6878,
+ jdo: 6879,
+ jdp: 6880,
+ jdq: 6881,
+ jdr: 6882,
+ jds: 6883,
+ jdt: 6884,
+ jdu: 6885,
+ jdv: 6886,
+ jdw: 6887,
+ jdx: 6888,
+ jdy: 6889,
+ jez: 6890,
+ jea: 6891,
+ jeb: 6892,
+ jec: 6893,
+ jed: 6894,
+ jee: 6895,
+ jef: 6896,
+ jeg: 6897,
+ jeh: 6898,
+ jei: 6899,
+ jej: 6900,
+ jek: 6901,
+ jel: 6902,
+ jem: 6903,
+ jen: 6904,
+ jeo: 6905,
+ jep: 6906,
+ jeq: 6907,
+ jer: 6908,
+ jes: 6909,
+ jet: 6910,
+ jeu: 6911,
+ jev: 6912,
+ jew: 6913,
+ jex: 6914,
+ jey: 6915,
+ jfz: 6916,
+ jfa: 6917,
+ jfb: 6918,
+ jfc: 6919,
+ jfd: 6920,
+ jfe: 6921,
+ jff: 6922,
+ jfg: 6923,
+ jfh: 6924,
+ jfi: 6925,
+ jfj: 6926,
+ jfk: 6927,
+ jfl: 6928,
+ jfm: 6929,
+ jfn: 6930,
+ jfo: 6931,
+ jfp: 6932,
+ jfq: 6933,
+ jfr: 6934,
+ jfs: 6935,
+ jft: 6936,
+ jfu: 6937,
+ jfv: 6938,
+ jfw: 6939,
+ jfx: 6940,
+ jfy: 6941,
+ jgz: 6942,
+ jga: 6943,
+ jgb: 6944,
+ jgc: 6945,
+ jgd: 6946,
+ jge: 6947,
+ jgf: 6948,
+ jgg: 6949,
+ jgh: 6950,
+ jgi: 6951,
+ jgj: 6952,
+ jgk: 6953,
+ jgl: 6954,
+ jgm: 6955,
+ jgn: 6956,
+ jgo: 6957,
+ jgp: 6958,
+ jgq: 6959,
+ jgr: 6960,
+ jgs: 6961,
+ jgt: 6962,
+ jgu: 6963,
+ jgv: 6964,
+ jgw: 6965,
+ jgx: 6966,
+ jgy: 6967,
+ jhz: 6968,
+ jha: 6969,
+ jhb: 6970,
+ jhc: 6971,
+ jhd: 6972,
+ jhe: 6973,
+ jhf: 6974,
+ jhg: 6975,
+ jhh: 6976,
+ jhi: 6977,
+ jhj: 6978,
+ jhk: 6979,
+ jhl: 6980,
+ jhm: 6981,
+ jhn: 6982,
+ jho: 6983,
+ jhp: 6984,
+ jhq: 6985,
+ jhr: 6986,
+ jhs: 6987,
+ jht: 6988,
+ jhu: 6989,
+ jhv: 6990,
+ jhw: 6991,
+ jhx: 6992,
+ jhy: 6993,
+ jiz: 6994,
+ jia: 6995,
+ jib: 6996,
+ jic: 6997,
+ jid: 6998,
+ jie: 6999,
+ jif: 7000,
+ jig: 7001,
+ jih: 7002,
+ jii: 7003,
+ jij: 7004,
+ jik: 7005,
+ jil: 7006,
+ jim: 7007,
+ jin: 7008,
+ jio: 7009,
+ jip: 7010,
+ jiq: 7011,
+ jir: 7012,
+ jis: 7013,
+ jit: 7014,
+ jiu: 7015,
+ jiv: 7016,
+ jiw: 7017,
+ jix: 7018,
+ jiy: 7019,
+ jjz: 7020,
+ jja: 7021,
+ jjb: 7022,
+ jjc: 7023,
+ jjd: 7024,
+ jje: 7025,
+ jjf: 7026,
+ jjg: 7027,
+ jjh: 7028,
+ jji: 7029,
+ jjj: 7030,
+ jjk: 7031,
+ jjl: 7032,
+ jjm: 7033,
+ jjn: 7034,
+ jjo: 7035,
+ jjp: 7036,
+ jjq: 7037,
+ jjr: 7038,
+ jjs: 7039,
+ jjt: 7040,
+ jju: 7041,
+ jjv: 7042,
+ jjw: 7043,
+ jjx: 7044,
+ jjy: 7045,
+ jkz: 7046,
+ jka: 7047,
+ jkb: 7048,
+ jkc: 7049,
+ jkd: 7050,
+ jke: 7051,
+ jkf: 7052,
+ jkg: 7053,
+ jkh: 7054,
+ jki: 7055,
+ jkj: 7056,
+ jkk: 7057,
+ jkl: 7058,
+ jkm: 7059,
+ jkn: 7060,
+ jko: 7061,
+ jkp: 7062,
+ jkq: 7063,
+ jkr: 7064,
+ jks: 7065,
+ jkt: 7066,
+ jku: 7067,
+ jkv: 7068,
+ jkw: 7069,
+ jkx: 7070,
+ jky: 7071,
+ jlz: 7072,
+ jla: 7073,
+ jlb: 7074,
+ jlc: 7075,
+ jld: 7076,
+ jle: 7077,
+ jlf: 7078,
+ jlg: 7079,
+ jlh: 7080,
+ jli: 7081,
+ jlj: 7082,
+ jlk: 7083,
+ jll: 7084,
+ jlm: 7085,
+ jln: 7086,
+ jlo: 7087,
+ jlp: 7088,
+ jlq: 7089,
+ jlr: 7090,
+ jls: 7091,
+ jlt: 7092,
+ jlu: 7093,
+ jlv: 7094,
+ jlw: 7095,
+ jlx: 7096,
+ jly: 7097,
+ jmz: 7098,
+ jma: 7099,
+ jmb: 7100,
+ jmc: 7101,
+ jmd: 7102,
+ jme: 7103,
+ jmf: 7104,
+ jmg: 7105,
+ jmh: 7106,
+ jmi: 7107,
+ jmj: 7108,
+ jmk: 7109,
+ jml: 7110,
+ jmm: 7111,
+ jmn: 7112,
+ jmo: 7113,
+ jmp: 7114,
+ jmq: 7115,
+ jmr: 7116,
+ jms: 7117,
+ jmt: 7118,
+ jmu: 7119,
+ jmv: 7120,
+ jmw: 7121,
+ jmx: 7122,
+ jmy: 7123,
+ jnz: 7124,
+ jna: 7125,
+ jnb: 7126,
+ jnc: 7127,
+ jnd: 7128,
+ jne: 7129,
+ jnf: 7130,
+ jng: 7131,
+ jnh: 7132,
+ jni: 7133,
+ jnj: 7134,
+ jnk: 7135,
+ jnl: 7136,
+ jnm: 7137,
+ jnn: 7138,
+ jno: 7139,
+ jnp: 7140,
+ jnq: 7141,
+ jnr: 7142,
+ jns: 7143,
+ jnt: 7144,
+ jnu: 7145,
+ jnv: 7146,
+ jnw: 7147,
+ jnx: 7148,
+ jny: 7149,
+ joz: 7150,
+ joa: 7151,
+ job: 7152,
+ joc: 7153,
+ jod: 7154,
+ joe: 7155,
+ jof: 7156,
+ jog: 7157,
+ joh: 7158,
+ joi: 7159,
+ joj: 7160,
+ jok: 7161,
+ jol: 7162,
+ jom: 7163,
+ jon: 7164,
+ joo: 7165,
+ jop: 7166,
+ joq: 7167,
+ jor: 7168,
+ jos: 7169,
+ jot: 7170,
+ jou: 7171,
+ jov: 7172,
+ jow: 7173,
+ jox: 7174,
+ joy: 7175,
+ jpz: 7176,
+ jpa: 7177,
+ jpb: 7178,
+ jpc: 7179,
+ jpd: 7180,
+ jpe: 7181,
+ jpf: 7182,
+ jpg: 7183,
+ jph: 7184,
+ jpi: 7185,
+ jpj: 7186,
+ jpk: 7187,
+ jpl: 7188,
+ jpm: 7189,
+ jpn: 7190,
+ jpo: 7191,
+ jpp: 7192,
+ jpq: 7193,
+ jpr: 7194,
+ jps: 7195,
+ jpt: 7196,
+ jpu: 7197,
+ jpv: 7198,
+ jpw: 7199,
+ jpx: 7200,
+ jpy: 7201,
+ jqz: 7202,
+ jqa: 7203,
+ jqb: 7204,
+ jqc: 7205,
+ jqd: 7206,
+ jqe: 7207,
+ jqf: 7208,
+ jqg: 7209,
+ jqh: 7210,
+ jqi: 7211,
+ jqj: 7212,
+ jqk: 7213,
+ jql: 7214,
+ jqm: 7215,
+ jqn: 7216,
+ jqo: 7217,
+ jqp: 7218,
+ jqq: 7219,
+ jqr: 7220,
+ jqs: 7221,
+ jqt: 7222,
+ jqu: 7223,
+ jqv: 7224,
+ jqw: 7225,
+ jqx: 7226,
+ jqy: 7227,
+ jrz: 7228,
+ jra: 7229,
+ jrb: 7230,
+ jrc: 7231,
+ jrd: 7232,
+ jre: 7233,
+ jrf: 7234,
+ jrg: 7235,
+ jrh: 7236,
+ jri: 7237,
+ jrj: 7238,
+ jrk: 7239,
+ jrl: 7240,
+ jrm: 7241,
+ jrn: 7242,
+ jro: 7243,
+ jrp: 7244,
+ jrq: 7245,
+ jrr: 7246,
+ jrs: 7247,
+ jrt: 7248,
+ jru: 7249,
+ jrv: 7250,
+ jrw: 7251,
+ jrx: 7252,
+ jry: 7253,
+ jsz: 7254,
+ jsa: 7255,
+ jsb: 7256,
+ jsc: 7257,
+ jsd: 7258,
+ jse: 7259,
+ jsf: 7260,
+ jsg: 7261,
+ jsh: 7262,
+ jsi: 7263,
+ jsj: 7264,
+ jsk: 7265,
+ jsl: 7266,
+ jsm: 7267,
+ jsn: 7268,
+ jso: 7269,
+ jsp: 7270,
+ jsq: 7271,
+ jsr: 7272,
+ jss: 7273,
+ jst: 7274,
+ jsu: 7275,
+ jsv: 7276,
+ jsw: 7277,
+ jsx: 7278,
+ jsy: 7279,
+ jtz: 7280,
+ jta: 7281,
+ jtb: 7282,
+ jtc: 7283,
+ jtd: 7284,
+ jte: 7285,
+ jtf: 7286,
+ jtg: 7287,
+ jth: 7288,
+ jti: 7289,
+ jtj: 7290,
+ jtk: 7291,
+ jtl: 7292,
+ jtm: 7293,
+ jtn: 7294,
+ jto: 7295,
+ jtp: 7296,
+ jtq: 7297,
+ jtr: 7298,
+ jts: 7299,
+ jtt: 7300,
+ jtu: 7301,
+ jtv: 7302,
+ jtw: 7303,
+ jtx: 7304,
+ jty: 7305,
+ juz: 7306,
+ jua: 7307,
+ jub: 7308,
+ juc: 7309,
+ jud: 7310,
+ jue: 7311,
+ juf: 7312,
+ jug: 7313,
+ juh: 7314,
+ jui: 7315,
+ juj: 7316,
+ juk: 7317,
+ jul: 7318,
+ jum: 7319,
+ jun: 7320,
+ juo: 7321,
+ jup: 7322,
+ juq: 7323,
+ jur: 7324,
+ jus: 7325,
+ jut: 7326,
+ juu: 7327,
+ juv: 7328,
+ juw: 7329,
+ jux: 7330,
+ juy: 7331,
+ jvz: 7332,
+ jva: 7333,
+ jvb: 7334,
+ jvc: 7335,
+ jvd: 7336,
+ jve: 7337,
+ jvf: 7338,
+ jvg: 7339,
+ jvh: 7340,
+ jvi: 7341,
+ jvj: 7342,
+ jvk: 7343,
+ jvl: 7344,
+ jvm: 7345,
+ jvn: 7346,
+ jvo: 7347,
+ jvp: 7348,
+ jvq: 7349,
+ jvr: 7350,
+ jvs: 7351,
+ jvt: 7352,
+ jvu: 7353,
+ jvv: 7354,
+ jvw: 7355,
+ jvx: 7356,
+ jvy: 7357,
+ jwz: 7358,
+ jwa: 7359,
+ jwb: 7360,
+ jwc: 7361,
+ jwd: 7362,
+ jwe: 7363,
+ jwf: 7364,
+ jwg: 7365,
+ jwh: 7366,
+ jwi: 7367,
+ jwj: 7368,
+ jwk: 7369,
+ jwl: 7370,
+ jwm: 7371,
+ jwn: 7372,
+ jwo: 7373,
+ jwp: 7374,
+ jwq: 7375,
+ jwr: 7376,
+ jws: 7377,
+ jwt: 7378,
+ jwu: 7379,
+ jwv: 7380,
+ jww: 7381,
+ jwx: 7382,
+ jwy: 7383,
+ jxz: 7384,
+ jxa: 7385,
+ jxb: 7386,
+ jxc: 7387,
+ jxd: 7388,
+ jxe: 7389,
+ jxf: 7390,
+ jxg: 7391,
+ jxh: 7392,
+ jxi: 7393,
+ jxj: 7394,
+ jxk: 7395,
+ jxl: 7396,
+ jxm: 7397,
+ jxn: 7398,
+ jxo: 7399,
+ jxp: 7400,
+ jxq: 7401,
+ jxr: 7402,
+ jxs: 7403,
+ jxt: 7404,
+ jxu: 7405,
+ jxv: 7406,
+ jxw: 7407,
+ jxx: 7408,
+ jxy: 7409,
+ jyz: 7410,
+ jya: 7411,
+ jyb: 7412,
+ jyc: 7413,
+ jyd: 7414,
+ jye: 7415,
+ jyf: 7416,
+ jyg: 7417,
+ jyh: 7418,
+ jyi: 7419,
+ jyj: 7420,
+ jyk: 7421,
+ jyl: 7422,
+ jym: 7423,
+ jyn: 7424,
+ jyo: 7425,
+ jyp: 7426,
+ jyq: 7427,
+ jyr: 7428,
+ jys: 7429,
+ jyt: 7430,
+ jyu: 7431,
+ jyv: 7432,
+ jyw: 7433,
+ jyx: 7434,
+ jyy: 7435,
+ kzz: 7436,
+ kza: 7437,
+ kzb: 7438,
+ kzc: 7439,
+ kzd: 7440,
+ kze: 7441,
+ kzf: 7442,
+ kzg: 7443,
+ kzh: 7444,
+ kzi: 7445,
+ kzj: 7446,
+ kzk: 7447,
+ kzl: 7448,
+ kzm: 7449,
+ kzn: 7450,
+ kzo: 7451,
+ kzp: 7452,
+ kzq: 7453,
+ kzr: 7454,
+ kzs: 7455,
+ kzt: 7456,
+ kzu: 7457,
+ kzv: 7458,
+ kzw: 7459,
+ kzx: 7460,
+ kzy: 7461,
+ kaz: 7462,
+ kaa: 7463,
+ kab: 7464,
+ kac: 7465,
+ kad: 7466,
+ kae: 7467,
+ kaf: 7468,
+ kag: 7469,
+ kah: 7470,
+ kai: 7471,
+ kaj: 7472,
+ kak: 7473,
+ kal: 7474,
+ kam: 7475,
+ kan: 7476,
+ kao: 7477,
+ kap: 7478,
+ kaq: 7479,
+ kar: 7480,
+ kas: 7481,
+ kat: 7482,
+ kau: 7483,
+ kav: 7484,
+ kaw: 7485,
+ kax: 7486,
+ kay: 7487,
+ kbz: 7488,
+ kba: 7489,
+ kbb: 7490,
+ kbc: 7491,
+ kbd: 7492,
+ kbe: 7493,
+ kbf: 7494,
+ kbg: 7495,
+ kbh: 7496,
+ kbi: 7497,
+ kbj: 7498,
+ kbk: 7499,
+ kbl: 7500,
+ kbm: 7501,
+ kbn: 7502,
+ kbo: 7503,
+ kbp: 7504,
+ kbq: 7505,
+ kbr: 7506,
+ kbs: 7507,
+ kbt: 7508,
+ kbu: 7509,
+ kbv: 7510,
+ kbw: 7511,
+ kbx: 7512,
+ kby: 7513,
+ kcz: 7514,
+ kca: 7515,
+ kcb: 7516,
+ kcc: 7517,
+ kcd: 7518,
+ kce: 7519,
+ kcf: 7520,
+ kcg: 7521,
+ kch: 7522,
+ kci: 7523,
+ kcj: 7524,
+ kck: 7525,
+ kcl: 7526,
+ kcm: 7527,
+ kcn: 7528,
+ kco: 7529,
+ kcp: 7530,
+ kcq: 7531,
+ kcr: 7532,
+ kcs: 7533,
+ kct: 7534,
+ kcu: 7535,
+ kcv: 7536,
+ kcw: 7537,
+ kcx: 7538,
+ kcy: 7539,
+ kdz: 7540,
+ kda: 7541,
+ kdb: 7542,
+ kdc: 7543,
+ kdd: 7544,
+ kde: 7545,
+ kdf: 7546,
+ kdg: 7547,
+ kdh: 7548,
+ kdi: 7549,
+ kdj: 7550,
+ kdk: 7551,
+ kdl: 7552,
+ kdm: 7553,
+ kdn: 7554,
+ kdo: 7555,
+ kdp: 7556,
+ kdq: 7557,
+ kdr: 7558,
+ kds: 7559,
+ kdt: 7560,
+ kdu: 7561,
+ kdv: 7562,
+ kdw: 7563,
+ kdx: 7564,
+ kdy: 7565,
+ kez: 7566,
+ kea: 7567,
+ keb: 7568,
+ kec: 7569,
+ ked: 7570,
+ kee: 7571,
+ kef: 7572,
+ keg: 7573,
+ keh: 7574,
+ kei: 7575,
+ kej: 7576,
+ kek: 7577,
+ kel: 7578,
+ kem: 7579,
+ ken: 7580,
+ keo: 7581,
+ kep: 7582,
+ keq: 7583,
+ ker: 7584,
+ kes: 7585,
+ ket: 7586,
+ keu: 7587,
+ kev: 7588,
+ kew: 7589,
+ kex: 7590,
+ key: 7591,
+ kfz: 7592,
+ kfa: 7593,
+ kfb: 7594,
+ kfc: 7595,
+ kfd: 7596,
+ kfe: 7597,
+ kff: 7598,
+ kfg: 7599,
+ kfh: 7600,
+ kfi: 7601,
+ kfj: 7602,
+ kfk: 7603,
+ kfl: 7604,
+ kfm: 7605,
+ kfn: 7606,
+ kfo: 7607,
+ kfp: 7608,
+ kfq: 7609,
+ kfr: 7610,
+ kfs: 7611,
+ kft: 7612,
+ kfu: 7613,
+ kfv: 7614,
+ kfw: 7615,
+ kfx: 7616,
+ kfy: 7617,
+ kgz: 7618,
+ kga: 7619,
+ kgb: 7620,
+ kgc: 7621,
+ kgd: 7622,
+ kge: 7623,
+ kgf: 7624,
+ kgg: 7625,
+ kgh: 7626,
+ kgi: 7627,
+ kgj: 7628,
+ kgk: 7629,
+ kgl: 7630,
+ kgm: 7631,
+ kgn: 7632,
+ kgo: 7633,
+ kgp: 7634,
+ kgq: 7635,
+ kgr: 7636,
+ kgs: 7637,
+ kgt: 7638,
+ kgu: 7639,
+ kgv: 7640,
+ kgw: 7641,
+ kgx: 7642,
+ kgy: 7643,
+ khz: 7644,
+ kha: 7645,
+ khb: 7646,
+ khc: 7647,
+ khd: 7648,
+ khe: 7649,
+ khf: 7650,
+ khg: 7651,
+ khh: 7652,
+ khi: 7653,
+ khj: 7654,
+ khk: 7655,
+ khl: 7656,
+ khm: 7657,
+ khn: 7658,
+ kho: 7659,
+ khp: 7660,
+ khq: 7661,
+ khr: 7662,
+ khs: 7663,
+ kht: 7664,
+ khu: 7665,
+ khv: 7666,
+ khw: 7667,
+ khx: 7668,
+ khy: 7669,
+ kiz: 7670,
+ kia: 7671,
+ kib: 7672,
+ kic: 7673,
+ kid: 7674,
+ kie: 7675,
+ kif: 7676,
+ kig: 7677,
+ kih: 7678,
+ kii: 7679,
+ kij: 7680,
+ kik: 7681,
+ kil: 7682,
+ kim: 7683,
+ kin: 7684,
+ kio: 7685,
+ kip: 7686,
+ kiq: 7687,
+ kir: 7688,
+ kis: 7689,
+ kit: 7690,
+ kiu: 7691,
+ kiv: 7692,
+ kiw: 7693,
+ kix: 7694,
+ kiy: 7695,
+ kjz: 7696,
+ kja: 7697,
+ kjb: 7698,
+ kjc: 7699,
+ kjd: 7700,
+ kje: 7701,
+ kjf: 7702,
+ kjg: 7703,
+ kjh: 7704,
+ kji: 7705,
+ kjj: 7706,
+ kjk: 7707,
+ kjl: 7708,
+ kjm: 7709,
+ kjn: 7710,
+ kjo: 7711,
+ kjp: 7712,
+ kjq: 7713,
+ kjr: 7714,
+ kjs: 7715,
+ kjt: 7716,
+ kju: 7717,
+ kjv: 7718,
+ kjw: 7719,
+ kjx: 7720,
+ kjy: 7721,
+ kkz: 7722,
+ kka: 7723,
+ kkb: 7724,
+ kkc: 7725,
+ kkd: 7726,
+ kke: 7727,
+ kkf: 7728,
+ kkg: 7729,
+ kkh: 7730,
+ kki: 7731,
+ kkj: 7732,
+ kkk: 7733,
+ kkl: 7734,
+ kkm: 7735,
+ kkn: 7736,
+ kko: 7737,
+ kkp: 7738,
+ kkq: 7739,
+ kkr: 7740,
+ kks: 7741,
+ kkt: 7742,
+ kku: 7743,
+ kkv: 7744,
+ kkw: 7745,
+ kkx: 7746,
+ kky: 7747,
+ klz: 7748,
+ kla: 7749,
+ klb: 7750,
+ klc: 7751,
+ kld: 7752,
+ kle: 7753,
+ klf: 7754,
+ klg: 7755,
+ klh: 7756,
+ kli: 7757,
+ klj: 7758,
+ klk: 7759,
+ kll: 7760,
+ klm: 7761,
+ kln: 7762,
+ klo: 7763,
+ klp: 7764,
+ klq: 7765,
+ klr: 7766,
+ kls: 7767,
+ klt: 7768,
+ klu: 7769,
+ klv: 7770,
+ klw: 7771,
+ klx: 7772,
+ kly: 7773,
+ kmz: 7774,
+ kma: 7775,
+ kmb: 7776,
+ kmc: 7777,
+ kmd: 7778,
+ kme: 7779,
+ kmf: 7780,
+ kmg: 7781,
+ kmh: 7782,
+ kmi: 7783,
+ kmj: 7784,
+ kmk: 7785,
+ kml: 7786,
+ kmm: 7787,
+ kmn: 7788,
+ kmo: 7789,
+ kmp: 7790,
+ kmq: 7791,
+ kmr: 7792,
+ kms: 7793,
+ kmt: 7794,
+ kmu: 7795,
+ kmv: 7796,
+ kmw: 7797,
+ kmx: 7798,
+ kmy: 7799,
+ knz: 7800,
+ kna: 7801,
+ knb: 7802,
+ knc: 7803,
+ knd: 7804,
+ kne: 7805,
+ knf: 7806,
+ kng: 7807,
+ knh: 7808,
+ kni: 7809,
+ knj: 7810,
+ knk: 7811,
+ knl: 7812,
+ knm: 7813,
+ knn: 7814,
+ kno: 7815,
+ knp: 7816,
+ knq: 7817,
+ knr: 7818,
+ kns: 7819,
+ knt: 7820,
+ knu: 7821,
+ knv: 7822,
+ knw: 7823,
+ knx: 7824,
+ kny: 7825,
+ koz: 7826,
+ koa: 7827,
+ kob: 7828,
+ koc: 7829,
+ kod: 7830,
+ koe: 7831,
+ kof: 7832,
+ kog: 7833,
+ koh: 7834,
+ koi: 7835,
+ koj: 7836,
+ kok: 7837,
+ kol: 7838,
+ kom: 7839,
+ kon: 7840,
+ koo: 7841,
+ kop: 7842,
+ koq: 7843,
+ kor: 7844,
+ kos: 7845,
+ kot: 7846,
+ kou: 7847,
+ kov: 7848,
+ kow: 7849,
+ kox: 7850,
+ koy: 7851,
+ kpz: 7852,
+ kpa: 7853,
+ kpb: 7854,
+ kpc: 7855,
+ kpd: 7856,
+ kpe: 7857,
+ kpf: 7858,
+ kpg: 7859,
+ kph: 7860,
+ kpi: 7861,
+ kpj: 7862,
+ kpk: 7863,
+ kpl: 7864,
+ kpm: 7865,
+ kpn: 7866,
+ kpo: 7867,
+ kpp: 7868,
+ kpq: 7869,
+ kpr: 7870,
+ kps: 7871,
+ kpt: 7872,
+ kpu: 7873,
+ kpv: 7874,
+ kpw: 7875,
+ kpx: 7876,
+ kpy: 7877,
+ kqz: 7878,
+ kqa: 7879,
+ kqb: 7880,
+ kqc: 7881,
+ kqd: 7882,
+ kqe: 7883,
+ kqf: 7884,
+ kqg: 7885,
+ kqh: 7886,
+ kqi: 7887,
+ kqj: 7888,
+ kqk: 7889,
+ kql: 7890,
+ kqm: 7891,
+ kqn: 7892,
+ kqo: 7893,
+ kqp: 7894,
+ kqq: 7895,
+ kqr: 7896,
+ kqs: 7897,
+ kqt: 7898,
+ kqu: 7899,
+ kqv: 7900,
+ kqw: 7901,
+ kqx: 7902,
+ kqy: 7903,
+ krz: 7904,
+ kra: 7905,
+ krb: 7906,
+ krc: 7907,
+ krd: 7908,
+ kre: 7909,
+ krf: 7910,
+ krg: 7911,
+ krh: 7912,
+ kri: 7913,
+ krj: 7914,
+ krk: 7915,
+ krl: 7916,
+ krm: 7917,
+ krn: 7918,
+ kro: 7919,
+ krp: 7920,
+ krq: 7921,
+ krr: 7922,
+ krs: 7923,
+ krt: 7924,
+ kru: 7925,
+ krv: 7926,
+ krw: 7927,
+ krx: 7928,
+ kry: 7929,
+ ksz: 7930,
+ ksa: 7931,
+ ksb: 7932,
+ ksc: 7933,
+ ksd: 7934,
+ kse: 7935,
+ ksf: 7936,
+ ksg: 7937,
+ ksh: 7938,
+ ksi: 7939,
+ ksj: 7940,
+ ksk: 7941,
+ ksl: 7942,
+ ksm: 7943,
+ ksn: 7944,
+ kso: 7945,
+ ksp: 7946,
+ ksq: 7947,
+ ksr: 7948,
+ kss: 7949,
+ kst: 7950,
+ ksu: 7951,
+ ksv: 7952,
+ ksw: 7953,
+ ksx: 7954,
+ ksy: 7955,
+ ktz: 7956,
+ kta: 7957,
+ ktb: 7958,
+ ktc: 7959,
+ ktd: 7960,
+ kte: 7961,
+ ktf: 7962,
+ ktg: 7963,
+ kth: 7964,
+ kti: 7965,
+ ktj: 7966,
+ ktk: 7967,
+ ktl: 7968,
+ ktm: 7969,
+ ktn: 7970,
+ kto: 7971,
+ ktp: 7972,
+ ktq: 7973,
+ ktr: 7974,
+ kts: 7975,
+ ktt: 7976,
+ ktu: 7977,
+ ktv: 7978,
+ ktw: 7979,
+ ktx: 7980,
+ kty: 7981,
+ kuz: 7982,
+ kua: 7983,
+ kub: 7984,
+ kuc: 7985,
+ kud: 7986,
+ kue: 7987,
+ kuf: 7988,
+ kug: 7989,
+ kuh: 7990,
+ kui: 7991,
+ kuj: 7992,
+ kuk: 7993,
+ kul: 7994,
+ kum: 7995,
+ kun: 7996,
+ kuo: 7997,
+ kup: 7998,
+ kuq: 7999,
+ kur: 8000,
+ kus: 8001,
+ kut: 8002,
+ kuu: 8003,
+ kuv: 8004,
+ kuw: 8005,
+ kux: 8006,
+ kuy: 8007,
+ kvz: 8008,
+ kva: 8009,
+ kvb: 8010,
+ kvc: 8011,
+ kvd: 8012,
+ kve: 8013,
+ kvf: 8014,
+ kvg: 8015,
+ kvh: 8016,
+ kvi: 8017,
+ kvj: 8018,
+ kvk: 8019,
+ kvl: 8020,
+ kvm: 8021,
+ kvn: 8022,
+ kvo: 8023,
+ kvp: 8024,
+ kvq: 8025,
+ kvr: 8026,
+ kvs: 8027,
+ kvt: 8028,
+ kvu: 8029,
+ kvv: 8030,
+ kvw: 8031,
+ kvx: 8032,
+ kvy: 8033,
+ kwz: 8034,
+ kwa: 8035,
+ kwb: 8036,
+ kwc: 8037,
+ kwd: 8038,
+ kwe: 8039,
+ kwf: 8040,
+ kwg: 8041,
+ kwh: 8042,
+ kwi: 8043,
+ kwj: 8044,
+ kwk: 8045,
+ kwl: 8046,
+ kwm: 8047,
+ kwn: 8048,
+ kwo: 8049,
+ kwp: 8050,
+ kwq: 8051,
+ kwr: 8052,
+ kws: 8053,
+ kwt: 8054,
+ kwu: 8055,
+ kwv: 8056,
+ kww: 8057,
+ kwx: 8058,
+ kwy: 8059,
+ kxz: 8060,
+ kxa: 8061,
+ kxb: 8062,
+ kxc: 8063,
+ kxd: 8064,
+ kxe: 8065,
+ kxf: 8066,
+ kxg: 8067,
+ kxh: 8068,
+ kxi: 8069,
+ kxj: 8070,
+ kxk: 8071,
+ kxl: 8072,
+ kxm: 8073,
+ kxn: 8074,
+ kxo: 8075,
+ kxp: 8076,
+ kxq: 8077,
+ kxr: 8078,
+ kxs: 8079,
+ kxt: 8080,
+ kxu: 8081,
+ kxv: 8082,
+ kxw: 8083,
+ kxx: 8084,
+ kxy: 8085,
+ kyz: 8086,
+ kya: 8087,
+ kyb: 8088,
+ kyc: 8089,
+ kyd: 8090,
+ kye: 8091,
+ kyf: 8092,
+ kyg: 8093,
+ kyh: 8094,
+ kyi: 8095,
+ kyj: 8096,
+ kyk: 8097,
+ kyl: 8098,
+ kym: 8099,
+ kyn: 8100,
+ kyo: 8101,
+ kyp: 8102,
+ kyq: 8103,
+ kyr: 8104,
+ kys: 8105,
+ kyt: 8106,
+ kyu: 8107,
+ kyv: 8108,
+ kyw: 8109,
+ kyx: 8110,
+ kyy: 8111,
+ lzz: 8112,
+ lza: 8113,
+ lzb: 8114,
+ lzc: 8115,
+ lzd: 8116,
+ lze: 8117,
+ lzf: 8118,
+ lzg: 8119,
+ lzh: 8120,
+ lzi: 8121,
+ lzj: 8122,
+ lzk: 8123,
+ lzl: 8124,
+ lzm: 8125,
+ lzn: 8126,
+ lzo: 8127,
+ lzp: 8128,
+ lzq: 8129,
+ lzr: 8130,
+ lzs: 8131,
+ lzt: 8132,
+ lzu: 8133,
+ lzv: 8134,
+ lzw: 8135,
+ lzx: 8136,
+ lzy: 8137,
+ laz: 8138,
+ laa: 8139,
+ lab: 8140,
+ lac: 8141,
+ lad: 8142,
+ lae: 8143,
+ laf: 8144,
+ lag: 8145,
+ lah: 8146,
+ lai: 8147,
+ laj: 8148,
+ lak: 8149,
+ lal: 8150,
+ lam: 8151,
+ lan: 8152,
+ lao: 8153,
+ lap: 8154,
+ laq: 8155,
+ lar: 8156,
+ las: 8157,
+ lat: 8158,
+ lau: 8159,
+ lav: 8160,
+ law: 8161,
+ lax: 8162,
+ lay: 8163,
+ lbz: 8164,
+ lba: 8165,
+ lbb: 8166,
+ lbc: 8167,
+ lbd: 8168,
+ lbe: 8169,
+ lbf: 8170,
+ lbg: 8171,
+ lbh: 8172,
+ lbi: 8173,
+ lbj: 8174,
+ lbk: 8175,
+ lbl: 8176,
+ lbm: 8177,
+ lbn: 8178,
+ lbo: 8179,
+ lbp: 8180,
+ lbq: 8181,
+ lbr: 8182,
+ lbs: 8183,
+ lbt: 8184,
+ lbu: 8185,
+ lbv: 8186,
+ lbw: 8187,
+ lbx: 8188,
+ lby: 8189,
+ lcz: 8190,
+ lca: 8191,
+ lcb: 8192,
+ lcc: 8193,
+ lcd: 8194,
+ lce: 8195,
+ lcf: 8196,
+ lcg: 8197,
+ lch: 8198,
+ lci: 8199,
+ lcj: 8200,
+ lck: 8201,
+ lcl: 8202,
+ lcm: 8203,
+ lcn: 8204,
+ lco: 8205,
+ lcp: 8206,
+ lcq: 8207,
+ lcr: 8208,
+ lcs: 8209,
+ lct: 8210,
+ lcu: 8211,
+ lcv: 8212,
+ lcw: 8213,
+ lcx: 8214,
+ lcy: 8215,
+ ldz: 8216,
+ lda: 8217,
+ ldb: 8218,
+ ldc: 8219,
+ ldd: 8220,
+ lde: 8221,
+ ldf: 8222,
+ ldg: 8223,
+ ldh: 8224,
+ ldi: 8225,
+ ldj: 8226,
+ ldk: 8227,
+ ldl: 8228,
+ ldm: 8229,
+ ldn: 8230,
+ ldo: 8231,
+ ldp: 8232,
+ ldq: 8233,
+ ldr: 8234,
+ lds: 8235,
+ ldt: 8236,
+ ldu: 8237,
+ ldv: 8238,
+ ldw: 8239,
+ ldx: 8240,
+ ldy: 8241,
+ lez: 8242,
+ lea: 8243,
+ leb: 8244,
+ lec: 8245,
+ led: 8246,
+ lee: 8247,
+ lef: 8248,
+ leg: 8249,
+ leh: 8250,
+ lei: 8251,
+ lej: 8252,
+ lek: 8253,
+ lel: 8254,
+ lem: 8255,
+ len: 8256,
+ leo: 8257,
+ lep: 8258,
+ leq: 8259,
+ ler: 8260,
+ les: 8261,
+ let: 8262,
+ leu: 8263,
+ lev: 8264,
+ lew: 8265,
+ lex: 8266,
+ ley: 8267,
+ lfz: 8268,
+ lfa: 8269,
+ lfb: 8270,
+ lfc: 8271,
+ lfd: 8272,
+ lfe: 8273,
+ lff: 8274,
+ lfg: 8275,
+ lfh: 8276,
+ lfi: 8277,
+ lfj: 8278,
+ lfk: 8279,
+ lfl: 8280,
+ lfm: 8281,
+ lfn: 8282,
+ lfo: 8283,
+ lfp: 8284,
+ lfq: 8285,
+ lfr: 8286,
+ lfs: 8287,
+ lft: 8288,
+ lfu: 8289,
+ lfv: 8290,
+ lfw: 8291,
+ lfx: 8292,
+ lfy: 8293,
+ lgz: 8294,
+ lga: 8295,
+ lgb: 8296,
+ lgc: 8297,
+ lgd: 8298,
+ lge: 8299,
+ lgf: 8300,
+ lgg: 8301,
+ lgh: 8302,
+ lgi: 8303,
+ lgj: 8304,
+ lgk: 8305,
+ lgl: 8306,
+ lgm: 8307,
+ lgn: 8308,
+ lgo: 8309,
+ lgp: 8310,
+ lgq: 8311,
+ lgr: 8312,
+ lgs: 8313,
+ lgt: 8314,
+ lgu: 8315,
+ lgv: 8316,
+ lgw: 8317,
+ lgx: 8318,
+ lgy: 8319,
+ lhz: 8320,
+ lha: 8321,
+ lhb: 8322,
+ lhc: 8323,
+ lhd: 8324,
+ lhe: 8325,
+ lhf: 8326,
+ lhg: 8327,
+ lhh: 8328,
+ lhi: 8329,
+ lhj: 8330,
+ lhk: 8331,
+ lhl: 8332,
+ lhm: 8333,
+ lhn: 8334,
+ lho: 8335,
+ lhp: 8336,
+ lhq: 8337,
+ lhr: 8338,
+ lhs: 8339,
+ lht: 8340,
+ lhu: 8341,
+ lhv: 8342,
+ lhw: 8343,
+ lhx: 8344,
+ lhy: 8345,
+ liz: 8346,
+ lia: 8347,
+ lib: 8348,
+ lic: 8349,
+ lid: 8350,
+ lie: 8351,
+ lif: 8352,
+ lig: 8353,
+ lih: 8354,
+ lii: 8355,
+ lij: 8356,
+ lik: 8357,
+ lil: 8358,
+ lim: 8359,
+ lin: 8360,
+ lio: 8361,
+ lip: 8362,
+ liq: 8363,
+ lir: 8364,
+ lis: 8365,
+ lit: 8366,
+ liu: 8367,
+ liv: 8368,
+ liw: 8369,
+ lix: 8370,
+ liy: 8371,
+ ljz: 8372,
+ lja: 8373,
+ ljb: 8374,
+ ljc: 8375,
+ ljd: 8376,
+ lje: 8377,
+ ljf: 8378,
+ ljg: 8379,
+ ljh: 8380,
+ lji: 8381,
+ ljj: 8382,
+ ljk: 8383,
+ ljl: 8384,
+ ljm: 8385,
+ ljn: 8386,
+ ljo: 8387,
+ ljp: 8388,
+ ljq: 8389,
+ ljr: 8390,
+ ljs: 8391,
+ ljt: 8392,
+ lju: 8393,
+ ljv: 8394,
+ ljw: 8395,
+ ljx: 8396,
+ ljy: 8397,
+ lkz: 8398,
+ lka: 8399,
+ lkb: 8400,
+ lkc: 8401,
+ lkd: 8402,
+ lke: 8403,
+ lkf: 8404,
+ lkg: 8405,
+ lkh: 8406,
+ lki: 8407,
+ lkj: 8408,
+ lkk: 8409,
+ lkl: 8410,
+ lkm: 8411,
+ lkn: 8412,
+ lko: 8413,
+ lkp: 8414,
+ lkq: 8415,
+ lkr: 8416,
+ lks: 8417,
+ lkt: 8418,
+ lku: 8419,
+ lkv: 8420,
+ lkw: 8421,
+ lkx: 8422,
+ lky: 8423,
+ llz: 8424,
+ lla: 8425,
+ llb: 8426,
+ llc: 8427,
+ lld: 8428,
+ lle: 8429,
+ llf: 8430,
+ llg: 8431,
+ llh: 8432,
+ lli: 8433,
+ llj: 8434,
+ llk: 8435,
+ lll: 8436,
+ llm: 8437,
+ lln: 8438,
+ llo: 8439,
+ llp: 8440,
+ llq: 8441,
+ llr: 8442,
+ lls: 8443,
+ llt: 8444,
+ llu: 8445,
+ llv: 8446,
+ llw: 8447,
+ llx: 8448,
+ lly: 8449,
+ lmz: 8450,
+ lma: 8451,
+ lmb: 8452,
+ lmc: 8453,
+ lmd: 8454,
+ lme: 8455,
+ lmf: 8456,
+ lmg: 8457,
+ lmh: 8458,
+ lmi: 8459,
+ lmj: 8460,
+ lmk: 8461,
+ lml: 8462,
+ lmm: 8463,
+ lmn: 8464,
+ lmo: 8465,
+ lmp: 8466,
+ lmq: 8467,
+ lmr: 8468,
+ lms: 8469,
+ lmt: 8470,
+ lmu: 8471,
+ lmv: 8472,
+ lmw: 8473,
+ lmx: 8474,
+ lmy: 8475,
+ lnz: 8476,
+ lna: 8477,
+ lnb: 8478,
+ lnc: 8479,
+ lnd: 8480,
+ lne: 8481,
+ lnf: 8482,
+ lng: 8483,
+ lnh: 8484,
+ lni: 8485,
+ lnj: 8486,
+ lnk: 8487,
+ lnl: 8488,
+ lnm: 8489,
+ lnn: 8490,
+ lno: 8491,
+ lnp: 8492,
+ lnq: 8493,
+ lnr: 8494,
+ lns: 8495,
+ lnt: 8496,
+ lnu: 8497,
+ lnv: 8498,
+ lnw: 8499,
+ lnx: 8500,
+ lny: 8501,
+ loz: 8502,
+ loa: 8503,
+ lob: 8504,
+ loc: 8505,
+ lod: 8506,
+ loe: 8507,
+ lof: 8508,
+ log: 8509,
+ loh: 8510,
+ loi: 8511,
+ loj: 8512,
+ lok: 8513,
+ lol: 8514,
+ lom: 8515,
+ lon: 8516,
+ loo: 8517,
+ lop: 8518,
+ loq: 8519,
+ lor: 8520,
+ los: 8521,
+ lot: 8522,
+ lou: 8523,
+ lov: 8524,
+ low: 8525,
+ lox: 8526,
+ loy: 8527,
+ lpz: 8528,
+ lpa: 8529,
+ lpb: 8530,
+ lpc: 8531,
+ lpd: 8532,
+ lpe: 8533,
+ lpf: 8534,
+ lpg: 8535,
+ lph: 8536,
+ lpi: 8537,
+ lpj: 8538,
+ lpk: 8539,
+ lpl: 8540,
+ lpm: 8541,
+ lpn: 8542,
+ lpo: 8543,
+ lpp: 8544,
+ lpq: 8545,
+ lpr: 8546,
+ lps: 8547,
+ lpt: 8548,
+ lpu: 8549,
+ lpv: 8550,
+ lpw: 8551,
+ lpx: 8552,
+ lpy: 8553,
+ lqz: 8554,
+ lqa: 8555,
+ lqb: 8556,
+ lqc: 8557,
+ lqd: 8558,
+ lqe: 8559,
+ lqf: 8560,
+ lqg: 8561,
+ lqh: 8562,
+ lqi: 8563,
+ lqj: 8564,
+ lqk: 8565,
+ lql: 8566,
+ lqm: 8567,
+ lqn: 8568,
+ lqo: 8569,
+ lqp: 8570,
+ lqq: 8571,
+ lqr: 8572,
+ lqs: 8573,
+ lqt: 8574,
+ lqu: 8575,
+ lqv: 8576,
+ lqw: 8577,
+ lqx: 8578,
+ lqy: 8579,
+ lrz: 8580,
+ lra: 8581,
+ lrb: 8582,
+ lrc: 8583,
+ lrd: 8584,
+ lre: 8585,
+ lrf: 8586,
+ lrg: 8587,
+ lrh: 8588,
+ lri: 8589,
+ lrj: 8590,
+ lrk: 8591,
+ lrl: 8592,
+ lrm: 8593,
+ lrn: 8594,
+ lro: 8595,
+ lrp: 8596,
+ lrq: 8597,
+ lrr: 8598,
+ lrs: 8599,
+ lrt: 8600,
+ lru: 8601,
+ lrv: 8602,
+ lrw: 8603,
+ lrx: 8604,
+ lry: 8605,
+ lsz: 8606,
+ lsa: 8607,
+ lsb: 8608,
+ lsc: 8609,
+ lsd: 8610,
+ lse: 8611,
+ lsf: 8612,
+ lsg: 8613,
+ lsh: 8614,
+ lsi: 8615,
+ lsj: 8616,
+ lsk: 8617,
+ lsl: 8618,
+ lsm: 8619,
+ lsn: 8620,
+ lso: 8621,
+ lsp: 8622,
+ lsq: 8623,
+ lsr: 8624,
+ lss: 8625,
+ lst: 8626,
+ lsu: 8627,
+ lsv: 8628,
+ lsw: 8629,
+ lsx: 8630,
+ lsy: 8631,
+ ltz: 8632,
+ lta: 8633,
+ ltb: 8634,
+ ltc: 8635,
+ ltd: 8636,
+ lte: 8637,
+ ltf: 8638,
+ ltg: 8639,
+ lth: 8640,
+ lti: 8641,
+ ltj: 8642,
+ ltk: 8643,
+ ltl: 8644,
+ ltm: 8645,
+ ltn: 8646,
+ lto: 8647,
+ ltp: 8648,
+ ltq: 8649,
+ ltr: 8650,
+ lts: 8651,
+ ltt: 8652,
+ ltu: 8653,
+ ltv: 8654,
+ ltw: 8655,
+ ltx: 8656,
+ lty: 8657,
+ luz: 8658,
+ lua: 8659,
+ lub: 8660,
+ luc: 8661,
+ lud: 8662,
+ lue: 8663,
+ luf: 8664,
+ lug: 8665,
+ luh: 8666,
+ lui: 8667,
+ luj: 8668,
+ luk: 8669,
+ lul: 8670,
+ lum: 8671,
+ lun: 8672,
+ luo: 8673,
+ lup: 8674,
+ luq: 8675,
+ lur: 8676,
+ lus: 8677,
+ lut: 8678,
+ luu: 8679,
+ luv: 8680,
+ luw: 8681,
+ lux: 8682,
+ luy: 8683,
+ lvz: 8684,
+ lva: 8685,
+ lvb: 8686,
+ lvc: 8687,
+ lvd: 8688,
+ lve: 8689,
+ lvf: 8690,
+ lvg: 8691,
+ lvh: 8692,
+ lvi: 8693,
+ lvj: 8694,
+ lvk: 8695,
+ lvl: 8696,
+ lvm: 8697,
+ lvn: 8698,
+ lvo: 8699,
+ lvp: 8700,
+ lvq: 8701,
+ lvr: 8702,
+ lvs: 8703,
+ lvt: 8704,
+ lvu: 8705,
+ lvv: 8706,
+ lvw: 8707,
+ lvx: 8708,
+ lvy: 8709,
+ lwz: 8710,
+ lwa: 8711,
+ lwb: 8712,
+ lwc: 8713,
+ lwd: 8714,
+ lwe: 8715,
+ lwf: 8716,
+ lwg: 8717,
+ lwh: 8718,
+ lwi: 8719,
+ lwj: 8720,
+ lwk: 8721,
+ lwl: 8722,
+ lwm: 8723,
+ lwn: 8724,
+ lwo: 8725,
+ lwp: 8726,
+ lwq: 8727,
+ lwr: 8728,
+ lws: 8729,
+ lwt: 8730,
+ lwu: 8731,
+ lwv: 8732,
+ lww: 8733,
+ lwx: 8734,
+ lwy: 8735,
+ lxz: 8736,
+ lxa: 8737,
+ lxb: 8738,
+ lxc: 8739,
+ lxd: 8740,
+ lxe: 8741,
+ lxf: 8742,
+ lxg: 8743,
+ lxh: 8744,
+ lxi: 8745,
+ lxj: 8746,
+ lxk: 8747,
+ lxl: 8748,
+ lxm: 8749,
+ lxn: 8750,
+ lxo: 8751,
+ lxp: 8752,
+ lxq: 8753,
+ lxr: 8754,
+ lxs: 8755,
+ lxt: 8756,
+ lxu: 8757,
+ lxv: 8758,
+ lxw: 8759,
+ lxx: 8760,
+ lxy: 8761,
+ lyz: 8762,
+ lya: 8763,
+ lyb: 8764,
+ lyc: 8765,
+ lyd: 8766,
+ lye: 8767,
+ lyf: 8768,
+ lyg: 8769,
+ lyh: 8770,
+ lyi: 8771,
+ lyj: 8772,
+ lyk: 8773,
+ lyl: 8774,
+ lym: 8775,
+ lyn: 8776,
+ lyo: 8777,
+ lyp: 8778,
+ lyq: 8779,
+ lyr: 8780,
+ lys: 8781,
+ lyt: 8782,
+ lyu: 8783,
+ lyv: 8784,
+ lyw: 8785,
+ lyx: 8786,
+ lyy: 8787,
+ mzz: 8788,
+ mza: 8789,
+ mzb: 8790,
+ mzc: 8791,
+ mzd: 8792,
+ mze: 8793,
+ mzf: 8794,
+ mzg: 8795,
+ mzh: 8796,
+ mzi: 8797,
+ mzj: 8798,
+ mzk: 8799,
+ mzl: 8800,
+ mzm: 8801,
+ mzn: 8802,
+ mzo: 8803,
+ mzp: 8804,
+ mzq: 8805,
+ mzr: 8806,
+ mzs: 8807,
+ mzt: 8808,
+ mzu: 8809,
+ mzv: 8810,
+ mzw: 8811,
+ mzx: 8812,
+ mzy: 8813,
+ maz: 8814,
+ maa: 8815,
+ mab: 8816,
+ mac: 8817,
+ mad: 8818,
+ mae: 8819,
+ maf: 8820,
+ mag: 8821,
+ mah: 8822,
+ mai: 8823,
+ maj: 8824,
+ mak: 8825,
+ mal: 8826,
+ mam: 8827,
+ man: 8828,
+ mao: 8829,
+ map: 8830,
+ maq: 8831,
+ mar: 8832,
+ mas: 8833,
+ mat: 8834,
+ mau: 8835,
+ mav: 8836,
+ maw: 8837,
+ max: 8838,
+ may: 8839,
+ mbz: 8840,
+ mba: 8841,
+ mbb: 8842,
+ mbc: 8843,
+ mbd: 8844,
+ mbe: 8845,
+ mbf: 8846,
+ mbg: 8847,
+ mbh: 8848,
+ mbi: 8849,
+ mbj: 8850,
+ mbk: 8851,
+ mbl: 8852,
+ mbm: 8853,
+ mbn: 8854,
+ mbo: 8855,
+ mbp: 8856,
+ mbq: 8857,
+ mbr: 8858,
+ mbs: 8859,
+ mbt: 8860,
+ mbu: 8861,
+ mbv: 8862,
+ mbw: 8863,
+ mbx: 8864,
+ mby: 8865,
+ mcz: 8866,
+ mca: 8867,
+ mcb: 8868,
+ mcc: 8869,
+ mcd: 8870,
+ mce: 8871,
+ mcf: 8872,
+ mcg: 8873,
+ mch: 8874,
+ mci: 8875,
+ mcj: 8876,
+ mck: 8877,
+ mcl: 8878,
+ mcm: 8879,
+ mcn: 8880,
+ mco: 8881,
+ mcp: 8882,
+ mcq: 8883,
+ mcr: 8884,
+ mcs: 8885,
+ mct: 8886,
+ mcu: 8887,
+ mcv: 8888,
+ mcw: 8889,
+ mcx: 8890,
+ mcy: 8891,
+ mdz: 8892,
+ mda: 8893,
+ mdb: 8894,
+ mdc: 8895,
+ mdd: 8896,
+ mde: 8897,
+ mdf: 8898,
+ mdg: 8899,
+ mdh: 8900,
+ mdi: 8901,
+ mdj: 8902,
+ mdk: 8903,
+ mdl: 8904,
+ mdm: 8905,
+ mdn: 8906,
+ mdo: 8907,
+ mdp: 8908,
+ mdq: 8909,
+ mdr: 8910,
+ mds: 8911,
+ mdt: 8912,
+ mdu: 8913,
+ mdv: 8914,
+ mdw: 8915,
+ mdx: 8916,
+ mdy: 8917,
+ mez: 8918,
+ mea: 8919,
+ meb: 8920,
+ mec: 8921,
+ med: 8922,
+ mee: 8923,
+ mef: 8924,
+ meg: 8925,
+ meh: 8926,
+ mei: 8927,
+ mej: 8928,
+ mek: 8929,
+ mel: 8930,
+ mem: 8931,
+ men: 8932,
+ meo: 8933,
+ mep: 8934,
+ meq: 8935,
+ mer: 8936,
+ mes: 8937,
+ met: 8938,
+ meu: 8939,
+ mev: 8940,
+ mew: 8941,
+ mex: 8942,
+ mey: 8943,
+ mfz: 8944,
+ mfa: 8945,
+ mfb: 8946,
+ mfc: 8947,
+ mfd: 8948,
+ mfe: 8949,
+ mff: 8950,
+ mfg: 8951,
+ mfh: 8952,
+ mfi: 8953,
+ mfj: 8954,
+ mfk: 8955,
+ mfl: 8956,
+ mfm: 8957,
+ mfn: 8958,
+ mfo: 8959,
+ mfp: 8960,
+ mfq: 8961,
+ mfr: 8962,
+ mfs: 8963,
+ mft: 8964,
+ mfu: 8965,
+ mfv: 8966,
+ mfw: 8967,
+ mfx: 8968,
+ mfy: 8969,
+ mgz: 8970,
+ mga: 8971,
+ mgb: 8972,
+ mgc: 8973,
+ mgd: 8974,
+ mge: 8975,
+ mgf: 8976,
+ mgg: 8977,
+ mgh: 8978,
+ mgi: 8979,
+ mgj: 8980,
+ mgk: 8981,
+ mgl: 8982,
+ mgm: 8983,
+ mgn: 8984,
+ mgo: 8985,
+ mgp: 8986,
+ mgq: 8987,
+ mgr: 8988,
+ mgs: 8989,
+ mgt: 8990,
+ mgu: 8991,
+ mgv: 8992,
+ mgw: 8993,
+ mgx: 8994,
+ mgy: 8995,
+ mhz: 8996,
+ mha: 8997,
+ mhb: 8998,
+ mhc: 8999,
+ mhd: 9000,
+ mhe: 9001,
+ mhf: 9002,
+ mhg: 9003,
+ mhh: 9004,
+ mhi: 9005,
+ mhj: 9006,
+ mhk: 9007,
+ mhl: 9008,
+ mhm: 9009,
+ mhn: 9010,
+ mho: 9011,
+ mhp: 9012,
+ mhq: 9013,
+ mhr: 9014,
+ mhs: 9015,
+ mht: 9016,
+ mhu: 9017,
+ mhv: 9018,
+ mhw: 9019,
+ mhx: 9020,
+ mhy: 9021,
+ miz: 9022,
+ mia: 9023,
+ mib: 9024,
+ mic: 9025,
+ mid: 9026,
+ mie: 9027,
+ mif: 9028,
+ mig: 9029,
+ mih: 9030,
+ mii: 9031,
+ mij: 9032,
+ mik: 9033,
+ mil: 9034,
+ mim: 9035,
+ min: 9036,
+ mio: 9037,
+ mip: 9038,
+ miq: 9039,
+ mir: 9040,
+ mis: 9041,
+ mit: 9042,
+ miu: 9043,
+ miv: 9044,
+ miw: 9045,
+ mix: 9046,
+ miy: 9047,
+ mjz: 9048,
+ mja: 9049,
+ mjb: 9050,
+ mjc: 9051,
+ mjd: 9052,
+ mje: 9053,
+ mjf: 9054,
+ mjg: 9055,
+ mjh: 9056,
+ mji: 9057,
+ mjj: 9058,
+ mjk: 9059,
+ mjl: 9060,
+ mjm: 9061,
+ mjn: 9062,
+ mjo: 9063,
+ mjp: 9064,
+ mjq: 9065,
+ mjr: 9066,
+ mjs: 9067,
+ mjt: 9068,
+ mju: 9069,
+ mjv: 9070,
+ mjw: 9071,
+ mjx: 9072,
+ mjy: 9073,
+ mkz: 9074,
+ mka: 9075,
+ mkb: 9076,
+ mkc: 9077,
+ mkd: 9078,
+ mke: 9079,
+ mkf: 9080,
+ mkg: 9081,
+ mkh: 9082,
+ mki: 9083,
+ mkj: 9084,
+ mkk: 9085,
+ mkl: 9086,
+ mkm: 9087,
+ mkn: 9088,
+ mko: 9089,
+ mkp: 9090,
+ mkq: 9091,
+ mkr: 9092,
+ mks: 9093,
+ mkt: 9094,
+ mku: 9095,
+ mkv: 9096,
+ mkw: 9097,
+ mkx: 9098,
+ mky: 9099,
+ mlz: 9100,
+ mla: 9101,
+ mlb: 9102,
+ mlc: 9103,
+ mld: 9104,
+ mle: 9105,
+ mlf: 9106,
+ mlg: 9107,
+ mlh: 9108,
+ mli: 9109,
+ mlj: 9110,
+ mlk: 9111,
+ mll: 9112,
+ mlm: 9113,
+ mln: 9114,
+ mlo: 9115,
+ mlp: 9116,
+ mlq: 9117,
+ mlr: 9118,
+ mls: 9119,
+ mlt: 9120,
+ mlu: 9121,
+ mlv: 9122,
+ mlw: 9123,
+ mlx: 9124,
+ mly: 9125,
+ mmz: 9126,
+ mma: 9127,
+ mmb: 9128,
+ mmc: 9129,
+ mmd: 9130,
+ mme: 9131,
+ mmf: 9132,
+ mmg: 9133,
+ mmh: 9134,
+ mmi: 9135,
+ mmj: 9136,
+ mmk: 9137,
+ mml: 9138,
+ mmm: 9139,
+ mmn: 9140,
+ mmo: 9141,
+ mmp: 9142,
+ mmq: 9143,
+ mmr: 9144,
+ mms: 9145,
+ mmt: 9146,
+ mmu: 9147,
+ mmv: 9148,
+ mmw: 9149,
+ mmx: 9150,
+ mmy: 9151,
+ mnz: 9152,
+ mna: 9153,
+ mnb: 9154,
+ mnc: 9155,
+ mnd: 9156,
+ mne: 9157,
+ mnf: 9158,
+ mng: 9159,
+ mnh: 9160,
+ mni: 9161,
+ mnj: 9162,
+ mnk: 9163,
+ mnl: 9164,
+ mnm: 9165,
+ mnn: 9166,
+ mno: 9167,
+ mnp: 9168,
+ mnq: 9169,
+ mnr: 9170,
+ mns: 9171,
+ mnt: 9172,
+ mnu: 9173,
+ mnv: 9174,
+ mnw: 9175,
+ mnx: 9176,
+ mny: 9177,
+ moz: 9178,
+ moa: 9179,
+ mob: 9180,
+ moc: 9181,
+ mod: 9182,
+ moe: 9183,
+ mof: 9184,
+ mog: 9185,
+ moh: 9186,
+ moi: 9187,
+ moj: 9188,
+ mok: 9189,
+ mol: 9190,
+ mom: 9191,
+ mon: 9192,
+ moo: 9193,
+ mop: 9194,
+ moq: 9195,
+ mor: 9196,
+ mos: 9197,
+ mot: 9198,
+ mou: 9199,
+ mov: 9200,
+ mow: 9201,
+ mox: 9202,
+ moy: 9203,
+ mpz: 9204,
+ mpa: 9205,
+ mpb: 9206,
+ mpc: 9207,
+ mpd: 9208,
+ mpe: 9209,
+ mpf: 9210,
+ mpg: 9211,
+ mph: 9212,
+ mpi: 9213,
+ mpj: 9214,
+ mpk: 9215,
+ mpl: 9216,
+ mpm: 9217,
+ mpn: 9218,
+ mpo: 9219,
+ mpp: 9220,
+ mpq: 9221,
+ mpr: 9222,
+ mps: 9223,
+ mpt: 9224,
+ mpu: 9225,
+ mpv: 9226,
+ mpw: 9227,
+ mpx: 9228,
+ mpy: 9229,
+ mqz: 9230,
+ mqa: 9231,
+ mqb: 9232,
+ mqc: 9233,
+ mqd: 9234,
+ mqe: 9235,
+ mqf: 9236,
+ mqg: 9237,
+ mqh: 9238,
+ mqi: 9239,
+ mqj: 9240,
+ mqk: 9241,
+ mql: 9242,
+ mqm: 9243,
+ mqn: 9244,
+ mqo: 9245,
+ mqp: 9246,
+ mqq: 9247,
+ mqr: 9248,
+ mqs: 9249,
+ mqt: 9250,
+ mqu: 9251,
+ mqv: 9252,
+ mqw: 9253,
+ mqx: 9254,
+ mqy: 9255,
+ mrz: 9256,
+ mra: 9257,
+ mrb: 9258,
+ mrc: 9259,
+ mrd: 9260,
+ mre: 9261,
+ mrf: 9262,
+ mrg: 9263,
+ mrh: 9264,
+ mri: 9265,
+ mrj: 9266,
+ mrk: 9267,
+ mrl: 9268,
+ mrm: 9269,
+ mrn: 9270,
+ mro: 9271,
+ mrp: 9272,
+ mrq: 9273,
+ mrr: 9274,
+ mrs: 9275,
+ mrt: 9276,
+ mru: 9277,
+ mrv: 9278,
+ mrw: 9279,
+ mrx: 9280,
+ mry: 9281,
+ msz: 9282,
+ msa: 9283,
+ msb: 9284,
+ msc: 9285,
+ msd: 9286,
+ mse: 9287,
+ msf: 9288,
+ msg: 9289,
+ msh: 9290,
+ msi: 9291,
+ msj: 9292,
+ msk: 9293,
+ msl: 9294,
+ msm: 9295,
+ msn: 9296,
+ mso: 9297,
+ msp: 9298,
+ msq: 9299,
+ msr: 9300,
+ mss: 9301,
+ mst: 9302,
+ msu: 9303,
+ msv: 9304,
+ msw: 9305,
+ msx: 9306,
+ msy: 9307,
+ mtz: 9308,
+ mta: 9309,
+ mtb: 9310,
+ mtc: 9311,
+ mtd: 9312,
+ mte: 9313,
+ mtf: 9314,
+ mtg: 9315,
+ mth: 9316,
+ mti: 9317,
+ mtj: 9318,
+ mtk: 9319,
+ mtl: 9320,
+ mtm: 9321,
+ mtn: 9322,
+ mto: 9323,
+ mtp: 9324,
+ mtq: 9325,
+ mtr: 9326,
+ mts: 9327,
+ mtt: 9328,
+ mtu: 9329,
+ mtv: 9330,
+ mtw: 9331,
+ mtx: 9332,
+ mty: 9333,
+ muz: 9334,
+ mua: 9335,
+ mub: 9336,
+ muc: 9337,
+ mud: 9338,
+ mue: 9339,
+ muf: 9340,
+ mug: 9341,
+ muh: 9342,
+ mui: 9343,
+ muj: 9344,
+ muk: 9345,
+ mul: 9346,
+ mum: 9347,
+ mun: 9348,
+ muo: 9349,
+ mup: 9350,
+ muq: 9351,
+ mur: 9352,
+ mus: 9353,
+ mut: 9354,
+ muu: 9355,
+ muv: 9356,
+ muw: 9357,
+ mux: 9358,
+ muy: 9359,
+ mvz: 9360,
+ mva: 9361,
+ mvb: 9362,
+ mvc: 9363,
+ mvd: 9364,
+ mve: 9365,
+ mvf: 9366,
+ mvg: 9367,
+ mvh: 9368,
+ mvi: 9369,
+ mvj: 9370,
+ mvk: 9371,
+ mvl: 9372,
+ mvm: 9373,
+ mvn: 9374,
+ mvo: 9375,
+ mvp: 9376,
+ mvq: 9377,
+ mvr: 9378,
+ mvs: 9379,
+ mvt: 9380,
+ mvu: 9381,
+ mvv: 9382,
+ mvw: 9383,
+ mvx: 9384,
+ mvy: 9385,
+ mwz: 9386,
+ mwa: 9387,
+ mwb: 9388,
+ mwc: 9389,
+ mwd: 9390,
+ mwe: 9391,
+ mwf: 9392,
+ mwg: 9393,
+ mwh: 9394,
+ mwi: 9395,
+ mwj: 9396,
+ mwk: 9397,
+ mwl: 9398,
+ mwm: 9399,
+ mwn: 9400,
+ mwo: 9401,
+ mwp: 9402,
+ mwq: 9403,
+ mwr: 9404,
+ mws: 9405,
+ mwt: 9406,
+ mwu: 9407,
+ mwv: 9408,
+ mww: 9409,
+ mwx: 9410,
+ mwy: 9411,
+ mxz: 9412,
+ mxa: 9413,
+ mxb: 9414,
+ mxc: 9415,
+ mxd: 9416,
+ mxe: 9417,
+ mxf: 9418,
+ mxg: 9419,
+ mxh: 9420,
+ mxi: 9421,
+ mxj: 9422,
+ mxk: 9423,
+ mxl: 9424,
+ mxm: 9425,
+ mxn: 9426,
+ mxo: 9427,
+ mxp: 9428,
+ mxq: 9429,
+ mxr: 9430,
+ mxs: 9431,
+ mxt: 9432,
+ mxu: 9433,
+ mxv: 9434,
+ mxw: 9435,
+ mxx: 9436,
+ mxy: 9437,
+ myz: 9438,
+ mya: 9439,
+ myb: 9440,
+ myc: 9441,
+ myd: 9442,
+ mye: 9443,
+ myf: 9444,
+ myg: 9445,
+ myh: 9446,
+ myi: 9447,
+ myj: 9448,
+ myk: 9449,
+ myl: 9450,
+ mym: 9451,
+ myn: 9452,
+ myo: 9453,
+ myp: 9454,
+ myq: 9455,
+ myr: 9456,
+ mys: 9457,
+ myt: 9458,
+ myu: 9459,
+ myv: 9460,
+ myw: 9461,
+ myx: 9462,
+ myy: 9463,
+ nzz: 9464,
+ nza: 9465,
+ nzb: 9466,
+ nzc: 9467,
+ nzd: 9468,
+ nze: 9469,
+ nzf: 9470,
+ nzg: 9471,
+ nzh: 9472,
+ nzi: 9473,
+ nzj: 9474,
+ nzk: 9475,
+ nzl: 9476,
+ nzm: 9477,
+ nzn: 9478,
+ nzo: 9479,
+ nzp: 9480,
+ nzq: 9481,
+ nzr: 9482,
+ nzs: 9483,
+ nzt: 9484,
+ nzu: 9485,
+ nzv: 9486,
+ nzw: 9487,
+ nzx: 9488,
+ nzy: 9489,
+ naz: 9490,
+ naa: 9491,
+ nab: 9492,
+ nac: 9493,
+ nad: 9494,
+ nae: 9495,
+ naf: 9496,
+ nag: 9497,
+ nah: 9498,
+ nai: 9499,
+ naj: 9500,
+ nak: 9501,
+ nal: 9502,
+ nam: 9503,
+ nan: 9504,
+ nao: 9505,
+ nap: 9506,
+ naq: 9507,
+ nar: 9508,
+ nas: 9509,
+ nat: 9510,
+ nau: 9511,
+ nav: 9512,
+ naw: 9513,
+ nax: 9514,
+ nay: 9515,
+ nbz: 9516,
+ nba: 9517,
+ nbb: 9518,
+ nbc: 9519,
+ nbd: 9520,
+ nbe: 9521,
+ nbf: 9522,
+ nbg: 9523,
+ nbh: 9524,
+ nbi: 9525,
+ nbj: 9526,
+ nbk: 9527,
+ nbl: 9528,
+ nbm: 9529,
+ nbn: 9530,
+ nbo: 9531,
+ nbp: 9532,
+ nbq: 9533,
+ nbr: 9534,
+ nbs: 9535,
+ nbt: 9536,
+ nbu: 9537,
+ nbv: 9538,
+ nbw: 9539,
+ nbx: 9540,
+ nby: 9541,
+ ncz: 9542,
+ nca: 9543,
+ ncb: 9544,
+ ncc: 9545,
+ ncd: 9546,
+ nce: 9547,
+ ncf: 9548,
+ ncg: 9549,
+ nch: 9550,
+ nci: 9551,
+ ncj: 9552,
+ nck: 9553,
+ ncl: 9554,
+ ncm: 9555,
+ ncn: 9556,
+ nco: 9557,
+ ncp: 9558,
+ ncq: 9559,
+ ncr: 9560,
+ ncs: 9561,
+ nct: 9562,
+ ncu: 9563,
+ ncv: 9564,
+ ncw: 9565,
+ ncx: 9566,
+ ncy: 9567,
+ ndz: 9568,
+ nda: 9569,
+ ndb: 9570,
+ ndc: 9571,
+ ndd: 9572,
+ nde: 9573,
+ ndf: 9574,
+ ndg: 9575,
+ ndh: 9576,
+ ndi: 9577,
+ ndj: 9578,
+ ndk: 9579,
+ ndl: 9580,
+ ndm: 9581,
+ ndn: 9582,
+ ndo: 9583,
+ ndp: 9584,
+ ndq: 9585,
+ ndr: 9586,
+ nds: 9587,
+ ndt: 9588,
+ ndu: 9589,
+ ndv: 9590,
+ ndw: 9591,
+ ndx: 9592,
+ ndy: 9593,
+ nez: 9594,
+ nea: 9595,
+ neb: 9596,
+ nec: 9597,
+ ned: 9598,
+ nee: 9599,
+ nef: 9600,
+ neg: 9601,
+ neh: 9602,
+ nei: 9603,
+ nej: 9604,
+ nek: 9605,
+ nel: 9606,
+ nem: 9607,
+ nen: 9608,
+ neo: 9609,
+ nep: 9610,
+ neq: 9611,
+ ner: 9612,
+ nes: 9613,
+ net: 9614,
+ neu: 9615,
+ nev: 9616,
+ new: 9617,
+ nex: 9618,
+ ney: 9619,
+ nfz: 9620,
+ nfa: 9621,
+ nfb: 9622,
+ nfc: 9623,
+ nfd: 9624,
+ nfe: 9625,
+ nff: 9626,
+ nfg: 9627,
+ nfh: 9628,
+ nfi: 9629,
+ nfj: 9630,
+ nfk: 9631,
+ nfl: 9632,
+ nfm: 9633,
+ nfn: 9634,
+ nfo: 9635,
+ nfp: 9636,
+ nfq: 9637,
+ nfr: 9638,
+ nfs: 9639,
+ nft: 9640,
+ nfu: 9641,
+ nfv: 9642,
+ nfw: 9643,
+ nfx: 9644,
+ nfy: 9645,
+ ngz: 9646,
+ nga: 9647,
+ ngb: 9648,
+ ngc: 9649,
+ ngd: 9650,
+ nge: 9651,
+ ngf: 9652,
+ ngg: 9653,
+ ngh: 9654,
+ ngi: 9655,
+ ngj: 9656,
+ ngk: 9657,
+ ngl: 9658,
+ ngm: 9659,
+ ngn: 9660,
+ ngo: 9661,
+ ngp: 9662,
+ ngq: 9663,
+ ngr: 9664,
+ ngs: 9665,
+ ngt: 9666,
+ ngu: 9667,
+ ngv: 9668,
+ ngw: 9669,
+ ngx: 9670,
+ ngy: 9671,
+ nhz: 9672,
+ nha: 9673,
+ nhb: 9674,
+ nhc: 9675,
+ nhd: 9676,
+ nhe: 9677,
+ nhf: 9678,
+ nhg: 9679,
+ nhh: 9680,
+ nhi: 9681,
+ nhj: 9682,
+ nhk: 9683,
+ nhl: 9684,
+ nhm: 9685,
+ nhn: 9686,
+ nho: 9687,
+ nhp: 9688,
+ nhq: 9689,
+ nhr: 9690,
+ nhs: 9691,
+ nht: 9692,
+ nhu: 9693,
+ nhv: 9694,
+ nhw: 9695,
+ nhx: 9696,
+ nhy: 9697,
+ niz: 9698,
+ nia: 9699,
+ nib: 9700,
+ nic: 9701,
+ nid: 9702,
+ nie: 9703,
+ nif: 9704,
+ nig: 9705,
+ nih: 9706,
+ nii: 9707,
+ nij: 9708,
+ nik: 9709,
+ nil: 9710,
+ nim: 9711,
+ nin: 9712,
+ nio: 9713,
+ nip: 9714,
+ niq: 9715,
+ nir: 9716,
+ nis: 9717,
+ nit: 9718,
+ niu: 9719,
+ niv: 9720,
+ niw: 9721,
+ nix: 9722,
+ niy: 9723,
+ njz: 9724,
+ nja: 9725,
+ njb: 9726,
+ njc: 9727,
+ njd: 9728,
+ nje: 9729,
+ njf: 9730,
+ njg: 9731,
+ njh: 9732,
+ nji: 9733,
+ njj: 9734,
+ njk: 9735,
+ njl: 9736,
+ njm: 9737,
+ njn: 9738,
+ njo: 9739,
+ njp: 9740,
+ njq: 9741,
+ njr: 9742,
+ njs: 9743,
+ njt: 9744,
+ nju: 9745,
+ njv: 9746,
+ njw: 9747,
+ njx: 9748,
+ njy: 9749,
+ nkz: 9750,
+ nka: 9751,
+ nkb: 9752,
+ nkc: 9753,
+ nkd: 9754,
+ nke: 9755,
+ nkf: 9756,
+ nkg: 9757,
+ nkh: 9758,
+ nki: 9759,
+ nkj: 9760,
+ nkk: 9761,
+ nkl: 9762,
+ nkm: 9763,
+ nkn: 9764,
+ nko: 9765,
+ nkp: 9766,
+ nkq: 9767,
+ nkr: 9768,
+ nks: 9769,
+ nkt: 9770,
+ nku: 9771,
+ nkv: 9772,
+ nkw: 9773,
+ nkx: 9774,
+ nky: 9775,
+ nlz: 9776,
+ nla: 9777,
+ nlb: 9778,
+ nlc: 9779,
+ nld: 9780,
+ nle: 9781,
+ nlf: 9782,
+ nlg: 9783,
+ nlh: 9784,
+ nli: 9785,
+ nlj: 9786,
+ nlk: 9787,
+ nll: 9788,
+ nlm: 9789,
+ nln: 9790,
+ nlo: 9791,
+ nlp: 9792,
+ nlq: 9793,
+ nlr: 9794,
+ nls: 9795,
+ nlt: 9796,
+ nlu: 9797,
+ nlv: 9798,
+ nlw: 9799,
+ nlx: 9800,
+ nly: 9801,
+ nmz: 9802,
+ nma: 9803,
+ nmb: 9804,
+ nmc: 9805,
+ nmd: 9806,
+ nme: 9807,
+ nmf: 9808,
+ nmg: 9809,
+ nmh: 9810,
+ nmi: 9811,
+ nmj: 9812,
+ nmk: 9813,
+ nml: 9814,
+ nmm: 9815,
+ nmn: 9816,
+ nmo: 9817,
+ nmp: 9818,
+ nmq: 9819,
+ nmr: 9820,
+ nms: 9821,
+ nmt: 9822,
+ nmu: 9823,
+ nmv: 9824,
+ nmw: 9825,
+ nmx: 9826,
+ nmy: 9827,
+ nnz: 9828,
+ nna: 9829,
+ nnb: 9830,
+ nnc: 9831,
+ nnd: 9832,
+ nne: 9833,
+ nnf: 9834,
+ nng: 9835,
+ nnh: 9836,
+ nni: 9837,
+ nnj: 9838,
+ nnk: 9839,
+ nnl: 9840,
+ nnm: 9841,
+ nnn: 9842,
+ nno: 9843,
+ nnp: 9844,
+ nnq: 9845,
+ nnr: 9846,
+ nns: 9847,
+ nnt: 9848,
+ nnu: 9849,
+ nnv: 9850,
+ nnw: 9851,
+ nnx: 9852,
+ nny: 9853,
+ noz: 9854,
+ noa: 9855,
+ nob: 9856,
+ noc: 9857,
+ nod: 9858,
+ noe: 9859,
+ nof: 9860,
+ nog: 9861,
+ noh: 9862,
+ noi: 9863,
+ noj: 9864,
+ nok: 9865,
+ nol: 9866,
+ nom: 9867,
+ non: 9868,
+ noo: 9869,
+ nop: 9870,
+ noq: 9871,
+ nor: 9872,
+ nos: 9873,
+ not: 9874,
+ nou: 9875,
+ nov: 9876,
+ now: 9877,
+ nox: 9878,
+ noy: 9879,
+ npz: 9880,
+ npa: 9881,
+ npb: 9882,
+ npc: 9883,
+ npd: 9884,
+ npe: 9885,
+ npf: 9886,
+ npg: 9887,
+ nph: 9888,
+ npi: 9889,
+ npj: 9890,
+ npk: 9891,
+ npl: 9892,
+ npm: 9893,
+ npn: 9894,
+ npo: 9895,
+ npp: 9896,
+ npq: 9897,
+ npr: 9898,
+ nps: 9899,
+ npt: 9900,
+ npu: 9901,
+ npv: 9902,
+ npw: 9903,
+ npx: 9904,
+ npy: 9905,
+ nqz: 9906,
+ nqa: 9907,
+ nqb: 9908,
+ nqc: 9909,
+ nqd: 9910,
+ nqe: 9911,
+ nqf: 9912,
+ nqg: 9913,
+ nqh: 9914,
+ nqi: 9915,
+ nqj: 9916,
+ nqk: 9917,
+ nql: 9918,
+ nqm: 9919,
+ nqn: 9920,
+ nqo: 9921,
+ nqp: 9922,
+ nqq: 9923,
+ nqr: 9924,
+ nqs: 9925,
+ nqt: 9926,
+ nqu: 9927,
+ nqv: 9928,
+ nqw: 9929,
+ nqx: 9930,
+ nqy: 9931,
+ nrz: 9932,
+ nra: 9933,
+ nrb: 9934,
+ nrc: 9935,
+ nrd: 9936,
+ nre: 9937,
+ nrf: 9938,
+ nrg: 9939,
+ nrh: 9940,
+ nri: 9941,
+ nrj: 9942,
+ nrk: 9943,
+ nrl: 9944,
+ nrm: 9945,
+ nrn: 9946,
+ nro: 9947,
+ nrp: 9948,
+ nrq: 9949,
+ nrr: 9950,
+ nrs: 9951,
+ nrt: 9952,
+ nru: 9953,
+ nrv: 9954,
+ nrw: 9955,
+ nrx: 9956,
+ nry: 9957,
+ nsz: 9958,
+ nsa: 9959,
+ nsb: 9960,
+ nsc: 9961,
+ nsd: 9962,
+ nse: 9963,
+ nsf: 9964,
+ nsg: 9965,
+ nsh: 9966,
+ nsi: 9967,
+ nsj: 9968,
+ nsk: 9969,
+ nsl: 9970,
+ nsm: 9971,
+ nsn: 9972,
+ nso: 9973,
+ nsp: 9974,
+ nsq: 9975,
+ nsr: 9976,
+ nss: 9977,
+ nst: 9978,
+ nsu: 9979,
+ nsv: 9980,
+ nsw: 9981,
+ nsx: 9982,
+ nsy: 9983,
+ ntz: 9984,
+ nta: 9985,
+ ntb: 9986,
+ ntc: 9987,
+ ntd: 9988,
+ nte: 9989,
+ ntf: 9990,
+ ntg: 9991,
+ nth: 9992,
+ nti: 9993,
+ ntj: 9994,
+ ntk: 9995,
+ ntl: 9996,
+ ntm: 9997,
+ ntn: 9998,
+ nto: 9999,
+ ntp: 10000,
+ ntq: 10001,
+ ntr: 10002,
+ nts: 10003,
+ ntt: 10004,
+ ntu: 10005,
+ ntv: 10006,
+ ntw: 10007,
+ ntx: 10008,
+ nty: 10009,
+ nuz: 10010,
+ nua: 10011,
+ nub: 10012,
+ nuc: 10013,
+ nud: 10014,
+ nue: 10015,
+ nuf: 10016,
+ nug: 10017,
+ nuh: 10018,
+ nui: 10019,
+ nuj: 10020,
+ nuk: 10021,
+ nul: 10022,
+ num: 10023,
+ nun: 10024,
+ nuo: 10025,
+ nup: 10026,
+ nuq: 10027,
+ nur: 10028,
+ nus: 10029,
+ nut: 10030,
+ nuu: 10031,
+ nuv: 10032,
+ nuw: 10033,
+ nux: 10034,
+ nuy: 10035,
+ nvz: 10036,
+ nva: 10037,
+ nvb: 10038,
+ nvc: 10039,
+ nvd: 10040,
+ nve: 10041,
+ nvf: 10042,
+ nvg: 10043,
+ nvh: 10044,
+ nvi: 10045,
+ nvj: 10046,
+ nvk: 10047,
+ nvl: 10048,
+ nvm: 10049,
+ nvn: 10050,
+ nvo: 10051,
+ nvp: 10052,
+ nvq: 10053,
+ nvr: 10054,
+ nvs: 10055,
+ nvt: 10056,
+ nvu: 10057,
+ nvv: 10058,
+ nvw: 10059,
+ nvx: 10060,
+ nvy: 10061,
+ nwz: 10062,
+ nwa: 10063,
+ nwb: 10064,
+ nwc: 10065,
+ nwd: 10066,
+ nwe: 10067,
+ nwf: 10068,
+ nwg: 10069,
+ nwh: 10070,
+ nwi: 10071,
+ nwj: 10072,
+ nwk: 10073,
+ nwl: 10074,
+ nwm: 10075,
+ nwn: 10076,
+ nwo: 10077,
+ nwp: 10078,
+ nwq: 10079,
+ nwr: 10080,
+ nws: 10081,
+ nwt: 10082,
+ nwu: 10083,
+ nwv: 10084,
+ nww: 10085,
+ nwx: 10086,
+ nwy: 10087,
+ nxz: 10088,
+ nxa: 10089,
+ nxb: 10090,
+ nxc: 10091,
+ nxd: 10092,
+ nxe: 10093,
+ nxf: 10094,
+ nxg: 10095,
+ nxh: 10096,
+ nxi: 10097,
+ nxj: 10098,
+ nxk: 10099,
+ nxl: 10100,
+ nxm: 10101,
+ nxn: 10102,
+ nxo: 10103,
+ nxp: 10104,
+ nxq: 10105,
+ nxr: 10106,
+ nxs: 10107,
+ nxt: 10108,
+ nxu: 10109,
+ nxv: 10110,
+ nxw: 10111,
+ nxx: 10112,
+ nxy: 10113,
+ nyz: 10114,
+ nya: 10115,
+ nyb: 10116,
+ nyc: 10117,
+ nyd: 10118,
+ nye: 10119,
+ nyf: 10120,
+ nyg: 10121,
+ nyh: 10122,
+ nyi: 10123,
+ nyj: 10124,
+ nyk: 10125,
+ nyl: 10126,
+ nym: 10127,
+ nyn: 10128,
+ nyo: 10129,
+ nyp: 10130,
+ nyq: 10131,
+ nyr: 10132,
+ nys: 10133,
+ nyt: 10134,
+ nyu: 10135,
+ nyv: 10136,
+ nyw: 10137,
+ nyx: 10138,
+ nyy: 10139,
+ ozz: 10140,
+ oza: 10141,
+ ozb: 10142,
+ ozc: 10143,
+ ozd: 10144,
+ oze: 10145,
+ ozf: 10146,
+ ozg: 10147,
+ ozh: 10148,
+ ozi: 10149,
+ ozj: 10150,
+ ozk: 10151,
+ ozl: 10152,
+ ozm: 10153,
+ ozn: 10154,
+ ozo: 10155,
+ ozp: 10156,
+ ozq: 10157,
+ ozr: 10158,
+ ozs: 10159,
+ ozt: 10160,
+ ozu: 10161,
+ ozv: 10162,
+ ozw: 10163,
+ ozx: 10164,
+ ozy: 10165,
+ oaz: 10166,
+ oaa: 10167,
+ oab: 10168,
+ oac: 10169,
+ oad: 10170,
+ oae: 10171,
+ oaf: 10172,
+ oag: 10173,
+ oah: 10174,
+ oai: 10175,
+ oaj: 10176,
+ oak: 10177,
+ oal: 10178,
+ oam: 10179,
+ oan: 10180,
+ oao: 10181,
+ oap: 10182,
+ oaq: 10183,
+ oar: 10184,
+ oas: 10185,
+ oat: 10186,
+ oau: 10187,
+ oav: 10188,
+ oaw: 10189,
+ oax: 10190,
+ oay: 10191,
+ obz: 10192,
+ oba: 10193,
+ obb: 10194,
+ obc: 10195,
+ obd: 10196,
+ obe: 10197,
+ obf: 10198,
+ obg: 10199,
+ obh: 10200,
+ obi: 10201,
+ obj: 10202,
+ obk: 10203,
+ obl: 10204,
+ obm: 10205,
+ obn: 10206,
+ obo: 10207,
+ obp: 10208,
+ obq: 10209,
+ obr: 10210,
+ obs: 10211,
+ obt: 10212,
+ obu: 10213,
+ obv: 10214,
+ obw: 10215,
+ obx: 10216,
+ oby: 10217,
+ ocz: 10218,
+ oca: 10219,
+ ocb: 10220,
+ occ: 10221,
+ ocd: 10222,
+ oce: 10223,
+ ocf: 10224,
+ ocg: 10225,
+ och: 10226,
+ oci: 10227,
+ ocj: 10228,
+ ock: 10229,
+ ocl: 10230,
+ ocm: 10231,
+ ocn: 10232,
+ oco: 10233,
+ ocp: 10234,
+ ocq: 10235,
+ ocr: 10236,
+ ocs: 10237,
+ oct: 10238,
+ ocu: 10239,
+ ocv: 10240,
+ ocw: 10241,
+ ocx: 10242,
+ ocy: 10243,
+ odz: 10244,
+ oda: 10245,
+ odb: 10246,
+ odc: 10247,
+ odd: 10248,
+ ode: 10249,
+ odf: 10250,
+ odg: 10251,
+ odh: 10252,
+ odi: 10253,
+ odj: 10254,
+ odk: 10255,
+ odl: 10256,
+ odm: 10257,
+ odn: 10258,
+ odo: 10259,
+ odp: 10260,
+ odq: 10261,
+ odr: 10262,
+ ods: 10263,
+ odt: 10264,
+ odu: 10265,
+ odv: 10266,
+ odw: 10267,
+ odx: 10268,
+ ody: 10269,
+ oez: 10270,
+ oea: 10271,
+ oeb: 10272,
+ oec: 10273,
+ oed: 10274,
+ oee: 10275,
+ oef: 10276,
+ oeg: 10277,
+ oeh: 10278,
+ oei: 10279,
+ oej: 10280,
+ oek: 10281,
+ oel: 10282,
+ oem: 10283,
+ oen: 10284,
+ oeo: 10285,
+ oep: 10286,
+ oeq: 10287,
+ oer: 10288,
+ oes: 10289,
+ oet: 10290,
+ oeu: 10291,
+ oev: 10292,
+ oew: 10293,
+ oex: 10294,
+ oey: 10295,
+ ofz: 10296,
+ ofa: 10297,
+ ofb: 10298,
+ ofc: 10299,
+ ofd: 10300,
+ ofe: 10301,
+ off: 10302,
+ ofg: 10303,
+ ofh: 10304,
+ ofi: 10305,
+ ofj: 10306,
+ ofk: 10307,
+ ofl: 10308,
+ ofm: 10309,
+ ofn: 10310,
+ ofo: 10311,
+ ofp: 10312,
+ ofq: 10313,
+ ofr: 10314,
+ ofs: 10315,
+ oft: 10316,
+ ofu: 10317,
+ ofv: 10318,
+ ofw: 10319,
+ ofx: 10320,
+ ofy: 10321,
+ ogz: 10322,
+ oga: 10323,
+ ogb: 10324,
+ ogc: 10325,
+ ogd: 10326,
+ oge: 10327,
+ ogf: 10328,
+ ogg: 10329,
+ ogh: 10330,
+ ogi: 10331,
+ ogj: 10332,
+ ogk: 10333,
+ ogl: 10334,
+ ogm: 10335,
+ ogn: 10336,
+ ogo: 10337,
+ ogp: 10338,
+ ogq: 10339,
+ ogr: 10340,
+ ogs: 10341,
+ ogt: 10342,
+ ogu: 10343,
+ ogv: 10344,
+ ogw: 10345,
+ ogx: 10346,
+ ogy: 10347,
+ ohz: 10348,
+ oha: 10349,
+ ohb: 10350,
+ ohc: 10351,
+ ohd: 10352,
+ ohe: 10353,
+ ohf: 10354,
+ ohg: 10355,
+ ohh: 10356,
+ ohi: 10357,
+ ohj: 10358,
+ ohk: 10359,
+ ohl: 10360,
+ ohm: 10361,
+ ohn: 10362,
+ oho: 10363,
+ ohp: 10364,
+ ohq: 10365,
+ ohr: 10366,
+ ohs: 10367,
+ oht: 10368,
+ ohu: 10369,
+ ohv: 10370,
+ ohw: 10371,
+ ohx: 10372,
+ ohy: 10373,
+ oiz: 10374,
+ oia: 10375,
+ oib: 10376,
+ oic: 10377,
+ oid: 10378,
+ oie: 10379,
+ oif: 10380,
+ oig: 10381,
+ oih: 10382,
+ oii: 10383,
+ oij: 10384,
+ oik: 10385,
+ oil: 10386,
+ oim: 10387,
+ oin: 10388,
+ oio: 10389,
+ oip: 10390,
+ oiq: 10391,
+ oir: 10392,
+ ois: 10393,
+ oit: 10394,
+ oiu: 10395,
+ oiv: 10396,
+ oiw: 10397,
+ oix: 10398,
+ oiy: 10399,
+ ojz: 10400,
+ oja: 10401,
+ ojb: 10402,
+ ojc: 10403,
+ ojd: 10404,
+ oje: 10405,
+ ojf: 10406,
+ ojg: 10407,
+ ojh: 10408,
+ oji: 10409,
+ ojj: 10410,
+ ojk: 10411,
+ ojl: 10412,
+ ojm: 10413,
+ ojn: 10414,
+ ojo: 10415,
+ ojp: 10416,
+ ojq: 10417,
+ ojr: 10418,
+ ojs: 10419,
+ ojt: 10420,
+ oju: 10421,
+ ojv: 10422,
+ ojw: 10423,
+ ojx: 10424,
+ ojy: 10425,
+ okz: 10426,
+ oka: 10427,
+ okb: 10428,
+ okc: 10429,
+ okd: 10430,
+ oke: 10431,
+ okf: 10432,
+ okg: 10433,
+ okh: 10434,
+ oki: 10435,
+ okj: 10436,
+ okk: 10437,
+ okl: 10438,
+ okm: 10439,
+ okn: 10440,
+ oko: 10441,
+ okp: 10442,
+ okq: 10443,
+ okr: 10444,
+ oks: 10445,
+ okt: 10446,
+ oku: 10447,
+ okv: 10448,
+ okw: 10449,
+ okx: 10450,
+ oky: 10451,
+ olz: 10452,
+ ola: 10453,
+ olb: 10454,
+ olc: 10455,
+ old: 10456,
+ ole: 10457,
+ olf: 10458,
+ olg: 10459,
+ olh: 10460,
+ oli: 10461,
+ olj: 10462,
+ olk: 10463,
+ oll: 10464,
+ olm: 10465,
+ oln: 10466,
+ olo: 10467,
+ olp: 10468,
+ olq: 10469,
+ olr: 10470,
+ ols: 10471,
+ olt: 10472,
+ olu: 10473,
+ olv: 10474,
+ olw: 10475,
+ olx: 10476,
+ oly: 10477,
+ omz: 10478,
+ oma: 10479,
+ omb: 10480,
+ omc: 10481,
+ omd: 10482,
+ ome: 10483,
+ omf: 10484,
+ omg: 10485,
+ omh: 10486,
+ omi: 10487,
+ omj: 10488,
+ omk: 10489,
+ oml: 10490,
+ omm: 10491,
+ omn: 10492,
+ omo: 10493,
+ omp: 10494,
+ omq: 10495,
+ omr: 10496,
+ oms: 10497,
+ omt: 10498,
+ omu: 10499,
+ omv: 10500,
+ omw: 10501,
+ omx: 10502,
+ omy: 10503,
+ onz: 10504,
+ ona: 10505,
+ onb: 10506,
+ onc: 10507,
+ ond: 10508,
+ one: 10509,
+ onf: 10510,
+ ong: 10511,
+ onh: 10512,
+ oni: 10513,
+ onj: 10514,
+ onk: 10515,
+ onl: 10516,
+ onm: 10517,
+ onn: 10518,
+ ono: 10519,
+ onp: 10520,
+ onq: 10521,
+ onr: 10522,
+ ons: 10523,
+ ont: 10524,
+ onu: 10525,
+ onv: 10526,
+ onw: 10527,
+ onx: 10528,
+ ony: 10529,
+ ooz: 10530,
+ ooa: 10531,
+ oob: 10532,
+ ooc: 10533,
+ ood: 10534,
+ ooe: 10535,
+ oof: 10536,
+ oog: 10537,
+ ooh: 10538,
+ ooi: 10539,
+ ooj: 10540,
+ ook: 10541,
+ ool: 10542,
+ oom: 10543,
+ oon: 10544,
+ ooo: 10545,
+ oop: 10546,
+ ooq: 10547,
+ oor: 10548,
+ oos: 10549,
+ oot: 10550,
+ oou: 10551,
+ oov: 10552,
+ oow: 10553,
+ oox: 10554,
+ ooy: 10555,
+ opz: 10556,
+ opa: 10557,
+ opb: 10558,
+ opc: 10559,
+ opd: 10560,
+ ope: 10561,
+ opf: 10562,
+ opg: 10563,
+ oph: 10564,
+ opi: 10565,
+ opj: 10566,
+ opk: 10567,
+ opl: 10568,
+ opm: 10569,
+ opn: 10570,
+ opo: 10571,
+ opp: 10572,
+ opq: 10573,
+ opr: 10574,
+ ops: 10575,
+ opt: 10576,
+ opu: 10577,
+ opv: 10578,
+ opw: 10579,
+ opx: 10580,
+ opy: 10581,
+ oqz: 10582,
+ oqa: 10583,
+ oqb: 10584,
+ oqc: 10585,
+ oqd: 10586,
+ oqe: 10587,
+ oqf: 10588,
+ oqg: 10589,
+ oqh: 10590,
+ oqi: 10591,
+ oqj: 10592,
+ oqk: 10593,
+ oql: 10594,
+ oqm: 10595,
+ oqn: 10596,
+ oqo: 10597,
+ oqp: 10598,
+ oqq: 10599,
+ oqr: 10600,
+ oqs: 10601,
+ oqt: 10602,
+ oqu: 10603,
+ oqv: 10604,
+ oqw: 10605,
+ oqx: 10606,
+ oqy: 10607,
+ orz: 10608,
+ ora: 10609,
+ orb: 10610,
+ orc: 10611,
+ ord: 10612,
+ ore: 10613,
+ orf: 10614,
+ org: 10615,
+ orh: 10616,
+ ori: 10617,
+ orj: 10618,
+ ork: 10619,
+ orl: 10620,
+ orm: 10621,
+ orn: 10622,
+ oro: 10623,
+ orp: 10624,
+ orq: 10625,
+ orr: 10626,
+ ors: 10627,
+ ort: 10628,
+ oru: 10629,
+ orv: 10630,
+ orw: 10631,
+ orx: 10632,
+ ory: 10633,
+ osz: 10634,
+ osa: 10635,
+ osb: 10636,
+ osc: 10637,
+ osd: 10638,
+ ose: 10639,
+ osf: 10640,
+ osg: 10641,
+ osh: 10642,
+ osi: 10643,
+ osj: 10644,
+ osk: 10645,
+ osl: 10646,
+ osm: 10647,
+ osn: 10648,
+ oso: 10649,
+ osp: 10650,
+ osq: 10651,
+ osr: 10652,
+ oss: 10653,
+ ost: 10654,
+ osu: 10655,
+ osv: 10656,
+ osw: 10657,
+ osx: 10658,
+ osy: 10659,
+ otz: 10660,
+ ota: 10661,
+ otb: 10662,
+ otc: 10663,
+ otd: 10664,
+ ote: 10665,
+ otf: 10666,
+ otg: 10667,
+ oth: 10668,
+ oti: 10669,
+ otj: 10670,
+ otk: 10671,
+ otl: 10672,
+ otm: 10673,
+ otn: 10674,
+ oto: 10675,
+ otp: 10676,
+ otq: 10677,
+ otr: 10678,
+ ots: 10679,
+ ott: 10680,
+ otu: 10681,
+ otv: 10682,
+ otw: 10683,
+ otx: 10684,
+ oty: 10685,
+ ouz: 10686,
+ oua: 10687,
+ oub: 10688,
+ ouc: 10689,
+ oud: 10690,
+ oue: 10691,
+ ouf: 10692,
+ oug: 10693,
+ ouh: 10694,
+ oui: 10695,
+ ouj: 10696,
+ ouk: 10697,
+ oul: 10698,
+ oum: 10699,
+ oun: 10700,
+ ouo: 10701,
+ oup: 10702,
+ ouq: 10703,
+ our: 10704,
+ ous: 10705,
+ out: 10706,
+ ouu: 10707,
+ ouv: 10708,
+ ouw: 10709,
+ oux: 10710,
+ ouy: 10711,
+ ovz: 10712,
+ ova: 10713,
+ ovb: 10714,
+ ovc: 10715,
+ ovd: 10716,
+ ove: 10717,
+ ovf: 10718,
+ ovg: 10719,
+ ovh: 10720,
+ ovi: 10721,
+ ovj: 10722,
+ ovk: 10723,
+ ovl: 10724,
+ ovm: 10725,
+ ovn: 10726,
+ ovo: 10727,
+ ovp: 10728,
+ ovq: 10729,
+ ovr: 10730,
+ ovs: 10731,
+ ovt: 10732,
+ ovu: 10733,
+ ovv: 10734,
+ ovw: 10735,
+ ovx: 10736,
+ ovy: 10737,
+ owz: 10738,
+ owa: 10739,
+ owb: 10740,
+ owc: 10741,
+ owd: 10742,
+ owe: 10743,
+ owf: 10744,
+ owg: 10745,
+ owh: 10746,
+ owi: 10747,
+ owj: 10748,
+ owk: 10749,
+ owl: 10750,
+ owm: 10751,
+ own: 10752,
+ owo: 10753,
+ owp: 10754,
+ owq: 10755,
+ owr: 10756,
+ ows: 10757,
+ owt: 10758,
+ owu: 10759,
+ owv: 10760,
+ oww: 10761,
+ owx: 10762,
+ owy: 10763,
+ oxz: 10764,
+ oxa: 10765,
+ oxb: 10766,
+ oxc: 10767,
+ oxd: 10768,
+ oxe: 10769,
+ oxf: 10770,
+ oxg: 10771,
+ oxh: 10772,
+ oxi: 10773,
+ oxj: 10774,
+ oxk: 10775,
+ oxl: 10776,
+ oxm: 10777,
+ oxn: 10778,
+ oxo: 10779,
+ oxp: 10780,
+ oxq: 10781,
+ oxr: 10782,
+ oxs: 10783,
+ oxt: 10784,
+ oxu: 10785,
+ oxv: 10786,
+ oxw: 10787,
+ oxx: 10788,
+ oxy: 10789,
+ oyz: 10790,
+ oya: 10791,
+ oyb: 10792,
+ oyc: 10793,
+ oyd: 10794,
+ oye: 10795,
+ oyf: 10796,
+ oyg: 10797,
+ oyh: 10798,
+ oyi: 10799,
+ oyj: 10800,
+ oyk: 10801,
+ oyl: 10802,
+ oym: 10803,
+ oyn: 10804,
+ oyo: 10805,
+ oyp: 10806,
+ oyq: 10807,
+ oyr: 10808,
+ oys: 10809,
+ oyt: 10810,
+ oyu: 10811,
+ oyv: 10812,
+ oyw: 10813,
+ oyx: 10814,
+ oyy: 10815,
+ pzz: 10816,
+ pza: 10817,
+ pzb: 10818,
+ pzc: 10819,
+ pzd: 10820,
+ pze: 10821,
+ pzf: 10822,
+ pzg: 10823,
+ pzh: 10824,
+ pzi: 10825,
+ pzj: 10826,
+ pzk: 10827,
+ pzl: 10828,
+ pzm: 10829,
+ pzn: 10830,
+ pzo: 10831,
+ pzp: 10832,
+ pzq: 10833,
+ pzr: 10834,
+ pzs: 10835,
+ pzt: 10836,
+ pzu: 10837,
+ pzv: 10838,
+ pzw: 10839,
+ pzx: 10840,
+ pzy: 10841,
+ paz: 10842,
+ paa: 10843,
+ pab: 10844,
+ pac: 10845,
+ pad: 10846,
+ pae: 10847,
+ paf: 10848,
+ pag: 10849,
+ pah: 10850,
+ pai: 10851,
+ paj: 10852,
+ pak: 10853,
+ pal: 10854,
+ pam: 10855,
+ pan: 10856,
+ pao: 10857,
+ pap: 10858,
+ paq: 10859,
+ par: 10860,
+ pas: 10861,
+ pat: 10862,
+ pau: 10863,
+ pav: 10864,
+ paw: 10865,
+ pax: 10866,
+ pay: 10867,
+ pbz: 10868,
+ pba: 10869,
+ pbb: 10870,
+ pbc: 10871,
+ pbd: 10872,
+ pbe: 10873,
+ pbf: 10874,
+ pbg: 10875,
+ pbh: 10876,
+ pbi: 10877,
+ pbj: 10878,
+ pbk: 10879,
+ pbl: 10880,
+ pbm: 10881,
+ pbn: 10882,
+ pbo: 10883,
+ pbp: 10884,
+ pbq: 10885,
+ pbr: 10886,
+ pbs: 10887,
+ pbt: 10888,
+ pbu: 10889,
+ pbv: 10890,
+ pbw: 10891,
+ pbx: 10892,
+ pby: 10893,
+ pcz: 10894,
+ pca: 10895,
+ pcb: 10896,
+ pcc: 10897,
+ pcd: 10898,
+ pce: 10899,
+ pcf: 10900,
+ pcg: 10901,
+ pch: 10902,
+ pci: 10903,
+ pcj: 10904,
+ pck: 10905,
+ pcl: 10906,
+ pcm: 10907,
+ pcn: 10908,
+ pco: 10909,
+ pcp: 10910,
+ pcq: 10911,
+ pcr: 10912,
+ pcs: 10913,
+ pct: 10914,
+ pcu: 10915,
+ pcv: 10916,
+ pcw: 10917,
+ pcx: 10918,
+ pcy: 10919,
+ pdz: 10920,
+ pda: 10921,
+ pdb: 10922,
+ pdc: 10923,
+ pdd: 10924,
+ pde: 10925,
+ pdf: 10926,
+ pdg: 10927,
+ pdh: 10928,
+ pdi: 10929,
+ pdj: 10930,
+ pdk: 10931,
+ pdl: 10932,
+ pdm: 10933,
+ pdn: 10934,
+ pdo: 10935,
+ pdp: 10936,
+ pdq: 10937,
+ pdr: 10938,
+ pds: 10939,
+ pdt: 10940,
+ pdu: 10941,
+ pdv: 10942,
+ pdw: 10943,
+ pdx: 10944,
+ pdy: 10945,
+ pez: 10946,
+ pea: 10947,
+ peb: 10948,
+ pec: 10949,
+ ped: 10950,
+ pee: 10951,
+ pef: 10952,
+ peg: 10953,
+ peh: 10954,
+ pei: 10955,
+ pej: 10956,
+ pek: 10957,
+ pel: 10958,
+ pem: 10959,
+ pen: 10960,
+ peo: 10961,
+ pep: 10962,
+ peq: 10963,
+ per: 10964,
+ pes: 10965,
+ pet: 10966,
+ peu: 10967,
+ pev: 10968,
+ pew: 10969,
+ pex: 10970,
+ pey: 10971,
+ pfz: 10972,
+ pfa: 10973,
+ pfb: 10974,
+ pfc: 10975,
+ pfd: 10976,
+ pfe: 10977,
+ pff: 10978,
+ pfg: 10979,
+ pfh: 10980,
+ pfi: 10981,
+ pfj: 10982,
+ pfk: 10983,
+ pfl: 10984,
+ pfm: 10985,
+ pfn: 10986,
+ pfo: 10987,
+ pfp: 10988,
+ pfq: 10989,
+ pfr: 10990,
+ pfs: 10991,
+ pft: 10992,
+ pfu: 10993,
+ pfv: 10994,
+ pfw: 10995,
+ pfx: 10996,
+ pfy: 10997,
+ pgz: 10998,
+ pga: 10999,
+ pgb: 11000,
+ pgc: 11001,
+ pgd: 11002,
+ pge: 11003,
+ pgf: 11004,
+ pgg: 11005,
+ pgh: 11006,
+ pgi: 11007,
+ pgj: 11008,
+ pgk: 11009,
+ pgl: 11010,
+ pgm: 11011,
+ pgn: 11012,
+ pgo: 11013,
+ pgp: 11014,
+ pgq: 11015,
+ pgr: 11016,
+ pgs: 11017,
+ pgt: 11018,
+ pgu: 11019,
+ pgv: 11020,
+ pgw: 11021,
+ pgx: 11022,
+ pgy: 11023,
+ phz: 11024,
+ pha: 11025,
+ phb: 11026,
+ phc: 11027,
+ phd: 11028,
+ phe: 11029,
+ phf: 11030,
+ phg: 11031,
+ phh: 11032,
+ phi: 11033,
+ phj: 11034,
+ phk: 11035,
+ phl: 11036,
+ phm: 11037,
+ phn: 11038,
+ pho: 11039,
+ php: 11040,
+ phq: 11041,
+ phr: 11042,
+ phs: 11043,
+ pht: 11044,
+ phu: 11045,
+ phv: 11046,
+ phw: 11047,
+ phx: 11048,
+ phy: 11049,
+ piz: 11050,
+ pia: 11051,
+ pib: 11052,
+ pic: 11053,
+ pid: 11054,
+ pie: 11055,
+ pif: 11056,
+ pig: 11057,
+ pih: 11058,
+ pii: 11059,
+ pij: 11060,
+ pik: 11061,
+ pil: 11062,
+ pim: 11063,
+ pin: 11064,
+ pio: 11065,
+ pip: 11066,
+ piq: 11067,
+ pir: 11068,
+ pis: 11069,
+ pit: 11070,
+ piu: 11071,
+ piv: 11072,
+ piw: 11073,
+ pix: 11074,
+ piy: 11075,
+ pjz: 11076,
+ pja: 11077,
+ pjb: 11078,
+ pjc: 11079,
+ pjd: 11080,
+ pje: 11081,
+ pjf: 11082,
+ pjg: 11083,
+ pjh: 11084,
+ pji: 11085,
+ pjj: 11086,
+ pjk: 11087,
+ pjl: 11088,
+ pjm: 11089,
+ pjn: 11090,
+ pjo: 11091,
+ pjp: 11092,
+ pjq: 11093,
+ pjr: 11094,
+ pjs: 11095,
+ pjt: 11096,
+ pju: 11097,
+ pjv: 11098,
+ pjw: 11099,
+ pjx: 11100,
+ pjy: 11101,
+ pkz: 11102,
+ pka: 11103,
+ pkb: 11104,
+ pkc: 11105,
+ pkd: 11106,
+ pke: 11107,
+ pkf: 11108,
+ pkg: 11109,
+ pkh: 11110,
+ pki: 11111,
+ pkj: 11112,
+ pkk: 11113,
+ pkl: 11114,
+ pkm: 11115,
+ pkn: 11116,
+ pko: 11117,
+ pkp: 11118,
+ pkq: 11119,
+ pkr: 11120,
+ pks: 11121,
+ pkt: 11122,
+ pku: 11123,
+ pkv: 11124,
+ pkw: 11125,
+ pkx: 11126,
+ pky: 11127,
+ plz: 11128,
+ pla: 11129,
+ plb: 11130,
+ plc: 11131,
+ pld: 11132,
+ ple: 11133,
+ plf: 11134,
+ plg: 11135,
+ plh: 11136,
+ pli: 11137,
+ plj: 11138,
+ plk: 11139,
+ pll: 11140,
+ plm: 11141,
+ pln: 11142,
+ plo: 11143,
+ plp: 11144,
+ plq: 11145,
+ plr: 11146,
+ pls: 11147,
+ plt: 11148,
+ plu: 11149,
+ plv: 11150,
+ plw: 11151,
+ plx: 11152,
+ ply: 11153,
+ pmz: 11154,
+ pma: 11155,
+ pmb: 11156,
+ pmc: 11157,
+ pmd: 11158,
+ pme: 11159,
+ pmf: 11160,
+ pmg: 11161,
+ pmh: 11162,
+ pmi: 11163,
+ pmj: 11164,
+ pmk: 11165,
+ pml: 11166,
+ pmm: 11167,
+ pmn: 11168,
+ pmo: 11169,
+ pmp: 11170,
+ pmq: 11171,
+ pmr: 11172,
+ pms: 11173,
+ pmt: 11174,
+ pmu: 11175,
+ pmv: 11176,
+ pmw: 11177,
+ pmx: 11178,
+ pmy: 11179,
+ pnz: 11180,
+ pna: 11181,
+ pnb: 11182,
+ pnc: 11183,
+ pnd: 11184,
+ pne: 11185,
+ pnf: 11186,
+ png: 11187,
+ pnh: 11188,
+ pni: 11189,
+ pnj: 11190,
+ pnk: 11191,
+ pnl: 11192,
+ pnm: 11193,
+ pnn: 11194,
+ pno: 11195,
+ pnp: 11196,
+ pnq: 11197,
+ pnr: 11198,
+ pns: 11199,
+ pnt: 11200,
+ pnu: 11201,
+ pnv: 11202,
+ pnw: 11203,
+ pnx: 11204,
+ pny: 11205,
+ poz: 11206,
+ poa: 11207,
+ pob: 11208,
+ poc: 11209,
+ pod: 11210,
+ poe: 11211,
+ pof: 11212,
+ pog: 11213,
+ poh: 11214,
+ poi: 11215,
+ poj: 11216,
+ pok: 11217,
+ pol: 11218,
+ pom: 11219,
+ pon: 11220,
+ poo: 11221,
+ pop: 11222,
+ poq: 11223,
+ por: 11224,
+ pos: 11225,
+ pot: 11226,
+ pou: 11227,
+ pov: 11228,
+ pow: 11229,
+ pox: 11230,
+ poy: 11231,
+ ppz: 11232,
+ ppa: 11233,
+ ppb: 11234,
+ ppc: 11235,
+ ppd: 11236,
+ ppe: 11237,
+ ppf: 11238,
+ ppg: 11239,
+ pph: 11240,
+ ppi: 11241,
+ ppj: 11242,
+ ppk: 11243,
+ ppl: 11244,
+ ppm: 11245,
+ ppn: 11246,
+ ppo: 11247,
+ ppp: 11248,
+ ppq: 11249,
+ ppr: 11250,
+ pps: 11251,
+ ppt: 11252,
+ ppu: 11253,
+ ppv: 11254,
+ ppw: 11255,
+ ppx: 11256,
+ ppy: 11257,
+ pqz: 11258,
+ pqa: 11259,
+ pqb: 11260,
+ pqc: 11261,
+ pqd: 11262,
+ pqe: 11263,
+ pqf: 11264,
+ pqg: 11265,
+ pqh: 11266,
+ pqi: 11267,
+ pqj: 11268,
+ pqk: 11269,
+ pql: 11270,
+ pqm: 11271,
+ pqn: 11272,
+ pqo: 11273,
+ pqp: 11274,
+ pqq: 11275,
+ pqr: 11276,
+ pqs: 11277,
+ pqt: 11278,
+ pqu: 11279,
+ pqv: 11280,
+ pqw: 11281,
+ pqx: 11282,
+ pqy: 11283,
+ prz: 11284,
+ pra: 11285,
+ prb: 11286,
+ prc: 11287,
+ prd: 11288,
+ pre: 11289,
+ prf: 11290,
+ prg: 11291,
+ prh: 11292,
+ pri: 11293,
+ prj: 11294,
+ prk: 11295,
+ prl: 11296,
+ prm: 11297,
+ prn: 11298,
+ pro: 11299,
+ prp: 11300,
+ prq: 11301,
+ prr: 11302,
+ prs: 11303,
+ prt: 11304,
+ pru: 11305,
+ prv: 11306,
+ prw: 11307,
+ prx: 11308,
+ pry: 11309,
+ psz: 11310,
+ psa: 11311,
+ psb: 11312,
+ psc: 11313,
+ psd: 11314,
+ pse: 11315,
+ psf: 11316,
+ psg: 11317,
+ psh: 11318,
+ psi: 11319,
+ psj: 11320,
+ psk: 11321,
+ psl: 11322,
+ psm: 11323,
+ psn: 11324,
+ pso: 11325,
+ psp: 11326,
+ psq: 11327,
+ psr: 11328,
+ pss: 11329,
+ pst: 11330,
+ psu: 11331,
+ psv: 11332,
+ psw: 11333,
+ psx: 11334,
+ psy: 11335,
+ ptz: 11336,
+ pta: 11337,
+ ptb: 11338,
+ ptc: 11339,
+ ptd: 11340,
+ pte: 11341,
+ ptf: 11342,
+ ptg: 11343,
+ pth: 11344,
+ pti: 11345,
+ ptj: 11346,
+ ptk: 11347,
+ ptl: 11348,
+ ptm: 11349,
+ ptn: 11350,
+ pto: 11351,
+ ptp: 11352,
+ ptq: 11353,
+ ptr: 11354,
+ pts: 11355,
+ ptt: 11356,
+ ptu: 11357,
+ ptv: 11358,
+ ptw: 11359,
+ ptx: 11360,
+ pty: 11361,
+ puz: 11362,
+ pua: 11363,
+ pub: 11364,
+ puc: 11365,
+ pud: 11366,
+ pue: 11367,
+ puf: 11368,
+ pug: 11369,
+ puh: 11370,
+ pui: 11371,
+ puj: 11372,
+ puk: 11373,
+ pul: 11374,
+ pum: 11375,
+ pun: 11376,
+ puo: 11377,
+ pup: 11378,
+ puq: 11379,
+ pur: 11380,
+ pus: 11381,
+ put: 11382,
+ puu: 11383,
+ puv: 11384,
+ puw: 11385,
+ pux: 11386,
+ puy: 11387,
+ pvz: 11388,
+ pva: 11389,
+ pvb: 11390,
+ pvc: 11391,
+ pvd: 11392,
+ pve: 11393,
+ pvf: 11394,
+ pvg: 11395,
+ pvh: 11396,
+ pvi: 11397,
+ pvj: 11398,
+ pvk: 11399,
+ pvl: 11400,
+ pvm: 11401,
+ pvn: 11402,
+ pvo: 11403,
+ pvp: 11404,
+ pvq: 11405,
+ pvr: 11406,
+ pvs: 11407,
+ pvt: 11408,
+ pvu: 11409,
+ pvv: 11410,
+ pvw: 11411,
+ pvx: 11412,
+ pvy: 11413,
+ pwz: 11414,
+ pwa: 11415,
+ pwb: 11416,
+ pwc: 11417,
+ pwd: 11418,
+ pwe: 11419,
+ pwf: 11420,
+ pwg: 11421,
+ pwh: 11422,
+ pwi: 11423,
+ pwj: 11424,
+ pwk: 11425,
+ pwl: 11426,
+ pwm: 11427,
+ pwn: 11428,
+ pwo: 11429,
+ pwp: 11430,
+ pwq: 11431,
+ pwr: 11432,
+ pws: 11433,
+ pwt: 11434,
+ pwu: 11435,
+ pwv: 11436,
+ pww: 11437,
+ pwx: 11438,
+ pwy: 11439,
+ pxz: 11440,
+ pxa: 11441,
+ pxb: 11442,
+ pxc: 11443,
+ pxd: 11444,
+ pxe: 11445,
+ pxf: 11446,
+ pxg: 11447,
+ pxh: 11448,
+ pxi: 11449,
+ pxj: 11450,
+ pxk: 11451,
+ pxl: 11452,
+ pxm: 11453,
+ pxn: 11454,
+ pxo: 11455,
+ pxp: 11456,
+ pxq: 11457,
+ pxr: 11458,
+ pxs: 11459,
+ pxt: 11460,
+ pxu: 11461,
+ pxv: 11462,
+ pxw: 11463,
+ pxx: 11464,
+ pxy: 11465,
+ pyz: 11466,
+ pya: 11467,
+ pyb: 11468,
+ pyc: 11469,
+ pyd: 11470,
+ pye: 11471,
+ pyf: 11472,
+ pyg: 11473,
+ pyh: 11474,
+ pyi: 11475,
+ pyj: 11476,
+ pyk: 11477,
+ pyl: 11478,
+ pym: 11479,
+ pyn: 11480,
+ pyo: 11481,
+ pyp: 11482,
+ pyq: 11483,
+ pyr: 11484,
+ pys: 11485,
+ pyt: 11486,
+ pyu: 11487,
+ pyv: 11488,
+ pyw: 11489,
+ pyx: 11490,
+ pyy: 11491,
+ qzz: 11492,
+ qza: 11493,
+ qzb: 11494,
+ qzc: 11495,
+ qzd: 11496,
+ qze: 11497,
+ qzf: 11498,
+ qzg: 11499,
+ qzh: 11500,
+ qzi: 11501,
+ qzj: 11502,
+ qzk: 11503,
+ qzl: 11504,
+ qzm: 11505,
+ qzn: 11506,
+ qzo: 11507,
+ qzp: 11508,
+ qzq: 11509,
+ qzr: 11510,
+ qzs: 11511,
+ qzt: 11512,
+ qzu: 11513,
+ qzv: 11514,
+ qzw: 11515,
+ qzx: 11516,
+ qzy: 11517,
+ qaz: 11518,
+ qaa: 11519,
+ qab: 11520,
+ qac: 11521,
+ qad: 11522,
+ qae: 11523,
+ qaf: 11524,
+ qag: 11525,
+ qah: 11526,
+ qai: 11527,
+ qaj: 11528,
+ qak: 11529,
+ qal: 11530,
+ qam: 11531,
+ qan: 11532,
+ qao: 11533,
+ qap: 11534,
+ qaq: 11535,
+ qar: 11536,
+ qas: 11537,
+ qat: 11538,
+ qau: 11539,
+ qav: 11540,
+ qaw: 11541,
+ qax: 11542,
+ qay: 11543,
+ qbz: 11544,
+ qba: 11545,
+ qbb: 11546,
+ qbc: 11547,
+ qbd: 11548,
+ qbe: 11549,
+ qbf: 11550,
+ qbg: 11551,
+ qbh: 11552,
+ qbi: 11553,
+ qbj: 11554,
+ qbk: 11555,
+ qbl: 11556,
+ qbm: 11557,
+ qbn: 11558,
+ qbo: 11559,
+ qbp: 11560,
+ qbq: 11561,
+ qbr: 11562,
+ qbs: 11563,
+ qbt: 11564,
+ qbu: 11565,
+ qbv: 11566,
+ qbw: 11567,
+ qbx: 11568,
+ qby: 11569,
+ qcz: 11570,
+ qca: 11571,
+ qcb: 11572,
+ qcc: 11573,
+ qcd: 11574,
+ qce: 11575,
+ qcf: 11576,
+ qcg: 11577,
+ qch: 11578,
+ qci: 11579,
+ qcj: 11580,
+ qck: 11581,
+ qcl: 11582,
+ qcm: 11583,
+ qcn: 11584,
+ qco: 11585,
+ qcp: 11586,
+ qcq: 11587,
+ qcr: 11588,
+ qcs: 11589,
+ qct: 11590,
+ qcu: 11591,
+ qcv: 11592,
+ qcw: 11593,
+ qcx: 11594,
+ qcy: 11595,
+ qdz: 11596,
+ qda: 11597,
+ qdb: 11598,
+ qdc: 11599,
+ qdd: 11600,
+ qde: 11601,
+ qdf: 11602,
+ qdg: 11603,
+ qdh: 11604,
+ qdi: 11605,
+ qdj: 11606,
+ qdk: 11607,
+ qdl: 11608,
+ qdm: 11609,
+ qdn: 11610,
+ qdo: 11611,
+ qdp: 11612,
+ qdq: 11613,
+ qdr: 11614,
+ qds: 11615,
+ qdt: 11616,
+ qdu: 11617,
+ qdv: 11618,
+ qdw: 11619,
+ qdx: 11620,
+ qdy: 11621,
+ qez: 11622,
+ qea: 11623,
+ qeb: 11624,
+ qec: 11625,
+ qed: 11626,
+ qee: 11627,
+ qef: 11628,
+ qeg: 11629,
+ qeh: 11630,
+ qei: 11631,
+ qej: 11632,
+ qek: 11633,
+ qel: 11634,
+ qem: 11635,
+ qen: 11636,
+ qeo: 11637,
+ qep: 11638,
+ qeq: 11639,
+ qer: 11640,
+ qes: 11641,
+ qet: 11642,
+ qeu: 11643,
+ qev: 11644,
+ qew: 11645,
+ qex: 11646,
+ qey: 11647,
+ qfz: 11648,
+ qfa: 11649,
+ qfb: 11650,
+ qfc: 11651,
+ qfd: 11652,
+ qfe: 11653,
+ qff: 11654,
+ qfg: 11655,
+ qfh: 11656,
+ qfi: 11657,
+ qfj: 11658,
+ qfk: 11659,
+ qfl: 11660,
+ qfm: 11661,
+ qfn: 11662,
+ qfo: 11663,
+ qfp: 11664,
+ qfq: 11665,
+ qfr: 11666,
+ qfs: 11667,
+ qft: 11668,
+ qfu: 11669,
+ qfv: 11670,
+ qfw: 11671,
+ qfx: 11672,
+ qfy: 11673,
+ qgz: 11674,
+ qga: 11675,
+ qgb: 11676,
+ qgc: 11677,
+ qgd: 11678,
+ qge: 11679,
+ qgf: 11680,
+ qgg: 11681,
+ qgh: 11682,
+ qgi: 11683,
+ qgj: 11684,
+ qgk: 11685,
+ qgl: 11686,
+ qgm: 11687,
+ qgn: 11688,
+ qgo: 11689,
+ qgp: 11690,
+ qgq: 11691,
+ qgr: 11692,
+ qgs: 11693,
+ qgt: 11694,
+ qgu: 11695,
+ qgv: 11696,
+ qgw: 11697,
+ qgx: 11698,
+ qgy: 11699,
+ qhz: 11700,
+ qha: 11701,
+ qhb: 11702,
+ qhc: 11703,
+ qhd: 11704,
+ qhe: 11705,
+ qhf: 11706,
+ qhg: 11707,
+ qhh: 11708,
+ qhi: 11709,
+ qhj: 11710,
+ qhk: 11711,
+ qhl: 11712,
+ qhm: 11713,
+ qhn: 11714,
+ qho: 11715,
+ qhp: 11716,
+ qhq: 11717,
+ qhr: 11718,
+ qhs: 11719,
+ qht: 11720,
+ qhu: 11721,
+ qhv: 11722,
+ qhw: 11723,
+ qhx: 11724,
+ qhy: 11725,
+ qiz: 11726,
+ qia: 11727,
+ qib: 11728,
+ qic: 11729,
+ qid: 11730,
+ qie: 11731,
+ qif: 11732,
+ qig: 11733,
+ qih: 11734,
+ qii: 11735,
+ qij: 11736,
+ qik: 11737,
+ qil: 11738,
+ qim: 11739,
+ qin: 11740,
+ qio: 11741,
+ qip: 11742,
+ qiq: 11743,
+ qir: 11744,
+ qis: 11745,
+ qit: 11746,
+ qiu: 11747,
+ qiv: 11748,
+ qiw: 11749,
+ qix: 11750,
+ qiy: 11751,
+ qjz: 11752,
+ qja: 11753,
+ qjb: 11754,
+ qjc: 11755,
+ qjd: 11756,
+ qje: 11757,
+ qjf: 11758,
+ qjg: 11759,
+ qjh: 11760,
+ qji: 11761,
+ qjj: 11762,
+ qjk: 11763,
+ qjl: 11764,
+ qjm: 11765,
+ qjn: 11766,
+ qjo: 11767,
+ qjp: 11768,
+ qjq: 11769,
+ qjr: 11770,
+ qjs: 11771,
+ qjt: 11772,
+ qju: 11773,
+ qjv: 11774,
+ qjw: 11775,
+ qjx: 11776,
+ qjy: 11777,
+ qkz: 11778,
+ qka: 11779,
+ qkb: 11780,
+ qkc: 11781,
+ qkd: 11782,
+ qke: 11783,
+ qkf: 11784,
+ qkg: 11785,
+ qkh: 11786,
+ qki: 11787,
+ qkj: 11788,
+ qkk: 11789,
+ qkl: 11790,
+ qkm: 11791,
+ qkn: 11792,
+ qko: 11793,
+ qkp: 11794,
+ qkq: 11795,
+ qkr: 11796,
+ qks: 11797,
+ qkt: 11798,
+ qku: 11799,
+ qkv: 11800,
+ qkw: 11801,
+ qkx: 11802,
+ qky: 11803,
+ qlz: 11804,
+ qla: 11805,
+ qlb: 11806,
+ qlc: 11807,
+ qld: 11808,
+ qle: 11809,
+ qlf: 11810,
+ qlg: 11811,
+ qlh: 11812,
+ qli: 11813,
+ qlj: 11814,
+ qlk: 11815,
+ qll: 11816,
+ qlm: 11817,
+ qln: 11818,
+ qlo: 11819,
+ qlp: 11820,
+ qlq: 11821,
+ qlr: 11822,
+ qls: 11823,
+ qlt: 11824,
+ qlu: 11825,
+ qlv: 11826,
+ qlw: 11827,
+ qlx: 11828,
+ qly: 11829,
+ qmz: 11830,
+ qma: 11831,
+ qmb: 11832,
+ qmc: 11833,
+ qmd: 11834,
+ qme: 11835,
+ qmf: 11836,
+ qmg: 11837,
+ qmh: 11838,
+ qmi: 11839,
+ qmj: 11840,
+ qmk: 11841,
+ qml: 11842,
+ qmm: 11843,
+ qmn: 11844,
+ qmo: 11845,
+ qmp: 11846,
+ qmq: 11847,
+ qmr: 11848,
+ qms: 11849,
+ qmt: 11850,
+ qmu: 11851,
+ qmv: 11852,
+ qmw: 11853,
+ qmx: 11854,
+ qmy: 11855,
+ qnz: 11856,
+ qna: 11857,
+ qnb: 11858,
+ qnc: 11859,
+ qnd: 11860,
+ qne: 11861,
+ qnf: 11862,
+ qng: 11863,
+ qnh: 11864,
+ qni: 11865,
+ qnj: 11866,
+ qnk: 11867,
+ qnl: 11868,
+ qnm: 11869,
+ qnn: 11870,
+ qno: 11871,
+ qnp: 11872,
+ qnq: 11873,
+ qnr: 11874,
+ qns: 11875,
+ qnt: 11876,
+ qnu: 11877,
+ qnv: 11878,
+ qnw: 11879,
+ qnx: 11880,
+ qny: 11881,
+ qoz: 11882,
+ qoa: 11883,
+ qob: 11884,
+ qoc: 11885,
+ qod: 11886,
+ qoe: 11887,
+ qof: 11888,
+ qog: 11889,
+ qoh: 11890,
+ qoi: 11891,
+ qoj: 11892,
+ qok: 11893,
+ qol: 11894,
+ qom: 11895,
+ qon: 11896,
+ qoo: 11897,
+ qop: 11898,
+ qoq: 11899,
+ qor: 11900,
+ qos: 11901,
+ qot: 11902,
+ qou: 11903,
+ qov: 11904,
+ qow: 11905,
+ qox: 11906,
+ qoy: 11907,
+ qpz: 11908,
+ qpa: 11909,
+ qpb: 11910,
+ qpc: 11911,
+ qpd: 11912,
+ qpe: 11913,
+ qpf: 11914,
+ qpg: 11915,
+ qph: 11916,
+ qpi: 11917,
+ qpj: 11918,
+ qpk: 11919,
+ qpl: 11920,
+ qpm: 11921,
+ qpn: 11922,
+ qpo: 11923,
+ qpp: 11924,
+ qpq: 11925,
+ qpr: 11926,
+ qps: 11927,
+ qpt: 11928,
+ qpu: 11929,
+ qpv: 11930,
+ qpw: 11931,
+ qpx: 11932,
+ qpy: 11933,
+ qqz: 11934,
+ qqa: 11935,
+ qqb: 11936,
+ qqc: 11937,
+ qqd: 11938,
+ qqe: 11939,
+ qqf: 11940,
+ qqg: 11941,
+ qqh: 11942,
+ qqi: 11943,
+ qqj: 11944,
+ qqk: 11945,
+ qql: 11946,
+ qqm: 11947,
+ qqn: 11948,
+ qqo: 11949,
+ qqp: 11950,
+ qqq: 11951,
+ qqr: 11952,
+ qqs: 11953,
+ qqt: 11954,
+ qqu: 11955,
+ qqv: 11956,
+ qqw: 11957,
+ qqx: 11958,
+ qqy: 11959,
+ qrz: 11960,
+ qra: 11961,
+ qrb: 11962,
+ qrc: 11963,
+ qrd: 11964,
+ qre: 11965,
+ qrf: 11966,
+ qrg: 11967,
+ qrh: 11968,
+ qri: 11969,
+ qrj: 11970,
+ qrk: 11971,
+ qrl: 11972,
+ qrm: 11973,
+ qrn: 11974,
+ qro: 11975,
+ qrp: 11976,
+ qrq: 11977,
+ qrr: 11978,
+ qrs: 11979,
+ qrt: 11980,
+ qru: 11981,
+ qrv: 11982,
+ qrw: 11983,
+ qrx: 11984,
+ qry: 11985,
+ qsz: 11986,
+ qsa: 11987,
+ qsb: 11988,
+ qsc: 11989,
+ qsd: 11990,
+ qse: 11991,
+ qsf: 11992,
+ qsg: 11993,
+ qsh: 11994,
+ qsi: 11995,
+ qsj: 11996,
+ qsk: 11997,
+ qsl: 11998,
+ qsm: 11999,
+ qsn: 12000,
+ qso: 12001,
+ qsp: 12002,
+ qsq: 12003,
+ qsr: 12004,
+ qss: 12005,
+ qst: 12006,
+ qsu: 12007,
+ qsv: 12008,
+ qsw: 12009,
+ qsx: 12010,
+ qsy: 12011,
+ qtz: 12012,
+ qta: 12013,
+ qtb: 12014,
+ qtc: 12015,
+ qtd: 12016,
+ qte: 12017,
+ qtf: 12018,
+ qtg: 12019,
+ qth: 12020,
+ qti: 12021,
+ qtj: 12022,
+ qtk: 12023,
+ qtl: 12024,
+ qtm: 12025,
+ qtn: 12026,
+ qto: 12027,
+ qtp: 12028,
+ qtq: 12029,
+ qtr: 12030,
+ qts: 12031,
+ qtt: 12032,
+ qtu: 12033,
+ qtv: 12034,
+ qtw: 12035,
+ qtx: 12036,
+ qty: 12037,
+ quz: 12038,
+ qua: 12039,
+ qub: 12040,
+ quc: 12041,
+ qud: 12042,
+ que: 12043,
+ quf: 12044,
+ qug: 12045,
+ quh: 12046,
+ qui: 12047,
+ quj: 12048,
+ quk: 12049,
+ qul: 12050,
+ qum: 12051,
+ qun: 12052,
+ quo: 12053,
+ qup: 12054,
+ quq: 12055,
+ qur: 12056,
+ qus: 12057,
+ qut: 12058,
+ quu: 12059,
+ quv: 12060,
+ quw: 12061,
+ qux: 12062,
+ quy: 12063,
+ qvz: 12064,
+ qva: 12065,
+ qvb: 12066,
+ qvc: 12067,
+ qvd: 12068,
+ qve: 12069,
+ qvf: 12070,
+ qvg: 12071,
+ qvh: 12072,
+ qvi: 12073,
+ qvj: 12074,
+ qvk: 12075,
+ qvl: 12076,
+ qvm: 12077,
+ qvn: 12078,
+ qvo: 12079,
+ qvp: 12080,
+ qvq: 12081,
+ qvr: 12082,
+ qvs: 12083,
+ qvt: 12084,
+ qvu: 12085,
+ qvv: 12086,
+ qvw: 12087,
+ qvx: 12088,
+ qvy: 12089,
+ qwz: 12090,
+ qwa: 12091,
+ qwb: 12092,
+ qwc: 12093,
+ qwd: 12094,
+ qwe: 12095,
+ qwf: 12096,
+ qwg: 12097,
+ qwh: 12098,
+ qwi: 12099,
+ qwj: 12100,
+ qwk: 12101,
+ qwl: 12102,
+ qwm: 12103,
+ qwn: 12104,
+ qwo: 12105,
+ qwp: 12106,
+ qwq: 12107,
+ qwr: 12108,
+ qws: 12109,
+ qwt: 12110,
+ qwu: 12111,
+ qwv: 12112,
+ qww: 12113,
+ qwx: 12114,
+ qwy: 12115,
+ qxz: 12116,
+ qxa: 12117,
+ qxb: 12118,
+ qxc: 12119,
+ qxd: 12120,
+ qxe: 12121,
+ qxf: 12122,
+ qxg: 12123,
+ qxh: 12124,
+ qxi: 12125,
+ qxj: 12126,
+ qxk: 12127,
+ qxl: 12128,
+ qxm: 12129,
+ qxn: 12130,
+ qxo: 12131,
+ qxp: 12132,
+ qxq: 12133,
+ qxr: 12134,
+ qxs: 12135,
+ qxt: 12136,
+ qxu: 12137,
+ qxv: 12138,
+ qxw: 12139,
+ qxx: 12140,
+ qxy: 12141,
+ qyz: 12142,
+ qya: 12143,
+ qyb: 12144,
+ qyc: 12145,
+ qyd: 12146,
+ qye: 12147,
+ qyf: 12148,
+ qyg: 12149,
+ qyh: 12150,
+ qyi: 12151,
+ qyj: 12152,
+ qyk: 12153,
+ qyl: 12154,
+ qym: 12155,
+ qyn: 12156,
+ qyo: 12157,
+ qyp: 12158,
+ qyq: 12159,
+ qyr: 12160,
+ qys: 12161,
+ qyt: 12162,
+ qyu: 12163,
+ qyv: 12164,
+ qyw: 12165,
+ qyx: 12166,
+ qyy: 12167,
+ rzz: 12168,
+ rza: 12169,
+ rzb: 12170,
+ rzc: 12171,
+ rzd: 12172,
+ rze: 12173,
+ rzf: 12174,
+ rzg: 12175,
+ rzh: 12176,
+ rzi: 12177,
+ rzj: 12178,
+ rzk: 12179,
+ rzl: 12180,
+ rzm: 12181,
+ rzn: 12182,
+ rzo: 12183,
+ rzp: 12184,
+ rzq: 12185,
+ rzr: 12186,
+ rzs: 12187,
+ rzt: 12188,
+ rzu: 12189,
+ rzv: 12190,
+ rzw: 12191,
+ rzx: 12192,
+ rzy: 12193,
+ raz: 12194,
+ raa: 12195,
+ rab: 12196,
+ rac: 12197,
+ rad: 12198,
+ rae: 12199,
+ raf: 12200,
+ rag: 12201,
+ rah: 12202,
+ rai: 12203,
+ raj: 12204,
+ rak: 12205,
+ ral: 12206,
+ ram: 12207,
+ ran: 12208,
+ rao: 12209,
+ rap: 12210,
+ raq: 12211,
+ rar: 12212,
+ ras: 12213,
+ rat: 12214,
+ rau: 12215,
+ rav: 12216,
+ raw: 12217,
+ rax: 12218,
+ ray: 12219,
+ rbz: 12220,
+ rba: 12221,
+ rbb: 12222,
+ rbc: 12223,
+ rbd: 12224,
+ rbe: 12225,
+ rbf: 12226,
+ rbg: 12227,
+ rbh: 12228,
+ rbi: 12229,
+ rbj: 12230,
+ rbk: 12231,
+ rbl: 12232,
+ rbm: 12233,
+ rbn: 12234,
+ rbo: 12235,
+ rbp: 12236,
+ rbq: 12237,
+ rbr: 12238,
+ rbs: 12239,
+ rbt: 12240,
+ rbu: 12241,
+ rbv: 12242,
+ rbw: 12243,
+ rbx: 12244,
+ rby: 12245,
+ rcz: 12246,
+ rca: 12247,
+ rcb: 12248,
+ rcc: 12249,
+ rcd: 12250,
+ rce: 12251,
+ rcf: 12252,
+ rcg: 12253,
+ rch: 12254,
+ rci: 12255,
+ rcj: 12256,
+ rck: 12257,
+ rcl: 12258,
+ rcm: 12259,
+ rcn: 12260,
+ rco: 12261,
+ rcp: 12262,
+ rcq: 12263,
+ rcr: 12264,
+ rcs: 12265,
+ rct: 12266,
+ rcu: 12267,
+ rcv: 12268,
+ rcw: 12269,
+ rcx: 12270,
+ rcy: 12271,
+ rdz: 12272,
+ rda: 12273,
+ rdb: 12274,
+ rdc: 12275,
+ rdd: 12276,
+ rde: 12277,
+ rdf: 12278,
+ rdg: 12279,
+ rdh: 12280,
+ rdi: 12281,
+ rdj: 12282,
+ rdk: 12283,
+ rdl: 12284,
+ rdm: 12285,
+ rdn: 12286,
+ rdo: 12287,
+ rdp: 12288,
+ rdq: 12289,
+ rdr: 12290,
+ rds: 12291,
+ rdt: 12292,
+ rdu: 12293,
+ rdv: 12294,
+ rdw: 12295,
+ rdx: 12296,
+ rdy: 12297,
+ rez: 12298,
+ rea: 12299,
+ reb: 12300,
+ rec: 12301,
+ red: 12302,
+ ree: 12303,
+ ref: 12304,
+ reg: 12305,
+ reh: 12306,
+ rei: 12307,
+ rej: 12308,
+ rek: 12309,
+ rel: 12310,
+ rem: 12311,
+ ren: 12312,
+ reo: 12313,
+ rep: 12314,
+ req: 12315,
+ rer: 12316,
+ res: 12317,
+ ret: 12318,
+ reu: 12319,
+ rev: 12320,
+ rew: 12321,
+ rex: 12322,
+ rey: 12323,
+ rfz: 12324,
+ rfa: 12325,
+ rfb: 12326,
+ rfc: 12327,
+ rfd: 12328,
+ rfe: 12329,
+ rff: 12330,
+ rfg: 12331,
+ rfh: 12332,
+ rfi: 12333,
+ rfj: 12334,
+ rfk: 12335,
+ rfl: 12336,
+ rfm: 12337,
+ rfn: 12338,
+ rfo: 12339,
+ rfp: 12340,
+ rfq: 12341,
+ rfr: 12342,
+ rfs: 12343,
+ rft: 12344,
+ rfu: 12345,
+ rfv: 12346,
+ rfw: 12347,
+ rfx: 12348,
+ rfy: 12349,
+ rgz: 12350,
+ rga: 12351,
+ rgb: 12352,
+ rgc: 12353,
+ rgd: 12354,
+ rge: 12355,
+ rgf: 12356,
+ rgg: 12357,
+ rgh: 12358,
+ rgi: 12359,
+ rgj: 12360,
+ rgk: 12361,
+ rgl: 12362,
+ rgm: 12363,
+ rgn: 12364,
+ rgo: 12365,
+ rgp: 12366,
+ rgq: 12367,
+ rgr: 12368,
+ rgs: 12369,
+ rgt: 12370,
+ rgu: 12371,
+ rgv: 12372,
+ rgw: 12373,
+ rgx: 12374,
+ rgy: 12375,
+ rhz: 12376,
+ rha: 12377,
+ rhb: 12378,
+ rhc: 12379,
+ rhd: 12380,
+ rhe: 12381,
+ rhf: 12382,
+ rhg: 12383,
+ rhh: 12384,
+ rhi: 12385,
+ rhj: 12386,
+ rhk: 12387,
+ rhl: 12388,
+ rhm: 12389,
+ rhn: 12390,
+ rho: 12391,
+ rhp: 12392,
+ rhq: 12393,
+ rhr: 12394,
+ rhs: 12395,
+ rht: 12396,
+ rhu: 12397,
+ rhv: 12398,
+ rhw: 12399,
+ rhx: 12400,
+ rhy: 12401,
+ riz: 12402,
+ ria: 12403,
+ rib: 12404,
+ ric: 12405,
+ rid: 12406,
+ rie: 12407,
+ rif: 12408,
+ rig: 12409,
+ rih: 12410,
+ rii: 12411,
+ rij: 12412,
+ rik: 12413,
+ ril: 12414,
+ rim: 12415,
+ rin: 12416,
+ rio: 12417,
+ rip: 12418,
+ riq: 12419,
+ rir: 12420,
+ ris: 12421,
+ rit: 12422,
+ riu: 12423,
+ riv: 12424,
+ riw: 12425,
+ rix: 12426,
+ riy: 12427,
+ rjz: 12428,
+ rja: 12429,
+ rjb: 12430,
+ rjc: 12431,
+ rjd: 12432,
+ rje: 12433,
+ rjf: 12434,
+ rjg: 12435,
+ rjh: 12436,
+ rji: 12437,
+ rjj: 12438,
+ rjk: 12439,
+ rjl: 12440,
+ rjm: 12441,
+ rjn: 12442,
+ rjo: 12443,
+ rjp: 12444,
+ rjq: 12445,
+ rjr: 12446,
+ rjs: 12447,
+ rjt: 12448,
+ rju: 12449,
+ rjv: 12450,
+ rjw: 12451,
+ rjx: 12452,
+ rjy: 12453,
+ rkz: 12454,
+ rka: 12455,
+ rkb: 12456,
+ rkc: 12457,
+ rkd: 12458,
+ rke: 12459,
+ rkf: 12460,
+ rkg: 12461,
+ rkh: 12462,
+ rki: 12463,
+ rkj: 12464,
+ rkk: 12465,
+ rkl: 12466,
+ rkm: 12467,
+ rkn: 12468,
+ rko: 12469,
+ rkp: 12470,
+ rkq: 12471,
+ rkr: 12472,
+ rks: 12473,
+ rkt: 12474,
+ rku: 12475,
+ rkv: 12476,
+ rkw: 12477,
+ rkx: 12478,
+ rky: 12479,
+ rlz: 12480,
+ rla: 12481,
+ rlb: 12482,
+ rlc: 12483,
+ rld: 12484,
+ rle: 12485,
+ rlf: 12486,
+ rlg: 12487,
+ rlh: 12488,
+ rli: 12489,
+ rlj: 12490,
+ rlk: 12491,
+ rll: 12492,
+ rlm: 12493,
+ rln: 12494,
+ rlo: 12495,
+ rlp: 12496,
+ rlq: 12497,
+ rlr: 12498,
+ rls: 12499,
+ rlt: 12500,
+ rlu: 12501,
+ rlv: 12502,
+ rlw: 12503,
+ rlx: 12504,
+ rly: 12505,
+ rmz: 12506,
+ rma: 12507,
+ rmb: 12508,
+ rmc: 12509,
+ rmd: 12510,
+ rme: 12511,
+ rmf: 12512,
+ rmg: 12513,
+ rmh: 12514,
+ rmi: 12515,
+ rmj: 12516,
+ rmk: 12517,
+ rml: 12518,
+ rmm: 12519,
+ rmn: 12520,
+ rmo: 12521,
+ rmp: 12522,
+ rmq: 12523,
+ rmr: 12524,
+ rms: 12525,
+ rmt: 12526,
+ rmu: 12527,
+ rmv: 12528,
+ rmw: 12529,
+ rmx: 12530,
+ rmy: 12531,
+ rnz: 12532,
+ rna: 12533,
+ rnb: 12534,
+ rnc: 12535,
+ rnd: 12536,
+ rne: 12537,
+ rnf: 12538,
+ rng: 12539,
+ rnh: 12540,
+ rni: 12541,
+ rnj: 12542,
+ rnk: 12543,
+ rnl: 12544,
+ rnm: 12545,
+ rnn: 12546,
+ rno: 12547,
+ rnp: 12548,
+ rnq: 12549,
+ rnr: 12550,
+ rns: 12551,
+ rnt: 12552,
+ rnu: 12553,
+ rnv: 12554,
+ rnw: 12555,
+ rnx: 12556,
+ rny: 12557,
+ roz: 12558,
+ roa: 12559,
+ rob: 12560,
+ roc: 12561,
+ rod: 12562,
+ roe: 12563,
+ rof: 12564,
+ rog: 12565,
+ roh: 12566,
+ roi: 12567,
+ roj: 12568,
+ rok: 12569,
+ rol: 12570,
+ rom: 12571,
+ ron: 12572,
+ roo: 12573,
+ rop: 12574,
+ roq: 12575,
+ ror: 12576,
+ ros: 12577,
+ rot: 12578,
+ rou: 12579,
+ rov: 12580,
+ row: 12581,
+ rox: 12582,
+ roy: 12583,
+ rpz: 12584,
+ rpa: 12585,
+ rpb: 12586,
+ rpc: 12587,
+ rpd: 12588,
+ rpe: 12589,
+ rpf: 12590,
+ rpg: 12591,
+ rph: 12592,
+ rpi: 12593,
+ rpj: 12594,
+ rpk: 12595,
+ rpl: 12596,
+ rpm: 12597,
+ rpn: 12598,
+ rpo: 12599,
+ rpp: 12600,
+ rpq: 12601,
+ rpr: 12602,
+ rps: 12603,
+ rpt: 12604,
+ rpu: 12605,
+ rpv: 12606,
+ rpw: 12607,
+ rpx: 12608,
+ rpy: 12609,
+ rqz: 12610,
+ rqa: 12611,
+ rqb: 12612,
+ rqc: 12613,
+ rqd: 12614,
+ rqe: 12615,
+ rqf: 12616,
+ rqg: 12617,
+ rqh: 12618,
+ rqi: 12619,
+ rqj: 12620,
+ rqk: 12621,
+ rql: 12622,
+ rqm: 12623,
+ rqn: 12624,
+ rqo: 12625,
+ rqp: 12626,
+ rqq: 12627,
+ rqr: 12628,
+ rqs: 12629,
+ rqt: 12630,
+ rqu: 12631,
+ rqv: 12632,
+ rqw: 12633,
+ rqx: 12634,
+ rqy: 12635,
+ rrz: 12636,
+ rra: 12637,
+ rrb: 12638,
+ rrc: 12639,
+ rrd: 12640,
+ rre: 12641,
+ rrf: 12642,
+ rrg: 12643,
+ rrh: 12644,
+ rri: 12645,
+ rrj: 12646,
+ rrk: 12647,
+ rrl: 12648,
+ rrm: 12649,
+ rrn: 12650,
+ rro: 12651,
+ rrp: 12652,
+ rrq: 12653,
+ rrr: 12654,
+ rrs: 12655,
+ rrt: 12656,
+ rru: 12657,
+ rrv: 12658,
+ rrw: 12659,
+ rrx: 12660,
+ rry: 12661,
+ rsz: 12662,
+ rsa: 12663,
+ rsb: 12664,
+ rsc: 12665,
+ rsd: 12666,
+ rse: 12667,
+ rsf: 12668,
+ rsg: 12669,
+ rsh: 12670,
+ rsi: 12671,
+ rsj: 12672,
+ rsk: 12673,
+ rsl: 12674,
+ rsm: 12675,
+ rsn: 12676,
+ rso: 12677,
+ rsp: 12678,
+ rsq: 12679,
+ rsr: 12680,
+ rss: 12681,
+ rst: 12682,
+ rsu: 12683,
+ rsv: 12684,
+ rsw: 12685,
+ rsx: 12686,
+ rsy: 12687,
+ rtz: 12688,
+ rta: 12689,
+ rtb: 12690,
+ rtc: 12691,
+ rtd: 12692,
+ rte: 12693,
+ rtf: 12694,
+ rtg: 12695,
+ rth: 12696,
+ rti: 12697,
+ rtj: 12698,
+ rtk: 12699,
+ rtl: 12700,
+ rtm: 12701,
+ rtn: 12702,
+ rto: 12703,
+ rtp: 12704,
+ rtq: 12705,
+ rtr: 12706,
+ rts: 12707,
+ rtt: 12708,
+ rtu: 12709,
+ rtv: 12710,
+ rtw: 12711,
+ rtx: 12712,
+ rty: 12713,
+ ruz: 12714,
+ rua: 12715,
+ rub: 12716,
+ ruc: 12717,
+ rud: 12718,
+ rue: 12719,
+ ruf: 12720,
+ rug: 12721,
+ ruh: 12722,
+ rui: 12723,
+ ruj: 12724,
+ ruk: 12725,
+ rul: 12726,
+ rum: 12727,
+ run: 12728,
+ ruo: 12729,
+ rup: 12730,
+ ruq: 12731,
+ rur: 12732,
+ rus: 12733,
+ rut: 12734,
+ ruu: 12735,
+ ruv: 12736,
+ ruw: 12737,
+ rux: 12738,
+ ruy: 12739,
+ rvz: 12740,
+ rva: 12741,
+ rvb: 12742,
+ rvc: 12743,
+ rvd: 12744,
+ rve: 12745,
+ rvf: 12746,
+ rvg: 12747,
+ rvh: 12748,
+ rvi: 12749,
+ rvj: 12750,
+ rvk: 12751,
+ rvl: 12752,
+ rvm: 12753,
+ rvn: 12754,
+ rvo: 12755,
+ rvp: 12756,
+ rvq: 12757,
+ rvr: 12758,
+ rvs: 12759,
+ rvt: 12760,
+ rvu: 12761,
+ rvv: 12762,
+ rvw: 12763,
+ rvx: 12764,
+ rvy: 12765,
+ rwz: 12766,
+ rwa: 12767,
+ rwb: 12768,
+ rwc: 12769,
+ rwd: 12770,
+ rwe: 12771,
+ rwf: 12772,
+ rwg: 12773,
+ rwh: 12774,
+ rwi: 12775,
+ rwj: 12776,
+ rwk: 12777,
+ rwl: 12778,
+ rwm: 12779,
+ rwn: 12780,
+ rwo: 12781,
+ rwp: 12782,
+ rwq: 12783,
+ rwr: 12784,
+ rws: 12785,
+ rwt: 12786,
+ rwu: 12787,
+ rwv: 12788,
+ rww: 12789,
+ rwx: 12790,
+ rwy: 12791,
+ rxz: 12792,
+ rxa: 12793,
+ rxb: 12794,
+ rxc: 12795,
+ rxd: 12796,
+ rxe: 12797,
+ rxf: 12798,
+ rxg: 12799,
+ rxh: 12800,
+ rxi: 12801,
+ rxj: 12802,
+ rxk: 12803,
+ rxl: 12804,
+ rxm: 12805,
+ rxn: 12806,
+ rxo: 12807,
+ rxp: 12808,
+ rxq: 12809,
+ rxr: 12810,
+ rxs: 12811,
+ rxt: 12812,
+ rxu: 12813,
+ rxv: 12814,
+ rxw: 12815,
+ rxx: 12816,
+ rxy: 12817,
+ ryz: 12818,
+ rya: 12819,
+ ryb: 12820,
+ ryc: 12821,
+ ryd: 12822,
+ rye: 12823,
+ ryf: 12824,
+ ryg: 12825,
+ ryh: 12826,
+ ryi: 12827,
+ ryj: 12828,
+ ryk: 12829,
+ ryl: 12830,
+ rym: 12831,
+ ryn: 12832,
+ ryo: 12833,
+ ryp: 12834,
+ ryq: 12835,
+ ryr: 12836,
+ rys: 12837,
+ ryt: 12838,
+ ryu: 12839,
+ ryv: 12840,
+ ryw: 12841,
+ ryx: 12842,
+ ryy: 12843,
+ szz: 12844,
+ sza: 12845,
+ szb: 12846,
+ szc: 12847,
+ szd: 12848,
+ sze: 12849,
+ szf: 12850,
+ szg: 12851,
+ szh: 12852,
+ szi: 12853,
+ szj: 12854,
+ szk: 12855,
+ szl: 12856,
+ szm: 12857,
+ szn: 12858,
+ szo: 12859,
+ szp: 12860,
+ szq: 12861,
+ szr: 12862,
+ szs: 12863,
+ szt: 12864,
+ szu: 12865,
+ szv: 12866,
+ szw: 12867,
+ szx: 12868,
+ szy: 12869,
+ saz: 12870,
+ saa: 12871,
+ sab: 12872,
+ sac: 12873,
+ sad: 12874,
+ sae: 12875,
+ saf: 12876,
+ sag: 12877,
+ sah: 12878,
+ sai: 12879,
+ saj: 12880,
+ sak: 12881,
+ sal: 12882,
+ sam: 12883,
+ san: 12884,
+ sao: 12885,
+ sap: 12886,
+ saq: 12887,
+ sar: 12888,
+ sas: 12889,
+ sat: 12890,
+ sau: 12891,
+ sav: 12892,
+ saw: 12893,
+ sax: 12894,
+ say: 12895,
+ sbz: 12896,
+ sba: 12897,
+ sbb: 12898,
+ sbc: 12899,
+ sbd: 12900,
+ sbe: 12901,
+ sbf: 12902,
+ sbg: 12903,
+ sbh: 12904,
+ sbi: 12905,
+ sbj: 12906,
+ sbk: 12907,
+ sbl: 12908,
+ sbm: 12909,
+ sbn: 12910,
+ sbo: 12911,
+ sbp: 12912,
+ sbq: 12913,
+ sbr: 12914,
+ sbs: 12915,
+ sbt: 12916,
+ sbu: 12917,
+ sbv: 12918,
+ sbw: 12919,
+ sbx: 12920,
+ sby: 12921,
+ scz: 12922,
+ sca: 12923,
+ scb: 12924,
+ scc: 12925,
+ scd: 12926,
+ sce: 12927,
+ scf: 12928,
+ scg: 12929,
+ sch: 12930,
+ sci: 12931,
+ scj: 12932,
+ sck: 12933,
+ scl: 12934,
+ scm: 12935,
+ scn: 12936,
+ sco: 12937,
+ scp: 12938,
+ scq: 12939,
+ scr: 12940,
+ scs: 12941,
+ sct: 12942,
+ scu: 12943,
+ scv: 12944,
+ scw: 12945,
+ scx: 12946,
+ scy: 12947,
+ sdz: 12948,
+ sda: 12949,
+ sdb: 12950,
+ sdc: 12951,
+ sdd: 12952,
+ sde: 12953,
+ sdf: 12954,
+ sdg: 12955,
+ sdh: 12956,
+ sdi: 12957,
+ sdj: 12958,
+ sdk: 12959,
+ sdl: 12960,
+ sdm: 12961,
+ sdn: 12962,
+ sdo: 12963,
+ sdp: 12964,
+ sdq: 12965,
+ sdr: 12966,
+ sds: 12967,
+ sdt: 12968,
+ sdu: 12969,
+ sdv: 12970,
+ sdw: 12971,
+ sdx: 12972,
+ sdy: 12973,
+ sez: 12974,
+ sea: 12975,
+ seb: 12976,
+ sec: 12977,
+ sed: 12978,
+ see: 12979,
+ sef: 12980,
+ seg: 12981,
+ seh: 12982,
+ sei: 12983,
+ sej: 12984,
+ sek: 12985,
+ sel: 12986,
+ sem: 12987,
+ sen: 12988,
+ seo: 12989,
+ sep: 12990,
+ seq: 12991,
+ ser: 12992,
+ ses: 12993,
+ set: 12994,
+ seu: 12995,
+ sev: 12996,
+ sew: 12997,
+ sex: 12998,
+ sey: 12999,
+ sfz: 13000,
+ sfa: 13001,
+ sfb: 13002,
+ sfc: 13003,
+ sfd: 13004,
+ sfe: 13005,
+ sff: 13006,
+ sfg: 13007,
+ sfh: 13008,
+ sfi: 13009,
+ sfj: 13010,
+ sfk: 13011,
+ sfl: 13012,
+ sfm: 13013,
+ sfn: 13014,
+ sfo: 13015,
+ sfp: 13016,
+ sfq: 13017,
+ sfr: 13018,
+ sfs: 13019,
+ sft: 13020,
+ sfu: 13021,
+ sfv: 13022,
+ sfw: 13023,
+ sfx: 13024,
+ sfy: 13025,
+ sgz: 13026,
+ sga: 13027,
+ sgb: 13028,
+ sgc: 13029,
+ sgd: 13030,
+ sge: 13031,
+ sgf: 13032,
+ sgg: 13033,
+ sgh: 13034,
+ sgi: 13035,
+ sgj: 13036,
+ sgk: 13037,
+ sgl: 13038,
+ sgm: 13039,
+ sgn: 13040,
+ sgo: 13041,
+ sgp: 13042,
+ sgq: 13043,
+ sgr: 13044,
+ sgs: 13045,
+ sgt: 13046,
+ sgu: 13047,
+ sgv: 13048,
+ sgw: 13049,
+ sgx: 13050,
+ sgy: 13051,
+ shz: 13052,
+ sha: 13053,
+ shb: 13054,
+ shc: 13055,
+ shd: 13056,
+ she: 13057,
+ shf: 13058,
+ shg: 13059,
+ shh: 13060,
+ shi: 13061,
+ shj: 13062,
+ shk: 13063,
+ shl: 13064,
+ shm: 13065,
+ shn: 13066,
+ sho: 13067,
+ shp: 13068,
+ shq: 13069,
+ shr: 13070,
+ shs: 13071,
+ sht: 13072,
+ shu: 13073,
+ shv: 13074,
+ shw: 13075,
+ shx: 13076,
+ shy: 13077,
+ siz: 13078,
+ sia: 13079,
+ sib: 13080,
+ sic: 13081,
+ sid: 13082,
+ sie: 13083,
+ sif: 13084,
+ sig: 13085,
+ sih: 13086,
+ sii: 13087,
+ sij: 13088,
+ sik: 13089,
+ sil: 13090,
+ sim: 13091,
+ sin: 13092,
+ sio: 13093,
+ sip: 13094,
+ siq: 13095,
+ sir: 13096,
+ sis: 13097,
+ sit: 13098,
+ siu: 13099,
+ siv: 13100,
+ siw: 13101,
+ six: 13102,
+ siy: 13103,
+ sjz: 13104,
+ sja: 13105,
+ sjb: 13106,
+ sjc: 13107,
+ sjd: 13108,
+ sje: 13109,
+ sjf: 13110,
+ sjg: 13111,
+ sjh: 13112,
+ sji: 13113,
+ sjj: 13114,
+ sjk: 13115,
+ sjl: 13116,
+ sjm: 13117,
+ sjn: 13118,
+ sjo: 13119,
+ sjp: 13120,
+ sjq: 13121,
+ sjr: 13122,
+ sjs: 13123,
+ sjt: 13124,
+ sju: 13125,
+ sjv: 13126,
+ sjw: 13127,
+ sjx: 13128,
+ sjy: 13129,
+ skz: 13130,
+ ska: 13131,
+ skb: 13132,
+ skc: 13133,
+ skd: 13134,
+ ske: 13135,
+ skf: 13136,
+ skg: 13137,
+ skh: 13138,
+ ski: 13139,
+ skj: 13140,
+ skk: 13141,
+ skl: 13142,
+ skm: 13143,
+ skn: 13144,
+ sko: 13145,
+ skp: 13146,
+ skq: 13147,
+ skr: 13148,
+ sks: 13149,
+ skt: 13150,
+ sku: 13151,
+ skv: 13152,
+ skw: 13153,
+ skx: 13154,
+ sky: 13155,
+ slz: 13156,
+ sla: 13157,
+ slb: 13158,
+ slc: 13159,
+ sld: 13160,
+ sle: 13161,
+ slf: 13162,
+ slg: 13163,
+ slh: 13164,
+ sli: 13165,
+ slj: 13166,
+ slk: 13167,
+ sll: 13168,
+ slm: 13169,
+ sln: 13170,
+ slo: 13171,
+ slp: 13172,
+ slq: 13173,
+ slr: 13174,
+ sls: 13175,
+ slt: 13176,
+ slu: 13177,
+ slv: 13178,
+ slw: 13179,
+ slx: 13180,
+ sly: 13181,
+ smz: 13182,
+ sma: 13183,
+ smb: 13184,
+ smc: 13185,
+ smd: 13186,
+ sme: 13187,
+ smf: 13188,
+ smg: 13189,
+ smh: 13190,
+ smi: 13191,
+ smj: 13192,
+ smk: 13193,
+ sml: 13194,
+ smm: 13195,
+ smn: 13196,
+ smo: 13197,
+ smp: 13198,
+ smq: 13199,
+ smr: 13200,
+ sms: 13201,
+ smt: 13202,
+ smu: 13203,
+ smv: 13204,
+ smw: 13205,
+ smx: 13206,
+ smy: 13207,
+ snz: 13208,
+ sna: 13209,
+ snb: 13210,
+ snc: 13211,
+ snd: 13212,
+ sne: 13213,
+ snf: 13214,
+ sng: 13215,
+ snh: 13216,
+ sni: 13217,
+ snj: 13218,
+ snk: 13219,
+ snl: 13220,
+ snm: 13221,
+ snn: 13222,
+ sno: 13223,
+ snp: 13224,
+ snq: 13225,
+ snr: 13226,
+ sns: 13227,
+ snt: 13228,
+ snu: 13229,
+ snv: 13230,
+ snw: 13231,
+ snx: 13232,
+ sny: 13233,
+ soz: 13234,
+ soa: 13235,
+ sob: 13236,
+ soc: 13237,
+ sod: 13238,
+ soe: 13239,
+ sof: 13240,
+ sog: 13241,
+ soh: 13242,
+ soi: 13243,
+ soj: 13244,
+ sok: 13245,
+ sol: 13246,
+ som: 13247,
+ son: 13248,
+ soo: 13249,
+ sop: 13250,
+ soq: 13251,
+ sor: 13252,
+ sos: 13253,
+ sot: 13254,
+ sou: 13255,
+ sov: 13256,
+ sow: 13257,
+ sox: 13258,
+ soy: 13259,
+ spz: 13260,
+ spa: 13261,
+ spb: 13262,
+ spc: 13263,
+ spd: 13264,
+ spe: 13265,
+ spf: 13266,
+ spg: 13267,
+ sph: 13268,
+ spi: 13269,
+ spj: 13270,
+ spk: 13271,
+ spl: 13272,
+ spm: 13273,
+ spn: 13274,
+ spo: 13275,
+ spp: 13276,
+ spq: 13277,
+ spr: 13278,
+ sps: 13279,
+ spt: 13280,
+ spu: 13281,
+ spv: 13282,
+ spw: 13283,
+ spx: 13284,
+ spy: 13285,
+ sqz: 13286,
+ sqa: 13287,
+ sqb: 13288,
+ sqc: 13289,
+ sqd: 13290,
+ sqe: 13291,
+ sqf: 13292,
+ sqg: 13293,
+ sqh: 13294,
+ sqi: 13295,
+ sqj: 13296,
+ sqk: 13297,
+ sql: 13298,
+ sqm: 13299,
+ sqn: 13300,
+ sqo: 13301,
+ sqp: 13302,
+ sqq: 13303,
+ sqr: 13304,
+ sqs: 13305,
+ sqt: 13306,
+ squ: 13307,
+ sqv: 13308,
+ sqw: 13309,
+ sqx: 13310,
+ sqy: 13311,
+ srz: 13312,
+ sra: 13313,
+ srb: 13314,
+ src: 13315,
+ srd: 13316,
+ sre: 13317,
+ srf: 13318,
+ srg: 13319,
+ srh: 13320,
+ sri: 13321,
+ srj: 13322,
+ srk: 13323,
+ srl: 13324,
+ srm: 13325,
+ srn: 13326,
+ sro: 13327,
+ srp: 13328,
+ srq: 13329,
+ srr: 13330,
+ srs: 13331,
+ srt: 13332,
+ sru: 13333,
+ srv: 13334,
+ srw: 13335,
+ srx: 13336,
+ sry: 13337,
+ ssz: 13338,
+ ssa: 13339,
+ ssb: 13340,
+ ssc: 13341,
+ ssd: 13342,
+ sse: 13343,
+ ssf: 13344,
+ ssg: 13345,
+ ssh: 13346,
+ ssi: 13347,
+ ssj: 13348,
+ ssk: 13349,
+ ssl: 13350,
+ ssm: 13351,
+ ssn: 13352,
+ sso: 13353,
+ ssp: 13354,
+ ssq: 13355,
+ ssr: 13356,
+ sss: 13357,
+ sst: 13358,
+ ssu: 13359,
+ ssv: 13360,
+ ssw: 13361,
+ ssx: 13362,
+ ssy: 13363,
+ stz: 13364,
+ sta: 13365,
+ stb: 13366,
+ stc: 13367,
+ std: 13368,
+ ste: 13369,
+ stf: 13370,
+ stg: 13371,
+ sth: 13372,
+ sti: 13373,
+ stj: 13374,
+ stk: 13375,
+ stl: 13376,
+ stm: 13377,
+ stn: 13378,
+ sto: 13379,
+ stp: 13380,
+ stq: 13381,
+ str: 13382,
+ sts: 13383,
+ stt: 13384,
+ stu: 13385,
+ stv: 13386,
+ stw: 13387,
+ stx: 13388,
+ sty: 13389,
+ suz: 13390,
+ sua: 13391,
+ sub: 13392,
+ suc: 13393,
+ sud: 13394,
+ sue: 13395,
+ suf: 13396,
+ sug: 13397,
+ suh: 13398,
+ sui: 13399,
+ suj: 13400,
+ suk: 13401,
+ sul: 13402,
+ sum: 13403,
+ sun: 13404,
+ suo: 13405,
+ sup: 13406,
+ suq: 13407,
+ sur: 13408,
+ sus: 13409,
+ sut: 13410,
+ suu: 13411,
+ suv: 13412,
+ suw: 13413,
+ sux: 13414,
+ suy: 13415,
+ svz: 13416,
+ sva: 13417,
+ svb: 13418,
+ svc: 13419,
+ svd: 13420,
+ sve: 13421,
+ svf: 13422,
+ svg: 13423,
+ svh: 13424,
+ svi: 13425,
+ svj: 13426,
+ svk: 13427,
+ svl: 13428,
+ svm: 13429,
+ svn: 13430,
+ svo: 13431,
+ svp: 13432,
+ svq: 13433,
+ svr: 13434,
+ svs: 13435,
+ svt: 13436,
+ svu: 13437,
+ svv: 13438,
+ svw: 13439,
+ svx: 13440,
+ svy: 13441,
+ swz: 13442,
+ swa: 13443,
+ swb: 13444,
+ swc: 13445,
+ swd: 13446,
+ swe: 13447,
+ swf: 13448,
+ swg: 13449,
+ swh: 13450,
+ swi: 13451,
+ swj: 13452,
+ swk: 13453,
+ swl: 13454,
+ swm: 13455,
+ swn: 13456,
+ swo: 13457,
+ swp: 13458,
+ swq: 13459,
+ swr: 13460,
+ sws: 13461,
+ swt: 13462,
+ swu: 13463,
+ swv: 13464,
+ sww: 13465,
+ swx: 13466,
+ swy: 13467,
+ sxz: 13468,
+ sxa: 13469,
+ sxb: 13470,
+ sxc: 13471,
+ sxd: 13472,
+ sxe: 13473,
+ sxf: 13474,
+ sxg: 13475,
+ sxh: 13476,
+ sxi: 13477,
+ sxj: 13478,
+ sxk: 13479,
+ sxl: 13480,
+ sxm: 13481,
+ sxn: 13482,
+ sxo: 13483,
+ sxp: 13484,
+ sxq: 13485,
+ sxr: 13486,
+ sxs: 13487,
+ sxt: 13488,
+ sxu: 13489,
+ sxv: 13490,
+ sxw: 13491,
+ sxx: 13492,
+ sxy: 13493,
+ syz: 13494,
+ sya: 13495,
+ syb: 13496,
+ syc: 13497,
+ syd: 13498,
+ sye: 13499,
+ syf: 13500,
+ syg: 13501,
+ syh: 13502,
+ syi: 13503,
+ syj: 13504,
+ syk: 13505,
+ syl: 13506,
+ sym: 13507,
+ syn: 13508,
+ syo: 13509,
+ syp: 13510,
+ syq: 13511,
+ syr: 13512,
+ sys: 13513,
+ syt: 13514,
+ syu: 13515,
+ syv: 13516,
+ syw: 13517,
+ syx: 13518,
+ syy: 13519,
+ tzz: 13520,
+ tza: 13521,
+ tzb: 13522,
+ tzc: 13523,
+ tzd: 13524,
+ tze: 13525,
+ tzf: 13526,
+ tzg: 13527,
+ tzh: 13528,
+ tzi: 13529,
+ tzj: 13530,
+ tzk: 13531,
+ tzl: 13532,
+ tzm: 13533,
+ tzn: 13534,
+ tzo: 13535,
+ tzp: 13536,
+ tzq: 13537,
+ tzr: 13538,
+ tzs: 13539,
+ tzt: 13540,
+ tzu: 13541,
+ tzv: 13542,
+ tzw: 13543,
+ tzx: 13544,
+ tzy: 13545,
+ taz: 13546,
+ taa: 13547,
+ tab: 13548,
+ tac: 13549,
+ tad: 13550,
+ tae: 13551,
+ taf: 13552,
+ tag: 13553,
+ tah: 13554,
+ tai: 13555,
+ taj: 13556,
+ tak: 13557,
+ tal: 13558,
+ tam: 13559,
+ tan: 13560,
+ tao: 13561,
+ tap: 13562,
+ taq: 13563,
+ tar: 13564,
+ tas: 13565,
+ tat: 13566,
+ tau: 13567,
+ tav: 13568,
+ taw: 13569,
+ tax: 13570,
+ tay: 13571,
+ tbz: 13572,
+ tba: 13573,
+ tbb: 13574,
+ tbc: 13575,
+ tbd: 13576,
+ tbe: 13577,
+ tbf: 13578,
+ tbg: 13579,
+ tbh: 13580,
+ tbi: 13581,
+ tbj: 13582,
+ tbk: 13583,
+ tbl: 13584,
+ tbm: 13585,
+ tbn: 13586,
+ tbo: 13587,
+ tbp: 13588,
+ tbq: 13589,
+ tbr: 13590,
+ tbs: 13591,
+ tbt: 13592,
+ tbu: 13593,
+ tbv: 13594,
+ tbw: 13595,
+ tbx: 13596,
+ tby: 13597,
+ tcz: 13598,
+ tca: 13599,
+ tcb: 13600,
+ tcc: 13601,
+ tcd: 13602,
+ tce: 13603,
+ tcf: 13604,
+ tcg: 13605,
+ tch: 13606,
+ tci: 13607,
+ tcj: 13608,
+ tck: 13609,
+ tcl: 13610,
+ tcm: 13611,
+ tcn: 13612,
+ tco: 13613,
+ tcp: 13614,
+ tcq: 13615,
+ tcr: 13616,
+ tcs: 13617,
+ tct: 13618,
+ tcu: 13619,
+ tcv: 13620,
+ tcw: 13621,
+ tcx: 13622,
+ tcy: 13623,
+ tdz: 13624,
+ tda: 13625,
+ tdb: 13626,
+ tdc: 13627,
+ tdd: 13628,
+ tde: 13629,
+ tdf: 13630,
+ tdg: 13631,
+ tdh: 13632,
+ tdi: 13633,
+ tdj: 13634,
+ tdk: 13635,
+ tdl: 13636,
+ tdm: 13637,
+ tdn: 13638,
+ tdo: 13639,
+ tdp: 13640,
+ tdq: 13641,
+ tdr: 13642,
+ tds: 13643,
+ tdt: 13644,
+ tdu: 13645,
+ tdv: 13646,
+ tdw: 13647,
+ tdx: 13648,
+ tdy: 13649,
+ tez: 13650,
+ tea: 13651,
+ teb: 13652,
+ tec: 13653,
+ ted: 13654,
+ tee: 13655,
+ tef: 13656,
+ teg: 13657,
+ teh: 13658,
+ tei: 13659,
+ tej: 13660,
+ tek: 13661,
+ tel: 13662,
+ tem: 13663,
+ ten: 13664,
+ teo: 13665,
+ tep: 13666,
+ teq: 13667,
+ ter: 13668,
+ tes: 13669,
+ tet: 13670,
+ teu: 13671,
+ tev: 13672,
+ tew: 13673,
+ tex: 13674,
+ tey: 13675,
+ tfz: 13676,
+ tfa: 13677,
+ tfb: 13678,
+ tfc: 13679,
+ tfd: 13680,
+ tfe: 13681,
+ tff: 13682,
+ tfg: 13683,
+ tfh: 13684,
+ tfi: 13685,
+ tfj: 13686,
+ tfk: 13687,
+ tfl: 13688,
+ tfm: 13689,
+ tfn: 13690,
+ tfo: 13691,
+ tfp: 13692,
+ tfq: 13693,
+ tfr: 13694,
+ tfs: 13695,
+ tft: 13696,
+ tfu: 13697,
+ tfv: 13698,
+ tfw: 13699,
+ tfx: 13700,
+ tfy: 13701,
+ tgz: 13702,
+ tga: 13703,
+ tgb: 13704,
+ tgc: 13705,
+ tgd: 13706,
+ tge: 13707,
+ tgf: 13708,
+ tgg: 13709,
+ tgh: 13710,
+ tgi: 13711,
+ tgj: 13712,
+ tgk: 13713,
+ tgl: 13714,
+ tgm: 13715,
+ tgn: 13716,
+ tgo: 13717,
+ tgp: 13718,
+ tgq: 13719,
+ tgr: 13720,
+ tgs: 13721,
+ tgt: 13722,
+ tgu: 13723,
+ tgv: 13724,
+ tgw: 13725,
+ tgx: 13726,
+ tgy: 13727,
+ thz: 13728,
+ tha: 13729,
+ thb: 13730,
+ thc: 13731,
+ thd: 13732,
+ the: 13733,
+ thf: 13734,
+ thg: 13735,
+ thh: 13736,
+ thi: 13737,
+ thj: 13738,
+ thk: 13739,
+ thl: 13740,
+ thm: 13741,
+ thn: 13742,
+ tho: 13743,
+ thp: 13744,
+ thq: 13745,
+ thr: 13746,
+ ths: 13747,
+ tht: 13748,
+ thu: 13749,
+ thv: 13750,
+ thw: 13751,
+ thx: 13752,
+ thy: 13753,
+ tiz: 13754,
+ tia: 13755,
+ tib: 13756,
+ tic: 13757,
+ tid: 13758,
+ tie: 13759,
+ tif: 13760,
+ tig: 13761,
+ tih: 13762,
+ tii: 13763,
+ tij: 13764,
+ tik: 13765,
+ til: 13766,
+ tim: 13767,
+ tin: 13768,
+ tio: 13769,
+ tip: 13770,
+ tiq: 13771,
+ tir: 13772,
+ tis: 13773,
+ tit: 13774,
+ tiu: 13775,
+ tiv: 13776,
+ tiw: 13777,
+ tix: 13778,
+ tiy: 13779,
+ tjz: 13780,
+ tja: 13781,
+ tjb: 13782,
+ tjc: 13783,
+ tjd: 13784,
+ tje: 13785,
+ tjf: 13786,
+ tjg: 13787,
+ tjh: 13788,
+ tji: 13789,
+ tjj: 13790,
+ tjk: 13791,
+ tjl: 13792,
+ tjm: 13793,
+ tjn: 13794,
+ tjo: 13795,
+ tjp: 13796,
+ tjq: 13797,
+ tjr: 13798,
+ tjs: 13799,
+ tjt: 13800,
+ tju: 13801,
+ tjv: 13802,
+ tjw: 13803,
+ tjx: 13804,
+ tjy: 13805,
+ tkz: 13806,
+ tka: 13807,
+ tkb: 13808,
+ tkc: 13809,
+ tkd: 13810,
+ tke: 13811,
+ tkf: 13812,
+ tkg: 13813,
+ tkh: 13814,
+ tki: 13815,
+ tkj: 13816,
+ tkk: 13817,
+ tkl: 13818,
+ tkm: 13819,
+ tkn: 13820,
+ tko: 13821,
+ tkp: 13822,
+ tkq: 13823,
+ tkr: 13824,
+ tks: 13825,
+ tkt: 13826,
+ tku: 13827,
+ tkv: 13828,
+ tkw: 13829,
+ tkx: 13830,
+ tky: 13831,
+ tlz: 13832,
+ tla: 13833,
+ tlb: 13834,
+ tlc: 13835,
+ tld: 13836,
+ tle: 13837,
+ tlf: 13838,
+ tlg: 13839,
+ tlh: 13840,
+ tli: 13841,
+ tlj: 13842,
+ tlk: 13843,
+ tll: 13844,
+ tlm: 13845,
+ tln: 13846,
+ tlo: 13847,
+ tlp: 13848,
+ tlq: 13849,
+ tlr: 13850,
+ tls: 13851,
+ tlt: 13852,
+ tlu: 13853,
+ tlv: 13854,
+ tlw: 13855,
+ tlx: 13856,
+ tly: 13857,
+ tmz: 13858,
+ tma: 13859,
+ tmb: 13860,
+ tmc: 13861,
+ tmd: 13862,
+ tme: 13863,
+ tmf: 13864,
+ tmg: 13865,
+ tmh: 13866,
+ tmi: 13867,
+ tmj: 13868,
+ tmk: 13869,
+ tml: 13870,
+ tmm: 13871,
+ tmn: 13872,
+ tmo: 13873,
+ tmp: 13874,
+ tmq: 13875,
+ tmr: 13876,
+ tms: 13877,
+ tmt: 13878,
+ tmu: 13879,
+ tmv: 13880,
+ tmw: 13881,
+ tmx: 13882,
+ tmy: 13883,
+ tnz: 13884,
+ tna: 13885,
+ tnb: 13886,
+ tnc: 13887,
+ tnd: 13888,
+ tne: 13889,
+ tnf: 13890,
+ tng: 13891,
+ tnh: 13892,
+ tni: 13893,
+ tnj: 13894,
+ tnk: 13895,
+ tnl: 13896,
+ tnm: 13897,
+ tnn: 13898,
+ tno: 13899,
+ tnp: 13900,
+ tnq: 13901,
+ tnr: 13902,
+ tns: 13903,
+ tnt: 13904,
+ tnu: 13905,
+ tnv: 13906,
+ tnw: 13907,
+ tnx: 13908,
+ tny: 13909,
+ toz: 13910,
+ toa: 13911,
+ tob: 13912,
+ toc: 13913,
+ tod: 13914,
+ toe: 13915,
+ tof: 13916,
+ tog: 13917,
+ toh: 13918,
+ toi: 13919,
+ toj: 13920,
+ tok: 13921,
+ tol: 13922,
+ tom: 13923,
+ ton: 13924,
+ too: 13925,
+ top: 13926,
+ toq: 13927,
+ tor: 13928,
+ tos: 13929,
+ tot: 13930,
+ tou: 13931,
+ tov: 13932,
+ tow: 13933,
+ tox: 13934,
+ toy: 13935,
+ tpz: 13936,
+ tpa: 13937,
+ tpb: 13938,
+ tpc: 13939,
+ tpd: 13940,
+ tpe: 13941,
+ tpf: 13942,
+ tpg: 13943,
+ tph: 13944,
+ tpi: 13945,
+ tpj: 13946,
+ tpk: 13947,
+ tpl: 13948,
+ tpm: 13949,
+ tpn: 13950,
+ tpo: 13951,
+ tpp: 13952,
+ tpq: 13953,
+ tpr: 13954,
+ tps: 13955,
+ tpt: 13956,
+ tpu: 13957,
+ tpv: 13958,
+ tpw: 13959,
+ tpx: 13960,
+ tpy: 13961,
+ tqz: 13962,
+ tqa: 13963,
+ tqb: 13964,
+ tqc: 13965,
+ tqd: 13966,
+ tqe: 13967,
+ tqf: 13968,
+ tqg: 13969,
+ tqh: 13970,
+ tqi: 13971,
+ tqj: 13972,
+ tqk: 13973,
+ tql: 13974,
+ tqm: 13975,
+ tqn: 13976,
+ tqo: 13977,
+ tqp: 13978,
+ tqq: 13979,
+ tqr: 13980,
+ tqs: 13981,
+ tqt: 13982,
+ tqu: 13983,
+ tqv: 13984,
+ tqw: 13985,
+ tqx: 13986,
+ tqy: 13987,
+ trz: 13988,
+ tra: 13989,
+ trb: 13990,
+ trc: 13991,
+ trd: 13992,
+ tre: 13993,
+ trf: 13994,
+ trg: 13995,
+ trh: 13996,
+ tri: 13997,
+ trj: 13998,
+ trk: 13999,
+ trl: 14000,
+ trm: 14001,
+ trn: 14002,
+ tro: 14003,
+ trp: 14004,
+ trq: 14005,
+ trr: 14006,
+ trs: 14007,
+ trt: 14008,
+ tru: 14009,
+ trv: 14010,
+ trw: 14011,
+ trx: 14012,
+ try: 14013,
+ tsz: 14014,
+ tsa: 14015,
+ tsb: 14016,
+ tsc: 14017,
+ tsd: 14018,
+ tse: 14019,
+ tsf: 14020,
+ tsg: 14021,
+ tsh: 14022,
+ tsi: 14023,
+ tsj: 14024,
+ tsk: 14025,
+ tsl: 14026,
+ tsm: 14027,
+ tsn: 14028,
+ tso: 14029,
+ tsp: 14030,
+ tsq: 14031,
+ tsr: 14032,
+ tss: 14033,
+ tst: 14034,
+ tsu: 14035,
+ tsv: 14036,
+ tsw: 14037,
+ tsx: 14038,
+ tsy: 14039,
+ ttz: 14040,
+ tta: 14041,
+ ttb: 14042,
+ ttc: 14043,
+ ttd: 14044,
+ tte: 14045,
+ ttf: 14046,
+ ttg: 14047,
+ tth: 14048,
+ tti: 14049,
+ ttj: 14050,
+ ttk: 14051,
+ ttl: 14052,
+ ttm: 14053,
+ ttn: 14054,
+ tto: 14055,
+ ttp: 14056,
+ ttq: 14057,
+ ttr: 14058,
+ tts: 14059,
+ ttt: 14060,
+ ttu: 14061,
+ ttv: 14062,
+ ttw: 14063,
+ ttx: 14064,
+ tty: 14065,
+ tuz: 14066,
+ tua: 14067,
+ tub: 14068,
+ tuc: 14069,
+ tud: 14070,
+ tue: 14071,
+ tuf: 14072,
+ tug: 14073,
+ tuh: 14074,
+ tui: 14075,
+ tuj: 14076,
+ tuk: 14077,
+ tul: 14078,
+ tum: 14079,
+ tun: 14080,
+ tuo: 14081,
+ tup: 14082,
+ tuq: 14083,
+ tur: 14084,
+ tus: 14085,
+ tut: 14086,
+ tuu: 14087,
+ tuv: 14088,
+ tuw: 14089,
+ tux: 14090,
+ tuy: 14091,
+ tvz: 14092,
+ tva: 14093,
+ tvb: 14094,
+ tvc: 14095,
+ tvd: 14096,
+ tve: 14097,
+ tvf: 14098,
+ tvg: 14099,
+ tvh: 14100,
+ tvi: 14101,
+ tvj: 14102,
+ tvk: 14103,
+ tvl: 14104,
+ tvm: 14105,
+ tvn: 14106,
+ tvo: 14107,
+ tvp: 14108,
+ tvq: 14109,
+ tvr: 14110,
+ tvs: 14111,
+ tvt: 14112,
+ tvu: 14113,
+ tvv: 14114,
+ tvw: 14115,
+ tvx: 14116,
+ tvy: 14117,
+ twz: 14118,
+ twa: 14119,
+ twb: 14120,
+ twc: 14121,
+ twd: 14122,
+ twe: 14123,
+ twf: 14124,
+ twg: 14125,
+ twh: 14126,
+ twi: 14127,
+ twj: 14128,
+ twk: 14129,
+ twl: 14130,
+ twm: 14131,
+ twn: 14132,
+ two: 14133,
+ twp: 14134,
+ twq: 14135,
+ twr: 14136,
+ tws: 14137,
+ twt: 14138,
+ twu: 14139,
+ twv: 14140,
+ tww: 14141,
+ twx: 14142,
+ twy: 14143,
+ txz: 14144,
+ txa: 14145,
+ txb: 14146,
+ txc: 14147,
+ txd: 14148,
+ txe: 14149,
+ txf: 14150,
+ txg: 14151,
+ txh: 14152,
+ txi: 14153,
+ txj: 14154,
+ txk: 14155,
+ txl: 14156,
+ txm: 14157,
+ txn: 14158,
+ txo: 14159,
+ txp: 14160,
+ txq: 14161,
+ txr: 14162,
+ txs: 14163,
+ txt: 14164,
+ txu: 14165,
+ txv: 14166,
+ txw: 14167,
+ txx: 14168,
+ txy: 14169,
+ tyz: 14170,
+ tya: 14171,
+ tyb: 14172,
+ tyc: 14173,
+ tyd: 14174,
+ tye: 14175,
+ tyf: 14176,
+ tyg: 14177,
+ tyh: 14178,
+ tyi: 14179,
+ tyj: 14180,
+ tyk: 14181,
+ tyl: 14182,
+ tym: 14183,
+ tyn: 14184,
+ tyo: 14185,
+ typ: 14186,
+ tyq: 14187,
+ tyr: 14188,
+ tys: 14189,
+ tyt: 14190,
+ tyu: 14191,
+ tyv: 14192,
+ tyw: 14193,
+ tyx: 14194,
+ tyy: 14195,
+ uzz: 14196,
+ uza: 14197,
+ uzb: 14198,
+ uzc: 14199,
+ uzd: 14200,
+ uze: 14201,
+ uzf: 14202,
+ uzg: 14203,
+ uzh: 14204,
+ uzi: 14205,
+ uzj: 14206,
+ uzk: 14207,
+ uzl: 14208,
+ uzm: 14209,
+ uzn: 14210,
+ uzo: 14211,
+ uzp: 14212,
+ uzq: 14213,
+ uzr: 14214,
+ uzs: 14215,
+ uzt: 14216,
+ uzu: 14217,
+ uzv: 14218,
+ uzw: 14219,
+ uzx: 14220,
+ uzy: 14221,
+ uaz: 14222,
+ uaa: 14223,
+ uab: 14224,
+ uac: 14225,
+ uad: 14226,
+ uae: 14227,
+ uaf: 14228,
+ uag: 14229,
+ uah: 14230,
+ uai: 14231,
+ uaj: 14232,
+ uak: 14233,
+ ual: 14234,
+ uam: 14235,
+ uan: 14236,
+ uao: 14237,
+ uap: 14238,
+ uaq: 14239,
+ uar: 14240,
+ uas: 14241,
+ uat: 14242,
+ uau: 14243,
+ uav: 14244,
+ uaw: 14245,
+ uax: 14246,
+ uay: 14247,
+ ubz: 14248,
+ uba: 14249,
+ ubb: 14250,
+ ubc: 14251,
+ ubd: 14252,
+ ube: 14253,
+ ubf: 14254,
+ ubg: 14255,
+ ubh: 14256,
+ ubi: 14257,
+ ubj: 14258,
+ ubk: 14259,
+ ubl: 14260,
+ ubm: 14261,
+ ubn: 14262,
+ ubo: 14263,
+ ubp: 14264,
+ ubq: 14265,
+ ubr: 14266,
+ ubs: 14267,
+ ubt: 14268,
+ ubu: 14269,
+ ubv: 14270,
+ ubw: 14271,
+ ubx: 14272,
+ uby: 14273,
+ ucz: 14274,
+ uca: 14275,
+ ucb: 14276,
+ ucc: 14277,
+ ucd: 14278,
+ uce: 14279,
+ ucf: 14280,
+ ucg: 14281,
+ uch: 14282,
+ uci: 14283,
+ ucj: 14284,
+ uck: 14285,
+ ucl: 14286,
+ ucm: 14287,
+ ucn: 14288,
+ uco: 14289,
+ ucp: 14290,
+ ucq: 14291,
+ ucr: 14292,
+ ucs: 14293,
+ uct: 14294,
+ ucu: 14295,
+ ucv: 14296,
+ ucw: 14297,
+ ucx: 14298,
+ ucy: 14299,
+ udz: 14300,
+ uda: 14301,
+ udb: 14302,
+ udc: 14303,
+ udd: 14304,
+ ude: 14305,
+ udf: 14306,
+ udg: 14307,
+ udh: 14308,
+ udi: 14309,
+ udj: 14310,
+ udk: 14311,
+ udl: 14312,
+ udm: 14313,
+ udn: 14314,
+ udo: 14315,
+ udp: 14316,
+ udq: 14317,
+ udr: 14318,
+ uds: 14319,
+ udt: 14320,
+ udu: 14321,
+ udv: 14322,
+ udw: 14323,
+ udx: 14324,
+ udy: 14325,
+ uez: 14326,
+ uea: 14327,
+ ueb: 14328,
+ uec: 14329,
+ ued: 14330,
+ uee: 14331,
+ uef: 14332,
+ ueg: 14333,
+ ueh: 14334,
+ uei: 14335,
+ uej: 14336,
+ uek: 14337,
+ uel: 14338,
+ uem: 14339,
+ uen: 14340,
+ ueo: 14341,
+ uep: 14342,
+ ueq: 14343,
+ uer: 14344,
+ ues: 14345,
+ uet: 14346,
+ ueu: 14347,
+ uev: 14348,
+ uew: 14349,
+ uex: 14350,
+ uey: 14351,
+ ufz: 14352,
+ ufa: 14353,
+ ufb: 14354,
+ ufc: 14355,
+ ufd: 14356,
+ ufe: 14357,
+ uff: 14358,
+ ufg: 14359,
+ ufh: 14360,
+ ufi: 14361,
+ ufj: 14362,
+ ufk: 14363,
+ ufl: 14364,
+ ufm: 14365,
+ ufn: 14366,
+ ufo: 14367,
+ ufp: 14368,
+ ufq: 14369,
+ ufr: 14370,
+ ufs: 14371,
+ uft: 14372,
+ ufu: 14373,
+ ufv: 14374,
+ ufw: 14375,
+ ufx: 14376,
+ ufy: 14377,
+ ugz: 14378,
+ uga: 14379,
+ ugb: 14380,
+ ugc: 14381,
+ ugd: 14382,
+ uge: 14383,
+ ugf: 14384,
+ ugg: 14385,
+ ugh: 14386,
+ ugi: 14387,
+ ugj: 14388,
+ ugk: 14389,
+ ugl: 14390,
+ ugm: 14391,
+ ugn: 14392,
+ ugo: 14393,
+ ugp: 14394,
+ ugq: 14395,
+ ugr: 14396,
+ ugs: 14397,
+ ugt: 14398,
+ ugu: 14399,
+ ugv: 14400,
+ ugw: 14401,
+ ugx: 14402,
+ ugy: 14403,
+ uhz: 14404,
+ uha: 14405,
+ uhb: 14406,
+ uhc: 14407,
+ uhd: 14408,
+ uhe: 14409,
+ uhf: 14410,
+ uhg: 14411,
+ uhh: 14412,
+ uhi: 14413,
+ uhj: 14414,
+ uhk: 14415,
+ uhl: 14416,
+ uhm: 14417,
+ uhn: 14418,
+ uho: 14419,
+ uhp: 14420,
+ uhq: 14421,
+ uhr: 14422,
+ uhs: 14423,
+ uht: 14424,
+ uhu: 14425,
+ uhv: 14426,
+ uhw: 14427,
+ uhx: 14428,
+ uhy: 14429,
+ uiz: 14430,
+ uia: 14431,
+ uib: 14432,
+ uic: 14433,
+ uid: 14434,
+ uie: 14435,
+ uif: 14436,
+ uig: 14437,
+ uih: 14438,
+ uii: 14439,
+ uij: 14440,
+ uik: 14441,
+ uil: 14442,
+ uim: 14443,
+ uin: 14444,
+ uio: 14445,
+ uip: 14446,
+ uiq: 14447,
+ uir: 14448,
+ uis: 14449,
+ uit: 14450,
+ uiu: 14451,
+ uiv: 14452,
+ uiw: 14453,
+ uix: 14454,
+ uiy: 14455,
+ ujz: 14456,
+ uja: 14457,
+ ujb: 14458,
+ ujc: 14459,
+ ujd: 14460,
+ uje: 14461,
+ ujf: 14462,
+ ujg: 14463,
+ ujh: 14464,
+ uji: 14465,
+ ujj: 14466,
+ ujk: 14467,
+ ujl: 14468,
+ ujm: 14469,
+ ujn: 14470,
+ ujo: 14471,
+ ujp: 14472,
+ ujq: 14473,
+ ujr: 14474,
+ ujs: 14475,
+ ujt: 14476,
+ uju: 14477,
+ ujv: 14478,
+ ujw: 14479,
+ ujx: 14480,
+ ujy: 14481,
+ ukz: 14482,
+ uka: 14483,
+ ukb: 14484,
+ ukc: 14485,
+ ukd: 14486,
+ uke: 14487,
+ ukf: 14488,
+ ukg: 14489,
+ ukh: 14490,
+ uki: 14491,
+ ukj: 14492,
+ ukk: 14493,
+ ukl: 14494,
+ ukm: 14495,
+ ukn: 14496,
+ uko: 14497,
+ ukp: 14498,
+ ukq: 14499,
+ ukr: 14500,
+ uks: 14501,
+ ukt: 14502,
+ uku: 14503,
+ ukv: 14504,
+ ukw: 14505,
+ ukx: 14506,
+ uky: 14507,
+ ulz: 14508,
+ ula: 14509,
+ ulb: 14510,
+ ulc: 14511,
+ uld: 14512,
+ ule: 14513,
+ ulf: 14514,
+ ulg: 14515,
+ ulh: 14516,
+ uli: 14517,
+ ulj: 14518,
+ ulk: 14519,
+ ull: 14520,
+ ulm: 14521,
+ uln: 14522,
+ ulo: 14523,
+ ulp: 14524,
+ ulq: 14525,
+ ulr: 14526,
+ uls: 14527,
+ ult: 14528,
+ ulu: 14529,
+ ulv: 14530,
+ ulw: 14531,
+ ulx: 14532,
+ uly: 14533,
+ umz: 14534,
+ uma: 14535,
+ umb: 14536,
+ umc: 14537,
+ umd: 14538,
+ ume: 14539,
+ umf: 14540,
+ umg: 14541,
+ umh: 14542,
+ umi: 14543,
+ umj: 14544,
+ umk: 14545,
+ uml: 14546,
+ umm: 14547,
+ umn: 14548,
+ umo: 14549,
+ ump: 14550,
+ umq: 14551,
+ umr: 14552,
+ ums: 14553,
+ umt: 14554,
+ umu: 14555,
+ umv: 14556,
+ umw: 14557,
+ umx: 14558,
+ umy: 14559,
+ unz: 14560,
+ una: 14561,
+ unb: 14562,
+ unc: 14563,
+ und: 14564,
+ une: 14565,
+ unf: 14566,
+ ung: 14567,
+ unh: 14568,
+ uni: 14569,
+ unj: 14570,
+ unk: 14571,
+ unl: 14572,
+ unm: 14573,
+ unn: 14574,
+ uno: 14575,
+ unp: 14576,
+ unq: 14577,
+ unr: 14578,
+ uns: 14579,
+ unt: 14580,
+ unu: 14581,
+ unv: 14582,
+ unw: 14583,
+ unx: 14584,
+ uny: 14585,
+ uoz: 14586,
+ uoa: 14587,
+ uob: 14588,
+ uoc: 14589,
+ uod: 14590,
+ uoe: 14591,
+ uof: 14592,
+ uog: 14593,
+ uoh: 14594,
+ uoi: 14595,
+ uoj: 14596,
+ uok: 14597,
+ uol: 14598,
+ uom: 14599,
+ uon: 14600,
+ uoo: 14601,
+ uop: 14602,
+ uoq: 14603,
+ uor: 14604,
+ uos: 14605,
+ uot: 14606,
+ uou: 14607,
+ uov: 14608,
+ uow: 14609,
+ uox: 14610,
+ uoy: 14611,
+ upz: 14612,
+ upa: 14613,
+ upb: 14614,
+ upc: 14615,
+ upd: 14616,
+ upe: 14617,
+ upf: 14618,
+ upg: 14619,
+ uph: 14620,
+ upi: 14621,
+ upj: 14622,
+ upk: 14623,
+ upl: 14624,
+ upm: 14625,
+ upn: 14626,
+ upo: 14627,
+ upp: 14628,
+ upq: 14629,
+ upr: 14630,
+ ups: 14631,
+ upt: 14632,
+ upu: 14633,
+ upv: 14634,
+ upw: 14635,
+ upx: 14636,
+ upy: 14637,
+ uqz: 14638,
+ uqa: 14639,
+ uqb: 14640,
+ uqc: 14641,
+ uqd: 14642,
+ uqe: 14643,
+ uqf: 14644,
+ uqg: 14645,
+ uqh: 14646,
+ uqi: 14647,
+ uqj: 14648,
+ uqk: 14649,
+ uql: 14650,
+ uqm: 14651,
+ uqn: 14652,
+ uqo: 14653,
+ uqp: 14654,
+ uqq: 14655,
+ uqr: 14656,
+ uqs: 14657,
+ uqt: 14658,
+ uqu: 14659,
+ uqv: 14660,
+ uqw: 14661,
+ uqx: 14662,
+ uqy: 14663,
+ urz: 14664,
+ ura: 14665,
+ urb: 14666,
+ urc: 14667,
+ urd: 14668,
+ ure: 14669,
+ urf: 14670,
+ urg: 14671,
+ urh: 14672,
+ uri: 14673,
+ urj: 14674,
+ urk: 14675,
+ url: 14676,
+ urm: 14677,
+ urn: 14678,
+ uro: 14679,
+ urp: 14680,
+ urq: 14681,
+ urr: 14682,
+ urs: 14683,
+ urt: 14684,
+ uru: 14685,
+ urv: 14686,
+ urw: 14687,
+ urx: 14688,
+ ury: 14689,
+ usz: 14690,
+ usa: 14691,
+ usb: 14692,
+ usc: 14693,
+ usd: 14694,
+ use: 14695,
+ usf: 14696,
+ usg: 14697,
+ ush: 14698,
+ usi: 14699,
+ usj: 14700,
+ usk: 14701,
+ usl: 14702,
+ usm: 14703,
+ usn: 14704,
+ uso: 14705,
+ usp: 14706,
+ usq: 14707,
+ usr: 14708,
+ uss: 14709,
+ ust: 14710,
+ usu: 14711,
+ usv: 14712,
+ usw: 14713,
+ usx: 14714,
+ usy: 14715,
+ utz: 14716,
+ uta: 14717,
+ utb: 14718,
+ utc: 14719,
+ utd: 14720,
+ ute: 14721,
+ utf: 14722,
+ utg: 14723,
+ uth: 14724,
+ uti: 14725,
+ utj: 14726,
+ utk: 14727,
+ utl: 14728,
+ utm: 14729,
+ utn: 14730,
+ uto: 14731,
+ utp: 14732,
+ utq: 14733,
+ utr: 14734,
+ uts: 14735,
+ utt: 14736,
+ utu: 14737,
+ utv: 14738,
+ utw: 14739,
+ utx: 14740,
+ uty: 14741,
+ uuz: 14742,
+ uua: 14743,
+ uub: 14744,
+ uuc: 14745,
+ uud: 14746,
+ uue: 14747,
+ uuf: 14748,
+ uug: 14749,
+ uuh: 14750,
+ uui: 14751,
+ uuj: 14752,
+ uuk: 14753,
+ uul: 14754,
+ uum: 14755,
+ uun: 14756,
+ uuo: 14757,
+ uup: 14758,
+ uuq: 14759,
+ uur: 14760,
+ uus: 14761,
+ uut: 14762,
+ uuu: 14763,
+ uuv: 14764,
+ uuw: 14765,
+ uux: 14766,
+ uuy: 14767,
+ uvz: 14768,
+ uva: 14769,
+ uvb: 14770,
+ uvc: 14771,
+ uvd: 14772,
+ uve: 14773,
+ uvf: 14774,
+ uvg: 14775,
+ uvh: 14776,
+ uvi: 14777,
+ uvj: 14778,
+ uvk: 14779,
+ uvl: 14780,
+ uvm: 14781,
+ uvn: 14782,
+ uvo: 14783,
+ uvp: 14784,
+ uvq: 14785,
+ uvr: 14786,
+ uvs: 14787,
+ uvt: 14788,
+ uvu: 14789,
+ uvv: 14790,
+ uvw: 14791,
+ uvx: 14792,
+ uvy: 14793,
+ uwz: 14794,
+ uwa: 14795,
+ uwb: 14796,
+ uwc: 14797,
+ uwd: 14798,
+ uwe: 14799,
+ uwf: 14800,
+ uwg: 14801,
+ uwh: 14802,
+ uwi: 14803,
+ uwj: 14804,
+ uwk: 14805,
+ uwl: 14806,
+ uwm: 14807,
+ uwn: 14808,
+ uwo: 14809,
+ uwp: 14810,
+ uwq: 14811,
+ uwr: 14812,
+ uws: 14813,
+ uwt: 14814,
+ uwu: 14815,
+ uwv: 14816,
+ uww: 14817,
+ uwx: 14818,
+ uwy: 14819,
+ uxz: 14820,
+ uxa: 14821,
+ uxb: 14822,
+ uxc: 14823,
+ uxd: 14824,
+ uxe: 14825,
+ uxf: 14826,
+ uxg: 14827,
+ uxh: 14828,
+ uxi: 14829,
+ uxj: 14830,
+ uxk: 14831,
+ uxl: 14832,
+ uxm: 14833,
+ uxn: 14834,
+ uxo: 14835,
+ uxp: 14836,
+ uxq: 14837,
+ uxr: 14838,
+ uxs: 14839,
+ uxt: 14840,
+ uxu: 14841,
+ uxv: 14842,
+ uxw: 14843,
+ uxx: 14844,
+ uxy: 14845,
+ uyz: 14846,
+ uya: 14847,
+ uyb: 14848,
+ uyc: 14849,
+ uyd: 14850,
+ uye: 14851,
+ uyf: 14852,
+ uyg: 14853,
+ uyh: 14854,
+ uyi: 14855,
+ uyj: 14856,
+ uyk: 14857,
+ uyl: 14858,
+ uym: 14859,
+ uyn: 14860,
+ uyo: 14861,
+ uyp: 14862,
+ uyq: 14863,
+ uyr: 14864,
+ uys: 14865,
+ uyt: 14866,
+ uyu: 14867,
+ uyv: 14868,
+ uyw: 14869,
+ uyx: 14870,
+ uyy: 14871,
+ vzz: 14872,
+ vza: 14873,
+ vzb: 14874,
+ vzc: 14875,
+ vzd: 14876,
+ vze: 14877,
+ vzf: 14878,
+ vzg: 14879,
+ vzh: 14880,
+ vzi: 14881,
+ vzj: 14882,
+ vzk: 14883,
+ vzl: 14884,
+ vzm: 14885,
+ vzn: 14886,
+ vzo: 14887,
+ vzp: 14888,
+ vzq: 14889,
+ vzr: 14890,
+ vzs: 14891,
+ vzt: 14892,
+ vzu: 14893,
+ vzv: 14894,
+ vzw: 14895,
+ vzx: 14896,
+ vzy: 14897,
+ vaz: 14898,
+ vaa: 14899,
+ vab: 14900,
+ vac: 14901,
+ vad: 14902,
+ vae: 14903,
+ vaf: 14904,
+ vag: 14905,
+ vah: 14906,
+ vai: 14907,
+ vaj: 14908,
+ vak: 14909,
+ val: 14910,
+ vam: 14911,
+ van: 14912,
+ vao: 14913,
+ vap: 14914,
+ vaq: 14915,
+ var: 14916,
+ vas: 14917,
+ vat: 14918,
+ vau: 14919,
+ vav: 14920,
+ vaw: 14921,
+ vax: 14922,
+ vay: 14923,
+ vbz: 14924,
+ vba: 14925,
+ vbb: 14926,
+ vbc: 14927,
+ vbd: 14928,
+ vbe: 14929,
+ vbf: 14930,
+ vbg: 14931,
+ vbh: 14932,
+ vbi: 14933,
+ vbj: 14934,
+ vbk: 14935,
+ vbl: 14936,
+ vbm: 14937,
+ vbn: 14938,
+ vbo: 14939,
+ vbp: 14940,
+ vbq: 14941,
+ vbr: 14942,
+ vbs: 14943,
+ vbt: 14944,
+ vbu: 14945,
+ vbv: 14946,
+ vbw: 14947,
+ vbx: 14948,
+ vby: 14949,
+ vcz: 14950,
+ vca: 14951,
+ vcb: 14952,
+ vcc: 14953,
+ vcd: 14954,
+ vce: 14955,
+ vcf: 14956,
+ vcg: 14957,
+ vch: 14958,
+ vci: 14959,
+ vcj: 14960,
+ vck: 14961,
+ vcl: 14962,
+ vcm: 14963,
+ vcn: 14964,
+ vco: 14965,
+ vcp: 14966,
+ vcq: 14967,
+ vcr: 14968,
+ vcs: 14969,
+ vct: 14970,
+ vcu: 14971,
+ vcv: 14972,
+ vcw: 14973,
+ vcx: 14974,
+ vcy: 14975,
+ vdz: 14976,
+ vda: 14977,
+ vdb: 14978,
+ vdc: 14979,
+ vdd: 14980,
+ vde: 14981,
+ vdf: 14982,
+ vdg: 14983,
+ vdh: 14984,
+ vdi: 14985,
+ vdj: 14986,
+ vdk: 14987,
+ vdl: 14988,
+ vdm: 14989,
+ vdn: 14990,
+ vdo: 14991,
+ vdp: 14992,
+ vdq: 14993,
+ vdr: 14994,
+ vds: 14995,
+ vdt: 14996,
+ vdu: 14997,
+ vdv: 14998,
+ vdw: 14999,
+ vdx: 15000,
+ vdy: 15001,
+ vez: 15002,
+ vea: 15003,
+ veb: 15004,
+ vec: 15005,
+ ved: 15006,
+ vee: 15007,
+ vef: 15008,
+ veg: 15009,
+ veh: 15010,
+ vei: 15011,
+ vej: 15012,
+ vek: 15013,
+ vel: 15014,
+ vem: 15015,
+ ven: 15016,
+ veo: 15017,
+ vep: 15018,
+ veq: 15019,
+ ver: 15020,
+ ves: 15021,
+ vet: 15022,
+ veu: 15023,
+ vev: 15024,
+ vew: 15025,
+ vex: 15026,
+ vey: 15027,
+ vfz: 15028,
+ vfa: 15029,
+ vfb: 15030,
+ vfc: 15031,
+ vfd: 15032,
+ vfe: 15033,
+ vff: 15034,
+ vfg: 15035,
+ vfh: 15036,
+ vfi: 15037,
+ vfj: 15038,
+ vfk: 15039,
+ vfl: 15040,
+ vfm: 15041,
+ vfn: 15042,
+ vfo: 15043,
+ vfp: 15044,
+ vfq: 15045,
+ vfr: 15046,
+ vfs: 15047,
+ vft: 15048,
+ vfu: 15049,
+ vfv: 15050,
+ vfw: 15051,
+ vfx: 15052,
+ vfy: 15053,
+ vgz: 15054,
+ vga: 15055,
+ vgb: 15056,
+ vgc: 15057,
+ vgd: 15058,
+ vge: 15059,
+ vgf: 15060,
+ vgg: 15061,
+ vgh: 15062,
+ vgi: 15063,
+ vgj: 15064,
+ vgk: 15065,
+ vgl: 15066,
+ vgm: 15067,
+ vgn: 15068,
+ vgo: 15069,
+ vgp: 15070,
+ vgq: 15071,
+ vgr: 15072,
+ vgs: 15073,
+ vgt: 15074,
+ vgu: 15075,
+ vgv: 15076,
+ vgw: 15077,
+ vgx: 15078,
+ vgy: 15079,
+ vhz: 15080,
+ vha: 15081,
+ vhb: 15082,
+ vhc: 15083,
+ vhd: 15084,
+ vhe: 15085,
+ vhf: 15086,
+ vhg: 15087,
+ vhh: 15088,
+ vhi: 15089,
+ vhj: 15090,
+ vhk: 15091,
+ vhl: 15092,
+ vhm: 15093,
+ vhn: 15094,
+ vho: 15095,
+ vhp: 15096,
+ vhq: 15097,
+ vhr: 15098,
+ vhs: 15099,
+ vht: 15100,
+ vhu: 15101,
+ vhv: 15102,
+ vhw: 15103,
+ vhx: 15104,
+ vhy: 15105,
+ viz: 15106,
+ via: 15107,
+ vib: 15108,
+ vic: 15109,
+ vid: 15110,
+ vie: 15111,
+ vif: 15112,
+ vig: 15113,
+ vih: 15114,
+ vii: 15115,
+ vij: 15116,
+ vik: 15117,
+ vil: 15118,
+ vim: 15119,
+ vin: 15120,
+ vio: 15121,
+ vip: 15122,
+ viq: 15123,
+ vir: 15124,
+ vis: 15125,
+ vit: 15126,
+ viu: 15127,
+ viv: 15128,
+ viw: 15129,
+ vix: 15130,
+ viy: 15131,
+ vjz: 15132,
+ vja: 15133,
+ vjb: 15134,
+ vjc: 15135,
+ vjd: 15136,
+ vje: 15137,
+ vjf: 15138,
+ vjg: 15139,
+ vjh: 15140,
+ vji: 15141,
+ vjj: 15142,
+ vjk: 15143,
+ vjl: 15144,
+ vjm: 15145,
+ vjn: 15146,
+ vjo: 15147,
+ vjp: 15148,
+ vjq: 15149,
+ vjr: 15150,
+ vjs: 15151,
+ vjt: 15152,
+ vju: 15153,
+ vjv: 15154,
+ vjw: 15155,
+ vjx: 15156,
+ vjy: 15157,
+ vkz: 15158,
+ vka: 15159,
+ vkb: 15160,
+ vkc: 15161,
+ vkd: 15162,
+ vke: 15163,
+ vkf: 15164,
+ vkg: 15165,
+ vkh: 15166,
+ vki: 15167,
+ vkj: 15168,
+ vkk: 15169,
+ vkl: 15170,
+ vkm: 15171,
+ vkn: 15172,
+ vko: 15173,
+ vkp: 15174,
+ vkq: 15175,
+ vkr: 15176,
+ vks: 15177,
+ vkt: 15178,
+ vku: 15179,
+ vkv: 15180,
+ vkw: 15181,
+ vkx: 15182,
+ vky: 15183,
+ vlz: 15184,
+ vla: 15185,
+ vlb: 15186,
+ vlc: 15187,
+ vld: 15188,
+ vle: 15189,
+ vlf: 15190,
+ vlg: 15191,
+ vlh: 15192,
+ vli: 15193,
+ vlj: 15194,
+ vlk: 15195,
+ vll: 15196,
+ vlm: 15197,
+ vln: 15198,
+ vlo: 15199,
+ vlp: 15200,
+ vlq: 15201,
+ vlr: 15202,
+ vls: 15203,
+ vlt: 15204,
+ vlu: 15205,
+ vlv: 15206,
+ vlw: 15207,
+ vlx: 15208,
+ vly: 15209,
+ vmz: 15210,
+ vma: 15211,
+ vmb: 15212,
+ vmc: 15213,
+ vmd: 15214,
+ vme: 15215,
+ vmf: 15216,
+ vmg: 15217,
+ vmh: 15218,
+ vmi: 15219,
+ vmj: 15220,
+ vmk: 15221,
+ vml: 15222,
+ vmm: 15223,
+ vmn: 15224,
+ vmo: 15225,
+ vmp: 15226,
+ vmq: 15227,
+ vmr: 15228,
+ vms: 15229,
+ vmt: 15230,
+ vmu: 15231,
+ vmv: 15232,
+ vmw: 15233,
+ vmx: 15234,
+ vmy: 15235,
+ vnz: 15236,
+ vna: 15237,
+ vnb: 15238,
+ vnc: 15239,
+ vnd: 15240,
+ vne: 15241,
+ vnf: 15242,
+ vng: 15243,
+ vnh: 15244,
+ vni: 15245,
+ vnj: 15246,
+ vnk: 15247,
+ vnl: 15248,
+ vnm: 15249,
+ vnn: 15250,
+ vno: 15251,
+ vnp: 15252,
+ vnq: 15253,
+ vnr: 15254,
+ vns: 15255,
+ vnt: 15256,
+ vnu: 15257,
+ vnv: 15258,
+ vnw: 15259,
+ vnx: 15260,
+ vny: 15261,
+ voz: 15262,
+ voa: 15263,
+ vob: 15264,
+ voc: 15265,
+ vod: 15266,
+ voe: 15267,
+ vof: 15268,
+ vog: 15269,
+ voh: 15270,
+ voi: 15271,
+ voj: 15272,
+ vok: 15273,
+ vol: 15274,
+ vom: 15275,
+ von: 15276,
+ voo: 15277,
+ vop: 15278,
+ voq: 15279,
+ vor: 15280,
+ vos: 15281,
+ vot: 15282,
+ vou: 15283,
+ vov: 15284,
+ vow: 15285,
+ vox: 15286,
+ voy: 15287,
+ vpz: 15288,
+ vpa: 15289,
+ vpb: 15290,
+ vpc: 15291,
+ vpd: 15292,
+ vpe: 15293,
+ vpf: 15294,
+ vpg: 15295,
+ vph: 15296,
+ vpi: 15297,
+ vpj: 15298,
+ vpk: 15299,
+ vpl: 15300,
+ vpm: 15301,
+ vpn: 15302,
+ vpo: 15303,
+ vpp: 15304,
+ vpq: 15305,
+ vpr: 15306,
+ vps: 15307,
+ vpt: 15308,
+ vpu: 15309,
+ vpv: 15310,
+ vpw: 15311,
+ vpx: 15312,
+ vpy: 15313,
+ vqz: 15314,
+ vqa: 15315,
+ vqb: 15316,
+ vqc: 15317,
+ vqd: 15318,
+ vqe: 15319,
+ vqf: 15320,
+ vqg: 15321,
+ vqh: 15322,
+ vqi: 15323,
+ vqj: 15324,
+ vqk: 15325,
+ vql: 15326,
+ vqm: 15327,
+ vqn: 15328,
+ vqo: 15329,
+ vqp: 15330,
+ vqq: 15331,
+ vqr: 15332,
+ vqs: 15333,
+ vqt: 15334,
+ vqu: 15335,
+ vqv: 15336,
+ vqw: 15337,
+ vqx: 15338,
+ vqy: 15339,
+ vrz: 15340,
+ vra: 15341,
+ vrb: 15342,
+ vrc: 15343,
+ vrd: 15344,
+ vre: 15345,
+ vrf: 15346,
+ vrg: 15347,
+ vrh: 15348,
+ vri: 15349,
+ vrj: 15350,
+ vrk: 15351,
+ vrl: 15352,
+ vrm: 15353,
+ vrn: 15354,
+ vro: 15355,
+ vrp: 15356,
+ vrq: 15357,
+ vrr: 15358,
+ vrs: 15359,
+ vrt: 15360,
+ vru: 15361,
+ vrv: 15362,
+ vrw: 15363,
+ vrx: 15364,
+ vry: 15365,
+ vsz: 15366,
+ vsa: 15367,
+ vsb: 15368,
+ vsc: 15369,
+ vsd: 15370,
+ vse: 15371,
+ vsf: 15372,
+ vsg: 15373,
+ vsh: 15374,
+ vsi: 15375,
+ vsj: 15376,
+ vsk: 15377,
+ vsl: 15378,
+ vsm: 15379,
+ vsn: 15380,
+ vso: 15381,
+ vsp: 15382,
+ vsq: 15383,
+ vsr: 15384,
+ vss: 15385,
+ vst: 15386,
+ vsu: 15387,
+ vsv: 15388,
+ vsw: 15389,
+ vsx: 15390,
+ vsy: 15391,
+ vtz: 15392,
+ vta: 15393,
+ vtb: 15394,
+ vtc: 15395,
+ vtd: 15396,
+ vte: 15397,
+ vtf: 15398,
+ vtg: 15399,
+ vth: 15400,
+ vti: 15401,
+ vtj: 15402,
+ vtk: 15403,
+ vtl: 15404,
+ vtm: 15405,
+ vtn: 15406,
+ vto: 15407,
+ vtp: 15408,
+ vtq: 15409,
+ vtr: 15410,
+ vts: 15411,
+ vtt: 15412,
+ vtu: 15413,
+ vtv: 15414,
+ vtw: 15415,
+ vtx: 15416,
+ vty: 15417,
+ vuz: 15418,
+ vua: 15419,
+ vub: 15420,
+ vuc: 15421,
+ vud: 15422,
+ vue: 15423,
+ vuf: 15424,
+ vug: 15425,
+ vuh: 15426,
+ vui: 15427,
+ vuj: 15428,
+ vuk: 15429,
+ vul: 15430,
+ vum: 15431,
+ vun: 15432,
+ vuo: 15433,
+ vup: 15434,
+ vuq: 15435,
+ vur: 15436,
+ vus: 15437,
+ vut: 15438,
+ vuu: 15439,
+ vuv: 15440,
+ vuw: 15441,
+ vux: 15442,
+ vuy: 15443,
+ vvz: 15444,
+ vva: 15445,
+ vvb: 15446,
+ vvc: 15447,
+ vvd: 15448,
+ vve: 15449,
+ vvf: 15450,
+ vvg: 15451,
+ vvh: 15452,
+ vvi: 15453,
+ vvj: 15454,
+ vvk: 15455,
+ vvl: 15456,
+ vvm: 15457,
+ vvn: 15458,
+ vvo: 15459,
+ vvp: 15460,
+ vvq: 15461,
+ vvr: 15462,
+ vvs: 15463,
+ vvt: 15464,
+ vvu: 15465,
+ vvv: 15466,
+ vvw: 15467,
+ vvx: 15468,
+ vvy: 15469,
+ vwz: 15470,
+ vwa: 15471,
+ vwb: 15472,
+ vwc: 15473,
+ vwd: 15474,
+ vwe: 15475,
+ vwf: 15476,
+ vwg: 15477,
+ vwh: 15478,
+ vwi: 15479,
+ vwj: 15480,
+ vwk: 15481,
+ vwl: 15482,
+ vwm: 15483,
+ vwn: 15484,
+ vwo: 15485,
+ vwp: 15486,
+ vwq: 15487,
+ vwr: 15488,
+ vws: 15489,
+ vwt: 15490,
+ vwu: 15491,
+ vwv: 15492,
+ vww: 15493,
+ vwx: 15494,
+ vwy: 15495,
+ vxz: 15496,
+ vxa: 15497,
+ vxb: 15498,
+ vxc: 15499,
+ vxd: 15500,
+ vxe: 15501,
+ vxf: 15502,
+ vxg: 15503,
+ vxh: 15504,
+ vxi: 15505,
+ vxj: 15506,
+ vxk: 15507,
+ vxl: 15508,
+ vxm: 15509,
+ vxn: 15510,
+ vxo: 15511,
+ vxp: 15512,
+ vxq: 15513,
+ vxr: 15514,
+ vxs: 15515,
+ vxt: 15516,
+ vxu: 15517,
+ vxv: 15518,
+ vxw: 15519,
+ vxx: 15520,
+ vxy: 15521,
+ vyz: 15522,
+ vya: 15523,
+ vyb: 15524,
+ vyc: 15525,
+ vyd: 15526,
+ vye: 15527,
+ vyf: 15528,
+ vyg: 15529,
+ vyh: 15530,
+ vyi: 15531,
+ vyj: 15532,
+ vyk: 15533,
+ vyl: 15534,
+ vym: 15535,
+ vyn: 15536,
+ vyo: 15537,
+ vyp: 15538,
+ vyq: 15539,
+ vyr: 15540,
+ vys: 15541,
+ vyt: 15542,
+ vyu: 15543,
+ vyv: 15544,
+ vyw: 15545,
+ vyx: 15546,
+ vyy: 15547,
+ wzz: 15548,
+ wza: 15549,
+ wzb: 15550,
+ wzc: 15551,
+ wzd: 15552,
+ wze: 15553,
+ wzf: 15554,
+ wzg: 15555,
+ wzh: 15556,
+ wzi: 15557,
+ wzj: 15558,
+ wzk: 15559,
+ wzl: 15560,
+ wzm: 15561,
+ wzn: 15562,
+ wzo: 15563,
+ wzp: 15564,
+ wzq: 15565,
+ wzr: 15566,
+ wzs: 15567,
+ wzt: 15568,
+ wzu: 15569,
+ wzv: 15570,
+ wzw: 15571,
+ wzx: 15572,
+ wzy: 15573,
+ waz: 15574,
+ waa: 15575,
+ wab: 15576,
+ wac: 15577,
+ wad: 15578,
+ wae: 15579,
+ waf: 15580,
+ wag: 15581,
+ wah: 15582,
+ wai: 15583,
+ waj: 15584,
+ wak: 15585,
+ wal: 15586,
+ wam: 15587,
+ wan: 15588,
+ wao: 15589,
+ wap: 15590,
+ waq: 15591,
+ war: 15592,
+ was: 15593,
+ wat: 15594,
+ wau: 15595,
+ wav: 15596,
+ waw: 15597,
+ wax: 15598,
+ way: 15599,
+ wbz: 15600,
+ wba: 15601,
+ wbb: 15602,
+ wbc: 15603,
+ wbd: 15604,
+ wbe: 15605,
+ wbf: 15606,
+ wbg: 15607,
+ wbh: 15608,
+ wbi: 15609,
+ wbj: 15610,
+ wbk: 15611,
+ wbl: 15612,
+ wbm: 15613,
+ wbn: 15614,
+ wbo: 15615,
+ wbp: 15616,
+ wbq: 15617,
+ wbr: 15618,
+ wbs: 15619,
+ wbt: 15620,
+ wbu: 15621,
+ wbv: 15622,
+ wbw: 15623,
+ wbx: 15624,
+ wby: 15625,
+ wcz: 15626,
+ wca: 15627,
+ wcb: 15628,
+ wcc: 15629,
+ wcd: 15630,
+ wce: 15631,
+ wcf: 15632,
+ wcg: 15633,
+ wch: 15634,
+ wci: 15635,
+ wcj: 15636,
+ wck: 15637,
+ wcl: 15638,
+ wcm: 15639,
+ wcn: 15640,
+ wco: 15641,
+ wcp: 15642,
+ wcq: 15643,
+ wcr: 15644,
+ wcs: 15645,
+ wct: 15646,
+ wcu: 15647,
+ wcv: 15648,
+ wcw: 15649,
+ wcx: 15650,
+ wcy: 15651,
+ wdz: 15652,
+ wda: 15653,
+ wdb: 15654,
+ wdc: 15655,
+ wdd: 15656,
+ wde: 15657,
+ wdf: 15658,
+ wdg: 15659,
+ wdh: 15660,
+ wdi: 15661,
+ wdj: 15662,
+ wdk: 15663,
+ wdl: 15664,
+ wdm: 15665,
+ wdn: 15666,
+ wdo: 15667,
+ wdp: 15668,
+ wdq: 15669,
+ wdr: 15670,
+ wds: 15671,
+ wdt: 15672,
+ wdu: 15673,
+ wdv: 15674,
+ wdw: 15675,
+ wdx: 15676,
+ wdy: 15677,
+ wez: 15678,
+ wea: 15679,
+ web: 15680,
+ wec: 15681,
+ wed: 15682,
+ wee: 15683,
+ wef: 15684,
+ weg: 15685,
+ weh: 15686,
+ wei: 15687,
+ wej: 15688,
+ wek: 15689,
+ wel: 15690,
+ wem: 15691,
+ wen: 15692,
+ weo: 15693,
+ wep: 15694,
+ weq: 15695,
+ wer: 15696,
+ wes: 15697,
+ wet: 15698,
+ weu: 15699,
+ wev: 15700,
+ wew: 15701,
+ wex: 15702,
+ wey: 15703,
+ wfz: 15704,
+ wfa: 15705,
+ wfb: 15706,
+ wfc: 15707,
+ wfd: 15708,
+ wfe: 15709,
+ wff: 15710,
+ wfg: 15711,
+ wfh: 15712,
+ wfi: 15713,
+ wfj: 15714,
+ wfk: 15715,
+ wfl: 15716,
+ wfm: 15717,
+ wfn: 15718,
+ wfo: 15719,
+ wfp: 15720,
+ wfq: 15721,
+ wfr: 15722,
+ wfs: 15723,
+ wft: 15724,
+ wfu: 15725,
+ wfv: 15726,
+ wfw: 15727,
+ wfx: 15728,
+ wfy: 15729,
+ wgz: 15730,
+ wga: 15731,
+ wgb: 15732,
+ wgc: 15733,
+ wgd: 15734,
+ wge: 15735,
+ wgf: 15736,
+ wgg: 15737,
+ wgh: 15738,
+ wgi: 15739,
+ wgj: 15740,
+ wgk: 15741,
+ wgl: 15742,
+ wgm: 15743,
+ wgn: 15744,
+ wgo: 15745,
+ wgp: 15746,
+ wgq: 15747,
+ wgr: 15748,
+ wgs: 15749,
+ wgt: 15750,
+ wgu: 15751,
+ wgv: 15752,
+ wgw: 15753,
+ wgx: 15754,
+ wgy: 15755,
+ whz: 15756,
+ wha: 15757,
+ whb: 15758,
+ whc: 15759,
+ whd: 15760,
+ whe: 15761,
+ whf: 15762,
+ whg: 15763,
+ whh: 15764,
+ whi: 15765,
+ whj: 15766,
+ whk: 15767,
+ whl: 15768,
+ whm: 15769,
+ whn: 15770,
+ who: 15771,
+ whp: 15772,
+ whq: 15773,
+ whr: 15774,
+ whs: 15775,
+ wht: 15776,
+ whu: 15777,
+ whv: 15778,
+ whw: 15779,
+ whx: 15780,
+ why: 15781,
+ wiz: 15782,
+ wia: 15783,
+ wib: 15784,
+ wic: 15785,
+ wid: 15786,
+ wie: 15787,
+ wif: 15788,
+ wig: 15789,
+ wih: 15790,
+ wii: 15791,
+ wij: 15792,
+ wik: 15793,
+ wil: 15794,
+ wim: 15795,
+ win: 15796,
+ wio: 15797,
+ wip: 15798,
+ wiq: 15799,
+ wir: 15800,
+ wis: 15801,
+ wit: 15802,
+ wiu: 15803,
+ wiv: 15804,
+ wiw: 15805,
+ wix: 15806,
+ wiy: 15807,
+ wjz: 15808,
+ wja: 15809,
+ wjb: 15810,
+ wjc: 15811,
+ wjd: 15812,
+ wje: 15813,
+ wjf: 15814,
+ wjg: 15815,
+ wjh: 15816,
+ wji: 15817,
+ wjj: 15818,
+ wjk: 15819,
+ wjl: 15820,
+ wjm: 15821,
+ wjn: 15822,
+ wjo: 15823,
+ wjp: 15824,
+ wjq: 15825,
+ wjr: 15826,
+ wjs: 15827,
+ wjt: 15828,
+ wju: 15829,
+ wjv: 15830,
+ wjw: 15831,
+ wjx: 15832,
+ wjy: 15833,
+ wkz: 15834,
+ wka: 15835,
+ wkb: 15836,
+ wkc: 15837,
+ wkd: 15838,
+ wke: 15839,
+ wkf: 15840,
+ wkg: 15841,
+ wkh: 15842,
+ wki: 15843,
+ wkj: 15844,
+ wkk: 15845,
+ wkl: 15846,
+ wkm: 15847,
+ wkn: 15848,
+ wko: 15849,
+ wkp: 15850,
+ wkq: 15851,
+ wkr: 15852,
+ wks: 15853,
+ wkt: 15854,
+ wku: 15855,
+ wkv: 15856,
+ wkw: 15857,
+ wkx: 15858,
+ wky: 15859,
+ wlz: 15860,
+ wla: 15861,
+ wlb: 15862,
+ wlc: 15863,
+ wld: 15864,
+ wle: 15865,
+ wlf: 15866,
+ wlg: 15867,
+ wlh: 15868,
+ wli: 15869,
+ wlj: 15870,
+ wlk: 15871,
+ wll: 15872,
+ wlm: 15873,
+ wln: 15874,
+ wlo: 15875,
+ wlp: 15876,
+ wlq: 15877,
+ wlr: 15878,
+ wls: 15879,
+ wlt: 15880,
+ wlu: 15881,
+ wlv: 15882,
+ wlw: 15883,
+ wlx: 15884,
+ wly: 15885,
+ wmz: 15886,
+ wma: 15887,
+ wmb: 15888,
+ wmc: 15889,
+ wmd: 15890,
+ wme: 15891,
+ wmf: 15892,
+ wmg: 15893,
+ wmh: 15894,
+ wmi: 15895,
+ wmj: 15896,
+ wmk: 15897,
+ wml: 15898,
+ wmm: 15899,
+ wmn: 15900,
+ wmo: 15901,
+ wmp: 15902,
+ wmq: 15903,
+ wmr: 15904,
+ wms: 15905,
+ wmt: 15906,
+ wmu: 15907,
+ wmv: 15908,
+ wmw: 15909,
+ wmx: 15910,
+ wmy: 15911,
+ wnz: 15912,
+ wna: 15913,
+ wnb: 15914,
+ wnc: 15915,
+ wnd: 15916,
+ wne: 15917,
+ wnf: 15918,
+ wng: 15919,
+ wnh: 15920,
+ wni: 15921,
+ wnj: 15922,
+ wnk: 15923,
+ wnl: 15924,
+ wnm: 15925,
+ wnn: 15926,
+ wno: 15927,
+ wnp: 15928,
+ wnq: 15929,
+ wnr: 15930,
+ wns: 15931,
+ wnt: 15932,
+ wnu: 15933,
+ wnv: 15934,
+ wnw: 15935,
+ wnx: 15936,
+ wny: 15937,
+ woz: 15938,
+ woa: 15939,
+ wob: 15940,
+ woc: 15941,
+ wod: 15942,
+ woe: 15943,
+ wof: 15944,
+ wog: 15945,
+ woh: 15946,
+ woi: 15947,
+ woj: 15948,
+ wok: 15949,
+ wol: 15950,
+ wom: 15951,
+ won: 15952,
+ woo: 15953,
+ wop: 15954,
+ woq: 15955,
+ wor: 15956,
+ wos: 15957,
+ wot: 15958,
+ wou: 15959,
+ wov: 15960,
+ wow: 15961,
+ wox: 15962,
+ woy: 15963,
+ wpz: 15964,
+ wpa: 15965,
+ wpb: 15966,
+ wpc: 15967,
+ wpd: 15968,
+ wpe: 15969,
+ wpf: 15970,
+ wpg: 15971,
+ wph: 15972,
+ wpi: 15973,
+ wpj: 15974,
+ wpk: 15975,
+ wpl: 15976,
+ wpm: 15977,
+ wpn: 15978,
+ wpo: 15979,
+ wpp: 15980,
+ wpq: 15981,
+ wpr: 15982,
+ wps: 15983,
+ wpt: 15984,
+ wpu: 15985,
+ wpv: 15986,
+ wpw: 15987,
+ wpx: 15988,
+ wpy: 15989,
+ wqz: 15990,
+ wqa: 15991,
+ wqb: 15992,
+ wqc: 15993,
+ wqd: 15994,
+ wqe: 15995,
+ wqf: 15996,
+ wqg: 15997,
+ wqh: 15998,
+ wqi: 15999,
+ wqj: 16000,
+ wqk: 16001,
+ wql: 16002,
+ wqm: 16003,
+ wqn: 16004,
+ wqo: 16005,
+ wqp: 16006,
+ wqq: 16007,
+ wqr: 16008,
+ wqs: 16009,
+ wqt: 16010,
+ wqu: 16011,
+ wqv: 16012,
+ wqw: 16013,
+ wqx: 16014,
+ wqy: 16015,
+ wrz: 16016,
+ wra: 16017,
+ wrb: 16018,
+ wrc: 16019,
+ wrd: 16020,
+ wre: 16021,
+ wrf: 16022,
+ wrg: 16023,
+ wrh: 16024,
+ wri: 16025,
+ wrj: 16026,
+ wrk: 16027,
+ wrl: 16028,
+ wrm: 16029,
+ wrn: 16030,
+ wro: 16031,
+ wrp: 16032,
+ wrq: 16033,
+ wrr: 16034,
+ wrs: 16035,
+ wrt: 16036,
+ wru: 16037,
+ wrv: 16038,
+ wrw: 16039,
+ wrx: 16040,
+ wry: 16041,
+ wsz: 16042,
+ wsa: 16043,
+ wsb: 16044,
+ wsc: 16045,
+ wsd: 16046,
+ wse: 16047,
+ wsf: 16048,
+ wsg: 16049,
+ wsh: 16050,
+ wsi: 16051,
+ wsj: 16052,
+ wsk: 16053,
+ wsl: 16054,
+ wsm: 16055,
+ wsn: 16056,
+ wso: 16057,
+ wsp: 16058,
+ wsq: 16059,
+ wsr: 16060,
+ wss: 16061,
+ wst: 16062,
+ wsu: 16063,
+ wsv: 16064,
+ wsw: 16065,
+ wsx: 16066,
+ wsy: 16067,
+ wtz: 16068,
+ wta: 16069,
+ wtb: 16070,
+ wtc: 16071,
+ wtd: 16072,
+ wte: 16073,
+ wtf: 16074,
+ wtg: 16075,
+ wth: 16076,
+ wti: 16077,
+ wtj: 16078,
+ wtk: 16079,
+ wtl: 16080,
+ wtm: 16081,
+ wtn: 16082,
+ wto: 16083,
+ wtp: 16084,
+ wtq: 16085,
+ wtr: 16086,
+ wts: 16087,
+ wtt: 16088,
+ wtu: 16089,
+ wtv: 16090,
+ wtw: 16091,
+ wtx: 16092,
+ wty: 16093,
+ wuz: 16094,
+ wua: 16095,
+ wub: 16096,
+ wuc: 16097,
+ wud: 16098,
+ wue: 16099,
+ wuf: 16100,
+ wug: 16101,
+ wuh: 16102,
+ wui: 16103,
+ wuj: 16104,
+ wuk: 16105,
+ wul: 16106,
+ wum: 16107,
+ wun: 16108,
+ wuo: 16109,
+ wup: 16110,
+ wuq: 16111,
+ wur: 16112,
+ wus: 16113,
+ wut: 16114,
+ wuu: 16115,
+ wuv: 16116,
+ wuw: 16117,
+ wux: 16118,
+ wuy: 16119,
+ wvz: 16120,
+ wva: 16121,
+ wvb: 16122,
+ wvc: 16123,
+ wvd: 16124,
+ wve: 16125,
+ wvf: 16126,
+ wvg: 16127,
+ wvh: 16128,
+ wvi: 16129,
+ wvj: 16130,
+ wvk: 16131,
+ wvl: 16132,
+ wvm: 16133,
+ wvn: 16134,
+ wvo: 16135,
+ wvp: 16136,
+ wvq: 16137,
+ wvr: 16138,
+ wvs: 16139,
+ wvt: 16140,
+ wvu: 16141,
+ wvv: 16142,
+ wvw: 16143,
+ wvx: 16144,
+ wvy: 16145,
+ wwz: 16146,
+ wwa: 16147,
+ wwb: 16148,
+ wwc: 16149,
+ wwd: 16150,
+ wwe: 16151,
+ wwf: 16152,
+ wwg: 16153,
+ wwh: 16154,
+ wwi: 16155,
+ wwj: 16156,
+ wwk: 16157,
+ wwl: 16158,
+ wwm: 16159,
+ wwn: 16160,
+ wwo: 16161,
+ wwp: 16162,
+ wwq: 16163,
+ wwr: 16164,
+ wws: 16165,
+ wwt: 16166,
+ wwu: 16167,
+ wwv: 16168,
+ www: 16169,
+ wwx: 16170,
+ wwy: 16171,
+ wxz: 16172,
+ wxa: 16173,
+ wxb: 16174,
+ wxc: 16175,
+ wxd: 16176,
+ wxe: 16177,
+ wxf: 16178,
+ wxg: 16179,
+ wxh: 16180,
+ wxi: 16181,
+ wxj: 16182,
+ wxk: 16183,
+ wxl: 16184,
+ wxm: 16185,
+ wxn: 16186,
+ wxo: 16187,
+ wxp: 16188,
+ wxq: 16189,
+ wxr: 16190,
+ wxs: 16191,
+ wxt: 16192,
+ wxu: 16193,
+ wxv: 16194,
+ wxw: 16195,
+ wxx: 16196,
+ wxy: 16197,
+ wyz: 16198,
+ wya: 16199,
+ wyb: 16200,
+ wyc: 16201,
+ wyd: 16202,
+ wye: 16203,
+ wyf: 16204,
+ wyg: 16205,
+ wyh: 16206,
+ wyi: 16207,
+ wyj: 16208,
+ wyk: 16209,
+ wyl: 16210,
+ wym: 16211,
+ wyn: 16212,
+ wyo: 16213,
+ wyp: 16214,
+ wyq: 16215,
+ wyr: 16216,
+ wys: 16217,
+ wyt: 16218,
+ wyu: 16219,
+ wyv: 16220,
+ wyw: 16221,
+ wyx: 16222,
+ wyy: 16223,
+ xzz: 16224,
+ xza: 16225,
+ xzb: 16226,
+ xzc: 16227,
+ xzd: 16228,
+ xze: 16229,
+ xzf: 16230,
+ xzg: 16231,
+ xzh: 16232,
+ xzi: 16233,
+ xzj: 16234,
+ xzk: 16235,
+ xzl: 16236,
+ xzm: 16237,
+ xzn: 16238,
+ xzo: 16239,
+ xzp: 16240,
+ xzq: 16241,
+ xzr: 16242,
+ xzs: 16243,
+ xzt: 16244,
+ xzu: 16245,
+ xzv: 16246,
+ xzw: 16247,
+ xzx: 16248,
+ xzy: 16249,
+ xaz: 16250,
+ xaa: 16251,
+ xab: 16252,
+ xac: 16253,
+ xad: 16254,
+ xae: 16255,
+ xaf: 16256,
+ xag: 16257,
+ xah: 16258,
+ xai: 16259,
+ xaj: 16260,
+ xak: 16261,
+ xal: 16262,
+ xam: 16263,
+ xan: 16264,
+ xao: 16265,
+ xap: 16266,
+ xaq: 16267,
+ xar: 16268,
+ xas: 16269,
+ xat: 16270,
+ xau: 16271,
+ xav: 16272,
+ xaw: 16273,
+ xax: 16274,
+ xay: 16275,
+ xbz: 16276,
+ xba: 16277,
+ xbb: 16278,
+ xbc: 16279,
+ xbd: 16280,
+ xbe: 16281,
+ xbf: 16282,
+ xbg: 16283,
+ xbh: 16284,
+ xbi: 16285,
+ xbj: 16286,
+ xbk: 16287,
+ xbl: 16288,
+ xbm: 16289,
+ xbn: 16290,
+ xbo: 16291,
+ xbp: 16292,
+ xbq: 16293,
+ xbr: 16294,
+ xbs: 16295,
+ xbt: 16296,
+ xbu: 16297,
+ xbv: 16298,
+ xbw: 16299,
+ xbx: 16300,
+ xby: 16301,
+ xcz: 16302,
+ xca: 16303,
+ xcb: 16304,
+ xcc: 16305,
+ xcd: 16306,
+ xce: 16307,
+ xcf: 16308,
+ xcg: 16309,
+ xch: 16310,
+ xci: 16311,
+ xcj: 16312,
+ xck: 16313,
+ xcl: 16314,
+ xcm: 16315,
+ xcn: 16316,
+ xco: 16317,
+ xcp: 16318,
+ xcq: 16319,
+ xcr: 16320,
+ xcs: 16321,
+ xct: 16322,
+ xcu: 16323,
+ xcv: 16324,
+ xcw: 16325,
+ xcx: 16326,
+ xcy: 16327,
+ xdz: 16328,
+ xda: 16329,
+ xdb: 16330,
+ xdc: 16331,
+ xdd: 16332,
+ xde: 16333,
+ xdf: 16334,
+ xdg: 16335,
+ xdh: 16336,
+ xdi: 16337,
+ xdj: 16338,
+ xdk: 16339,
+ xdl: 16340,
+ xdm: 16341,
+ xdn: 16342,
+ xdo: 16343,
+ xdp: 16344,
+ xdq: 16345,
+ xdr: 16346,
+ xds: 16347,
+ xdt: 16348,
+ xdu: 16349,
+ xdv: 16350,
+ xdw: 16351,
+ xdx: 16352,
+ xdy: 16353,
+ xez: 16354,
+ xea: 16355,
+ xeb: 16356,
+ xec: 16357,
+ xed: 16358,
+ xee: 16359,
+ xef: 16360,
+ xeg: 16361,
+ xeh: 16362,
+ xei: 16363,
+ xej: 16364,
+ xek: 16365,
+ xel: 16366,
+ xem: 16367,
+ xen: 16368,
+ xeo: 16369,
+ xep: 16370,
+ xeq: 16371,
+ xer: 16372,
+ xes: 16373,
+ xet: 16374,
+ xeu: 16375,
+ xev: 16376,
+ xew: 16377,
+ xex: 16378,
+ xey: 16379,
+ xfz: 16380,
+ xfa: 16381,
+ xfb: 16382,
+ xfc: 16383,
+ xfd: 16384,
+ xfe: 16385,
+ xff: 16386,
+ xfg: 16387,
+ xfh: 16388,
+ xfi: 16389,
+ xfj: 16390,
+ xfk: 16391,
+ xfl: 16392,
+ xfm: 16393,
+ xfn: 16394,
+ xfo: 16395,
+ xfp: 16396,
+ xfq: 16397,
+ xfr: 16398,
+ xfs: 16399,
+ xft: 16400,
+ xfu: 16401,
+ xfv: 16402,
+ xfw: 16403,
+ xfx: 16404,
+ xfy: 16405,
+ xgz: 16406,
+ xga: 16407,
+ xgb: 16408,
+ xgc: 16409,
+ xgd: 16410,
+ xge: 16411,
+ xgf: 16412,
+ xgg: 16413,
+ xgh: 16414,
+ xgi: 16415,
+ xgj: 16416,
+ xgk: 16417,
+ xgl: 16418,
+ xgm: 16419,
+ xgn: 16420,
+ xgo: 16421,
+ xgp: 16422,
+ xgq: 16423,
+ xgr: 16424,
+ xgs: 16425,
+ xgt: 16426,
+ xgu: 16427,
+ xgv: 16428,
+ xgw: 16429,
+ xgx: 16430,
+ xgy: 16431,
+ xhz: 16432,
+ xha: 16433,
+ xhb: 16434,
+ xhc: 16435,
+ xhd: 16436,
+ xhe: 16437,
+ xhf: 16438,
+ xhg: 16439,
+ xhh: 16440,
+ xhi: 16441,
+ xhj: 16442,
+ xhk: 16443,
+ xhl: 16444,
+ xhm: 16445,
+ xhn: 16446,
+ xho: 16447,
+ xhp: 16448,
+ xhq: 16449,
+ xhr: 16450,
+ xhs: 16451,
+ xht: 16452,
+ xhu: 16453,
+ xhv: 16454,
+ xhw: 16455,
+ xhx: 16456,
+ xhy: 16457,
+ xiz: 16458,
+ xia: 16459,
+ xib: 16460,
+ xic: 16461,
+ xid: 16462,
+ xie: 16463,
+ xif: 16464,
+ xig: 16465,
+ xih: 16466,
+ xii: 16467,
+ xij: 16468,
+ xik: 16469,
+ xil: 16470,
+ xim: 16471,
+ xin: 16472,
+ xio: 16473,
+ xip: 16474,
+ xiq: 16475,
+ xir: 16476,
+ xis: 16477,
+ xit: 16478,
+ xiu: 16479,
+ xiv: 16480,
+ xiw: 16481,
+ xix: 16482,
+ xiy: 16483,
+ xjz: 16484,
+ xja: 16485,
+ xjb: 16486,
+ xjc: 16487,
+ xjd: 16488,
+ xje: 16489,
+ xjf: 16490,
+ xjg: 16491,
+ xjh: 16492,
+ xji: 16493,
+ xjj: 16494,
+ xjk: 16495,
+ xjl: 16496,
+ xjm: 16497,
+ xjn: 16498,
+ xjo: 16499,
+ xjp: 16500,
+ xjq: 16501,
+ xjr: 16502,
+ xjs: 16503,
+ xjt: 16504,
+ xju: 16505,
+ xjv: 16506,
+ xjw: 16507,
+ xjx: 16508,
+ xjy: 16509,
+ xkz: 16510,
+ xka: 16511,
+ xkb: 16512,
+ xkc: 16513,
+ xkd: 16514,
+ xke: 16515,
+ xkf: 16516,
+ xkg: 16517,
+ xkh: 16518,
+ xki: 16519,
+ xkj: 16520,
+ xkk: 16521,
+ xkl: 16522,
+ xkm: 16523,
+ xkn: 16524,
+ xko: 16525,
+ xkp: 16526,
+ xkq: 16527,
+ xkr: 16528,
+ xks: 16529,
+ xkt: 16530,
+ xku: 16531,
+ xkv: 16532,
+ xkw: 16533,
+ xkx: 16534,
+ xky: 16535,
+ xlz: 16536,
+ xla: 16537,
+ xlb: 16538,
+ xlc: 16539,
+ xld: 16540,
+ xle: 16541,
+ xlf: 16542,
+ xlg: 16543,
+ xlh: 16544,
+ xli: 16545,
+ xlj: 16546,
+ xlk: 16547,
+ xll: 16548,
+ xlm: 16549,
+ xln: 16550,
+ xlo: 16551,
+ xlp: 16552,
+ xlq: 16553,
+ xlr: 16554,
+ xls: 16555,
+ xlt: 16556,
+ xlu: 16557,
+ xlv: 16558,
+ xlw: 16559,
+ xlx: 16560,
+ xly: 16561,
+ xmz: 16562,
+ xma: 16563,
+ xmb: 16564,
+ xmc: 16565,
+ xmd: 16566,
+ xme: 16567,
+ xmf: 16568,
+ xmg: 16569,
+ xmh: 16570,
+ xmi: 16571,
+ xmj: 16572,
+ xmk: 16573,
+ xml: 16574,
+ xmm: 16575,
+ xmn: 16576,
+ xmo: 16577,
+ xmp: 16578,
+ xmq: 16579,
+ xmr: 16580,
+ xms: 16581,
+ xmt: 16582,
+ xmu: 16583,
+ xmv: 16584,
+ xmw: 16585,
+ xmx: 16586,
+ xmy: 16587,
+ xnz: 16588,
+ xna: 16589,
+ xnb: 16590,
+ xnc: 16591,
+ xnd: 16592,
+ xne: 16593,
+ xnf: 16594,
+ xng: 16595,
+ xnh: 16596,
+ xni: 16597,
+ xnj: 16598,
+ xnk: 16599,
+ xnl: 16600,
+ xnm: 16601,
+ xnn: 16602,
+ xno: 16603,
+ xnp: 16604,
+ xnq: 16605,
+ xnr: 16606,
+ xns: 16607,
+ xnt: 16608,
+ xnu: 16609,
+ xnv: 16610,
+ xnw: 16611,
+ xnx: 16612,
+ xny: 16613,
+ xoz: 16614,
+ xoa: 16615,
+ xob: 16616,
+ xoc: 16617,
+ xod: 16618,
+ xoe: 16619,
+ xof: 16620,
+ xog: 16621,
+ xoh: 16622,
+ xoi: 16623,
+ xoj: 16624,
+ xok: 16625,
+ xol: 16626,
+ xom: 16627,
+ xon: 16628,
+ xoo: 16629,
+ xop: 16630,
+ xoq: 16631,
+ xor: 16632,
+ xos: 16633,
+ xot: 16634,
+ xou: 16635,
+ xov: 16636,
+ xow: 16637,
+ xox: 16638,
+ xoy: 16639,
+ xpz: 16640,
+ xpa: 16641,
+ xpb: 16642,
+ xpc: 16643,
+ xpd: 16644,
+ xpe: 16645,
+ xpf: 16646,
+ xpg: 16647,
+ xph: 16648,
+ xpi: 16649,
+ xpj: 16650,
+ xpk: 16651,
+ xpl: 16652,
+ xpm: 16653,
+ xpn: 16654,
+ xpo: 16655,
+ xpp: 16656,
+ xpq: 16657,
+ xpr: 16658,
+ xps: 16659,
+ xpt: 16660,
+ xpu: 16661,
+ xpv: 16662,
+ xpw: 16663,
+ xpx: 16664,
+ xpy: 16665,
+ xqz: 16666,
+ xqa: 16667,
+ xqb: 16668,
+ xqc: 16669,
+ xqd: 16670,
+ xqe: 16671,
+ xqf: 16672,
+ xqg: 16673,
+ xqh: 16674,
+ xqi: 16675,
+ xqj: 16676,
+ xqk: 16677,
+ xql: 16678,
+ xqm: 16679,
+ xqn: 16680,
+ xqo: 16681,
+ xqp: 16682,
+ xqq: 16683,
+ xqr: 16684,
+ xqs: 16685,
+ xqt: 16686,
+ xqu: 16687,
+ xqv: 16688,
+ xqw: 16689,
+ xqx: 16690,
+ xqy: 16691,
+ xrz: 16692,
+ xra: 16693,
+ xrb: 16694,
+ xrc: 16695,
+ xrd: 16696,
+ xre: 16697,
+ xrf: 16698,
+ xrg: 16699,
+ xrh: 16700,
+ xri: 16701,
+ xrj: 16702,
+ xrk: 16703,
+ xrl: 16704,
+ xrm: 16705,
+ xrn: 16706,
+ xro: 16707,
+ xrp: 16708,
+ xrq: 16709,
+ xrr: 16710,
+ xrs: 16711,
+ xrt: 16712,
+ xru: 16713,
+ xrv: 16714,
+ xrw: 16715,
+ xrx: 16716,
+ xry: 16717,
+ xsz: 16718,
+ xsa: 16719,
+ xsb: 16720,
+ xsc: 16721,
+ xsd: 16722,
+ xse: 16723,
+ xsf: 16724,
+ xsg: 16725,
+ xsh: 16726,
+ xsi: 16727,
+ xsj: 16728,
+ xsk: 16729,
+ xsl: 16730,
+ xsm: 16731,
+ xsn: 16732,
+ xso: 16733,
+ xsp: 16734,
+ xsq: 16735,
+ xsr: 16736,
+ xss: 16737,
+ xst: 16738,
+ xsu: 16739,
+ xsv: 16740,
+ xsw: 16741,
+ xsx: 16742,
+ xsy: 16743,
+ xtz: 16744,
+ xta: 16745,
+ xtb: 16746,
+ xtc: 16747,
+ xtd: 16748,
+ xte: 16749,
+ xtf: 16750,
+ xtg: 16751,
+ xth: 16752,
+ xti: 16753,
+ xtj: 16754,
+ xtk: 16755,
+ xtl: 16756,
+ xtm: 16757,
+ xtn: 16758,
+ xto: 16759,
+ xtp: 16760,
+ xtq: 16761,
+ xtr: 16762,
+ xts: 16763,
+ xtt: 16764,
+ xtu: 16765,
+ xtv: 16766,
+ xtw: 16767,
+ xtx: 16768,
+ xty: 16769,
+ xuz: 16770,
+ xua: 16771,
+ xub: 16772,
+ xuc: 16773,
+ xud: 16774,
+ xue: 16775,
+ xuf: 16776,
+ xug: 16777,
+ xuh: 16778,
+ xui: 16779,
+ xuj: 16780,
+ xuk: 16781,
+ xul: 16782,
+ xum: 16783,
+ xun: 16784,
+ xuo: 16785,
+ xup: 16786,
+ xuq: 16787,
+ xur: 16788,
+ xus: 16789,
+ xut: 16790,
+ xuu: 16791,
+ xuv: 16792,
+ xuw: 16793,
+ xux: 16794,
+ xuy: 16795,
+ xvz: 16796,
+ xva: 16797,
+ xvb: 16798,
+ xvc: 16799,
+ xvd: 16800,
+ xve: 16801,
+ xvf: 16802,
+ xvg: 16803,
+ xvh: 16804,
+ xvi: 16805,
+ xvj: 16806,
+ xvk: 16807,
+ xvl: 16808,
+ xvm: 16809,
+ xvn: 16810,
+ xvo: 16811,
+ xvp: 16812,
+ xvq: 16813,
+ xvr: 16814,
+ xvs: 16815,
+ xvt: 16816,
+ xvu: 16817,
+ xvv: 16818,
+ xvw: 16819,
+ xvx: 16820,
+ xvy: 16821,
+ xwz: 16822,
+ xwa: 16823,
+ xwb: 16824,
+ xwc: 16825,
+ xwd: 16826,
+ xwe: 16827,
+ xwf: 16828,
+ xwg: 16829,
+ xwh: 16830,
+ xwi: 16831,
+ xwj: 16832,
+ xwk: 16833,
+ xwl: 16834,
+ xwm: 16835,
+ xwn: 16836,
+ xwo: 16837,
+ xwp: 16838,
+ xwq: 16839,
+ xwr: 16840,
+ xws: 16841,
+ xwt: 16842,
+ xwu: 16843,
+ xwv: 16844,
+ xww: 16845,
+ xwx: 16846,
+ xwy: 16847,
+ xxz: 16848,
+ xxa: 16849,
+ xxb: 16850,
+ xxc: 16851,
+ xxd: 16852,
+ xxe: 16853,
+ xxf: 16854,
+ xxg: 16855,
+ xxh: 16856,
+ xxi: 16857,
+ xxj: 16858,
+ xxk: 16859,
+ xxl: 16860,
+ xxm: 16861,
+ xxn: 16862,
+ xxo: 16863,
+ xxp: 16864,
+ xxq: 16865,
+ xxr: 16866,
+ xxs: 16867,
+ xxt: 16868,
+ xxu: 16869,
+ xxv: 16870,
+ xxw: 16871,
+ xxx: 16872,
+ xxy: 16873,
+ xyz: 16874,
+ xya: 16875,
+ xyb: 16876,
+ xyc: 16877,
+ xyd: 16878,
+ xye: 16879,
+ xyf: 16880,
+ xyg: 16881,
+ xyh: 16882,
+ xyi: 16883,
+ xyj: 16884,
+ xyk: 16885,
+ xyl: 16886,
+ xym: 16887,
+ xyn: 16888,
+ xyo: 16889,
+ xyp: 16890,
+ xyq: 16891,
+ xyr: 16892,
+ xys: 16893,
+ xyt: 16894,
+ xyu: 16895,
+ xyv: 16896,
+ xyw: 16897,
+ xyx: 16898,
+ xyy: 16899,
+ yzz: 16900,
+ yza: 16901,
+ yzb: 16902,
+ yzc: 16903,
+ yzd: 16904,
+ yze: 16905,
+ yzf: 16906,
+ yzg: 16907,
+ yzh: 16908,
+ yzi: 16909,
+ yzj: 16910,
+ yzk: 16911,
+ yzl: 16912,
+ yzm: 16913,
+ yzn: 16914,
+ yzo: 16915,
+ yzp: 16916,
+ yzq: 16917,
+ yzr: 16918,
+ yzs: 16919,
+ yzt: 16920,
+ yzu: 16921,
+ yzv: 16922,
+ yzw: 16923,
+ yzx: 16924,
+ yzy: 16925,
+ yaz: 16926,
+ yaa: 16927,
+ yab: 16928,
+ yac: 16929,
+ yad: 16930,
+ yae: 16931,
+ yaf: 16932,
+ yag: 16933,
+ yah: 16934,
+ yai: 16935,
+ yaj: 16936,
+ yak: 16937,
+ yal: 16938,
+ yam: 16939,
+ yan: 16940,
+ yao: 16941,
+ yap: 16942,
+ yaq: 16943,
+ yar: 16944,
+ yas: 16945,
+ yat: 16946,
+ yau: 16947,
+ yav: 16948,
+ yaw: 16949,
+ yax: 16950,
+ yay: 16951,
+ ybz: 16952,
+ yba: 16953,
+ ybb: 16954,
+ ybc: 16955,
+ ybd: 16956,
+ ybe: 16957,
+ ybf: 16958,
+ ybg: 16959,
+ ybh: 16960,
+ ybi: 16961,
+ ybj: 16962,
+ ybk: 16963,
+ ybl: 16964,
+ ybm: 16965,
+ ybn: 16966,
+ ybo: 16967,
+ ybp: 16968,
+ ybq: 16969,
+ ybr: 16970,
+ ybs: 16971,
+ ybt: 16972,
+ ybu: 16973,
+ ybv: 16974,
+ ybw: 16975,
+ ybx: 16976,
+ yby: 16977,
+ ycz: 16978,
+ yca: 16979,
+ ycb: 16980,
+ ycc: 16981,
+ ycd: 16982,
+ yce: 16983,
+ ycf: 16984,
+ ycg: 16985,
+ ych: 16986,
+ yci: 16987,
+ ycj: 16988,
+ yck: 16989,
+ ycl: 16990,
+ ycm: 16991,
+ ycn: 16992,
+ yco: 16993,
+ ycp: 16994,
+ ycq: 16995,
+ ycr: 16996,
+ ycs: 16997,
+ yct: 16998,
+ ycu: 16999,
+ ycv: 17000,
+ ycw: 17001,
+ ycx: 17002,
+ ycy: 17003,
+ ydz: 17004,
+ yda: 17005,
+ ydb: 17006,
+ ydc: 17007,
+ ydd: 17008,
+ yde: 17009,
+ ydf: 17010,
+ ydg: 17011,
+ ydh: 17012,
+ ydi: 17013,
+ ydj: 17014,
+ ydk: 17015,
+ ydl: 17016,
+ ydm: 17017,
+ ydn: 17018,
+ ydo: 17019,
+ ydp: 17020,
+ ydq: 17021,
+ ydr: 17022,
+ yds: 17023,
+ ydt: 17024,
+ ydu: 17025,
+ ydv: 17026,
+ ydw: 17027,
+ ydx: 17028,
+ ydy: 17029,
+ yez: 17030,
+ yea: 17031,
+ yeb: 17032,
+ yec: 17033,
+ yed: 17034,
+ yee: 17035,
+ yef: 17036,
+ yeg: 17037,
+ yeh: 17038,
+ yei: 17039,
+ yej: 17040,
+ yek: 17041,
+ yel: 17042,
+ yem: 17043,
+ yen: 17044,
+ yeo: 17045,
+ yep: 17046,
+ yeq: 17047,
+ yer: 17048,
+ yes: 17049,
+ yet: 17050,
+ yeu: 17051,
+ yev: 17052,
+ yew: 17053,
+ yex: 17054,
+ yey: 17055,
+ yfz: 17056,
+ yfa: 17057,
+ yfb: 17058,
+ yfc: 17059,
+ yfd: 17060,
+ yfe: 17061,
+ yff: 17062,
+ yfg: 17063,
+ yfh: 17064,
+ yfi: 17065,
+ yfj: 17066,
+ yfk: 17067,
+ yfl: 17068,
+ yfm: 17069,
+ yfn: 17070,
+ yfo: 17071,
+ yfp: 17072,
+ yfq: 17073,
+ yfr: 17074,
+ yfs: 17075,
+ yft: 17076,
+ yfu: 17077,
+ yfv: 17078,
+ yfw: 17079,
+ yfx: 17080,
+ yfy: 17081,
+ ygz: 17082,
+ yga: 17083,
+ ygb: 17084,
+ ygc: 17085,
+ ygd: 17086,
+ yge: 17087,
+ ygf: 17088,
+ ygg: 17089,
+ ygh: 17090,
+ ygi: 17091,
+ ygj: 17092,
+ ygk: 17093,
+ ygl: 17094,
+ ygm: 17095,
+ ygn: 17096,
+ ygo: 17097,
+ ygp: 17098,
+ ygq: 17099,
+ ygr: 17100,
+ ygs: 17101,
+ ygt: 17102,
+ ygu: 17103,
+ ygv: 17104,
+ ygw: 17105,
+ ygx: 17106,
+ ygy: 17107,
+ yhz: 17108,
+ yha: 17109,
+ yhb: 17110,
+ yhc: 17111,
+ yhd: 17112,
+ yhe: 17113,
+ yhf: 17114,
+ yhg: 17115,
+ yhh: 17116,
+ yhi: 17117,
+ yhj: 17118,
+ yhk: 17119,
+ yhl: 17120,
+ yhm: 17121,
+ yhn: 17122,
+ yho: 17123,
+ yhp: 17124,
+ yhq: 17125,
+ yhr: 17126,
+ yhs: 17127,
+ yht: 17128,
+ yhu: 17129,
+ yhv: 17130,
+ yhw: 17131,
+ yhx: 17132,
+ yhy: 17133,
+ yiz: 17134,
+ yia: 17135,
+ yib: 17136,
+ yic: 17137,
+ yid: 17138,
+ yie: 17139,
+ yif: 17140,
+ yig: 17141,
+ yih: 17142,
+ yii: 17143,
+ yij: 17144,
+ yik: 17145,
+ yil: 17146,
+ yim: 17147,
+ yin: 17148,
+ yio: 17149,
+ yip: 17150,
+ yiq: 17151,
+ yir: 17152,
+ yis: 17153,
+ yit: 17154,
+ yiu: 17155,
+ yiv: 17156,
+ yiw: 17157,
+ yix: 17158,
+ yiy: 17159,
+ yjz: 17160,
+ yja: 17161,
+ yjb: 17162,
+ yjc: 17163,
+ yjd: 17164,
+ yje: 17165,
+ yjf: 17166,
+ yjg: 17167,
+ yjh: 17168,
+ yji: 17169,
+ yjj: 17170,
+ yjk: 17171,
+ yjl: 17172,
+ yjm: 17173,
+ yjn: 17174,
+ yjo: 17175,
+ yjp: 17176,
+ yjq: 17177,
+ yjr: 17178,
+ yjs: 17179,
+ yjt: 17180,
+ yju: 17181,
+ yjv: 17182,
+ yjw: 17183,
+ yjx: 17184,
+ yjy: 17185,
+ ykz: 17186,
+ yka: 17187,
+ ykb: 17188,
+ ykc: 17189,
+ ykd: 17190,
+ yke: 17191,
+ ykf: 17192,
+ ykg: 17193,
+ ykh: 17194,
+ yki: 17195,
+ ykj: 17196,
+ ykk: 17197,
+ ykl: 17198,
+ ykm: 17199,
+ ykn: 17200,
+ yko: 17201,
+ ykp: 17202,
+ ykq: 17203,
+ ykr: 17204,
+ yks: 17205,
+ ykt: 17206,
+ yku: 17207,
+ ykv: 17208,
+ ykw: 17209,
+ ykx: 17210,
+ yky: 17211,
+ ylz: 17212,
+ yla: 17213,
+ ylb: 17214,
+ ylc: 17215,
+ yld: 17216,
+ yle: 17217,
+ ylf: 17218,
+ ylg: 17219,
+ ylh: 17220,
+ yli: 17221,
+ ylj: 17222,
+ ylk: 17223,
+ yll: 17224,
+ ylm: 17225,
+ yln: 17226,
+ ylo: 17227,
+ ylp: 17228,
+ ylq: 17229,
+ ylr: 17230,
+ yls: 17231,
+ ylt: 17232,
+ ylu: 17233,
+ ylv: 17234,
+ ylw: 17235,
+ ylx: 17236,
+ yly: 17237,
+ ymz: 17238,
+ yma: 17239,
+ ymb: 17240,
+ ymc: 17241,
+ ymd: 17242,
+ yme: 17243,
+ ymf: 17244,
+ ymg: 17245,
+ ymh: 17246,
+ ymi: 17247,
+ ymj: 17248,
+ ymk: 17249,
+ yml: 17250,
+ ymm: 17251,
+ ymn: 17252,
+ ymo: 17253,
+ ymp: 17254,
+ ymq: 17255,
+ ymr: 17256,
+ yms: 17257,
+ ymt: 17258,
+ ymu: 17259,
+ ymv: 17260,
+ ymw: 17261,
+ ymx: 17262,
+ ymy: 17263,
+ ynz: 17264,
+ yna: 17265,
+ ynb: 17266,
+ ync: 17267,
+ ynd: 17268,
+ yne: 17269,
+ ynf: 17270,
+ yng: 17271,
+ ynh: 17272,
+ yni: 17273,
+ ynj: 17274,
+ ynk: 17275,
+ ynl: 17276,
+ ynm: 17277,
+ ynn: 17278,
+ yno: 17279,
+ ynp: 17280,
+ ynq: 17281,
+ ynr: 17282,
+ yns: 17283,
+ ynt: 17284,
+ ynu: 17285,
+ ynv: 17286,
+ ynw: 17287,
+ ynx: 17288,
+ yny: 17289,
+ yoz: 17290,
+ yoa: 17291,
+ yob: 17292,
+ yoc: 17293,
+ yod: 17294,
+ yoe: 17295,
+ yof: 17296,
+ yog: 17297,
+ yoh: 17298,
+ yoi: 17299,
+ yoj: 17300,
+ yok: 17301,
+ yol: 17302,
+ yom: 17303,
+ yon: 17304,
+ yoo: 17305,
+ yop: 17306,
+ yoq: 17307,
+ yor: 17308,
+ yos: 17309,
+ yot: 17310,
+ you: 17311,
+ yov: 17312,
+ yow: 17313,
+ yox: 17314,
+ yoy: 17315,
+ ypz: 17316,
+ ypa: 17317,
+ ypb: 17318,
+ ypc: 17319,
+ ypd: 17320,
+ ype: 17321,
+ ypf: 17322,
+ ypg: 17323,
+ yph: 17324,
+ ypi: 17325,
+ ypj: 17326,
+ ypk: 17327,
+ ypl: 17328,
+ ypm: 17329,
+ ypn: 17330,
+ ypo: 17331,
+ ypp: 17332,
+ ypq: 17333,
+ ypr: 17334,
+ yps: 17335,
+ ypt: 17336,
+ ypu: 17337,
+ ypv: 17338,
+ ypw: 17339,
+ ypx: 17340,
+ ypy: 17341,
+ yqz: 17342,
+ yqa: 17343,
+ yqb: 17344,
+ yqc: 17345,
+ yqd: 17346,
+ yqe: 17347,
+ yqf: 17348,
+ yqg: 17349,
+ yqh: 17350,
+ yqi: 17351,
+ yqj: 17352,
+ yqk: 17353,
+ yql: 17354,
+ yqm: 17355,
+ yqn: 17356,
+ yqo: 17357,
+ yqp: 17358,
+ yqq: 17359,
+ yqr: 17360,
+ yqs: 17361,
+ yqt: 17362,
+ yqu: 17363,
+ yqv: 17364,
+ yqw: 17365,
+ yqx: 17366,
+ yqy: 17367,
+ yrz: 17368,
+ yra: 17369,
+ yrb: 17370,
+ yrc: 17371,
+ yrd: 17372,
+ yre: 17373,
+ yrf: 17374,
+ yrg: 17375,
+ yrh: 17376,
+ yri: 17377,
+ yrj: 17378,
+ yrk: 17379,
+ yrl: 17380,
+ yrm: 17381,
+ yrn: 17382,
+ yro: 17383,
+ yrp: 17384,
+ yrq: 17385,
+ yrr: 17386,
+ yrs: 17387,
+ yrt: 17388,
+ yru: 17389,
+ yrv: 17390,
+ yrw: 17391,
+ yrx: 17392,
+ yry: 17393,
+ ysz: 17394,
+ ysa: 17395,
+ ysb: 17396,
+ ysc: 17397,
+ ysd: 17398,
+ yse: 17399,
+ ysf: 17400,
+ ysg: 17401,
+ ysh: 17402,
+ ysi: 17403,
+ ysj: 17404,
+ ysk: 17405,
+ ysl: 17406,
+ ysm: 17407,
+ ysn: 17408,
+ yso: 17409,
+ ysp: 17410,
+ ysq: 17411,
+ ysr: 17412,
+ yss: 17413,
+ yst: 17414,
+ ysu: 17415,
+ ysv: 17416,
+ ysw: 17417,
+ ysx: 17418,
+ ysy: 17419,
+ ytz: 17420,
+ yta: 17421,
+ ytb: 17422,
+ ytc: 17423,
+ ytd: 17424,
+ yte: 17425,
+ ytf: 17426,
+ ytg: 17427,
+ yth: 17428,
+ yti: 17429,
+ ytj: 17430,
+ ytk: 17431,
+ ytl: 17432,
+ ytm: 17433,
+ ytn: 17434,
+ yto: 17435,
+ ytp: 17436,
+ ytq: 17437,
+ ytr: 17438,
+ yts: 17439,
+ ytt: 17440,
+ ytu: 17441,
+ ytv: 17442,
+ ytw: 17443,
+ ytx: 17444,
+ yty: 17445,
+ yuz: 17446,
+ yua: 17447,
+ yub: 17448,
+ yuc: 17449,
+ yud: 17450,
+ yue: 17451,
+ yuf: 17452,
+ yug: 17453,
+ yuh: 17454,
+ yui: 17455,
+ yuj: 17456,
+ yuk: 17457,
+ yul: 17458,
+ yum: 17459,
+ yun: 17460,
+ yuo: 17461,
+ yup: 17462,
+ yuq: 17463,
+ yur: 17464,
+ yus: 17465,
+ yut: 17466,
+ yuu: 17467,
+ yuv: 17468,
+ yuw: 17469,
+ yux: 17470,
+ yuy: 17471,
+ yvz: 17472,
+ yva: 17473,
+ yvb: 17474,
+ yvc: 17475,
+ yvd: 17476,
+ yve: 17477,
+ yvf: 17478,
+ yvg: 17479,
+ yvh: 17480,
+ yvi: 17481,
+ yvj: 17482,
+ yvk: 17483,
+ yvl: 17484,
+ yvm: 17485,
+ yvn: 17486,
+ yvo: 17487,
+ yvp: 17488,
+ yvq: 17489,
+ yvr: 17490,
+ yvs: 17491,
+ yvt: 17492,
+ yvu: 17493,
+ yvv: 17494,
+ yvw: 17495,
+ yvx: 17496,
+ yvy: 17497,
+ ywz: 17498,
+ ywa: 17499,
+ ywb: 17500,
+ ywc: 17501,
+ ywd: 17502,
+ ywe: 17503,
+ ywf: 17504,
+ ywg: 17505,
+ ywh: 17506,
+ ywi: 17507,
+ ywj: 17508,
+ ywk: 17509,
+ ywl: 17510,
+ ywm: 17511,
+ ywn: 17512,
+ ywo: 17513,
+ ywp: 17514,
+ ywq: 17515,
+ ywr: 17516,
+ yws: 17517,
+ ywt: 17518,
+ ywu: 17519,
+ ywv: 17520,
+ yww: 17521,
+ ywx: 17522,
+ ywy: 17523,
+ yxz: 17524,
+ yxa: 17525,
+ yxb: 17526,
+ yxc: 17527,
+ yxd: 17528,
+ yxe: 17529,
+ yxf: 17530,
+ yxg: 17531,
+ yxh: 17532,
+ yxi: 17533,
+ yxj: 17534,
+ yxk: 17535,
+ yxl: 17536,
+ yxm: 17537,
+ yxn: 17538,
+ yxo: 17539,
+ yxp: 17540,
+ yxq: 17541,
+ yxr: 17542,
+ yxs: 17543,
+ yxt: 17544,
+ yxu: 17545,
+ yxv: 17546,
+ yxw: 17547,
+ yxx: 17548,
+ yxy: 17549,
+ yyz: 17550,
+ yya: 17551,
+ yyb: 17552,
+ yyc: 17553,
+ yyd: 17554,
+ yye: 17555,
+ yyf: 17556,
+ yyg: 17557,
+ yyh: 17558,
+ yyi: 17559,
+ yyj: 17560,
+ yyk: 17561,
+ yyl: 17562,
+ yym: 17563,
+ yyn: 17564,
+ yyo: 17565,
+ yyp: 17566,
+ yyq: 17567,
+ yyr: 17568,
+ yys: 17569,
+ yyt: 17570,
+ yyu: 17571,
+ yyv: 17572,
+ 111: 111,
+ yyw: 17573,
+ yyx: 17574,
+ yyy: 17575,
+ get X() { print("getting X"); return "X"; },
+ set X(value) { print("setting X"); },
+};
+
+print(x.aaa);
+print(x.hhh);
+print(x.yyy);
+print(x[111]);
+print(x.X);
+x.X = 0;
+var keys = Object.keys(x);
+print(keys.length);
+print(keys[0]);
+print(keys[703]);
+print(keys[5624]);
+print(keys[17575]);
+print(keys[17576]);
+
diff --git a/test/script/basic/JDK-8017084.js.EXPECTED b/test/script/basic/JDK-8017084.js.EXPECTED
new file mode 100644
index 00000000..f57be50c
--- /dev/null
+++ b/test/script/basic/JDK-8017084.js.EXPECTED
@@ -0,0 +1,13 @@
+703
+5624
+17575
+111
+getting X
+X
+setting X
+17577
+111
+aaa
+hhh
+yyy
+X
diff --git a/test/script/basic/JDK-8017768.js b/test/script/basic/JDK-8017768.js
new file mode 100644
index 00000000..c91f6d1f
--- /dev/null
+++ b/test/script/basic/JDK-8017768.js
@@ -0,0 +1,35 @@
+/*
+ * 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-8017768: Allow use of dot notation for inner class names.
+ *
+ * @test
+ * @run
+ */
+
+print(Java.type("java.awt.geom.Arc2D.Float") === Java.type("java.awt.geom.Arc2D$Float"))
+var iisc = Java.type("jdk.nashorn.test.models.OuterClass$InnerStaticClass$InnerInnerStaticClass")
+print(Java.type("jdk.nashorn.test.models.OuterClass.InnerStaticClass.InnerInnerStaticClass") === iisc)
+print(Java.type("jdk.nashorn.test.models.OuterClass$InnerStaticClass.InnerInnerStaticClass") === iisc)
+print(Java.type("jdk.nashorn.test.models.OuterClass.InnerStaticClass$InnerInnerStaticClass") === iisc)
diff --git a/test/script/basic/JDK-8017768.js.EXPECTED b/test/script/basic/JDK-8017768.js.EXPECTED
new file mode 100644
index 00000000..1140ff52
--- /dev/null
+++ b/test/script/basic/JDK-8017768.js.EXPECTED
@@ -0,0 +1,4 @@
+true
+true
+true
+true
diff --git a/test/script/basic/JDK-8019585.js b/test/script/basic/JDK-8019585.js
new file mode 100644
index 00000000..58d18f35
--- /dev/null
+++ b/test/script/basic/JDK-8019585.js
@@ -0,0 +1,34 @@
+/*
+ * 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-8019585 - use before def issues with vars using the declared var
+ * legal - but needs to set "a" as undefined
+ *
+ * @test
+ * @run
+ */
+
+function f() {
+ var a = b == 17 && (a = toto(b)) && toto2(a);
+}
diff --git a/test/script/basic/JDK-8019629.js b/test/script/basic/JDK-8019629.js
new file mode 100644
index 00000000..2d284d05
--- /dev/null
+++ b/test/script/basic/JDK-8019629.js
@@ -0,0 +1,42 @@
+/*
+ * 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-8019629: void operator should always evaluate to undefined
+ *
+ * @test
+ * @run
+ */
+
+function check(str) {
+ var val = eval(str);
+ if (typeof val !== 'undefined') {
+ print("FAILED: " + str + " does not evaluate to 'undefined'");
+ }
+}
+
+check("void +this");
+check("void +(void 0)");
+check("(function f(){return void +(void 0)})()");
+check("void function() {}");
+
diff --git a/test/script/basic/JDK-8019783.js b/test/script/basic/JDK-8019783.js
new file mode 100644
index 00000000..27afcaf2
--- /dev/null
+++ b/test/script/basic/JDK-8019783.js
@@ -0,0 +1,55 @@
+/*
+ * 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-8019783: typeof does not work properly for java methods and foreign objects
+ *
+ * @test
+ * @run
+ */
+
+function printTypeof(str) {
+ print("typeof(" + str + ") = " + eval('typeof ' + str));
+}
+
+// Java methods
+printTypeof("java.lang.System.exit");
+printTypeof("java.lang.System['exit']");
+// full signature
+printTypeof("java.lang.System['exit(int)']");
+// overloaded method
+printTypeof("java.security.AccessController.doPrivileged");
+printTypeof("java.security.AccessController['doPrivileged']");
+
+// foreign objects
+var global = loadWithNewGlobal({ name: "t", script: "this" });
+print("typeof(global.Object) = " + (typeof global.Object));
+print("typeof(new global.Object()) = " + (typeof (new global.Object())));
+
+// foreign engine objects
+var m = new javax.script.ScriptEngineManager();
+var engine = m.getEngineByName("nashorn");
+var engineGlobal = engine.eval("this");
+
+print("typeof(engineGlobal.Object) = " + (typeof engineGlobal.Object));
+print("typeof(new engineGlobal.Object()) = " + (typeof (new engineGlobal.Object())));
diff --git a/test/script/basic/JDK-8019783.js.EXPECTED b/test/script/basic/JDK-8019783.js.EXPECTED
new file mode 100644
index 00000000..f2a5588b
--- /dev/null
+++ b/test/script/basic/JDK-8019783.js.EXPECTED
@@ -0,0 +1,9 @@
+typeof(java.lang.System.exit) = function
+typeof(java.lang.System['exit']) = function
+typeof(java.lang.System['exit(int)']) = function
+typeof(java.security.AccessController.doPrivileged) = function
+typeof(java.security.AccessController['doPrivileged']) = function
+typeof(global.Object) = function
+typeof(new global.Object()) = object
+typeof(engineGlobal.Object) = function
+typeof(new engineGlobal.Object()) = object
diff --git a/test/script/basic/JDK-8019791.js b/test/script/basic/JDK-8019791.js
new file mode 100644
index 00000000..75e92819
--- /dev/null
+++ b/test/script/basic/JDK-8019791.js
@@ -0,0 +1,50 @@
+/*
+ * 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-8019791: ~ is a unary operator
+ *
+ * @test
+ * @run
+ */
+
+// Used to crash instead of SyntaxError
+try {
+ eval('"" ~ ""');
+ print("FAILED: SyntaxError expected for: \"\" ~ \"\"");
+} catch (e) {
+ print(e.toString().replace(/\\/g, '/'));
+}
+
+// Used to crash instead of SyntaxError
+try {
+ eval("function() { if (1~0) return 0; return 1 }");
+ print("FAILED: SyntaxError expected for: if (1~0) ");
+} catch (e) {
+ print(e.toString().replace(/\\/g, '/'));
+}
+
+// The following are valid, but used to crash
+Function("0 \n ~ 2 \n ~ 1")();
+
+Function("~ ~ 0 \n ~ ~ 1")();
diff --git a/test/script/basic/JDK-8019791.js.EXPECTED b/test/script/basic/JDK-8019791.js.EXPECTED
new file mode 100644
index 00000000..5aec5909
--- /dev/null
+++ b/test/script/basic/JDK-8019791.js.EXPECTED
@@ -0,0 +1,6 @@
+SyntaxError: test/script/basic/JDK-8019791.js#33<eval>:1:3 Expected ; but found ~
+"" ~ ""
+ ^
+SyntaxError: test/script/basic/JDK-8019791.js#41<eval>:1:18 Expected ) but found ~
+function() { if (1~0) return 0; return 1 }
+ ^
diff --git a/test/script/basic/JDK-8019805.js b/test/script/basic/JDK-8019805.js
new file mode 100644
index 00000000..70371fb8
--- /dev/null
+++ b/test/script/basic/JDK-8019805.js
@@ -0,0 +1,36 @@
+/*
+ * 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-8019805: for each (init; test; modify) is invalid
+ *
+ * @test
+ * @run
+ */
+
+try {
+ eval("for each(var v=0;false;);");
+ print("FAILED: for each(var v=0; false;); should have thrown error");
+} catch (e) {
+ print(e.toString().replace(/\\/g, '/'));
+}
diff --git a/test/script/basic/JDK-8019805.js.EXPECTED b/test/script/basic/JDK-8019805.js.EXPECTED
new file mode 100644
index 00000000..154c3326
--- /dev/null
+++ b/test/script/basic/JDK-8019805.js.EXPECTED
@@ -0,0 +1,3 @@
+SyntaxError: test/script/basic/JDK-8019805.js#32<eval>:1:16 for each can only be used with for..in
+for each(var v=0;false;);
+ ^
diff --git a/test/script/basic/JDK-8019808.js b/test/script/basic/JDK-8019808.js
new file mode 100644
index 00000000..08d090cf
--- /dev/null
+++ b/test/script/basic/JDK-8019808.js
@@ -0,0 +1,39 @@
+/*
+ * 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-8019808: Switch on empty array breaks codegen
+ *
+ * @test
+ * @run
+ */
+
+Function("switch([]) { case 7: }");
+
+function f() {
+ switch([]) {
+ case 7:
+ }
+}
+
+f();
diff --git a/test/script/basic/JDK-8019809.js b/test/script/basic/JDK-8019809.js
new file mode 100644
index 00000000..cc31bd86
--- /dev/null
+++ b/test/script/basic/JDK-8019809.js
@@ -0,0 +1,37 @@
+/*
+ * 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-8019809: Break return combo that generates erroneous bytecode
+ *
+ * @test
+ * @run
+ */
+
+//Function("L: {break L;return; }");
+
+function f() {
+ L: { break L; return; }
+}
+
+f();
diff --git a/test/script/basic/JDK-8019810.js b/test/script/basic/JDK-8019810.js
new file mode 100644
index 00000000..a22fb06f
--- /dev/null
+++ b/test/script/basic/JDK-8019810.js
@@ -0,0 +1,36 @@
+/*
+ * 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-8019810: Assertion error in attr in function body
+ *
+ * @test
+ * @run
+ */
+
+Function("return (void ({ set each (x2)y }));");
+
+function f() {
+ return (void ({ set each (x2)y }));
+}
+print(f());
diff --git a/test/script/basic/JDK-8019810.js.EXPECTED b/test/script/basic/JDK-8019810.js.EXPECTED
new file mode 100644
index 00000000..417b7b53
--- /dev/null
+++ b/test/script/basic/JDK-8019810.js.EXPECTED
@@ -0,0 +1 @@
+undefined
diff --git a/test/script/basic/JDK-8019811.js b/test/script/basic/JDK-8019811.js
new file mode 100644
index 00000000..e64fafb3
--- /dev/null
+++ b/test/script/basic/JDK-8019811.js
@@ -0,0 +1,47 @@
+/*
+ * 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-8019811: Number coercion for return values of static calls was broken
+ *
+ * @test
+ * @run
+ */
+
+function f(x) {
+ var window = 17;
+ return function (x) {
+ return true
+ } (x) >> window;
+}
+
+Function("L:if((function x ()3)() + arguments++) {return; } else if (new gc()) while(((x2.prop = functional)) && 0){ }");
+
+Function("var x = x -= '' ");
+
+Function("switch((Math.pow ? x = 1.2e3 : 3)) { default: return; }")
+
+Function("x = 0.1, x\ntrue\n~this");
+
+Function("with((function (x)x2)() ^ this){return; }");
+ \ No newline at end of file
diff --git a/test/script/basic/JDK-8019814.js b/test/script/basic/JDK-8019814.js
new file mode 100644
index 00000000..24abf53b
--- /dev/null
+++ b/test/script/basic/JDK-8019814.js
@@ -0,0 +1,73 @@
+/*
+ * 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-8019814: Add regression test for passing cases
+ *
+ * @test
+ * @run
+ */
+
+// java.lang.VerifyError: Bad type on operand stack
+Function("switch([]) { case 7: }");
+
+// java.lang.AssertionError: expecting integer type or object for jump, but found double
+Function("with(\nnull == (this % {}))( /x/g );");
+
+// java.lang.AssertionError: expecting equivalent types on stack but got double and int
+try {
+ eval('Function("/*infloop*/while(((function ()4.)([z1,,], [,,]) - true++))switch(1e+81.x) { default: break; \u0009 }")');
+} catch (e) {
+ print(e.toString().replace(/\\/g, '/'));
+}
+
+// java.lang.VerifyError: get long/double overflows locals
+Function("var x = x -= '' ");
+
+// java.lang.AssertionError: object is not compatible with boolean
+Function("return (null != [,,] <= this);");
+
+// java.lang.AssertionError: Only return value on stack allowed at return point
+// - depth=2 stack = jdk.nashorn.internal.codegen.Label$Stack@4bd0d62f
+Function("x = 0.1, x\ntrue\n~this");
+
+// java.lang.AssertionError: node NaN ~ window class jdk.nashorn.internal.ir.BinaryNode
+// has no symbol! [object] function _L1()
+Function("throw NaN\n~window;");
+
+// java.lang.AssertionError: array element type doesn't match array type
+Function("if(([(this >>> 4.)].map(gc))) x;");
+
+try {
+ eval('Function("if(--) y;")');
+} catch (e) {
+ print(e.toString().replace(/\\/g, '/'));
+}
+
+// java.lang.AssertionError: stacks jdk.nashorn.internal.codegen.Label$Stack@4918f90f
+// is not equivalent with jdk.nashorn.internal.codegen.Label$Stack@5f9b21a1 at join point
+Function("if((null ^ [1]) !== (this.yoyo(false))) {var NaN, x;x\n~[,,z1] }");
+
+// java.lang.AssertionError
+// at jdk.nashorn.internal.codegen.Attr.enterFunctionBody(Attr.java:276)
+Function("return (void ({ set each (x2)y }));");
diff --git a/test/script/basic/JDK-8019814.js.EXPECTED b/test/script/basic/JDK-8019814.js.EXPECTED
new file mode 100644
index 00000000..51db7b5e
--- /dev/null
+++ b/test/script/basic/JDK-8019814.js.EXPECTED
@@ -0,0 +1,6 @@
+ReferenceError: <function>:1:50 Invalid left hand side for assignment
+/*infloop*/while(((function ()4.)([z1,,], [,,]) - true++))switch(1e+81.x) { default: break; }
+ ^
+SyntaxError: <function>:1:5 Expected l-value but found )
+if(--) y;
+ ^
diff --git a/test/script/basic/JDK-8019817.js b/test/script/basic/JDK-8019817.js
new file mode 100644
index 00000000..6611e9b4
--- /dev/null
+++ b/test/script/basic/JDK-8019817.js
@@ -0,0 +1,37 @@
+/*
+ * 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-8019817: More number coercion issues
+ *
+ * @test
+ * @run
+ */
+var y = 17.17;
+
+Function("return y % function(q) { return q; }();");
+
+function f() {
+ return y % function(q) { return q; }();
+}
+f();
diff --git a/test/script/basic/JDK-8019819.js b/test/script/basic/JDK-8019819.js
new file mode 100644
index 00000000..1760ac3d
--- /dev/null
+++ b/test/script/basic/JDK-8019819.js
@@ -0,0 +1,46 @@
+/*
+ * 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-8019819: scope symbol didn't get a slot in certain cases
+ *
+ * @test
+ * @run
+ */
+function f() {
+ try {
+ } catch(e if [].g(e)) {
+ with({}) {
+ throw e;
+ }
+ }
+}
+
+function g() {
+ try {
+ } catch(e) {
+ with({}) {
+ throw e;
+ }
+ }
+}
diff --git a/test/script/basic/JDK-8019821.js b/test/script/basic/JDK-8019821.js
new file mode 100644
index 00000000..c296ac3c
--- /dev/null
+++ b/test/script/basic/JDK-8019821.js
@@ -0,0 +1,37 @@
+/*
+ * 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-8019821: boolean switch value accidentally triggered "allInts" case
+ * as boolean is considered narrower than int. This caused a ClassCastException
+ *
+ * @test
+ * @run
+ */
+
+function f() {
+ switch(gc()) {
+ case true:
+ case 1:
+ }
+}
diff --git a/test/script/basic/JDK-8019822.js b/test/script/basic/JDK-8019822.js
new file mode 100644
index 00000000..2a491500
--- /dev/null
+++ b/test/script/basic/JDK-8019822.js
@@ -0,0 +1,29 @@
+/*
+ * 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-8019822: Duplicate name/signature for a function in finally block
+ *
+ * @test
+ */
+try { function (x) /x/ } finally { (function(id) { return id }); }
diff --git a/test/script/basic/JDK-8019947.js b/test/script/basic/JDK-8019947.js
new file mode 100644
index 00000000..4b64a818
--- /dev/null
+++ b/test/script/basic/JDK-8019947.js
@@ -0,0 +1,68 @@
+/*
+ * 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-8019947: inherited property invalidation does not work with two globals in same context
+ *
+ * @test
+ * @option -scripting
+ * @run
+ */
+
+function func(arr) {
+ try {
+ print(arr.toString());
+ } catch (e) {
+ print(e.stack);
+ }
+}
+
+var arr = ["hello", "world"]
+
+func(arr);
+
+var global = loadWithNewGlobal({
+ name: "t",
+ script: <<EOF
+
+
+function func(arr) {
+ try {
+ print(arr.toString());
+ } catch (e) {
+ print(e.stack);
+ }
+}
+
+var arr = [1, 2, 3];
+
+func(arr);
+
+delete Array.prototype.toString;
+
+// Object.prototype.toString should be visible
+// after Array.prototype.toString is deleted.
+func(arr);
+this;
+EOF
+});
diff --git a/test/script/basic/JDK-8019947.js.EXPECTED b/test/script/basic/JDK-8019947.js.EXPECTED
new file mode 100644
index 00000000..fb92ba32
--- /dev/null
+++ b/test/script/basic/JDK-8019947.js.EXPECTED
@@ -0,0 +1,3 @@
+hello,world
+1,2,3
+[object Array]
diff --git a/test/script/basic/JDK-8019963.js b/test/script/basic/JDK-8019963.js
new file mode 100644
index 00000000..5767a414
--- /dev/null
+++ b/test/script/basic/JDK-8019963.js
@@ -0,0 +1,66 @@
+/*
+ * 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-8019963: empty char range in regex
+ *
+ * @test
+ * @run
+ */
+
+var re1 = /[\x00-\x08\x0B\x0C\x0E-\x9F\uD800-\uDFFF\uFFFE\uFFFF]/;
+
+print(re1.test("\x00"));
+print(re1.test("\x04"));
+print(re1.test("\x08"));
+print(re1.test("\x0a"));
+print(re1.test("\x0B"));
+print(re1.test("\x0C"));
+print(re1.test("\x0E"));
+print(re1.test("\x10"));
+print(re1.test("\x1A"));
+print(re1.test("\x2F"));
+print(re1.test("\x8E"));
+print(re1.test("\x8F"));
+print(re1.test("\x9F"));
+print(re1.test("\xA0"));
+print(re1.test("\xAF"));
+print(re1.test("\uD800"));
+print(re1.test("\xDA00"));
+print(re1.test("\xDCFF"));
+print(re1.test("\xDFFF"));
+print(re1.test("\xFFFE"));
+print(re1.test("\xFFFF"));
+
+var re2 = /[\x1F\x7F-\x84\x86]/;
+
+print(re2.test("\x1F"));
+print(re2.test("\x2F"));
+print(re2.test("\x3F"));
+print(re2.test("\x7F"));
+print(re2.test("\x80"));
+print(re2.test("\x84"));
+print(re2.test("\x85"));
+print(re2.test("\x86"));
+
+var re3 = /^([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*$/;
diff --git a/test/script/basic/JDK-8019963.js.EXPECTED b/test/script/basic/JDK-8019963.js.EXPECTED
new file mode 100644
index 00000000..ffde31fe
--- /dev/null
+++ b/test/script/basic/JDK-8019963.js.EXPECTED
@@ -0,0 +1,29 @@
+true
+true
+true
+false
+true
+true
+true
+true
+true
+true
+true
+true
+true
+false
+false
+true
+true
+true
+true
+true
+true
+true
+false
+false
+true
+true
+true
+false
+true
diff --git a/test/script/basic/JDK-8019983.js b/test/script/basic/JDK-8019983.js
new file mode 100644
index 00000000..7851ab01
--- /dev/null
+++ b/test/script/basic/JDK-8019983.js
@@ -0,0 +1,42 @@
+/*
+ * 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-8019983.js return without expression combined with return with expression should produce object
+ * return type (undefined)
+ *
+ * @test
+ * @run
+ */
+
+
+function g() {
+ switch(1) {
+ case 0:
+ case '':
+ default:
+ return;
+ }
+ return 10;
+}
+print(g());
diff --git a/test/script/basic/JDK-8019983.js.EXPECTED b/test/script/basic/JDK-8019983.js.EXPECTED
new file mode 100644
index 00000000..417b7b53
--- /dev/null
+++ b/test/script/basic/JDK-8019983.js.EXPECTED
@@ -0,0 +1 @@
+undefined
diff --git a/test/script/basic/JDK-8020124.js b/test/script/basic/JDK-8020124.js
new file mode 100644
index 00000000..f7735fc0
--- /dev/null
+++ b/test/script/basic/JDK-8020124.js
@@ -0,0 +1,32 @@
+/*
+ * 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-8020124: explicit conversion needed for switch tag
+ *
+ * @test
+ * @run
+ */
+
+x = {};
+Function("switch((a? x = 1 : 3)) { default: return; }")
diff --git a/test/script/basic/JDK-8020223.js b/test/script/basic/JDK-8020223.js
new file mode 100644
index 00000000..9bbbad28
--- /dev/null
+++ b/test/script/basic/JDK-8020223.js
@@ -0,0 +1,71 @@
+/*
+ * 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-8020223: ClassCastException: String can not be casted to ScriptFunction
+ *
+ * @test
+ * @run
+ */
+
+__noSuchMethod__ = "";
+
+try {
+ foo();
+ fail("Must have thrown exception");
+} catch (e) {
+ if (! (e instanceof TypeError)) {
+ fail("TypeError expected, got " + e);
+ }
+}
+
+__noSuchProperty__ = 23;
+
+try {
+ foo;
+ fail("Must have thrown exception");
+} catch (e) {
+ if (! (e instanceof ReferenceError)) {
+ fail("ReferenceError expected, got " + e);
+ }
+}
+
+var obj = new JSAdapter() {
+ __get__: 332,
+ __call__: "hello"
+}
+
+try {
+ obj.foo; // should just be undefined
+} catch (e) {
+ fail("unexpected error : " + e);
+}
+
+try {
+ obj.foo();
+ fail("Must have thrown exception");
+} catch(e) {
+ if (! (e instanceof TypeError)) {
+ fail("TypeError expected, got " + e);
+ }
+}
diff --git a/test/script/basic/JDK-8020324.js b/test/script/basic/JDK-8020324.js
new file mode 100644
index 00000000..8f48f76c
--- /dev/null
+++ b/test/script/basic/JDK-8020324.js
@@ -0,0 +1,139 @@
+/*
+ * 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-8020324: Implement Object.bindProperties(target, source) for beans
+ *
+ * @test
+ * @run
+ */
+
+var PropertyBind = Java.type("jdk.nashorn.test.models.PropertyBind")
+var bean = new PropertyBind
+
+var obj1 = {}
+Object.bindProperties(obj1, bean)
+
+printBanner("Two-way read-write instance field")
+printEval("obj1.publicInt = 13")
+printEval("bean.publicInt")
+printEval("bean.publicInt = 15")
+printEval("obj1.publicInt")
+
+printBanner("Read only public instance field")
+printEval("obj1.publicFinalInt")
+printEval("obj1.publicFinalInt = 16")
+printEval("obj1.publicFinalInt")
+printEval("bean.publicFinalInt")
+
+printBanner("Two-way read-write instance property")
+printEval("obj1.readWrite = 17")
+printEval("bean.readWrite")
+printEval("bean.readWrite = 18")
+printEval("obj1.readWrite")
+printEval("obj1.getReadWrite()")
+printEval("obj1.setReadWrite(19)")
+printEval("obj1.readWrite")
+printEval("bean.readWrite")
+
+printBanner("Read only instance property")
+printEval("obj1.readOnly")
+printEval("obj1.readOnly = 20")
+printEval("obj1.readOnly")
+printEval("obj1.getReadOnly()")
+printEval("bean.getReadOnly()")
+
+printBanner("Write only instance property")
+printEval("obj1.writeOnly = 21")
+printEval("obj1.writeOnly")
+printEval("bean.writeOnly")
+printEval("bean.peekWriteOnly()")
+
+var obj2 = {}
+Object.bindProperties(obj2, PropertyBind)
+
+printBanner("Two-way read-write public static field")
+printEval("obj2.publicStaticInt = 22")
+printEval("PropertyBind.publicStaticInt")
+printEval("PropertyBind.publicStaticInt = 23")
+printEval("obj2.publicStaticInt")
+
+printBanner("Read only public static field")
+printEval("obj2.publicStaticFinalInt")
+printEval("obj2.publicStaticFinalInt = 24")
+printEval("obj2.publicStaticFinalInt")
+printEval("PropertyBind.publicStaticFinalInt")
+
+printBanner("Two-way read-write static property")
+printEval("obj2.staticReadWrite = 25")
+printEval("PropertyBind.staticReadWrite")
+printEval("PropertyBind.staticReadWrite = 26")
+printEval("obj2.staticReadWrite")
+printEval("obj2.getStaticReadWrite()")
+printEval("obj2.setStaticReadWrite(27)")
+printEval("obj2.staticReadWrite")
+printEval("PropertyBind.staticReadWrite")
+
+printBanner("Read only static property")
+printEval("obj2.staticReadOnly")
+printEval("obj2.staticReadOnly = 28")
+printEval("obj2.staticReadOnly")
+printEval("obj2.getStaticReadOnly()")
+printEval("PropertyBind.getStaticReadOnly()")
+
+printBanner("Write only static property")
+printEval("obj2.staticWriteOnly = 29")
+printEval("obj2.staticWriteOnly")
+printEval("PropertyBind.staticWriteOnly")
+printEval("PropertyBind.peekStaticWriteOnly()")
+
+printBanner("Sanity check to ensure property values remained what they were")
+printEval("obj1.publicInt")
+printEval("bean.publicInt")
+printEval("obj1.publicFinalInt")
+printEval("bean.publicFinalInt")
+printEval("obj1.readWrite")
+printEval("bean.readWrite")
+printEval("obj1.readOnly")
+printEval("bean.readOnly")
+printEval("bean.peekWriteOnly()")
+
+printEval("obj2.publicStaticInt")
+printEval("PropertyBind.publicStaticInt")
+printEval("obj2.publicStaticFinalInt")
+printEval("PropertyBind.publicStaticFinalInt")
+printEval("obj2.staticReadWrite")
+printEval("PropertyBind.staticReadWrite")
+printEval("obj2.staticReadOnly")
+printEval("PropertyBind.staticReadOnly")
+printEval("PropertyBind.peekStaticWriteOnly()")
+
+
+function printEval(s) {
+ print(s + ": " + eval(s))
+}
+
+function printBanner(s) {
+ print()
+ print("==== " + s + " ====")
+}
diff --git a/test/script/basic/JDK-8020324.js.EXPECTED b/test/script/basic/JDK-8020324.js.EXPECTED
new file mode 100644
index 00000000..500f46b9
--- /dev/null
+++ b/test/script/basic/JDK-8020324.js.EXPECTED
@@ -0,0 +1,90 @@
+
+==== Two-way read-write instance field ====
+obj1.publicInt = 13: 13
+bean.publicInt: 13
+bean.publicInt = 15: 15
+obj1.publicInt: 15
+
+==== Read only public instance field ====
+obj1.publicFinalInt: 42
+obj1.publicFinalInt = 16: 16
+obj1.publicFinalInt: 42
+bean.publicFinalInt: 42
+
+==== Two-way read-write instance property ====
+obj1.readWrite = 17: 17
+bean.readWrite: 17
+bean.readWrite = 18: 18
+obj1.readWrite: 18
+obj1.getReadWrite(): 18
+obj1.setReadWrite(19): null
+obj1.readWrite: 19
+bean.readWrite: 19
+
+==== Read only instance property ====
+obj1.readOnly: 123
+obj1.readOnly = 20: 20
+obj1.readOnly: 123
+obj1.getReadOnly(): 123
+bean.getReadOnly(): 123
+
+==== Write only instance property ====
+obj1.writeOnly = 21: 21
+obj1.writeOnly: undefined
+bean.writeOnly: undefined
+bean.peekWriteOnly(): 21
+
+==== Two-way read-write public static field ====
+obj2.publicStaticInt = 22: 22
+PropertyBind.publicStaticInt: 22
+PropertyBind.publicStaticInt = 23: 23
+obj2.publicStaticInt: 23
+
+==== Read only public static field ====
+obj2.publicStaticFinalInt: 2112
+obj2.publicStaticFinalInt = 24: 24
+obj2.publicStaticFinalInt: 2112
+PropertyBind.publicStaticFinalInt: 2112
+
+==== Two-way read-write static property ====
+obj2.staticReadWrite = 25: 25
+PropertyBind.staticReadWrite: 25
+PropertyBind.staticReadWrite = 26: 26
+obj2.staticReadWrite: 26
+obj2.getStaticReadWrite(): 26
+obj2.setStaticReadWrite(27): null
+obj2.staticReadWrite: 27
+PropertyBind.staticReadWrite: 27
+
+==== Read only static property ====
+obj2.staticReadOnly: 1230
+obj2.staticReadOnly = 28: 28
+obj2.staticReadOnly: 1230
+obj2.getStaticReadOnly(): 1230
+PropertyBind.getStaticReadOnly(): 1230
+
+==== Write only static property ====
+obj2.staticWriteOnly = 29: 29
+obj2.staticWriteOnly: undefined
+PropertyBind.staticWriteOnly: undefined
+PropertyBind.peekStaticWriteOnly(): 29
+
+==== Sanity check to ensure property values remained what they were ====
+obj1.publicInt: 15
+bean.publicInt: 15
+obj1.publicFinalInt: 42
+bean.publicFinalInt: 42
+obj1.readWrite: 19
+bean.readWrite: 19
+obj1.readOnly: 123
+bean.readOnly: 123
+bean.peekWriteOnly(): 21
+obj2.publicStaticInt: 23
+PropertyBind.publicStaticInt: 23
+obj2.publicStaticFinalInt: 2112
+PropertyBind.publicStaticFinalInt: 2112
+obj2.staticReadWrite: 27
+PropertyBind.staticReadWrite: 27
+obj2.staticReadOnly: 1230
+PropertyBind.staticReadOnly: 1230
+PropertyBind.peekStaticWriteOnly(): 29
diff --git a/test/script/basic/JDK-8020325.js b/test/script/basic/JDK-8020325.js
new file mode 100644
index 00000000..5c8e64f5
--- /dev/null
+++ b/test/script/basic/JDK-8020325.js
@@ -0,0 +1,38 @@
+/*
+ * 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-8020325: static property does not work on accessible, public classes
+ *
+ * @test
+ * @run
+ */
+
+function printStatic(obj) {
+ print(obj.getClass().static);
+}
+
+printStatic(new java.util.ArrayList());
+printStatic(new java.util.HashMap());
+printStatic(new java.lang.Object());
+printStatic(new (Java.type("java.lang.Object[]"))(0));
diff --git a/test/script/basic/JDK-8020325.js.EXPECTED b/test/script/basic/JDK-8020325.js.EXPECTED
new file mode 100644
index 00000000..96542b75
--- /dev/null
+++ b/test/script/basic/JDK-8020325.js.EXPECTED
@@ -0,0 +1,4 @@
+[JavaClass java.util.ArrayList]
+[JavaClass java.util.HashMap]
+[JavaClass java.lang.Object]
+[JavaClass [Ljava.lang.Object;]
diff --git a/test/script/basic/JDK-8020354.js b/test/script/basic/JDK-8020354.js
new file mode 100644
index 00000000..fbfa826c
--- /dev/null
+++ b/test/script/basic/JDK-8020354.js
@@ -0,0 +1,43 @@
+/*
+ * 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-8020354: Object literal property initialization is not done in source order
+ *
+ * @test
+ * @run
+ */
+
+
+var obj = ({a: print(1), b: print(2), a: print(3)});
+
+var obj = ({
+ a: print(1),
+ get x() { print("getting x"); return "x" },
+ set x(v) { print("setting x"); },
+ b: print(2),
+ a: print(3)
+});
+
+print(obj.x);
+obj.x = 4;
diff --git a/test/script/basic/JDK-8020354.js.EXPECTED b/test/script/basic/JDK-8020354.js.EXPECTED
new file mode 100644
index 00000000..f0f2fe13
--- /dev/null
+++ b/test/script/basic/JDK-8020354.js.EXPECTED
@@ -0,0 +1,9 @@
+1
+2
+3
+1
+2
+3
+getting x
+x
+setting x
diff --git a/test/script/basic/JDK-8020357.js b/test/script/basic/JDK-8020357.js
new file mode 100644
index 00000000..e74bca8a
--- /dev/null
+++ b/test/script/basic/JDK-8020357.js
@@ -0,0 +1,52 @@
+/*
+ * 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-8020357: Return range error for too big native array buffers
+ *
+ * @test
+ * @run
+ */
+
+var UNSIGNED_INT_BITS = 31
+var BYTES_PER_INT_32 = 4
+
+var limit = Math.pow(2, UNSIGNED_INT_BITS)/BYTES_PER_INT_32
+
+try {
+ // A value at or under the limit should either succeed if we have
+ // enough heap, or throw an OutOfMemoryError if we don't.
+ Int32Array(limit - 1)
+} catch(e) {
+ if(!(e instanceof java.lang.OutOfMemoryError)) {
+ // Only print an unexpected result; OutOfMemoryError is expected
+ print(e)
+ }
+}
+
+// A value over the limit should throw a RangeError.
+try {
+ Int32Array(limit)
+} catch(e) {
+ print(e)
+}
diff --git a/test/script/basic/JDK-8020357.js.EXPECTED b/test/script/basic/JDK-8020357.js.EXPECTED
new file mode 100644
index 00000000..cf6c27b0
--- /dev/null
+++ b/test/script/basic/JDK-8020357.js.EXPECTED
@@ -0,0 +1 @@
+RangeError: inappropriate array buffer length: 536870912
diff --git a/test/script/basic/JDK-8020358.js b/test/script/basic/JDK-8020358.js
new file mode 100644
index 00000000..401531de
--- /dev/null
+++ b/test/script/basic/JDK-8020358.js
@@ -0,0 +1,43 @@
+/*
+ * 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-8020358: Array(0xfffffff) throws OutOfMemoryError
+ *
+ * @test
+ * @run
+ */
+
+var x = new Array(0xfffffff);
+print(x.length);
+x[0xffffffe] = 1;
+print(x.length);
+x[0xfffffff] = 1;
+print(x.length);
+
+x = new Array(0x8ffff);
+print(x.length);
+print(Function("return 'ok'").apply(null, x));
+x[0] = "pass";
+print(Function("p", "return p").apply(null, x));
+print(Function("return arguments[0]").apply(null, x));
diff --git a/test/script/basic/JDK-8020358.js.EXPECTED b/test/script/basic/JDK-8020358.js.EXPECTED
new file mode 100644
index 00000000..5b6db365
--- /dev/null
+++ b/test/script/basic/JDK-8020358.js.EXPECTED
@@ -0,0 +1,7 @@
+268435455
+268435455
+268435456
+589823
+ok
+pass
+pass
diff --git a/test/script/basic/JDK-8020380.js b/test/script/basic/JDK-8020380.js
new file mode 100644
index 00000000..90357fa7
--- /dev/null
+++ b/test/script/basic/JDK-8020380.js
@@ -0,0 +1,36 @@
+/*
+ * 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-8020380: __noSuchProperty__ defined in mozilla_compat.js script should be non-enumerable
+ *
+ * @test
+ * @run
+ */
+
+load("nashorn:mozilla_compat.js");
+
+var desc = Object.getOwnPropertyDescriptor(this, "__noSuchProperty__");
+if (typeof desc.enumerable != 'boolean' || desc.enumerable != false) {
+ fail("__noSuchProperty__ is enumerable");
+}
diff --git a/test/script/basic/JDK-8020437.js b/test/script/basic/JDK-8020437.js
new file mode 100644
index 00000000..d758355c
--- /dev/null
+++ b/test/script/basic/JDK-8020437.js
@@ -0,0 +1,49 @@
+/*
+ * 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-8020437: Wrong handling of line numbers with multiline string literals
+ *
+ * @test
+ * @option -scripting
+ * @run
+ */
+
+print({
+ text: <<EOF
+This is a multiple line
+text inside a sting literal.
+Run this with -scripting option.
+EOF}); f();
+
+function f() {
+ try {
+ func();
+ } catch (e) {
+ print(e.stack.replace(/\\/g, '/'));
+ }
+}
+
+function func() {
+ throw new Error();
+}
diff --git a/test/script/basic/JDK-8020437.js.EXPECTED b/test/script/basic/JDK-8020437.js.EXPECTED
new file mode 100644
index 00000000..93657361
--- /dev/null
+++ b/test/script/basic/JDK-8020437.js.EXPECTED
@@ -0,0 +1,5 @@
+[object Object]
+Error
+ at func (test/script/basic/JDK-8020437.js:48)
+ at f (test/script/basic/JDK-8020437.js:41)
+ at <program> (test/script/basic/JDK-8020437.js:37)
diff --git a/test/script/basic/JDK-8020463.js b/test/script/basic/JDK-8020463.js
new file mode 100644
index 00000000..1b3830bf
--- /dev/null
+++ b/test/script/basic/JDK-8020463.js
@@ -0,0 +1,54 @@
+/*
+ * 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-8020463: Input argument array wrapping in loadWithNewGlobal is wrong
+ *
+ * @test
+ * @run
+ */
+
+loadWithNewGlobal({
+ name: "test",
+ script: "arguments[0]();"
+}, func);
+
+function func() {
+ try {
+ foo;
+ } catch (e) {
+ if (! (e instanceof ReferenceError)) {
+ fail("FAILED: expected ReferenceError!");
+ }
+ }
+}
+
+// identity
+var result = loadWithNewGlobal({
+ name: "test2",
+ script: "arguments[0]"
+}, this);
+
+if (result !== this) {
+ fail("FAILED: expected global to be returned 'as is'");
+}
diff --git a/test/script/basic/JDK-8020508.js b/test/script/basic/JDK-8020508.js
new file mode 100644
index 00000000..304870af
--- /dev/null
+++ b/test/script/basic/JDK-8020508.js
@@ -0,0 +1,37 @@
+/*
+ * 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-8020508: Enforce reflection check on
+ * Object.bindProperties(target, source) for beans
+ *
+ * @test
+ * @run
+ */
+
+var x = {}
+try {
+ Object.bindProperties(x, java.util.Vector.class)
+} catch(e) {
+ print(e)
+}
diff --git a/test/script/basic/JDK-8020508.js.EXPECTED b/test/script/basic/JDK-8020508.js.EXPECTED
new file mode 100644
index 00000000..356053d4
--- /dev/null
+++ b/test/script/basic/JDK-8020508.js.EXPECTED
@@ -0,0 +1 @@
+java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "nashorn.JavaReflection")
diff --git a/test/script/basic/NASHORN-759.js.EXPECTED b/test/script/basic/NASHORN-759.js.EXPECTED
index ccb88e0f..5d0001ef 100644
--- a/test/script/basic/NASHORN-759.js.EXPECTED
+++ b/test/script/basic/NASHORN-759.js.EXPECTED
@@ -11,7 +11,7 @@ number
true
object
-object
+function
false
T,h,e, ,q,u,i,c,k, ,g,r,a,y, ,n,a,s,h,o,r,n, ,j,u,m,p,s, ,o,v,e,r, ,t,h,e, ,l,a,z,y, ,z,e,b,r,a,.
diff --git a/test/script/basic/forin.js b/test/script/basic/forin.js
index ee3fa89b..2a60a660 100644
--- a/test/script/basic/forin.js
+++ b/test/script/basic/forin.js
@@ -49,8 +49,3 @@ for each (i in s) print(i);
// 'each' is a contextual keyword. Ok to use as identifier elsewhere..
var each = "This is each";
print(each);
-
-// it is ok to use "each" is usual for loop. Ignored as noise word.
-for each (var i = 0; i < 10; i++) {
- print(i);
-}
diff --git a/test/script/basic/forin.js.EXPECTED b/test/script/basic/forin.js.EXPECTED
index 159e43ba..f5b96f12 100644
--- a/test/script/basic/forin.js.EXPECTED
+++ b/test/script/basic/forin.js.EXPECTED
@@ -25,13 +25,3 @@ apple
bear
car
This is each
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
diff --git a/test/script/error/JDK-8020437-2.js b/test/script/error/JDK-8020437-2.js
new file mode 100644
index 00000000..dcd1e173
--- /dev/null
+++ b/test/script/error/JDK-8020437-2.js
@@ -0,0 +1,36 @@
+/*
+ * 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-8020437: Wrong handling of line numbers with multiline string literals
+ *
+ * @test/compile-error
+ * @option -scripting
+ */
+
+print({
+ text: <<EOF
+This is a multiple line
+text inside a sting literal.
+Run this with -scripting option.
+EOF}); var x++; // syntax error in same line
diff --git a/test/script/error/JDK-8020437-2.js.EXPECTED b/test/script/error/JDK-8020437-2.js.EXPECTED
new file mode 100644
index 00000000..b81f4885
--- /dev/null
+++ b/test/script/error/JDK-8020437-2.js.EXPECTED
@@ -0,0 +1,3 @@
+test/script/error/JDK-8020437-2.js:36:12 Expected ; but found ++
+EOF}); var x++; // syntax error in same line
+ ^
diff --git a/test/script/error/JDK-8020437.js b/test/script/error/JDK-8020437.js
new file mode 100644
index 00000000..e8b84c98
--- /dev/null
+++ b/test/script/error/JDK-8020437.js
@@ -0,0 +1,36 @@
+/*
+ * 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-8020437: Wrong handling of line numbers with multiline string literals
+ *
+ * @test/compile-error
+ * @option -scripting
+ */
+
+print({
+ text: <<EOF
+This is a multiple line
+text inside a sting literal.
+Run this with -scripting option.
+EOF); // missing "}" to end object literal
diff --git a/test/script/error/JDK-8020437.js.EXPECTED b/test/script/error/JDK-8020437.js.EXPECTED
new file mode 100644
index 00000000..9d169985
--- /dev/null
+++ b/test/script/error/JDK-8020437.js.EXPECTED
@@ -0,0 +1,3 @@
+test/script/error/JDK-8020437.js:36:3 Expected comma but found )
+EOF); // missing "}" to end object literal
+ ^
diff --git a/test/script/currently-failing/JDK-8006529.js b/test/script/trusted/JDK-8006529.js
index ca21f0b9..a4968e6e 100644
--- a/test/script/currently-failing/JDK-8006529.js
+++ b/test/script/trusted/JDK-8006529.js
@@ -39,30 +39,33 @@
* and FunctionNode because of package-access check and so reflective calls.
*/
-var Parser = Java.type("jdk.nashorn.internal.parser.Parser")
-var Compiler = Java.type("jdk.nashorn.internal.codegen.Compiler")
-var Context = Java.type("jdk.nashorn.internal.runtime.Context")
-var ScriptEnvironment = Java.type("jdk.nashorn.internal.runtime.ScriptEnvironment")
-var Source = Java.type("jdk.nashorn.internal.runtime.Source")
-var FunctionNode = Java.type("jdk.nashorn.internal.ir.FunctionNode")
-var ThrowErrorManager = Java.type("jdk.nashorn.internal.runtime.Context$ThrowErrorManager");
-
-// Compiler class methods and fields
-var parseMethod = Parser.class.getMethod("parse");
-var compileMethod = Compiler.class.getMethod("compile");
-
-// NOTE: private field. But this is a trusted test!
-// Compiler.functionNode
-var functionNodeField = Compiler.class.getDeclaredField("functionNode");
-functionNodeField.setAccessible(true);
+var Parser = Java.type("jdk.nashorn.internal.parser.Parser")
+var Compiler = Java.type("jdk.nashorn.internal.codegen.Compiler")
+var Context = Java.type("jdk.nashorn.internal.runtime.Context")
+var ScriptEnvironment = Java.type("jdk.nashorn.internal.runtime.ScriptEnvironment")
+var Source = Java.type("jdk.nashorn.internal.runtime.Source")
+var FunctionNode = Java.type("jdk.nashorn.internal.ir.FunctionNode")
+var Block = Java.type("jdk.nashorn.internal.ir.Block")
+var VarNode = Java.type("jdk.nashorn.internal.ir.VarNode")
+var ExpressionStatement = Java.type("jdk.nashorn.internal.ir.ExpressionStatement")
+var UnaryNode = Java.type("jdk.nashorn.internal.ir.UnaryNode")
+var BinaryNode = Java.type("jdk.nashorn.internal.ir.BinaryNode")
+var ThrowErrorManager = Java.type("jdk.nashorn.internal.runtime.Context$ThrowErrorManager")
+var Debug = Java.type("jdk.nashorn.internal.runtime.Debug")
-// FunctionNode methods
-
-// FunctionNode.getFunctions method
-var getFunctionsMethod = FunctionNode.class.getMethod("getFunctions");
+var parseMethod = Parser.class.getMethod("parse");
+var compileMethod = Compiler.class.getMethod("compile", FunctionNode.class);
+var getBodyMethod = FunctionNode.class.getMethod("getBody");
+var getStatementsMethod = Block.class.getMethod("getStatements");
+var getInitMethod = VarNode.class.getMethod("getInit");
+var getExpressionMethod = ExpressionStatement.class.getMethod("getExpression")
+var rhsMethod = UnaryNode.class.getMethod("rhs")
+var lhsMethod = BinaryNode.class.getMethod("lhs")
+var binaryRhsMethod = BinaryNode.class.getMethod("rhs")
+var debugIdMethod = Debug.class.getMethod("id", java.lang.Object.class)
// These are method names of methods in FunctionNode class
-var allAssertionList = ['isVarArg', 'needsParentScope', 'needsCallee', 'needsScope', 'needsSelfSymbol', 'isSplit', 'hasEval', 'hasWith', 'hasDeepWithOrEval', 'allVarsInScope', 'isStrictMode']
+var allAssertionList = ['isVarArg', 'needsParentScope', 'needsCallee', 'hasScopeBlock', 'needsSelfSymbol', 'isSplit', 'hasEval', 'allVarsInScope', 'isStrict']
// corresponding Method objects of FunctionNode class
var functionNodeMethods = {};
@@ -74,30 +77,54 @@ var functionNodeMethods = {};
}
})();
-// returns "script" functionNode from Compiler instance
-function getScriptNode(compiler) {
- // compiler.functionNode
- return functionNodeField.get(compiler);
+// returns functionNode.getBody().getStatements().get(0)
+function getFirstFunction(functionNode) {
+ var f = findFunction(getBodyMethod.invoke(functionNode))
+ if (f == null) {
+ throw new Error();
+ }
+ return f;
}
-// returns functionNode.getFunctions().get(0)
-function getFirstFunction(functionNode) {
- // functionNode.getFunctions().get(0)
- return getFunctionsMethod.invoke(functionNode).get(0);
+function findFunction(node) {
+ if(node instanceof Block) {
+ var stmts = getStatementsMethod.invoke(node)
+ for(var i = 0; i < stmts.size(); ++i) {
+ var retval = findFunction(stmts.get(i))
+ if(retval != null) {
+ return retval;
+ }
+ }
+ } else if(node instanceof VarNode) {
+ return findFunction(getInitMethod.invoke(node))
+ } else if(node instanceof UnaryNode) {
+ return findFunction(rhsMethod.invoke(node))
+ } else if(node instanceof BinaryNode) {
+ return findFunction(lhsMethod.invoke(node)) || findFunction(binaryRhsMethod.invoke(node))
+ } else if(node instanceof ExpressionStatement) {
+ return findFunction(getExpressionMethod.invoke(node))
+ } else if(node instanceof FunctionNode) {
+ return node
+ }
}
+var getContextMethod = Context.class.getMethod("getContext")
+var getEnvMethod = Context.class.getMethod("getEnv")
+
// compile(script) -- compiles a script specified as a string with its
// source code, returns a jdk.nashorn.internal.ir.FunctionNode object
// representing it.
function compile(source) {
var source = new Source("<no name>", source);
- var parser = new Parser(Context.getContext().getEnv(), source, new ThrowErrorManager());
+
+ var env = getEnvMethod.invoke(getContextMethod.invoke(null))
+
+ var parser = new Parser(env, source, new ThrowErrorManager());
var func = parseMethod.invoke(parser);
- var compiler = new Compiler(Context.getContext().getEnv(), func);
- compileMethod.invoke(compiler);
+ var compiler = new Compiler(env);
- return getScriptNode(compiler);
+ return compileMethod.invoke(compiler, func);
};
var allAssertions = (function() {
@@ -122,8 +149,9 @@ function test(f) {
}
for(var assertion in allAssertions) {
var expectedValue = !!assertions[assertion]
- if(functionNodeMethods[assertion].invoke(f) !== expectedValue) {
- throw "Expected " + assertion + " === " + expectedValue + " for " + f;
+ var actualValue = functionNodeMethods[assertion].invoke(f)
+ if(actualValue !== expectedValue) {
+ throw "Expected " + assertion + " === " + expectedValue + ", got " + actualValue + " for " + f + ":" + debugIdMethod.invoke(null, f);
}
}
}
@@ -152,7 +180,7 @@ testFirstFn("function f() { arguments }", 'needsCallee', 'isVarArg')
// A function referencing "arguments" will have to be vararg. If it is
// strict, it will not have to have a callee, though.
-testFirstFn("function f() {'use strict'; arguments }", 'isVarArg', 'isStrictMode')
+testFirstFn("function f() {'use strict'; arguments }", 'isVarArg', 'isStrict')
// A function defining "arguments" as a parameter will not be vararg.
testFirstFn("function f(arguments) { arguments }")
@@ -173,11 +201,11 @@ testFirstFn("(function f() { f() })", 'needsCallee', 'needsSelfSymbol')
// A child function accessing parent's variable triggers the need for scope
// in parent
-testFirstFn("(function f() { var x; function g() { x } })", 'needsScope')
+testFirstFn("(function f() { var x; function g() { x } })", 'hasScopeBlock')
// A child function accessing parent's parameter triggers the need for scope
// in parent
-testFirstFn("(function f(x) { function g() { x } })", 'needsScope')
+testFirstFn("(function f(x) { function g() { x } })", 'hasScopeBlock')
// A child function accessing a global variable triggers the need for parent
// scope in parent
@@ -187,22 +215,29 @@ testFirstFn("(function f() { function g() { x } })", 'needsParentScope', 'needsC
// affect the parent function in any way
testFirstFn("(function f() { var x; function g() { var x; x } })")
-// Using "with" unleashes a lot of needs: parent scope, callee, own scope,
-// and all variables in scope. Actually, we could make "with" less wasteful,
-// and only put those variables in scope that it actually references, similar
-// to what nested functions do with variables in their parents.
-testFirstFn("(function f() { var o; with(o) {} })", 'needsParentScope', 'needsCallee', 'needsScope', 'hasWith', 'hasDeepWithOrEval', 'allVarsInScope')
+// Using "with" on its own doesn't do much.
+testFirstFn("(function f() { var o; with(o) {} })")
-// Using "eval" is as bad as using "with" with the added requirement of
-// being vararg, 'cause we don't know if eval will be using "arguments".
-testFirstFn("(function f() { eval() })", 'needsParentScope', 'needsCallee', 'needsScope', 'hasEval', 'isVarArg', 'hasDeepWithOrEval', 'allVarsInScope')
+// "with" referencing a local variable triggers scoping.
+testFirstFn("(function f() { var x; var y; with(x) { y } })", 'hasScopeBlock')
+
+// "with" referencing a non-local variable triggers parent scope.
+testFirstFn("(function f() { var x; with(x) { y } })", 'needsCallee', 'needsParentScope')
// Nested function using "with" is pretty much the same as the parent
// function needing with.
-testFirstFn("(function f() { function g() { var o; with(o) {} } })", 'needsParentScope', 'needsCallee', 'needsScope', 'hasDeepWithOrEval', 'allVarsInScope')
+testFirstFn("(function f() { function g() { var o; with(o) {} } })")
+
+// Nested function using "with" referencing a local variable.
+testFirstFn("(function f() { var x; function g() { var o; with(o) { x } } })", 'hasScopeBlock')
+
+// Using "eval" triggers pretty much everything. The function even needs to be
+// vararg, 'cause we don't know if eval will be using "arguments".
+testFirstFn("(function f() { eval() })", 'needsParentScope', 'needsCallee', 'hasScopeBlock', 'hasEval', 'isVarArg', 'allVarsInScope')
+
// Nested function using "eval" is almost the same as parent function using
// eval, but at least the parent doesn't have to be vararg.
-testFirstFn("(function f() { function g() { eval() } })", 'needsParentScope', 'needsCallee', 'needsScope', 'hasDeepWithOrEval', 'allVarsInScope')
+testFirstFn("(function f() { function g() { eval() } })", 'needsParentScope', 'needsCallee', 'hasScopeBlock', 'allVarsInScope')
// Function with 250 named parameters is ordinary
testFirstFn("function f(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50, p51, p52, p53, p54, p55, p56, p57, p58, p59, p60, p61, p62, p63, p64, p65, p66, p67, p68, p69, p70, p71, p72, p73, p74, p75, p76, p77, p78, p79, p80, p81, p82, p83, p84, p85, p86, p87, p88, p89, p90, p91, p92, p93, p94, p95, p96, p97, p98, p99, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111, p112, p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126, p127, p128, p129, p130, p131, p132, p133, p134, p135, p136, p137, p138, p139, p140, p141, p142, p143, p144, p145, p146, p147, p148, p149, p150, p151, p152, p153, p154, p155, p156, p157, p158, p159, p160, p161, p162, p163, p164, p165, p166, p167, p168, p169, p170, p171, p172, p173, p174, p175, p176, p177, p178, p179, p180, p181, p182, p183, p184, p185, p186, p187, p188, p189, p190, p191, p192, p193, p194, p195, p196, p197, p198, p199, p200, p201, p202, p203, p204, p205, p206, p207, p208, p209, p210, p211, p212, p213, p214, p215, p216, p217, p218, p219, p220, p221, p222, p223, p224, p225, p226, p227, p228, p229, p230, p231, p232, p233, p234, p235, p236, p237, p238, p239, p240, p241, p242, p243, p244, p245, p246, p247, p248, p249, p250) { p250 = p249 }")
diff --git a/test/src/jdk/nashorn/api/scripting/ScriptEngineSecurityTest.java b/test/src/jdk/nashorn/api/scripting/ScriptEngineSecurityTest.java
index 6346313a..4f036101 100644
--- a/test/src/jdk/nashorn/api/scripting/ScriptEngineSecurityTest.java
+++ b/test/src/jdk/nashorn/api/scripting/ScriptEngineSecurityTest.java
@@ -27,7 +27,10 @@ package jdk.nashorn.api.scripting;
import static org.testng.Assert.fail;
+import java.util.Objects;
+import javax.script.Invocable;
import javax.script.ScriptEngine;
+import javax.script.ScriptException;
import javax.script.ScriptEngineManager;
import org.testng.annotations.Test;
@@ -44,6 +47,7 @@ public class ScriptEngineSecurityTest {
public void securityPackagesTest() {
if (System.getSecurityManager() == null) {
// pass vacuously
+ return;
}
final ScriptEngineManager m = new ScriptEngineManager();
@@ -64,6 +68,7 @@ public class ScriptEngineSecurityTest {
public void securityJavaTypeTest() {
if (System.getSecurityManager() == null) {
// pass vacuously
+ return;
}
final ScriptEngineManager m = new ScriptEngineManager();
@@ -84,6 +89,7 @@ public class ScriptEngineSecurityTest {
public void securityClassForNameTest() {
if (System.getSecurityManager() == null) {
// pass vacuously
+ return;
}
final ScriptEngineManager m = new ScriptEngineManager();
@@ -104,6 +110,7 @@ public class ScriptEngineSecurityTest {
public void securitySystemExit() {
if (System.getSecurityManager() == null) {
// pass vacuously
+ return;
}
final ScriptEngineManager m = new ScriptEngineManager();
@@ -124,6 +131,7 @@ public class ScriptEngineSecurityTest {
public void securitySystemLoadLibrary() {
if (System.getSecurityManager() == null) {
// pass vacuously
+ return;
}
final ScriptEngineManager m = new ScriptEngineManager();
@@ -139,4 +147,40 @@ public class ScriptEngineSecurityTest {
}
}
}
+
+ @Test
+ /**
+ * Check that script can't implement sensitive package interfaces.
+ */
+ public void checkSensitiveInterfaceImplTest() throws ScriptException {
+ if (System.getSecurityManager() == null) {
+ // pass vacuously
+ return;
+ }
+
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+ final Object[] holder = new Object[1];
+ e.put("holder", holder);
+ // put an empty script object into array
+ e.eval("holder[0] = {}");
+ // holder[0] is an object of some subclass of ScriptObject
+ Class ScriptObjectClass = holder[0].getClass().getSuperclass();
+ Class PropertyAccessClass = ScriptObjectClass.getInterfaces()[0];
+ // implementation methods for PropertyAccess class
+ e.eval("function set() {}; function get() {}; function getInt(){} " +
+ "function getDouble(){}; function getLong() {}; " +
+ "this.delete = function () {}; function has() {}; " +
+ "function hasOwnProperty() {}");
+
+ // get implementation of a restricted package interface
+ try {
+ log(Objects.toString(((Invocable)e).getInterface((Class<?>)PropertyAccessClass)));
+ fail("should have thrown SecurityException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof SecurityException)) {
+ fail("SecurityException expected, got " + exp);
+ }
+ }
+ }
}
diff --git a/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java b/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
index a6c015a1..64ab25b2 100644
--- a/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
+++ b/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
@@ -36,6 +36,7 @@ import java.io.StringWriter;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.concurrent.Callable;
import javax.script.Bindings;
import javax.script.Compilable;
@@ -345,6 +346,23 @@ public class ScriptEngineTest {
}
@Test
+ /**
+ * Try passing non-interface Class object for interface implementation.
+ */
+ public void getNonInterfaceGetInterfaceTest() {
+ final ScriptEngineManager manager = new ScriptEngineManager();
+ final ScriptEngine engine = manager.getEngineByName("nashorn");
+ try {
+ log(Objects.toString(((Invocable)engine).getInterface(Object.class)));
+ fail("Should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ fail("IllegalArgumentException expected, got " + exp);
+ }
+ }
+ }
+
+ @Test
public void accessGlobalTest() {
final ScriptEngineManager m = new ScriptEngineManager();
final ScriptEngine e = m.getEngineByName("nashorn");
diff --git a/test/src/jdk/nashorn/internal/runtime/TrustedScriptEngineTest.java b/test/src/jdk/nashorn/internal/runtime/TrustedScriptEngineTest.java
index 0f740a48..f7f7c6ae 100644
--- a/test/src/jdk/nashorn/internal/runtime/TrustedScriptEngineTest.java
+++ b/test/src/jdk/nashorn/internal/runtime/TrustedScriptEngineTest.java
@@ -145,4 +145,55 @@ public class TrustedScriptEngineTest {
fail("Cannot find nashorn factory!");
}
+
+ @Test
+ /**
+ * Test repeated evals with --loader-per-compile=false
+ * We used to get "class redefinition error".
+ */
+ public void noLoaderPerCompilerTest() {
+ final ScriptEngineManager sm = new ScriptEngineManager();
+ for (ScriptEngineFactory fac : sm.getEngineFactories()) {
+ if (fac instanceof NashornScriptEngineFactory) {
+ final NashornScriptEngineFactory nfac = (NashornScriptEngineFactory)fac;
+ final String[] options = new String[] { "--loader-per-compile=false" };
+ final ScriptEngine e = nfac.getScriptEngine(options);
+ try {
+ e.eval("2 + 3");
+ e.eval("4 + 4");
+ } catch (final ScriptException se) {
+ se.printStackTrace();
+ fail(se.getMessage());
+ }
+ return;
+ }
+ }
+ fail("Cannot find nashorn factory!");
+ }
+
+ @Test
+ /**
+ * Test that we can use same script name in repeated evals with --loader-per-compile=false
+ * We used to get "class redefinition error" as name was derived from script name.
+ */
+ public void noLoaderPerCompilerWithSameNameTest() {
+ final ScriptEngineManager sm = new ScriptEngineManager();
+ for (ScriptEngineFactory fac : sm.getEngineFactories()) {
+ if (fac instanceof NashornScriptEngineFactory) {
+ final NashornScriptEngineFactory nfac = (NashornScriptEngineFactory)fac;
+ final String[] options = new String[] { "--loader-per-compile=false" };
+ final ScriptEngine e = nfac.getScriptEngine(options);
+ e.put(ScriptEngine.FILENAME, "test.js");
+ try {
+ e.eval("2 + 3");
+ e.eval("4 + 4");
+ } catch (final ScriptException se) {
+ se.printStackTrace();
+ fail(se.getMessage());
+ }
+ return;
+ }
+ }
+ fail("Cannot find nashorn factory!");
+ }
}
diff --git a/test/src/jdk/nashorn/test/models/OuterClass.java b/test/src/jdk/nashorn/test/models/OuterClass.java
index 5db86f28..fc280f65 100644
--- a/test/src/jdk/nashorn/test/models/OuterClass.java
+++ b/test/src/jdk/nashorn/test/models/OuterClass.java
@@ -33,6 +33,10 @@ public class OuterClass {
}
public static class InnerStaticClass {
+
+ public static class InnerInnerStaticClass {
+ }
+
private final String value;
public InnerStaticClass(String value) {
diff --git a/test/src/jdk/nashorn/test/models/PropertyBind.java b/test/src/jdk/nashorn/test/models/PropertyBind.java
new file mode 100644
index 00000000..c1af3023
--- /dev/null
+++ b/test/src/jdk/nashorn/test/models/PropertyBind.java
@@ -0,0 +1,82 @@
+/*
+ * 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. 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.
+ */
+
+package jdk.nashorn.test.models;
+
+public class PropertyBind {
+ public static int publicStaticInt;
+ public static final int publicStaticFinalInt = 2112;
+
+ private static int staticReadWrite;
+ private static int staticReadOnly = 1230;
+ private static int staticWriteOnly;
+
+ public int publicInt;
+ public final int publicFinalInt = 42;
+
+ private int readWrite;
+ private int readOnly = 123;
+ private int writeOnly;
+
+ public int getReadWrite() {
+ return readWrite;
+ }
+
+ public void setReadWrite(int readWrite) {
+ this.readWrite = readWrite;
+ }
+
+ public int getReadOnly() {
+ return readOnly;
+ }
+
+ public void setWriteOnly(int writeOnly) {
+ this.writeOnly = writeOnly;
+ }
+
+ public int peekWriteOnly() {
+ return writeOnly;
+ }
+
+ public static int getStaticReadWrite() {
+ return staticReadWrite;
+ }
+
+ public static void setStaticReadWrite(int staticReadWrite) {
+ PropertyBind.staticReadWrite = staticReadWrite;
+ }
+
+ public static int getStaticReadOnly() {
+ return staticReadOnly;
+ }
+
+ public static void setStaticWriteOnly(int staticWriteOnly) {
+ PropertyBind.staticWriteOnly = staticWriteOnly;
+ }
+
+ public static int peekStaticWriteOnly() {
+ return PropertyBind.staticWriteOnly;
+ }
+}