flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [01/10] git commit: [flex-falcon] [refs/heads/develop] - Something doesn't like the use of 'int' as a member of the 'Language' class, changed it to '_int'.
Date Fri, 01 Nov 2013 11:33:14 GMT
Updated Branches:
  refs/heads/develop 9a3f3d990 -> a351366c8


Something doesn't like the use of 'int' as a member of the 'Language' class, changed it to
'_int'.

Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: a351366c8eb7074d47209a43726297286efa0f94
Parents: 1d2d36c
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Fri Nov 1 12:16:18 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Fri Nov 1 12:32:58 2013 +0100

----------------------------------------------------------------------
 .../js/flexjs/TestFlexJSGlobalFunctions.java       |  2 +-
 .../codegen/js/flexjs/JSFlexJSEmitter.java         | 17 +++++++++++------
 .../codegen/js/flexjs/JSFlexJSEmitterTokens.java   |  1 +
 3 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a351366c/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
index cbb9ee4..8391625 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalFunctions.java
@@ -53,7 +53,7 @@ public class TestFlexJSGlobalFunctions extends TestGoogGlobalFunctions
     {
         IVariableNode node = getVariable("var a:int = int(1.8);");
         asBlockWalker.visitVariable(node);
-        assertOut("var /** @type {number} */ a = org.apache.flex.utils.Language.int(1.8)");
+        assertOut("var /** @type {number} */ a = org.apache.flex.utils.Language._int(1.8)");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a351366c/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index 60460fc..944185e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -282,13 +282,18 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             }
             else if (!isClassCast)
             {
-                if (def != null &&
-                    (def.getBaseName().equals(IASGlobalFunctionConstants._int) ||
-                    def.getBaseName().equals(IASGlobalFunctionConstants.trace) ||
-                    def.getBaseName().equals(IASGlobalFunctionConstants.uint)))
+                if (def != null)
                 {
-                    write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
-                    write(ASEmitterTokens.MEMBER_ACCESS);
+                    boolean isInt = def.getBaseName().equals(IASGlobalFunctionConstants._int);
+                    if (isInt ||
+                        def.getBaseName().equals(IASGlobalFunctionConstants.trace) ||
+                        def.getBaseName().equals(IASGlobalFunctionConstants.uint))
+                    {
+                        write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
+                        write(ASEmitterTokens.MEMBER_ACCESS);
+                        if (isInt)
+                            write(JSFlexJSEmitterTokens.UNDERSCORE);                    
   
+                    }
                 }
                 getWalker().walk(node.getNameNode());
                 write(ASEmitterTokens.PAREN_OPEN);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a351366c/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
index 85c8d7a..dfa254c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitterTokens.java
@@ -27,6 +27,7 @@ import org.apache.flex.compiler.codegen.IEmitterTokens;
 public enum JSFlexJSEmitterTokens implements IEmitterTokens
 {
     LANGUAGE_QNAME("org.apache.flex.utils.Language"),
+    UNDERSCORE("_"),
     ;
 
     private String token;


Mime
View raw message