You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/03/22 00:16:22 UTC

[3/3] git commit: Fix some issues in FalconJS

Fix some issues in FalconJS


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/5a049b0c
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/5a049b0c
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/5a049b0c

Branch: refs/heads/master
Commit: 5a049b0cd3208004fb8b846286a46bf5f4816daa
Parents: 9118470
Author: Alex Harui <ah...@apache.org>
Authored: Thu Mar 21 16:15:55 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Mar 21 16:15:55 2013 -0700

----------------------------------------------------------------------
 compiler.js/bin/mxmlc                              |    2 +-
 .../internal/as/codegen/JSGeneratingReducer.java   |   16 +++++++++++++++
 .../compiler/internal/graph/GoogDepsWriter.java    |    2 +
 3 files changed, 19 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5a049b0c/compiler.js/bin/mxmlc
----------------------------------------------------------------------
diff --git a/compiler.js/bin/mxmlc b/compiler.js/bin/mxmlc
index efc970d..53a655d 100755
--- a/compiler.js/bin/mxmlc
+++ b/compiler.js/bin/mxmlc
@@ -25,9 +25,9 @@
 # In Windows Command Prompt, use mxmlc.bat instead.
 #
 
+SCRIPT_HOME=`dirname $0`
 if [ "x${FALCON_HOME}" = "x" ]
 then
-    SCRIPT_HOME=`dirname $0`
     FALCON_HOME=${SCRIPT_HOME}/../../compiler
 fi
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5a049b0c/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
----------------------------------------------------------------------
diff --git a/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java b/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
index 79c5425..b3fde25 100644
--- a/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
+++ b/compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSGeneratingReducer.java
@@ -6160,6 +6160,22 @@ public class JSGeneratingReducer
          */
 
         // expression = string_constant
+        // (AJH) sometimes folded constants don't have quotes.
+        // Probably should be fixed somewhere else but hacking
+        // a solution here for now
+        if (string_constant.length() == 0)
+        {
+        	string_constant = "";
+        }
+        else
+        {
+        	char firstChar = string_constant.charAt(0);
+        	if (firstChar != '\"' && firstChar != '\'')
+        	{
+        		// missing quotes, add them
+        		string_constant = "\"" + string_constant + "\"";
+        	}
+        }
         result += string_constant;
 
         return result;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5a049b0c/compiler.js/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git a/compiler.js/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java b/compiler.js/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index 4a47155..497a8d4 100644
--- a/compiler.js/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler.js/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -262,6 +262,8 @@ public class GoogDepsWriter {
 		{
 			path = path.replace(outputFolderPath, "");
 		}
+		// paths are actually URIs and always have forward slashes
+		path = path.replace('\\', '/');
 		return ".." + path;
 	}
 	private class GoogDep