Author: ptw
Date: 2007-10-24 13:09:32 -0700 (Wed, 24 Oct 2007)
New Revision: 6993

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/build.xml
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
   
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
   openlaszlo/trunk/build.properties
Log:
Change 20071024-ptw-3 by [EMAIL PROTECTED] on 2007-10-24 15:15:44 EDT
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Build LFCdhtml-{debug,backtrace}-simple.js for 'simple' browsers

Bugs Fixed:
LPP-4607 'Add dhtml debug-simple-lfc.js for browsers that can't handle the 
regular debugger'

Technical Reviewer: max (verbal)
QA Reviewer: henry (pending)

Details:
    Renamed debugSafari to debugSimple and set the LFC build to build
    the requisite versions.

Tests:
    ant make generates the new LFC's



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/build.xml
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/build.xml  2007-10-24 19:34:04 UTC (rev 
6992)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/build.xml  2007-10-24 20:09:32 UTC (rev 
6993)
@@ -151,6 +151,7 @@
 
     var buildDebug = lfc.getProperty("build.lfc.runtime.debug");
     var buildProfile = lfc.getProperty("build.lfc.runtime.profile");
+    var buildDebugSimple = lfc.getProperty("build.lfc.runtime.debug.simple");
     var LFCdir = lfc.getProperty("LFCdir") + '/';
 
     importPackage(java.io);
