[Laszlo-checkins] r13105 - in openlaszlo/trunk/WEB-INF/lps: lfc/data lfc/debugger/platform/swf lfc/debugger/platform/swf9 lfc/helpers lfc/kernel/dhtml lfc/kernel/swf lfc/kernel/swf9 lfc/services lfc/views server/sc/src/org/openlaszlo/sc server/src/org/openlaszlo/sc

dda@openlaszlo.org dda at openlaszlo.org
Sat Feb 28 07:18:29 PST 2009


Author: dda
Date: 2009-02-28 07:18:20 -0800 (Sat, 28 Feb 2009)
New Revision: 13105

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as
   openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
   openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
Log:
Change 20090225-dda-V by dda at lester-2.local on 2009-02-25 16:39:47 EST
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-b
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: do not drop 'void' return types

New Features:

Bugs Fixed: [LPP-7789] SWF9: void return-type dropped

Technical Reviewer: ptw (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
  Parser.jjt
    Fixed a mistake that was setting the return type in the AST to null for any function declared as "void".
    Null really means 'no return type specified' and must be distinguished from simply "void".
    "void" is now set as the return type in the AST.  Since this effectively 'enables' :void
    return types to appear in SWF9, this gave a small ripple effect in the lfc as detailed below.
    
  LzReplicationManager.lzs
  LzDatapointer.lzs
  LzDatapath.lzs
    for override functions destroy(), construct(), setSelected(), $lzc$set_datapath(),
    the :void return type has been removed to be compatible with the function it overrides.
    This amounts to no change for anyone calling or overriding these functions,
    given that the bug's previous behavior was to effectively remove :void

  services/LzBrowser.lzs
  */LzBrowserKernel.lzs
    according to the doc callJS() 'optionally' returns a value (the DHTML version does), so its :void
    return type has been changed to :*.  Again, no discernable change to the user, and it now matches its
    documentation.

  LzDataSelectionManager.lzs
  LzSelectionManager.lzs
    public functions unselect(),clearSelection(),select() now have :void return type removed.
    Some of these may be overridden (without return types) by components.

  swf9/LzDebug.as
  swf/LzDebug.as
    added :void to displayResult() to match LzDebugService.  This function is marked private in doc,
    so users should not be overriding this, and should be unaware of the change.

  LaszloView.lzs
  LaszloCanvas.lzs
    added :void to __LZinstantiationDone() to match LzNode.  This function is also marked private in doc,
    so users should not be overriding this, and should be unaware of the change.

  ParseTreePrinter.java
    Fixed an informational message triggered by the -SS flag to lzc, so the exact filename generated for
    for debugging line annotations is shown.
    

Tests:
    Andre's test case now gives the proper error message.
 
    {smokecheck,weather,lzpix} x {swf8,swf9,dhtml}



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -1,7 +1,7 @@
 /**
   * LzDatapath.lzs
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic LFC
@@ -254,7 +254,7 @@
 }
 
 /** @access private */
-override function construct ( v , args ) :void {
+override function construct ( v , args ){
     this.rerunxpath = true; // Defined in LzDatapointer
 
     super.construct.apply(this, arguments);
@@ -669,7 +669,7 @@
 /**
   * @access private
   */
-override function setSelected (torf) :void {
+override function setSelected (torf) /* :void */ {
     this.p.sel = torf;
     this.sel = torf;
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapointer.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -1450,7 +1450,7 @@
 }
 
 /** @access private */
-override function destroy () :void {
+override function destroy () {
     this.__LZsetTracking( null );
     if ( this.errorDel ) this.errorDel.unregisterAll();
     if ( this.timeoutDel ) this.timeoutDel.unregisterAll();

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -726,7 +726,7 @@
   * @deprecated Use setAttribute('datapath', ...) instead.
   * @access private
   */
-override function $lzc$set_datapath(xp) :void {
+override function $lzc$set_datapath(xp) /*:void*/ {
     this.setXPath(xp);
 }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as	2009-02-28 15:18:20 UTC (rev 13105)
@@ -161,7 +161,7 @@
    * compiled expression, so we have to put the "previous value's" in
    * _level0
    */
-  override function displayResult (result=(void 0)) {
+  final override function displayResult (result=(void 0)) : void {
     if (typeof(result) != 'undefined') {
       // Advance saved results if you have a new one
       if (result !== _level0['_']) {
@@ -293,7 +293,7 @@
 
 
 //* A_LZ_COPYRIGHT_BEGIN ******************************************************
-//* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.            *
+//* Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.            *
 //* Use is subject to license terms.                                          *
 //* A_LZ_COPYRIGHT_END ********************************************************
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as	2009-02-28 15:18:20 UTC (rev 13105)
@@ -3,7 +3,7 @@
 /*
  * Platform-specific DebugService
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
 
  */
@@ -92,7 +92,7 @@
    * compiled expression, so we have to put the "previous value's" in
   * _level0
    */
-  override function displayResult (result=(void 0)) {
+  final override function displayResult (result=(void 0)) : void {
     if (typeof(result) != 'undefined') {
       // Advance saved results if you have a new one
       if (result !== global._) {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -117,7 +117,7 @@
       * Unselect the given view
       * @param LzView o: The view to be unselected
       */
-    override function unselect (o /*:LzView*/) :void {
+    override function unselect (o /*:LzView*/) /*:void*/ {
         if (this.manager == null) this.manager = o.cloneManager;//try to get a cloneManager
 
         var sela:Array = this.selected;
@@ -192,7 +192,7 @@
       * Unselects everything that is currently selected and clears the selection
       * list
       */
-    override function clearSelection () :void {
+    override function clearSelection () /*:void*/ {
         var sela:Array = this.selected;
         this.selected = [];
         this.lastRangeStart = null;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -158,7 +158,7 @@
       * Called with a new member to be selected.
       * @param LzView o: The new element that got selected.
       */
-    function select (o /*:LzView*/) :void {
+    function select (o /*:LzView*/) /*:void*/ {
         if (this.isSelected( o ) && (this.toggle || this.isMultiSelect( o ))) {
             this.unselect( o );
         } else {
@@ -201,7 +201,7 @@
       * Unselects the given object.
       * @param LzView o: The object to make unselected
       */
-    function unselect (o /*:LzView*/) :void {
+    function unselect (o /*:LzView*/) /*:void*/ {
         var selh:Object = this.selectedHash;
         var sela:Array = this.selected;
         if (selh[ o.__LZUID ]) {
@@ -219,7 +219,7 @@
     /**
       * Unselects any selected objects.
       */
-    function clearSelection () :void {
+    function clearSelection () /*:void*/ {
         var sela:Array = this.selected;
         this.selected = [];
         this.selectedHash = {};

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzBrowserKernel.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -56,7 +56,7 @@
   * @param Function callback: Optional callback function to receive the return value of the javascript call
   * @param Optional arguments to call
   */
-static function callJS (methodname, callback) {
+static function callJS (methodname, callback) :* {
     var scope = null;
 
     var method = eval(methodname);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzBrowserKernel.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -48,7 +48,7 @@
   * @param Optional arguments to call
   */
 
-static function callJS (js, callback) {
+static function callJS (js, callback) :* {
     if (LzBrowserKernel.jsready != true) {
         LzBrowserKernel.__jslocked = true;
     }
@@ -61,7 +61,7 @@
             LzBrowserKernel.__jscallq.push(o);
             //Debug.write('queued', LzBrowserKernel.__jscallq.length, o); 
         }
-        return;
+        return null;
     }
 
     if (callback instanceof Function) {
@@ -79,6 +79,7 @@
     if (callback == false) {
         LzBrowserKernel._dequeueJS();
     }
+    return null;
 }
 
 /** @access private */ 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -52,7 +52,7 @@
   * Runs a Javascript method in the browser, returning the result  
   * @keywords flashspecific
   */
-static function callJS (...args) {
+static function callJS (...args) :* {
     var js = args[0];// String js: Browser javascript to execute
     var callback = args[1];
     //DojoExternalInterface.call.apply(null, args);
@@ -68,7 +68,7 @@
             LzBrowserKernel.__jscallq.push(o);
             //Debug.write('queued', LzBrowserKernel.__jscallq.length, o); 
         }
-        return;
+        return null;
     }
 
     LzBrowserKernel.__jscallback = callback;
@@ -82,6 +82,7 @@
     if (callback == false) {
         LzBrowserKernel._dequeueJS();
     }
+    return null;
 }
 
 /** @access private */ 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -98,11 +98,12 @@
      * @param Function callback: Optional callback function to receive the return value of the javascript call
      * @param * arguments to call the method with
      */
-    function callJS (methodname:String, callback:Function = null, args:* = null) :void {
+  function callJS (methodname:String, callback:Function = null, args:* = null) :* {
         try {
             return LzBrowserKernel.callJS.apply(null, arguments);
         } catch (e) {
             if ($debug) Debug.error('lz.Browser.callJS() failed:', e);
+            return null;
         }
     }
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -601,7 +601,7 @@
 /**
   * @access private
   */
-override function __LZinstantiationDone (){
+override function __LZinstantiationDone () : void {
 
     if (this.deferInit) {
         this.deferInit = false;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2009-02-28 15:18:20 UTC (rev 13105)
@@ -549,7 +549,7 @@
   * instantiating.
   * @access private
   */
-override function __LZinstantiationDone (){
+override function __LZinstantiationDone () : void {
     var vip:LzView = (this.immediateparent cast LzView);
     if (vip) {
         (vip).addSubview( this );

Modified: openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt	2009-02-28 15:18:20 UTC (rev 13105)
@@ -1,7 +1,7 @@
 /* ****************************************************************************
  * Parser.jjt
  *
- * Copyright (c) 2002-2008 Laszlo Systems, Inc.
+ * Copyright (c) 2002-2009 Laszlo Systems, Inc.
  * All Rights Reserved.
  *
  * This software is the proprietary information of Laszlo Systems, Inc.
@@ -732,7 +732,10 @@
 ASTIdentifier.Type TypeIdentifierOrVoid() #void : { ASTIdentifier.Type type = null; }
 {
   (
-    "void" {type = null;}
+    "void" {
+      type = new ASTIdentifier.Type();
+      type.typeName = "void";
+    }
   | type = TypeIdentifier()
   ) {
     return type;

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java	2009-02-28 14:35:05 UTC (rev 13104)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java	2009-02-28 15:18:20 UTC (rev 13105)
@@ -1242,8 +1242,8 @@
 
   public List makeTranslationUnits(String annotated, final SourceFileMap sources) {
     if (config.dumpLineAnnotationsFile != null) {
-      Compiler.emitFile(config.dumpLineAnnotationsFile, printableAnnotations(annotated));
-      System.err.println("Created " + config.dumpLineAnnotationsFile);
+      String newname = Compiler.emitFile(config.dumpLineAnnotationsFile, printableAnnotations(annotated));
+      System.err.println("Created " + newname);
     }
     if (Config.DEBUG_NODE_OUTPUT) {
       System.out.println("ANNOTATED OUTPUT:\n" + printableAnnotations(annotated));



More information about the Laszlo-checkins mailing list