This commit is contained in:
Lana Steuck 2016-08-11 17:02:59 +00:00
commit 09e772a9d7
7 changed files with 41 additions and 37 deletions

View File

@ -40,8 +40,8 @@ dist.javadoc.dir=${dist.dir}/javadoc
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=\

View File

@ -44,8 +44,8 @@ MODULESOURCEPATH := $(NASHORN_TOPDIR)/src/*/share/classes
$(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 @@ NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
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 := \

View File

@ -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>

View File

@ -51,9 +51,9 @@ build.zip=${build.dir}/nashorn.zip
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 @@ nashorn.shell.tool=jdk.nashorn.tools.Shell
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 @@ javac.test.classpath=\
${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

View File

@ -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 @@ public final class OptimisticTypesPersistence {
}
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 @@ public final class OptimisticTypesPersistence {
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() {

View File

@ -8,7 +8,7 @@ keys=intermittent randomness
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

View File

@ -51,7 +51,7 @@ if (! new File(jjsCmd).isFile()) {
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)");