[Laszlo-checkins] r9267 - openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc

dda@openlaszlo.org dda at openlaszlo.org
Wed May 21 19:34:09 PDT 2008


Author: dda
Date: 2008-05-21 19:34:01 -0700 (Wed, 21 May 2008)
New Revision: 9267

Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
Log:
Change 20080521-dda-6 by dda at lester.local on 2008-05-21 18:18:47 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc3
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Remove file line number in front of function declarations

New Features:

Bugs Fixed: nexb ticket #522, LPP-5784

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

Documentation:

Release Notes:

Details:
    Unconditionally removed file/line number in front of function declarations,
    it is not needed.  The nameFunctions option still turns on line numbering.

    This change is minimal - removing the use of 'force' line numbers would
    allow some cleanup and simplification to take place.  Another time.

Tests:
    (smokecheck+weather+lzpix) x (swf8+dhtml)
    Compared generated .js libs before and after and compared to verify
      the function file/lines are gone.
    Looked at output from nexb522.lzx to see that the reported problem is gone.



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	2008-05-22 01:00:47 UTC (rev 9266)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java	2008-05-22 02:34:01 UTC (rev 9267)
@@ -747,12 +747,7 @@
     } else {
       return defaultVisitor(node, children);
     }
-    String txt = "";
-    // Add location information if not compressing
-    if ((!this.compress) && (node.filename != null) && (node.beginLine != 0)) {
-      txt = annotateFileLineNumber(Compiler.getLocationString(node), true);
-    }
-    txt += "function" + (useName ? (" " + name) : "") + OPENPAREN + args + CLOSEPAREN;
+    String txt = "function" + (useName ? (" " + name) : "") + OPENPAREN + args + CLOSEPAREN;
     if (!inmixin) {
       txt += makeBlock(body);
     }
@@ -1027,6 +1022,9 @@
   //
   public String annotateFileLineNumber(String fileLineNumber, boolean force
 ) {
+    // TODO: [2008-05-21 dda] FORCE no longer needed, it
+    // and all it implies could be removed
+
     char op = force ? ANNOTATE_OP_FILE_LINENUM_FORCE : ANNOTATE_OP_FILE_LINENUM;
     return makeAnnotation(op, fileLineNumber);
   }



More information about the Laszlo-checkins mailing list