flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshtynj...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - compiler-jx: static getters and setters use @expose instead of @export because @export does not work in the release build with ADVANCED_OPTIMIZATIONS
Date Sat, 28 May 2016 21:08:18 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop b3708662c -> fc4e3af9f


compiler-jx: static getters and setters use @expose instead of @export because @export does
not work in the release build with ADVANCED_OPTIMIZATIONS


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

Branch: refs/heads/develop
Commit: fc4e3af9f772ab586a75950afce9cc284878c3ff
Parents: b370866
Author: Josh Tynjala <joshtynjala@gmail.com>
Authored: Sat May 28 14:08:08 2016 -0700
Committer: Josh Tynjala <joshtynjala@gmail.com>
Committed: Sat May 28 14:08:08 2016 -0700

----------------------------------------------------------------------
 .../flex/compiler/internal/codegen/js/jx/AccessorEmitter.java  | 6 +++++-
 .../internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java  | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fc4e3af9/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AccessorEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AccessorEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AccessorEmitter.java
index 7440462..5e7aa50 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AccessorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/AccessorEmitter.java
@@ -340,7 +340,11 @@ public class AccessorEmitter extends JSSubEmitter implements
                         propName);
                 IGetterNode getterNode = p.getter;
                 ISetterNode setterNode = p.setter;
-                writeNewline("/** @export */");
+                // @expose is supposed to be deprecated, so this isn't ideal,
+                // but @export and/or @nocollapse were not working in a release
+                // build with ADVANCED_OPTIMIZATIONS, so I don't know what else
+                // to do. maybe it's a bug in closure compiler... -JT
+                writeNewline("/** @expose */");
                 if (getterNode != null)
                 {
                     startMapping(getterNode);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fc4e3af9/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
index 58769fe..b00d31e 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
@@ -86,7 +86,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     	IClassNode node = (IClassNode) getNode("public static function get foo():int{return
-1;}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A,
/** @lends {FalconTest_A} */ {\n/** @export */\nfoo: {\nget: function() {\n  return -1;\n}}}\n);");
+        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A,
/** @lends {FalconTest_A} */ {\n/** @expose */\nfoo: {\nget: function() {\n  return -1;\n}}}\n);");
     }
 
     @Override
@@ -136,7 +136,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     	IClassNode node = (IClassNode) getNode("public static function set foo(value:int):void{}",
         		IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A,
/** @lends {FalconTest_A} */ {\n/** @export */\nfoo: {\nset: function(value) {\n}}}\n);");
+        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};Object.defineProperties(FalconTest_A,
/** @lends {FalconTest_A} */ {\n/** @expose */\nfoo: {\nset: function(value) {\n}}}\n);");
     }
 
     @Test


Mime
View raw message