8067636: ant javadoc target is broken

Reviewed-by: hannesw, lagergren
This commit is contained in:
Athijegannathan Sundararajan 2014-12-16 14:06:32 +05:30
parent 49252804f2
commit f73717b021
9 changed files with 98 additions and 9 deletions

View File

@ -209,7 +209,7 @@
</target>
<target name="javadoc" depends="jar">
<javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html"
<javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
additionalparam="-quiet" failonerror="true">
<classpath>

View File

@ -24,7 +24,7 @@
application.title=nashorn
# location of JDK embedded ASM sources
jdk.asm.src.dir=../jdk/src/share/classes/jdk/internal/org/objectweb/asm
jdk.asm.src.dir=../jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm
# source and target levels
build.compiler=modern

View File

@ -40,7 +40,6 @@ if (!$OPTIONS._fx) {
var ChangeListener = Java.type("javafx.beans.value.ChangeListener");
var Scene = Java.type("javafx.scene.Scene");
var WebView = Java.type("javafx.scene.web.WebView");
var EventListener = Java.type("org.w3c.dom.events.EventListener");
// JavaFX start method
function start(stage) {

View File

@ -0,0 +1,89 @@
#// Usage: jjs -fx time_color.js [-- true/false]
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
*
* 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 Oracle nor the names of its
* 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 THE COPYRIGHT OWNER OR
* CONTRIBUTORS 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.
*/
// A simple javafx program that changes background color
// of scene based on current time value (once per sec).
// inspired by http://whatcolourisit.scn9a.org/
if (!$OPTIONS._fx) {
print("Usage: jjs -fx time_color.js");
print(" jjs -fx time_color.js -- true");
exit(1);
}
// JavaFX classes used
var Color = Java.type("javafx.scene.paint.Color");
var Group = Java.type("javafx.scene.Group");
var Label = Java.type("javafx.scene.control.Label");
var Platform = Java.type("javafx.application.Platform");
var Scene = Java.type("javafx.scene.Scene");
var Timer = Java.type("java.util.Timer");
// execute function periodically once per given time in millisec
function setInterval(func, ms) {
// New timer, run as daemon so the application can quit
var timer = new Timer("setInterval", true);
timer.schedule(function() Platform.runLater(func), ms, ms);
return timer;
}
// do you want to flip hour/min/sec for RGB?
var flip = arguments.length > 0? "true".equals(arguments[0]) : false;
// JavaFX start method
function start(stage) {
start.title = "Time Color";
var root = new Group();
var label = new Label("time");
label.textFill = Color.WHITE;
root.children.add(label);
stage.scene = new Scene(root, 700, 500);
setInterval(function() {
var d = new Date();
var hours = d.getHours();
var mins = d.getMinutes();
var secs = d.getSeconds();
if (hours < 10) hours = "0" + hours;
if (mins < 10) mins = "0" + mins;
if (secs < 10) secs = "0" + secs;
var hex = flip?
"#" + secs + mins + hours : "#" + hours + mins + secs;
label.text = "Color: " + hex;
stage.scene.fill = Color.web(hex);
}, 1000);
stage.show();
}

View File

@ -67,7 +67,7 @@ import jdk.nashorn.internal.runtime.logging.DebugLogger;
import jdk.nashorn.internal.runtime.options.Options;
/**
* Static utility that encapsulates persistence of type information for functions compiled with optimistic
* <p>Static utility that encapsulates persistence of type information for functions compiled with optimistic
* typing. With this feature enabled, when a JavaScript function is recompiled because it gets deoptimized,
* the type information for deoptimization is stored in a cache file. If the same function is compiled in a
* subsequent JVM invocation, the type information is used for initial compilation, thus allowing the system
@ -83,6 +83,7 @@ import jdk.nashorn.internal.runtime.options.Options;
* {@code nashorn.typeInfo.cleanupDelaySeconds} system property. You can also specify the word
* {@code unlimited} as the value for {@code nashorn.typeInfo.maxFiles} in which case the type info cache is
* allowed to grow without limits.
* </p>
*/
public final class OptimisticTypesPersistence {
// Default is 0, for disabling the feature when not specified. A reasonable default when enabled is

View File

@ -86,7 +86,7 @@ public interface CodeInstaller<T> {
* @param source the script source
* @param mainClassName the main class name
* @param classBytes map of class names to class bytes
* @param initializers compilation id -> FunctionInitializer map
* @param initializers compilation id -&gt; FunctionInitializer map
* @param constants constants array
* @param compilationId compilation id
*/

View File

@ -180,10 +180,10 @@ public enum JSType {
/** Div exact wrapper for potentially integer division that turns into float point */
public static final Call DIV_EXACT_LONG = staticCall(JSTYPE_LOOKUP, JSType.class, "divExact", long.class, long.class, long.class, int.class);
/** Div zero wrapper for long division that handles (0/0) >>> 0 == 0 */
/** Div zero wrapper for long division that handles (0/0) &gt;&gt;&gt; 0 == 0 */
public static final Call DIV_ZERO_LONG = staticCall(JSTYPE_LOOKUP, JSType.class, "divZero", long.class, long.class, long.class);
/** Mod zero wrapper for long division that handles (0%0) >>> 0 == 0 */
/** Mod zero wrapper for long division that handles (0%0) &gt;&gt;&gt; 0 == 0 */
public static final Call REM_ZERO_LONG = staticCall(JSTYPE_LOOKUP, JSType.class, "remZero", long.class, long.class, long.class);
/** Mod exact wrapper for potentially integer remainders that turns into float point */

View File

@ -58,7 +58,7 @@ public final class StoredScript implements Serializable {
* @param compilationId compilation id
* @param mainClassName main class name
* @param classBytes map of class names to class bytes
* @param initializers initializer map, id -> FunctionInitializer
* @param initializers initializer map, id -&gt; FunctionInitializer
* @param constants constants array
*/
public StoredScript(final int compilationId, final String mainClassName, final Map<String, byte[]> classBytes, final Map<Integer, FunctionInitializer> initializers, final Object[] constants) {

View File

@ -275,7 +275,7 @@ public abstract class ArrayData {
/**
* Align an array size up to the nearest array chunk size
* @param size size required
* @return size given, always >= size
* @return size given, always &gt;= size
*/
protected final static int alignUp(final int size) {
return size + CHUNK_SIZE - 1 & ~(CHUNK_SIZE - 1);