8067636: ant javadoc target is broken
authorsundar
Tue, 16 Dec 2014 14:06:32 +0530
changeset 28126 9e60ca1ed968
parent 28125 118973efb1d3
child 28127 08a5e0d3248d
8067636: ant javadoc target is broken Reviewed-by: hannesw, lagergren
nashorn/make/build.xml
nashorn/make/project.properties
nashorn/samples/browser_dom.js
nashorn/samples/time_color.fx
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeInstaller.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSType.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java
--- a/nashorn/make/build.xml	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/make/build.xml	Tue Dec 16 14:06:32 2014 +0530
@@ -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>
--- a/nashorn/make/project.properties	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/make/project.properties	Tue Dec 16 14:06:32 2014 +0530
@@ -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
--- a/nashorn/samples/browser_dom.js	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/samples/browser_dom.js	Tue Dec 16 14:06:32 2014 +0530
@@ -40,7 +40,6 @@
 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) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/time_color.fx	Tue Dec 16 14:06:32 2014 +0530
@@ -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();
+}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Tue Dec 16 14:06:32 2014 +0530
@@ -67,7 +67,7 @@
 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 @@
  * {@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
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeInstaller.java	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeInstaller.java	Tue Dec 16 14:06:32 2014 +0530
@@ -86,7 +86,7 @@
      * @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
      */
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSType.java	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSType.java	Tue Dec 16 14:06:32 2014 +0530
@@ -180,10 +180,10 @@
     /** 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 */
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java	Tue Dec 16 14:06:32 2014 +0530
@@ -58,7 +58,7 @@
      * @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) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java	Mon Dec 15 12:32:34 2014 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java	Tue Dec 16 14:06:32 2014 +0530
@@ -275,7 +275,7 @@
     /**
      * 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);