--- a/nashorn/buildtools/nasgen/project.properties Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/buildtools/nasgen/project.properties Thu Aug 11 17:02:59 2016 +0000
@@ -40,8 +40,8 @@
javac.debug=true
nasgen.module.imports=\
- -XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
- -XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
+ --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
+ --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
meta.inf.dir=${src.dir}/META-INF
run.classpath=\
--- a/nashorn/make/BuildNashorn.gmk Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/make/BuildNashorn.gmk Thu Aug 11 17:02:59 2016 +0000
@@ -44,8 +44,8 @@
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
- FLAGS := -g -source 9 -target 9 -upgrademodulepath "$(JDK_OUTPUTDIR)/modules/" \
- -system none -modulesourcepath "$(MODULESOURCEPATH)", \
+ FLAGS := -g -source 9 -target 9 --upgrade-module-path "$(JDK_OUTPUTDIR)/modules/" \
+ --system none --module-source-path "$(MODULESOURCEPATH)", \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
@@ -76,9 +76,9 @@
ifeq ($(BOOT_JDK_MODULAR), true)
NASGEN_OPTIONS := \
-cp $(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.util=ALL-UNNAMED \
+ --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
+ --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
+ --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
#
else
NASGEN_OPTIONS := \
--- a/nashorn/make/build.xml Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/make/build.xml Thu Aug 11 17:02:59 2016 +0000
@@ -178,7 +178,7 @@
<compilerarg value="-Xdiags:verbose"/>
<compilerarg value="-parameters"/>
</javac>
- <!-- -Xpatch does not like module-info.class files! -->
+ <!-- patch-module does not like module-info.class files! -->
<delete>
<fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
</delete>
@@ -195,7 +195,7 @@
<compilerarg value="-parameters"/>
<compilerarg line="${nashorn.override.option}"/>
</javac>
- <!-- -Xpatch does not like module-info.class files! -->
+ <!-- patch-module does not like module-info.class files! -->
<delete>
<fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
</delete>
@@ -212,7 +212,7 @@
<compilerarg value="-parameters"/>
<compilerarg line="${nashorn.override.option}"/>
</javac>
- <!-- -Xpatch does not like module-info.class files! -->
+ <!-- patch-module does not like module-info.class files! -->
<delete>
<fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
</delete>
@@ -266,7 +266,7 @@
<javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
windowtitle="${nashorn.product.name} ${nashorn.version}"
additionalparam="-quiet" failonerror="true" useexternalfile="true">
- <arg value="-modulesourcepath"/>
+ <arg value="--module-source-path"/>
<arg value="${basedir}/src/*/share/classes"/>
<arg value="${javadoc.option}"/>
<classpath>
@@ -285,7 +285,7 @@
<javadoc destdir="${dist.nashornapi.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
additionalparam="-quiet" failonerror="true" useexternalfile="true">
- <arg value="-modulesourcepath"/>
+ <arg value="--module-source-path"/>
<arg value="${basedir}/src/*/share/classes"/>
<arg value="${javadoc.option}"/>
<classpath>
@@ -302,7 +302,7 @@
<javadoc destdir="${dist.dynalinkapi.javadoc.dir}" use="yes"
windowtitle="Dynalink"
additionalparam="-quiet" failonerror="true" useexternalfile="true">
- <arg value="-modulesourcepath"/>
+ <arg value="--module-source-path"/>
<arg value="${basedir}/src/*/share/classes"/>
<arg value="${javadoc.option}"/>
<classpath>
--- a/nashorn/make/project.properties Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/make/project.properties Thu Aug 11 17:02:59 2016 +0000
@@ -51,9 +51,9 @@
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
+ --patch-module jdk.scripting.nashorn=${build.classes.dir}/jdk.scripting.nashorn \
+ --patch-module jdk.scripting.nashorn.shell=${build.classes.dir}/jdk.scripting.nashorn.shell \
+ --patch-module jdk.dynalink=${build.classes.dir}/jdk.dynalink
# project directory of <nashorn> ant task
nashorntask.dir=buildtools/nashorntask
@@ -65,8 +65,8 @@
nasgen.tool=jdk.nashorn.internal.tools.nasgen.Main
nasgen.module.imports=\
- -XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
- -XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
+ --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
+ --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
# parallel test runner tool
parallel.test.runner=jdk.nashorn.internal.test.framework.ParallelTestRunner
@@ -142,19 +142,19 @@
${file.reference.snakeyaml.jar}
test.module.imports=\
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.objects=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.events=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.options=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED \
- -XaddExports:jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED \
- -XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.objects=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.events=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.options=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED \
+ --add-exports jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED \
+ --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
meta.inf.dir=${nashorn.module.src.dir}/META-INF
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java Thu Aug 11 17:02:59 2016 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -324,6 +324,8 @@
}
versionDir.mkdirs();
if (versionDir.isDirectory()) {
+ //FIXME:Logger is disabled as Context.getContext() always returns null here because global scope object will not be created
+ //by the time this method gets invoked
getLogger().info("Optimistic type persistence directory is " + versionDir);
return versionDir;
}
@@ -450,10 +452,12 @@
private static DebugLogger getLogger() {
try {
return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
+ } catch (final NullPointerException e) {
+ //Don't print stacktrace until we revisit this, NPE is a known issue here
} catch (final Exception e) {
e.printStackTrace();
- return DebugLogger.DISABLED_LOGGER;
}
+ return DebugLogger.DISABLED_LOGGER;
}
private static void scheduleCleanup() {
--- a/nashorn/test/TEST.ROOT Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/test/TEST.ROOT Thu Aug 11 17:02:59 2016 +0000
@@ -8,7 +8,7 @@
groups=TEST.groups
# Minimum jtreg version
-requiredVersion=4.2 b02
+requiredVersion=4.2 b03
-# Use new form of -Xpatch
-useNewXpatch=true
+# Use new module options
+useNewOptions=true
--- a/nashorn/test/script/currently-failing/JDK-8055034.js Thu Aug 11 15:47:10 2016 +0000
+++ b/nashorn/test/script/currently-failing/JDK-8055034.js Thu Aug 11 17:02:59 2016 +0000
@@ -51,7 +51,7 @@
jjsCmd = javahome + "/bin/jjs";
jjsCmd = jjsCmd.toString().replace(/\//g, File.separator);
}
-jjsCmd += " -J-Xpatch:" + nashornJar;
+jjsCmd += " -J--patch-module=jdk.scripting.nashorn=" + nashornJar;
$ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin
$EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)");