Merge
This commit is contained in:
commit
1f2a7cfb88
@ -1,49 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
|
||||
makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
else
|
||||
makefile_path := $(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
repo_dir := $(patsubst %/make/Makefile, %, $(makefile_path))
|
||||
|
||||
# What is the name of this subsystem (langtools, corba, etc)?
|
||||
subsystem_name := $(notdir $(repo_dir))
|
||||
|
||||
# Try to locate top-level makefile
|
||||
top_level_makefile := $(repo_dir)/../Makefile
|
||||
ifneq ($(wildcard $(top_level_makefile)), )
|
||||
$(info Will run $(subsystem_name) target on top-level Makefile)
|
||||
$(info WARNING: This is a non-recommended way of building!)
|
||||
$(info ===================================================)
|
||||
else
|
||||
$(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
|
||||
$(error Build from top-level Makefile instead)
|
||||
endif
|
||||
|
||||
all:
|
||||
@$(MAKE) -f $(top_level_makefile) $(subsystem_name)
|
@ -281,12 +281,12 @@
|
||||
<fileset dir="${test.src.dir}/META-INF/services/"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/resources">
|
||||
<fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/resources"/>
|
||||
<copy todir="${build.test.classes.dir}/jdk/nashorn/internal/runtime/test/resources">
|
||||
<fileset dir="${test.src.dir}/jdk/nashorn/internal/runtime/test/resources"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/resources">
|
||||
<fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/resources"/>
|
||||
<copy todir="${build.test.classes.dir}/jdk/nashorn/api/scripting/test/resources">
|
||||
<fileset dir="${test.src.dir}/jdk/nashorn/api/scripting/test/resources"/>
|
||||
</copy>
|
||||
|
||||
<!-- tests that check nashorn internals and internal API -->
|
||||
|
@ -60,6 +60,7 @@ import jdk.nashorn.internal.objects.annotations.ScriptClass;
|
||||
import jdk.nashorn.internal.objects.annotations.Setter;
|
||||
import jdk.nashorn.internal.runtime.Context;
|
||||
import jdk.nashorn.internal.runtime.ECMAErrors;
|
||||
import jdk.nashorn.internal.runtime.FindProperty;
|
||||
import jdk.nashorn.internal.runtime.GlobalConstants;
|
||||
import jdk.nashorn.internal.runtime.GlobalFunctions;
|
||||
import jdk.nashorn.internal.runtime.JSType;
|
||||
@ -2203,6 +2204,17 @@ public final class Global extends ScriptObject implements Scope {
|
||||
return invocation;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FindProperty findProperty(final String key, final boolean deep, final ScriptObject start) {
|
||||
if (lexicalScope != null && start != this && start.isScope()) {
|
||||
final FindProperty find = lexicalScope.findProperty(key, false);
|
||||
if (find != null) {
|
||||
return find;
|
||||
}
|
||||
}
|
||||
return super.findProperty(key, deep, start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuardedInvocation findSetMethod(final CallSiteDescriptor desc, final LinkRequest request) {
|
||||
final boolean isScope = NashornCallSiteDescriptor.isScope(desc);
|
||||
|
@ -114,12 +114,11 @@ public final class NativeFloat32Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final double elem) {
|
||||
try {
|
||||
nb.put(index, (float)elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, (float) elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,12 +114,11 @@ public final class NativeFloat64Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final double elem) {
|
||||
try {
|
||||
nb.put(index, elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,12 +115,11 @@ public final class NativeInt16Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
nb.put(index, (short)elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, (short) elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,11 +104,11 @@ public final class NativeInt32Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
nb.put(index, elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,12 +113,11 @@ public final class NativeInt8Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
nb.put(index, (byte)elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, (byte) elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,12 +104,11 @@ public final class NativeUint16Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
nb.put(index, (char)elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, (char) elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,12 +113,11 @@ public final class NativeUint32Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
nb.put(index, elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,12 +104,11 @@ public final class NativeUint8Array extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
nb.put(index, (byte)elem);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
if (index < nb.limit()) {
|
||||
nb.put(index, (byte) elem);
|
||||
}
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,18 +133,17 @@ public final class NativeUint8ClampedArray extends ArrayBufferView {
|
||||
|
||||
private void setElem(final int index, final int elem) {
|
||||
try {
|
||||
final byte clamped;
|
||||
if ((elem & 0xffff_ff00) == 0) {
|
||||
clamped = (byte)elem;
|
||||
} else {
|
||||
clamped = elem < 0 ? 0 : (byte)0xff;
|
||||
if (index < nb.limit()) {
|
||||
final byte clamped;
|
||||
if ((elem & 0xffff_ff00) == 0) {
|
||||
clamped = (byte) elem;
|
||||
} else {
|
||||
clamped = elem < 0 ? 0 : (byte) 0xff;
|
||||
}
|
||||
nb.put(index, clamped);
|
||||
}
|
||||
nb.put(index, clamped);
|
||||
} catch (final IndexOutOfBoundsException e) {
|
||||
//swallow valid array indexes. it's ok.
|
||||
if (index < 0) {
|
||||
throw new ClassCastException();
|
||||
}
|
||||
throw new ClassCastException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -812,7 +812,7 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable {
|
||||
*
|
||||
* @return FindPropertyData or null if not found.
|
||||
*/
|
||||
FindProperty findProperty(final String key, final boolean deep, final ScriptObject start) {
|
||||
protected FindProperty findProperty(final String key, final boolean deep, final ScriptObject start) {
|
||||
|
||||
final PropertyMap selfMap = getMap();
|
||||
final Property property = selfMap.findProperty(key);
|
||||
|
@ -198,7 +198,7 @@ public final class WithObject extends ScriptObject implements Scope {
|
||||
* @return FindPropertyData or null if not found.
|
||||
*/
|
||||
@Override
|
||||
FindProperty findProperty(final String key, final boolean deep, final ScriptObject start) {
|
||||
protected FindProperty findProperty(final String key, final boolean deep, final ScriptObject start) {
|
||||
// We call findProperty on 'expression' with 'expression' itself as start parameter.
|
||||
// This way in ScriptObject.setObject we can tell the property is from a 'with' expression
|
||||
// (as opposed from another non-scope object in the proto chain such as Object.prototype).
|
||||
|
@ -145,9 +145,6 @@ final class ArrayCompiler extends Compiler {
|
||||
case TargetInfo.IS_EMPTY_MEM:
|
||||
addOpcode(OPCode.NULL_CHECK_END_MEMST);
|
||||
break;
|
||||
case TargetInfo.IS_EMPTY_REC:
|
||||
addOpcode(OPCode.NULL_CHECK_END_MEMST_PUSH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // switch
|
||||
|
@ -183,7 +183,6 @@ class ByteCodeMachine extends StackMachine {
|
||||
case OPCode.NULL_CHECK_START: opNullCheckStart(); continue;
|
||||
case OPCode.NULL_CHECK_END: opNullCheckEnd(); continue;
|
||||
case OPCode.NULL_CHECK_END_MEMST: opNullCheckEndMemST(); continue;
|
||||
case OPCode.NULL_CHECK_END_MEMST_PUSH: opNullCheckEndMemSTPush(); continue;
|
||||
|
||||
case OPCode.JUMP: opJump(); continue;
|
||||
case OPCode.PUSH: opPush(); continue;
|
||||
@ -1025,29 +1024,6 @@ class ByteCodeMachine extends StackMachine {
|
||||
}
|
||||
}
|
||||
|
||||
// USE_SUBEXP_CALL
|
||||
private void opNullCheckEndMemSTPush() {
|
||||
final int mem = code[ip++]; /* mem: null check id */
|
||||
|
||||
int isNull;
|
||||
if (Config.USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT) {
|
||||
isNull = nullCheckMemStRec(mem, s);
|
||||
} else {
|
||||
isNull = nullCheckRec(mem, s);
|
||||
}
|
||||
|
||||
if (isNull != 0) {
|
||||
if (Config.DEBUG_MATCH) {
|
||||
Config.log.println("NULL_CHECK_END_MEMST_PUSH: skip id:" + mem + ", s:" + s);
|
||||
}
|
||||
|
||||
if (isNull == -1) {opFail(); return;}
|
||||
nullCheckFound();
|
||||
} else {
|
||||
pushNullCheckEnd(mem);
|
||||
}
|
||||
}
|
||||
|
||||
private void opJump() {
|
||||
ip += code[ip] + 1;
|
||||
}
|
||||
|
@ -19,7 +19,6 @@
|
||||
*/
|
||||
package jdk.nashorn.internal.runtime.regexp.joni;
|
||||
|
||||
import static jdk.nashorn.internal.runtime.regexp.joni.BitStatus.bsAt;
|
||||
import java.lang.ref.WeakReference;
|
||||
import jdk.nashorn.internal.runtime.regexp.joni.constants.StackPopLevel;
|
||||
import jdk.nashorn.internal.runtime.regexp.joni.constants.StackType;
|
||||
@ -369,118 +368,9 @@ abstract class StackMachine extends Matcher implements StackType {
|
||||
}
|
||||
}
|
||||
|
||||
protected final int nullCheckRec(final int id, final int s) {
|
||||
int level = 0;
|
||||
int k = stk;
|
||||
while (true) {
|
||||
k--;
|
||||
final StackEntry e = stack[k];
|
||||
|
||||
if (e.type == NULL_CHECK_START) {
|
||||
if (e.getNullCheckNum() == id) {
|
||||
if (level == 0) {
|
||||
return e.getNullCheckPStr() == s ? 1 : 0;
|
||||
}
|
||||
level--;
|
||||
}
|
||||
} else if (e.type == NULL_CHECK_END) {
|
||||
level++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected final int nullCheckMemSt(final int id, final int s) {
|
||||
int k = stk;
|
||||
int isNull;
|
||||
while (true) {
|
||||
k--;
|
||||
StackEntry e = stack[k];
|
||||
|
||||
if (e.type == NULL_CHECK_START) {
|
||||
if (e.getNullCheckNum() == id) {
|
||||
if (e.getNullCheckPStr() != s) {
|
||||
isNull = 0;
|
||||
break;
|
||||
}
|
||||
int endp;
|
||||
isNull = 1;
|
||||
while (k < stk) {
|
||||
if (e.type == MEM_START) {
|
||||
if (e.getMemEnd() == INVALID_INDEX) {
|
||||
isNull = 0;
|
||||
break;
|
||||
}
|
||||
if (bsAt(regex.btMemEnd, e.getMemNum())) {
|
||||
endp = stack[e.getMemEnd()].getMemPStr();
|
||||
} else {
|
||||
endp = e.getMemEnd();
|
||||
}
|
||||
if (stack[e.getMemStart()].getMemPStr() != endp) {
|
||||
isNull = 0;
|
||||
break;
|
||||
} else if (endp != s) {
|
||||
isNull = -1; /* empty, but position changed */
|
||||
}
|
||||
}
|
||||
k++;
|
||||
e = stack[k]; // !!
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return isNull;
|
||||
}
|
||||
|
||||
protected final int nullCheckMemStRec(final int id, final int s) {
|
||||
int level = 0;
|
||||
int k = stk;
|
||||
int isNull;
|
||||
while (true) {
|
||||
k--;
|
||||
StackEntry e = stack[k];
|
||||
|
||||
if (e.type == NULL_CHECK_START) {
|
||||
if (e.getNullCheckNum() == id) {
|
||||
if (level == 0) {
|
||||
if (e.getNullCheckPStr() != s) {
|
||||
isNull = 0;
|
||||
break;
|
||||
}
|
||||
int endp;
|
||||
isNull = 1;
|
||||
while (k < stk) {
|
||||
if (e.type == MEM_START) {
|
||||
if (e.getMemEnd() == INVALID_INDEX) {
|
||||
isNull = 0;
|
||||
break;
|
||||
}
|
||||
if (bsAt(regex.btMemEnd, e.getMemNum())) {
|
||||
endp = stack[e.getMemEnd()].getMemPStr();
|
||||
} else {
|
||||
endp = e.getMemEnd();
|
||||
}
|
||||
if (stack[e.getMemStart()].getMemPStr() != endp) {
|
||||
isNull = 0;
|
||||
break;
|
||||
} else if (endp != s) {
|
||||
isNull = -1; /* empty, but position changed */
|
||||
}
|
||||
}
|
||||
k++;
|
||||
e = stack[k];
|
||||
}
|
||||
break;
|
||||
}
|
||||
level--;
|
||||
}
|
||||
} else if (e.type == NULL_CHECK_END) {
|
||||
if (e.getNullCheckNum() == id) {
|
||||
level++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return isNull;
|
||||
// Return -1 here to cause operation to fail
|
||||
return -nullCheck(id, s);
|
||||
}
|
||||
|
||||
protected final int getRepeat(final int id) {
|
||||
|
@ -24,5 +24,4 @@ public interface TargetInfo {
|
||||
final int ISNOT_EMPTY = 0;
|
||||
final int IS_EMPTY = 1;
|
||||
final int IS_EMPTY_MEM = 2;
|
||||
final int IS_EMPTY_REC = 3;
|
||||
}
|
||||
|
45
nashorn/test/script/basic/JDK-8073868.js
Normal file
45
nashorn/test/script/basic/JDK-8073868.js
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 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-8073868: Regex matching causes java.lang.ArrayIndexOutOfBoundsException: 64
|
||||
*
|
||||
* @test
|
||||
* @run
|
||||
*/
|
||||
|
||||
function test(input) {
|
||||
var comma = input.indexOf(",");
|
||||
Assert.assertEquals(/([^\s]+),(.*)+/.exec(input)[0], input.trimLeft());
|
||||
Assert.assertEquals(/([^\s]+),(.*)+/.exec(input)[1], input.substring(0, comma).trimLeft());
|
||||
Assert.assertEquals(/([^\s]+),(.*)+/.exec(input)[2], input.substring(comma + 1));
|
||||
Assert.assertEquals(/(.*)+/.exec(input)[0], input);
|
||||
Assert.assertEquals(/(.*)+/.exec(input)[1], input);
|
||||
}
|
||||
|
||||
test(" xxxx, xxx xxxxxx xxxxxxxxx xxxxxxx, xxxx xxxxx xxxxx ");
|
||||
test(" xxxx, xxx xxxxxx xxxxxxxxx xxxxxxx, xxxx xxxxx xxxxx ");
|
||||
test("x, xxxxxxxxxx xxxxxxxxx xxxxxxx, xxxx xxxxx xxxxx ");
|
||||
|
||||
Assert.assertEquals(/(?:\1a|())*/.exec("a")[0], "a");
|
||||
Assert.assertEquals(/(?:\1a|())*/.exec("a")[1], undefined);
|
@ -96,3 +96,9 @@ function f() {
|
||||
f();
|
||||
|
||||
print(typeof a, typeof b, typeof c, typeof x, typeof z);
|
||||
|
||||
let v = 1;
|
||||
eval("print('v: ' + v); v = 2; print ('v: ' + v);");
|
||||
print("this.v: " + this.v);
|
||||
print("v: " + v);
|
||||
|
||||
|
@ -14,3 +14,7 @@ c: 0
|
||||
2 1 0
|
||||
2 1 0 undefined
|
||||
undefined undefined undefined undefined undefined
|
||||
v: 1
|
||||
v: 2
|
||||
this.v: undefined
|
||||
v: 2
|
||||
|
@ -29,8 +29,8 @@
|
||||
* @security
|
||||
*/
|
||||
|
||||
var Window = Java.type("jdk.nashorn.api.scripting.Window");
|
||||
var WindowEventHandler = Java.type("jdk.nashorn.api.scripting.WindowEventHandler");
|
||||
var Window = Java.type("jdk.nashorn.api.scripting.test.Window");
|
||||
var WindowEventHandler = Java.type("jdk.nashorn.api.scripting.test.WindowEventHandler");
|
||||
|
||||
var w = new Window();
|
||||
|
||||
|
@ -28,6 +28,6 @@
|
||||
* @run
|
||||
*/
|
||||
|
||||
load("classpath:jdk/nashorn/internal/runtime/resources/load_test.js")
|
||||
load("classpath:jdk/nashorn/internal/runtime/test/resources/load_test.js")
|
||||
|
||||
Assert.assertEquals(loadedFunc("hello"), "HELLO");
|
||||
|
@ -1 +1 @@
|
||||
jdk.nashorn.api.NashornSQLDriver
|
||||
jdk.nashorn.api.test.NashornSQLDriver
|
||||
|
@ -23,8 +23,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.internal.dynalink.beans;
|
||||
package jdk.internal.dynalink.beans.test;
|
||||
|
||||
import jdk.internal.dynalink.beans.BeansLinker;
|
||||
import jdk.nashorn.test.models.ClassLoaderAware;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.AssertJUnit.assertFalse;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.AssertJUnit.assertTrue;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import java.util.HashMap;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.AssertJUnit.assertTrue;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.AssertJUnit.assertTrue;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.AssertJUnit.assertTrue;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.internal.junit.ArrayAsserts.assertArrayEquals;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
public class Person {
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import javax.script.Invocable;
|
||||
import javax.script.ScriptEngine;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.javaaccess;
|
||||
package jdk.nashorn.api.javaaccess.test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import static org.testng.internal.junit.ArrayAsserts.assertArrayEquals;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.fail;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
@ -36,6 +36,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Set;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
||||
import jdk.nashorn.api.scripting.AbstractJSObject;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
@ -22,7 +22,7 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
@ -35,6 +35,8 @@ import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
import javax.script.SimpleBindings;
|
||||
import javax.script.SimpleScriptContext;
|
||||
import jdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
import jdk.nashorn.api.scripting.URLReader;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import static org.testng.Assert.fail;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
@ -32,6 +32,8 @@ import java.lang.reflect.Proxy;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
import jdk.nashorn.api.scripting.ClassFilter;
|
||||
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
@ -51,6 +51,7 @@ import javax.script.ScriptEngineFactory;
|
||||
import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
import javax.script.SimpleScriptContext;
|
||||
import jdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
@ -541,7 +542,7 @@ public class ScriptEngineTest {
|
||||
final ScriptEngineManager m = new ScriptEngineManager();
|
||||
final ScriptEngine e = m.getEngineByName("nashorn");
|
||||
e.eval("obj = { foo: 'hello' }");
|
||||
e.put("Window", e.eval("Packages.jdk.nashorn.api.scripting.Window"));
|
||||
e.put("Window", e.eval("Packages.jdk.nashorn.api.scripting.test.Window"));
|
||||
assertEquals(e.eval("Window.funcJSObject(obj)"), "hello");
|
||||
assertEquals(e.eval("Window.funcScriptObjectMirror(obj)"), "hello");
|
||||
assertEquals(e.eval("Window.funcMap(obj)"), "hello");
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
@ -41,6 +41,8 @@ import javax.script.ScriptContext;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptEngineManager;
|
||||
import javax.script.ScriptException;
|
||||
import jdk.nashorn.api.scripting.JSObject;
|
||||
import jdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
public interface VariableArityTestInterface {
|
@ -23,10 +23,12 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
import java.util.Map;
|
||||
import javax.script.Bindings;
|
||||
import jdk.nashorn.api.scripting.JSObject;
|
||||
import jdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
public class Window {
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api.scripting;
|
||||
package jdk.nashorn.api.scripting.test;
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
public interface WindowEventHandler {
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.api;
|
||||
package jdk.nashorn.api.test;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Driver;
|
@ -22,13 +22,16 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package jdk.nashorn.api.tree;
|
||||
package jdk.nashorn.api.tree.test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import jdk.nashorn.api.tree.Parser;
|
||||
import jdk.nashorn.api.tree.SimpleTreeVisitorES5_1;
|
||||
import jdk.nashorn.api.tree.Tree;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.codegen;
|
||||
package jdk.nashorn.internal.codegen.test;
|
||||
|
||||
import static jdk.nashorn.internal.runtime.Source.readFully;
|
||||
import static jdk.nashorn.internal.runtime.Source.sourceFor;
|
@ -23,11 +23,12 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.parser;
|
||||
package jdk.nashorn.internal.parser.test;
|
||||
|
||||
import static jdk.nashorn.internal.runtime.Source.readFully;
|
||||
import static jdk.nashorn.internal.runtime.Source.sourceFor;
|
||||
import java.io.File;
|
||||
import jdk.nashorn.internal.parser.Parser;
|
||||
import jdk.nashorn.internal.runtime.Context;
|
||||
import jdk.nashorn.internal.runtime.ErrorManager;
|
||||
import jdk.nashorn.internal.runtime.Source;
|
@ -23,8 +23,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime.regexp.joni;
|
||||
package jdk.nashorn.internal.runtime.regexp.joni.test;
|
||||
|
||||
import jdk.nashorn.internal.runtime.regexp.joni.Regex;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
@ -23,8 +23,11 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime.regexp;
|
||||
package jdk.nashorn.internal.runtime.regexp.test;
|
||||
|
||||
import jdk.nashorn.internal.runtime.regexp.RegExp;
|
||||
import jdk.nashorn.internal.runtime.regexp.RegExpFactory;
|
||||
import jdk.nashorn.internal.runtime.regexp.RegExpMatcher;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
import static org.testng.Assert.assertTrue;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static org.testng.Assert.fail;
|
||||
import java.io.File;
|
@ -22,7 +22,7 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertFalse;
|
@ -23,8 +23,9 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import jdk.nashorn.internal.runtime.ConsString;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.testng.annotations.Test;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static jdk.nashorn.internal.runtime.Source.sourceFor;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
@ -31,6 +31,12 @@ import static org.testng.Assert.assertTrue;
|
||||
import static org.testng.Assert.fail;
|
||||
import java.util.Map;
|
||||
import jdk.nashorn.internal.objects.Global;
|
||||
import jdk.nashorn.internal.runtime.Context;
|
||||
import jdk.nashorn.internal.runtime.ErrorManager;
|
||||
import jdk.nashorn.internal.runtime.ScriptFunction;
|
||||
import jdk.nashorn.internal.runtime.ScriptObject;
|
||||
import jdk.nashorn.internal.runtime.ScriptRuntime;
|
||||
import jdk.nashorn.internal.runtime.Source;
|
||||
import jdk.nashorn.internal.runtime.options.Options;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.fail;
|
||||
@ -34,6 +34,8 @@ import java.io.ObjectOutputStream;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptException;
|
||||
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
|
||||
import jdk.nashorn.internal.runtime.RewriteException;
|
||||
import jdk.nashorn.internal.runtime.UnwarrantedOptimismException;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
@ -23,8 +23,10 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import jdk.nashorn.internal.runtime.JSType;
|
||||
import jdk.nashorn.internal.runtime.ScriptRuntime;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
import static org.testng.Assert.assertTrue;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
|
||||
import org.testng.annotations.Test;
|
@ -22,7 +22,7 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static org.testng.Assert.fail;
|
||||
import java.io.ByteArrayOutputStream;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static jdk.nashorn.internal.runtime.Source.sourceFor;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
@ -36,6 +36,7 @@ import java.io.Reader;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import jdk.nashorn.api.scripting.URLReader;
|
||||
import jdk.nashorn.internal.runtime.Source;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package jdk.nashorn.internal.runtime;
|
||||
package jdk.nashorn.internal.runtime.test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
@ -36,6 +36,7 @@ import javax.script.ScriptException;
|
||||
import javax.script.SimpleScriptContext;
|
||||
import jdk.nashorn.api.scripting.ClassFilter;
|
||||
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
|
||||
import jdk.nashorn.internal.runtime.Version;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
Loading…
Reference in New Issue
Block a user