@@ -161,22 +162,42 @@
         dobuild(plain, "dhtml", "");
       }
       if (buildDebug) {
-        var debug = LFCdir + "LFCdhtml-debug.js";
-        if (!(new File(debug)).exists()) {
+        var dest = LFCdir + "LFCdhtml-debug.js";
+        if (!(new File(dest)).exists()) {
           // TODO: [2006-06-07 ptw] (LPP-2034) When the LFC is 'clean' of
           // warnings, the options can be changed to simply --debug
-          dobuild(debug,
+          dobuild(dest,
                   "dhtml",
                   "--option nameFunctions --option warnGlobalAssignments 
'-D$debug=true'");
         }
-        var backtrace = LFCdir + "LFCdhtml-backtrace.js";
-        if (!(new File(backtrace)).exists()) {
+        if (buildDebugSimple) {
+          var dest = LFCdir + "LFCdhtml-debug-simple.js";
+          if (!(new File(dest)).exists()) {
+            // TODO: [2006-06-07 ptw] (LPP-2034) When the LFC is 'clean' of
+            // warnings, the options can be changed to simply --debug
+            dobuild(dest,
+                    "dhtml",
+                    "--option debugSimple --option nameFunctions --option 
warnGlobalAssignments '-D$debug=true'");
+          }
+        }
+        var dest = LFCdir + "LFCdhtml-backtrace.js";
+        if (!(new File(dest)).exists()) {
           // TODO: [2006-06-07 ptw] (LPP-2034) When the LFC is 'clean' of
           // warnings, the options can be changed to simply -g3
-          dobuild(backtrace,
+          dobuild(dest,
                   "dhtml",
                   "--option debugBacktrace --option nameFunctions --option 
warnGlobalAssignments '-D$debug=true'");
         }
+        if (buildDebugSimple) {
+          var dest = LFCdir + "LFCdhtml-backtrace-simple.js";
+          if (!(new File(dest)).exists()) {
+            // TODO: [2006-06-07 ptw] (LPP-2034) When the LFC is 'clean' of
+            // warnings, the options can be changed to simply -g3
+            dobuild(dest,
+                    "dhtml",
+                    "--option debugSimple --option debugBacktrace --option 
nameFunctions --option warnGlobalAssignments '-D$debug=true'");
+          }
+        }
       }
       if (buildProfile) {
         var profile = LFCdir + "LFCdhtml-profile.js";
@@ -199,19 +220,19 @@
           dobuild(plain, "swf" + v, "");
         }
         if (buildDebug) {
-          var debug = LFCdir + "LFC" + v + "-debug.lzl";
-          if (!(new File(debug)).exists()) {
+          var dest = LFCdir + "LFC" + v + "-debug.lzl";
+          if (!(new File(dest)).exists()) {
             // TODO: [2006-06-07 ptw] (LPP-2034) When the LFC is 'clean' of
             // warnings, the options can be changed to simply --debug
-            dobuild(debug,
+            dobuild(dest,
                     "swf" + v,
                     "--option nameFunctions --option warnGlobalAssignments 
'-D$debug=true'");
           }
-          var backtrace = LFCdir + "LFC" + v + "-backtrace.lzl";
-          if (!(new File(backtrace)).exists()) {
+          var dest = LFCdir + "LFC" + v + "-backtrace.lzl";
+          if (!(new File(dest)).exists()) {
             // TODO: [2006-06-07 ptw] (LPP-2034) When the LFC is 'clean' of
             // warnings, the options can be changed to simply -g3
-            dobuild(backtrace,
+            dobuild(dest,
                     "swf" + v,
                     "--option debugBacktrace --option nameFunctions --option 
warnGlobalAssignments '-D$debug=true'");
           }

Modified: 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java     
2007-10-24 19:34:04 UTC (rev 6992)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java     
2007-10-24 20:09:32 UTC (rev 6993)
@@ -285,10 +285,11 @@
     if (options.getBoolean(DEBUG) ||
         options.getBoolean(NAME_FUNCTIONS)) {
       if (! options.containsKey(DEBUG_BACKTRACE)) {
-        options.put(DEBUG_BACKTRACE, Boolean.valueOf("false"));
+        options.putBoolean(DEBUG_BACKTRACE, false);
       }
-      // TODO: [2007-02-21 ptw] Remove after Leopard
-      options.put("debugSafari", LPS.getProperty("compiler.debug.safari", 
"false"));
+      if (! options.containsKey(DEBUG_SIMPLE)) {
+        options.putBoolean(DEBUG_SIMPLE, false);
+      }
     }
     if (! options.containsKey(PROFILE)) {
       options.putBoolean(PROFILE, false);
@@ -394,6 +395,7 @@
   public static String CONSTRAINT_FUNCTION = "constraintFunction";
   public static String DEBUG = "debug";
   public static String DEBUG_BACKTRACE = "debugBacktrace";
+  public static String DEBUG_SIMPLE = "debugSimple";
   public static String DISABLE_CONSTANT_POOL = "disableConstantPool";
   public static String ELIMINATE_DEAD_EXPRESSIONS = "eliminateDeadExpressions";
   public static String FLASH_COMPILER_COMPATABILITY = 
"flashCompilerCompatability";

Modified: 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
===================================================================
--- 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
  2007-10-24 19:34:04 UTC (rev 6992)
+++ 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
  2007-10-24 20:09:32 UTC (rev 6993)
@@ -1099,8 +1099,8 @@
       userFunctionName = functionName;
       if (! useName) {
         if ((! identifierPattern.matcher(functionName).matches())
-            // TODO: [2007-02-21 ptw] Remove after Leopard
-            || options.getBoolean("debugSafari")) {
+            // Some JS engines die if you name function expressions
+            || options.getBoolean(Compiler.DEBUG_SIMPLE)) {
           // This is a function-expression that has been annotated
           // with a non-legal function name, so remove that and put it
           // in _dbg_name (below)

Modified: openlaszlo/trunk/build.properties
===================================================================
--- openlaszlo/trunk/build.properties   2007-10-24 19:34:04 UTC (rev 6992)
+++ openlaszlo/trunk/build.properties   2007-10-24 20:09:32 UTC (rev 6993)
@@ -27,6 +27,7 @@
 
 # LFC variants to build
 build.lfc.runtime.debug = true
+build.lfc.runtime.debug.simple = true
 # build.lfc.runtime.krank = true
 build.lfc.runtime.profile = true
 


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to