Merge
This commit is contained in:
commit
19f9ce673f
@ -42,7 +42,7 @@
|
|||||||
destdir="${build.classes.dir}"
|
destdir="${build.classes.dir}"
|
||||||
debug="${javac.debug}"
|
debug="${javac.debug}"
|
||||||
includeantruntime="false" fork="true">
|
includeantruntime="false" fork="true">
|
||||||
<compilerarg value="-XaddExports:${nasgen.module.imports}"/>
|
<compilerarg line="${nasgen.module.imports}"/>
|
||||||
<compilerarg value="-Xlint:unchecked"/>
|
<compilerarg value="-Xlint:unchecked"/>
|
||||||
<compilerarg value="-Xlint:deprecation"/>
|
<compilerarg value="-Xlint:deprecation"/>
|
||||||
<compilerarg value="-XDignore.symbol.file"/>
|
<compilerarg value="-XDignore.symbol.file"/>
|
||||||
|
@ -40,8 +40,8 @@ dist.javadoc.dir=${dist.dir}/javadoc
|
|||||||
javac.debug=true
|
javac.debug=true
|
||||||
|
|
||||||
nasgen.module.imports=\
|
nasgen.module.imports=\
|
||||||
java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED,\
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
||||||
java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
|
||||||
|
|
||||||
meta.inf.dir=${src.dir}/META-INF
|
meta.inf.dir=${src.dir}/META-INF
|
||||||
run.classpath=\
|
run.classpath=\
|
||||||
|
@ -76,9 +76,10 @@ NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
|
|||||||
ifeq ($(BOOT_JDK_MODULAR), true)
|
ifeq ($(BOOT_JDK_MODULAR), true)
|
||||||
NASGEN_OPTIONS := \
|
NASGEN_OPTIONS := \
|
||||||
-cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
|
-cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
|
||||||
-Xpatch:$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
|
-Xpatch:java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
|
||||||
-XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
||||||
-XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
|
||||||
|
#
|
||||||
else
|
else
|
||||||
NASGEN_OPTIONS := \
|
NASGEN_OPTIONS := \
|
||||||
-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes
|
-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<pathelement location="${basedir}/jcov2/lib/jcov_j2se_rt.jar"/>
|
<pathelement location="${basedir}/jcov2/lib/jcov_j2se_rt.jar"/>
|
||||||
<pathelement location="${basedir}/buildtools/nasgen/dist/nasgen.jar"/>
|
<pathelement location="${basedir}/buildtools/nasgen/dist/nasgen.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
<jvmarg value="-XaddExports:${nasgen.module.imports}"/>
|
<jvmarg line="${nasgen.module.imports}"/>
|
||||||
<arg value="${nashorn.module.classes.dir}"/>
|
<arg value="${nashorn.module.classes.dir}"/>
|
||||||
<arg value="jdk.nashorn.internal.objects"/>
|
<arg value="jdk.nashorn.internal.objects"/>
|
||||||
<arg value="${nashorn.module.classes.dir}"/>
|
<arg value="${nashorn.module.classes.dir}"/>
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
<path id="nashorn.jar.path">
|
<path id="nashorn.jar.path">
|
||||||
<pathelement location="${nashorn.jar}"/>
|
<pathelement location="${nashorn.jar}"/>
|
||||||
</path>
|
</path>
|
||||||
<property name="nashorn.override.option" value="-Xpatch:${build.classes.dir}"/>
|
|
||||||
<condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
|
<condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
|
||||||
<available file="/usr/local/bin/svn"/>
|
<available file="/usr/local/bin/svn"/>
|
||||||
</condition>
|
</condition>
|
||||||
@ -176,6 +175,10 @@
|
|||||||
<compilerarg value="-Xdiags:verbose"/>
|
<compilerarg value="-Xdiags:verbose"/>
|
||||||
<compilerarg value="-parameters"/>
|
<compilerarg value="-parameters"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
<!-- -Xpatch does not like module-info.class files! -->
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
|
||||||
|
</delete>
|
||||||
<javac srcdir="${nashorn.module.src.dir}"
|
<javac srcdir="${nashorn.module.src.dir}"
|
||||||
destdir="${nashorn.module.classes.dir}"
|
destdir="${nashorn.module.classes.dir}"
|
||||||
source="${javac.source}"
|
source="${javac.source}"
|
||||||
@ -187,8 +190,12 @@
|
|||||||
<compilerarg value="-XDignore.symbol.file"/>
|
<compilerarg value="-XDignore.symbol.file"/>
|
||||||
<compilerarg value="-Xdiags:verbose"/>
|
<compilerarg value="-Xdiags:verbose"/>
|
||||||
<compilerarg value="-parameters"/>
|
<compilerarg value="-parameters"/>
|
||||||
<compilerarg value="${nashorn.override.option}"/>
|
<compilerarg line="${nashorn.override.option}"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
<!-- -Xpatch does not like module-info.class files! -->
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
|
||||||
|
</delete>
|
||||||
<javac srcdir="${nashorn.shell.module.src.dir}"
|
<javac srcdir="${nashorn.shell.module.src.dir}"
|
||||||
destdir="${nashorn.shell.module.classes.dir}"
|
destdir="${nashorn.shell.module.classes.dir}"
|
||||||
source="${javac.source}"
|
source="${javac.source}"
|
||||||
@ -200,7 +207,7 @@
|
|||||||
<compilerarg value="-XDignore.symbol.file"/>
|
<compilerarg value="-XDignore.symbol.file"/>
|
||||||
<compilerarg value="-Xdiags:verbose"/>
|
<compilerarg value="-Xdiags:verbose"/>
|
||||||
<compilerarg value="-parameters"/>
|
<compilerarg value="-parameters"/>
|
||||||
<compilerarg value="${nashorn.override.option}"/>
|
<compilerarg line="${nashorn.override.option}"/>
|
||||||
</javac>
|
</javac>
|
||||||
<!-- -Xpatch does not like module-info.class files! -->
|
<!-- -Xpatch does not like module-info.class files! -->
|
||||||
<delete>
|
<delete>
|
||||||
@ -348,11 +355,11 @@
|
|||||||
debug="${javac.debug}"
|
debug="${javac.debug}"
|
||||||
encoding="${javac.encoding}"
|
encoding="${javac.encoding}"
|
||||||
includeantruntime="false" fork="true">
|
includeantruntime="false" fork="true">
|
||||||
<compilerarg value="${nashorn.override.option}"/>
|
<compilerarg line="${nashorn.override.option}"/>
|
||||||
<compilerarg value="-Xlint:unchecked"/>
|
<compilerarg value="-Xlint:unchecked"/>
|
||||||
<compilerarg value="-Xlint:deprecation"/>
|
<compilerarg value="-Xlint:deprecation"/>
|
||||||
<compilerarg value="-Xdiags:verbose"/>
|
<compilerarg value="-Xdiags:verbose"/>
|
||||||
<compilerarg value="-XaddExports:${test.module.imports}"/>
|
<compilerarg line="${test.module.imports}"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<copy todir="${build.test.classes.dir}/META-INF/services">
|
<copy todir="${build.test.classes.dir}/META-INF/services">
|
||||||
|
@ -47,6 +47,11 @@ build.classes.dir=${build.dir}/classes
|
|||||||
build.zip=${build.dir}/nashorn.zip
|
build.zip=${build.dir}/nashorn.zip
|
||||||
build.gzip=${build.dir}/nashorn.tar.gz
|
build.gzip=${build.dir}/nashorn.tar.gz
|
||||||
|
|
||||||
|
nashorn.override.option=\
|
||||||
|
-Xpatch:jdk.scripting.nashorn=${build.classes.dir}/jdk.scripting.nashorn \
|
||||||
|
-Xpatch:jdk.scripting.nashorn.shell=${build.classes.dir}/jdk.scripting.nashorn.shell \
|
||||||
|
-Xpatch:jdk.dynalink=${build.classes.dir}/jdk.dynalink
|
||||||
|
|
||||||
# project directory of <nashorn> ant task
|
# project directory of <nashorn> ant task
|
||||||
nashorntask.dir=buildtools/nashorntask
|
nashorntask.dir=buildtools/nashorntask
|
||||||
|
|
||||||
@ -57,8 +62,8 @@ nashorn.shell.tool=jdk.nashorn.tools.Shell
|
|||||||
nasgen.tool=jdk.nashorn.internal.tools.nasgen.Main
|
nasgen.tool=jdk.nashorn.internal.tools.nasgen.Main
|
||||||
|
|
||||||
nasgen.module.imports=\
|
nasgen.module.imports=\
|
||||||
java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED,\
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
||||||
java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
|
||||||
|
|
||||||
# parallel test runner tool
|
# parallel test runner tool
|
||||||
parallel.test.runner=jdk.nashorn.internal.test.framework.ParallelTestRunner
|
parallel.test.runner=jdk.nashorn.internal.test.framework.ParallelTestRunner
|
||||||
@ -132,19 +137,19 @@ javac.test.classpath=\
|
|||||||
${file.reference.snakeyaml.jar}
|
${file.reference.snakeyaml.jar}
|
||||||
|
|
||||||
test.module.imports=\
|
test.module.imports=\
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.objects=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.objects=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime.events=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.events=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime.options=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.options=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED \
|
||||||
jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED,\
|
-XaddExports:jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED \
|
||||||
java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
|
-XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
|
||||||
|
|
||||||
meta.inf.dir=${nashorn.module.src.dir}/META-INF
|
meta.inf.dir=${nashorn.module.src.dir}/META-INF
|
||||||
|
|
||||||
@ -342,8 +347,8 @@ run.test.user.country=TR
|
|||||||
|
|
||||||
run.test.jvmargs.common=\
|
run.test.jvmargs.common=\
|
||||||
-server \
|
-server \
|
||||||
-XaddExports:${test.module.imports} \
|
${test.module.imports} \
|
||||||
-Xpatch:${build.classes.dir} \
|
${nashorn.override.option} \
|
||||||
-Dfile.encoding=UTF-8 \
|
-Dfile.encoding=UTF-8 \
|
||||||
-Duser.language=${run.test.user.language} \
|
-Duser.language=${run.test.user.language} \
|
||||||
-Duser.country=${run.test.user.country} \
|
-Duser.country=${run.test.user.country} \
|
||||||
|
@ -8,4 +8,7 @@ keys=intermittent randomness
|
|||||||
groups=TEST.groups
|
groups=TEST.groups
|
||||||
|
|
||||||
# Minimum jtreg version
|
# Minimum jtreg version
|
||||||
requiredVersion=4.2 b01
|
requiredVersion=4.2 b02
|
||||||
|
|
||||||
|
# Use new form of -Xpatch
|
||||||
|
useNewXpatch=true
|
||||||
|
36
nashorn/test/script/basic/JDK-8144711.js
Normal file
36
nashorn/test/script/basic/JDK-8144711.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016, 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-8144711: (x) => x + 1 causes Assertion failure instead of SyntaxError
|
||||||
|
*
|
||||||
|
* @test
|
||||||
|
* @run
|
||||||
|
*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
eval("(x) => x + 1");
|
||||||
|
throw new Error ("should not reach here");
|
||||||
|
} catch (e) {
|
||||||
|
Assert.assertTrue(e instanceof SyntaxError);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user