You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/11/15 15:57:01 UTC

[1/8] git commit: [flex-falcon] [refs/heads/develop] - Add emission of 'name' and 'qName' metadata for every class

Updated Branches:
  refs/heads/develop 18634f079 -> 719e3ff3b


Add emission of 'name' and 'qName' metadata for every class

Signed-off-by: Erik de Bruin <er...@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/45ae7763
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/45ae7763
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/45ae7763

Branch: refs/heads/develop
Commit: 45ae77633be69ff358e702a20532d83efae307e5
Parents: 18634f0
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 08:58:57 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 08:58:57 2013 +0100

----------------------------------------------------------------------
 .../codegen/js/flexjs/JSFlexJSEmitter.java      | 68 ++++++++++++++------
 .../js/flexjs/JSFlexJSEmitterTokens.java        |  3 +
 2 files changed, 50 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/45ae7763/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 fe82860..721050a 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
@@ -1207,6 +1207,46 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         ITypeNode tnode = findTypeNode(definition.getNode());
         if (tnode != null)
         {
+            /*
+             * @const
+             * @type {Object.<string, Array.<Object>>}
+             */
+            writeNewline();
+            writeNewline();
+            writeNewline();
+            getDoc().begin();
+            getDoc().emitConst(null);
+            writeNewline(" * @type {Object.<string, Array.<Object>>}");
+            getDoc().end();
+
+            // a.B.prototype.AFJS_CLASS_INFO = {  };
+            write(type.getQualifiedName());
+            write(ASEmitterTokens.MEMBER_ACCESS);
+            write(JSEmitterTokens.PROTOTYPE);
+            write(ASEmitterTokens.MEMBER_ACCESS);
+            writeToken(JSFlexJSEmitterTokens.FLEXJS_CLASS_INFO);
+            writeToken(ASEmitterTokens.EQUAL);
+            writeToken(ASEmitterTokens.BLOCK_OPEN);
+            
+            // names: [{ name: '', qName: '' }]
+            write(JSFlexJSEmitterTokens.NAMES);
+            writeToken(ASEmitterTokens.COLON);
+            write(ASEmitterTokens.SQUARE_OPEN);
+            writeToken(ASEmitterTokens.BLOCK_OPEN);
+            write(JSFlexJSEmitterTokens.NAME);
+            writeToken(ASEmitterTokens.COLON);
+            write(ASEmitterTokens.SINGLE_QUOTE);
+            write(tnode.getName());
+            write(ASEmitterTokens.SINGLE_QUOTE);
+            writeToken(ASEmitterTokens.COMMA);
+            write(JSFlexJSEmitterTokens.QNAME);
+            writeToken(ASEmitterTokens.COLON);
+            write(ASEmitterTokens.SINGLE_QUOTE);
+            write(tnode.getQualifiedName());
+            write(ASEmitterTokens.SINGLE_QUOTE);
+            write(ASEmitterTokens.BLOCK_CLOSE);
+            write(ASEmitterTokens.SQUARE_CLOSE);
+
             IExpressionNode[] enodes;
             if (tnode instanceof IClassNode)
                 enodes = ((IClassNode) tnode).getImplementedInterfaceNodes();
@@ -1215,23 +1255,9 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             
             if (enodes.length > 0)
             {
-                writeNewline();
-                writeNewline();
-                writeNewline();
-                getDoc().begin();
-                getDoc().emitConst(null);
-                getDoc().end();
-    
-                // a.B.prototype.AFJS_CLASS_INFO = { interfaces: [a.IC, a.ID] };
-                write(type.getQualifiedName());
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                write(JSEmitterTokens.PROTOTYPE);
-                write(ASEmitterTokens.MEMBER_ACCESS);
-                writeToken(JSFlexJSEmitterTokens.FLEXJS_CLASS_INFO);
-                writeToken(ASEmitterTokens.EQUAL);
-                writeToken(ASEmitterTokens.BLOCK_OPEN);
-                
-                // interfaces
+                writeToken(ASEmitterTokens.COMMA);
+
+                // interfaces: [a.IC, a.ID]
                 write(JSFlexJSEmitterTokens.INTERFACES);
                 writeToken(ASEmitterTokens.COLON);
                 write(ASEmitterTokens.SQUARE_OPEN);
@@ -1244,11 +1270,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                     i++;
                 }
                 write(ASEmitterTokens.SQUARE_CLOSE);
-
-                write(ASEmitterTokens.SPACE);
-                write(ASEmitterTokens.BLOCK_CLOSE);
-                writeNewline(ASEmitterTokens.SEMICOLON);
             }
+
+            write(ASEmitterTokens.SPACE);
+            write(ASEmitterTokens.BLOCK_CLOSE);
+            writeNewline(ASEmitterTokens.SEMICOLON);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/45ae7763/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 53110c1..77fd33e 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
@@ -30,6 +30,9 @@ public enum JSFlexJSEmitterTokens implements IEmitterTokens
     INDENT("  "),
     INTERFACES("interfaces"),
     LANGUAGE_QNAME("org.apache.flex.utils.Language"),
+    NAME("name"),
+    NAMES("names"),
+    QNAME("qName"),
     UNDERSCORE("_"),
     ;
 


[5/8] git commit: [flex-falcon] [refs/heads/develop] - Correct emission of 'Metadata' JSDoc

Posted by er...@apache.org.
Correct emission of 'Metadata' JSDoc

Signed-off-by: Erik de Bruin <er...@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/40dddef5
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/40dddef5
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/40dddef5

Branch: refs/heads/develop
Commit: 40dddef50322c5ad58c742215d8b6bb08ed74415
Parents: 5152bec
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 15:15:29 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 15:15:29 2013 +0100

----------------------------------------------------------------------
 .../codegen/js/flexjs/JSFlexJSEmitter.java      |  6 ++++--
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  | 22 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/40dddef5/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 a756ab4..b300c31 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
@@ -1220,14 +1220,16 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         if (tnode != null)
         {
             /*
-             * @const
+             * Metadata
+             * 
              * @type {Object.<string, Array.<Object>>}
              */
             writeNewline();
             writeNewline();
             writeNewline();
             getDoc().begin();
-            getDoc().emitConst(null);
+            writeNewline(" * Metadata");
+            writeNewline(" *");
             writeNewline(" * @type {Object.<string, Array.<Object>>}");
             getDoc().end();
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/40dddef5/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 4dfbf36..68bad5e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -155,6 +155,8 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         
         emitClassDeclEnd(cname, node);
 
+        emitMetaData(cdef);
+
         emitScripts();
 
         emitEvents(cname);
@@ -229,6 +231,26 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
 
     //--------------------------------------------------------------------------
 
+    protected void emitMetaData(IClassDefinition cdef)
+    {
+        String cname = cdef.getQualifiedName();
+        
+        writeNewline("/**");
+        writeNewline(" * Metadata");
+        writeNewline(" *");
+        writeNewline(" * @type {Object.<string, Array.<Object>>}");
+        writeNewline(" */");
+        write(cname + ".prototype.FLEXJS_CLASS_INFO = { names: [{ name: '");
+        write(cdef.getBaseName());
+        write("', qName: '");
+        write(cname);
+        writeNewline("' }] };");
+        writeNewline();
+        writeNewline();
+    }
+
+    //--------------------------------------------------------------------------
+
     protected void emitPropertyDecls()
     {
         for (MXMLDescriptorSpecifier instance : instances)


[4/8] git commit: [flex-falcon] [refs/heads/develop] - Change tests for new type coercion using 'as()'

Posted by er...@apache.org.
Change tests for new type coercion using 'as()'

Signed-off-by: Erik de Bruin <er...@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/5152bec8
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/5152bec8
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/5152bec8

Branch: refs/heads/develop
Commit: 5152bec862729236fe0efbd8b66ee9726d5177b1
Parents: b4a91ab
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 11:31:25 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 11:31:25 2013 +0100

----------------------------------------------------------------------
 .../codegen/js/flexjs/TestFlexJSExpressions.java        |  6 +++---
 .../test-files/flexjs/files/FlexJSTest_again_result.js  |  2 +-
 .../flexjs/files/controllers/MyController_result.js     | 12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5152bec8/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
index 19ba3b8..c378343 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
@@ -542,7 +542,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
 
         ((JSFlexJSEmitter)asEmitter).thisClass = def;
         asBlockWalker.visitBinaryOperator(bnode);
-        assertOut("this.model/** Cast to foo.bar.E */.set_labelText(null)");
+        assertOut("org.apache.flex.utils.Language.as(this.model, foo.bar.E, true).set_labelText(null)");
     }
 
     @Test
@@ -636,7 +636,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IClassNode node = (IClassNode) getNode("import spark.components.Button; public class B implements Button { public function B() { Button(b).label = ''; } }", ClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @implements {spark.components.Button}\n */\nB = function() {\n  b/** Cast to spark.components.Button */.set_label('');\n};");
+        assertOut("/**\n * @constructor\n * @implements {spark.components.Button}\n */\nB = function() {\n  org.apache.flex.utils.Language.as(b, spark.components.Button, true).set_label('');\n};");
     }
 
     @Test
@@ -644,7 +644,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){var foo:Object = FalconTest_A(bar).bar = '';}; public function get bar():Object { return this; };");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.foo = function() {\n  var /** @type {Object} */ foo = this.get_bar()/** Cast to FalconTest_A */.set_bar('');\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  var /** @type {Object} */ foo = org.apache.flex.utils.Language.as(this.get_bar(), FalconTest_A, true).set_bar('');\n}");
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5152bec8/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
index 098cbbe..9746f93 100644
--- a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
@@ -89,7 +89,7 @@ goog.inherits(FlexJSTest_again, org.apache.flex.core.Application);
  */
 FlexJSTest_again.prototype.$EH0 = function(event)
 {
-  this.model/** Cast to models.MyModel */.set_labelText('Hello World');
+  org.apache.flex.utils.Language.as(this.model, models.MyModel, true).set_labelText('Hello World');
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5152bec8/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
index 032f349..43a05d2 100644
--- a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
@@ -55,7 +55,7 @@ controllers.MyController.prototype.viewChangeHandler = function(event) {
  * @param {org.apache.flex.events.Event} event
  */
 controllers.MyController.prototype.buttonClickHandler = function(event) {
-  var /** @type {string} */ sym = this.app.initialView/** Cast to MyInitialView */.get_symbol();
+  var /** @type {string} */ sym = org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_symbol();
   this.app.get_service().set_url(this.queryBegin + sym + this.queryEnd);
   this.app.get_service().send();
   this.app.get_service().addEventListener("complete", goog.bind(this.completeHandler, this));
@@ -67,7 +67,7 @@ controllers.MyController.prototype.buttonClickHandler = function(event) {
  * @param {org.apache.flex.events.Event} event
  */
 controllers.MyController.prototype.completeHandler = function(event) {
-  this.app.model/** Cast to models.MyModel */.set_labelText(org.apache.flex.utils.Language.as(this.app.get_collection().getItemAt(0), String));
+  org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.get_collection().getItemAt(0), String));
 };
 
 
@@ -76,7 +76,7 @@ controllers.MyController.prototype.completeHandler = function(event) {
  * @param {org.apache.flex.events.Event} event
  */
 controllers.MyController.prototype.listChangedHandler = function(event) {
-  this.app.model/** Cast to models.MyModel */.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_symbol());
+  org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_symbol());
 };
 
 
@@ -85,7 +85,7 @@ controllers.MyController.prototype.listChangedHandler = function(event) {
  * @param {org.apache.flex.events.Event} event
  */
 controllers.MyController.prototype.cityListChangeHandler = function(event) {
-  this.app.model/** Cast to models.MyModel */.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_city());
+  org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_city());
 };
 
 
@@ -94,7 +94,7 @@ controllers.MyController.prototype.cityListChangeHandler = function(event) {
  * @param {org.apache.flex.events.Event} event
  */
 controllers.MyController.prototype.transferClickHandler = function(event) {
-  this.app.model/** Cast to models.MyModel */.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_inputText());
+  org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_inputText());
 };
 
 
@@ -103,7 +103,7 @@ controllers.MyController.prototype.transferClickHandler = function(event) {
  * @param {org.apache.flex.events.Event} event
  */
 controllers.MyController.prototype.comboBoxChangeHandler = function(event) {
-  this.app.model/** Cast to models.MyModel */.set_labelText(this.app.initialView/** Cast to MyInitialView */.get_comboBoxValue());
+  org.apache.flex.utils.Language.as(this.app.model, models.MyModel, true).set_labelText(org.apache.flex.utils.Language.as(this.app.initialView, MyInitialView, true).get_comboBoxValue());
 };
 
 


[8/8] git commit: [flex-falcon] [refs/heads/develop] - Changed tests to match the new 'Metadata' JSDoc header

Posted by er...@apache.org.
Changed tests to match the new 'Metadata' JSDoc header

Signed-off-by: Erik de Bruin <er...@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/719e3ff3
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/719e3ff3
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/719e3ff3

Branch: refs/heads/develop
Commit: 719e3ff3ba935f07e74c19956926eac5bb82c762
Parents: 9821b48
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 15:44:20 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 15:44:20 2013 +0100

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/TestFlexJSEmiter.java         | 6 +++---
 .../internal/codegen/js/flexjs/TestFlexJSPackage.java        | 8 ++++----
 .../internal/codegen/js/flexjs/TestFlexJSStatements.java     | 2 +-
 .../test-files/flexjs/files/FlexJSTest_again_result.js       | 8 ++++++++
 .../test-files/flexjs/files/LocalFunction_result.js          | 3 ++-
 .../test-files/flexjs/files/MyInitialView_result.js          | 8 ++++++++
 .../flexjs/files/controllers/MyController_result.js          | 3 ++-
 .../test-files/flexjs/files/models/MyModel_result.js         | 3 ++-
 .../test-files/flexjs/files/wildcard_import_result.js        | 8 ++++++++
 .../test-files/flexjs/projects/interfaces/Test_result.js     | 3 ++-
 .../flexjs/projects/interfaces/classes/A_result.js           | 3 ++-
 .../flexjs/projects/interfaces/classes/B_result.js           | 4 +++-
 .../flexjs/projects/interfaces/classes/C_result.js           | 3 ++-
 .../flexjs/projects/interfaces/interfaces/IA_result.js       | 3 ++-
 .../flexjs/projects/interfaces/interfaces/IB_result.js       | 3 ++-
 .../flexjs/projects/interfaces/interfaces/IC_result.js       | 3 ++-
 .../flexjs/projects/interfaces/interfaces/ID_result.js       | 3 ++-
 .../flexjs/projects/interfaces/interfaces/IE_result.js       | 3 ++-
 .../test-files/flexjs/projects/super/Base_result.js          | 3 ++-
 .../test-files/flexjs/projects/super/Super_result.js         | 3 ++-
 20 files changed, 61 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
index 3b79f54..1cf9b3b 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
@@ -54,7 +54,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
                 + "return \"Don't \" + _privateVar + value; }";
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('com.example.components.MyTextButton');\n\n\n\n/**\n * @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton = function() {\n  goog.base(this);\n  if (foo() != 42) {\n    bar();\n  }\n};\ngoog.inherits(com.example.components.MyTextButton, spark.components.Button);\n\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar = \"do \";\n\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty = 100;\n\n\n/**\n * @expose\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction = function(value) {\n  return \"Don't \" + this._privateVar + value;\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.MyTextButton.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyTextButton', qName: 'com.example.components.MyTextButton'}] };\n");
+        assertOut("goog.provide('com.example.components.MyTextButton');\n\n\n\n/**\n * @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton = function() {\n  goog.base(this);\n  if (foo() != 42) {\n    bar();\n  }\n};\ngoog.inherits(com.example.components.MyTextButton, spark.components.Button);\n\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar = \"do \";\n\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty = 100;\n\n\n/**\n * @expose\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction = function(value) {\n  return \"Don't \" + this._privateVar + value;\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.MyTextButton.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyTextButton', qName: 'com.example.components.MyTextButton'}] };\n");
     }
 
     @Override
@@ -65,7 +65,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
                 + "public interface TestInterface { } }";
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('com.example.components.TestInterface');\n\n\n\n/**\n * @interface\n */\ncom.example.components.TestInterface = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestInterface', qName: 'com.example.components.TestInterface'}] };\n");
+        assertOut("goog.provide('com.example.components.TestInterface');\n\n\n\n/**\n * @interface\n */\ncom.example.components.TestInterface = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestInterface', qName: 'com.example.components.TestInterface'}] };\n");
     }
 
     @Override
@@ -76,7 +76,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
                 + "public class TestClass { } }";
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('com.example.components.TestClass');\n\n\n\n/**\n * @constructor\n */\ncom.example.components.TestClass = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com.example.components.TestClass'}] };\n");
+        assertOut("goog.provide('com.example.components.TestClass');\n\n\n\n/**\n * @constructor\n */\ncom.example.components.TestClass = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com.example.components.TestClass'}] };\n");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
index 45c3c85..7d752fb 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
@@ -53,7 +53,7 @@ public class TestFlexJSPackage extends TestGoogPackage
 
         IFileNode node = compileAS("package {public class A{}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('A');\n\n\n\n/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'A'}] };\n");
+        assertOut("goog.provide('A');\n\n\n\n/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'A'}] };\n");
     }
 
     @Override
@@ -62,7 +62,7 @@ public class TestFlexJSPackage extends TestGoogPackage
     {
         IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
+        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
     }
 
     @Override
@@ -71,7 +71,7 @@ public class TestFlexJSPackage extends TestGoogPackage
     {
         IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
+        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
     }
 
     @Override
@@ -80,7 +80,7 @@ public class TestFlexJSPackage extends TestGoogPackage
     {
         IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n  if (a) {\n    for (var /** @type {Object} */ i in obj) {\n      doit();\n    }\n  }\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
+        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n  if (a) {\n    for (var /** @type {Object} */ i in obj) {\n      doit();\n    }\n  }\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
index fbadff8..c5edf17 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
@@ -424,7 +424,7 @@ public class TestFlexJSStatements extends TestGoogStatements
                         + "foo: for each(var i:int in obj) break foo;",
                 IFileNode.class);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('FalconTest_A');\n\n\n\n/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nFalconTest_A.prototype.falconTest_a = function() {\n  try {\n    a;\n  } catch (e) {\n    if (a) {\n      if (b) {\n        if (c)\n          b;\n        else if (f)\n          a;\n        else\n          e;\n      }\n    }\n  } finally {\n  }\n  if (d)\n    for (var /** @type {number} */ i = 0; i < len; i++)\n      break;\n  if (a) {\n    with (ab) {\n      c();\n    }\n    do {\n      a++;\n      do\n        a++;\n      while (a > b);\n    } while (c > d);\n  }\n  if (b) {\n    try {\n      a;\n      throw new Error('foo');\n    } catch (e) {\n      switch (i) {\n        case 1:\n          break;\n        default:\n          return;\n      }\n    } finally {\n      d;\n      var /** @type {Object} */ a = function(foo, bar) {\n        bar = typeof bar !== 'undefined' ? bar : 'goo';\n        return -1;\n      };\n      eee.dd;\n      eee.dd;\n      eee.dd;\n      e
 ee.dd;\n    }\n  }\n  foo : for (var foreachiter0 in obj) \n  {\n  var i = obj[foreachiter0];\n  \n    break foo;}\n  ;\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nFalconTest_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FalconTest_A', qName: 'FalconTest_A'}] };\n");
+        assertOut("goog.provide('FalconTest_A');\n\n\n\n/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nFalconTest_A.prototype.falconTest_a = function() {\n  try {\n    a;\n  } catch (e) {\n    if (a) {\n      if (b) {\n        if (c)\n          b;\n        else if (f)\n          a;\n        else\n          e;\n      }\n    }\n  } finally {\n  }\n  if (d)\n    for (var /** @type {number} */ i = 0; i < len; i++)\n      break;\n  if (a) {\n    with (ab) {\n      c();\n    }\n    do {\n      a++;\n      do\n        a++;\n      while (a > b);\n    } while (c > d);\n  }\n  if (b) {\n    try {\n      a;\n      throw new Error('foo');\n    } catch (e) {\n      switch (i) {\n        case 1:\n          break;\n        default:\n          return;\n      }\n    } finally {\n      d;\n      var /** @type {Object} */ a = function(foo, bar) {\n        bar = typeof bar !== 'undefined' ? bar : 'goo';\n        return -1;\n      };\n      eee.dd;\n      eee.dd;\n      eee.dd;\n      e
 ee.dd;\n    }\n  }\n  foo : for (var foreachiter0 in obj) \n  {\n  var i = obj[foreachiter0];\n  \n    break foo;}\n  ;\n};\n\n\n/**\n * Metadata\n *\n * @type {Object.<string, Array.<Object>>}\n */\nFalconTest_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FalconTest_A', qName: 'FalconTest_A'}] };\n");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
index 9746f93..2c3ff1f 100644
--- a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
@@ -84,6 +84,14 @@ goog.inherits(FlexJSTest_again, org.apache.flex.core.Application);
 
 
 /**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+FlexJSTest_again.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FlexJSTest_again', qName: 'FlexJSTest_again' }] };
+
+
+/**
  * @expose
  * @param {org.apache.flex.events.Event} event
  */

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
index 69b41a2..46e0fd3 100644
--- a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
@@ -37,7 +37,8 @@ LocalFunction.prototype.doIt = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 LocalFunction.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'LocalFunction', qName: 'LocalFunction'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
index c9f0920..6b305e9 100644
--- a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
@@ -179,6 +179,14 @@ goog.inherits(MyInitialView, org.apache.flex.core.ViewBase);
 
 
 /**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+MyInitialView.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyInitialView', qName: 'MyInitialView' }] };
+
+
+/**
  * @private
  * @type {org.apache.flex.utils.org.apache.flex.utils.Timer}
  */

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
index 43a05d2..84c38c3 100644
--- a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
@@ -120,7 +120,8 @@ controllers.MyController.prototype.setDocument = function(document, id) {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 controllers.MyController.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyController', qName: 'controllers.MyController'}], interfaces: [org.apache.flex.core.IDocument] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
index e05b83e..32bca77 100644
--- a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
@@ -73,7 +73,8 @@ models.MyModel.prototype.get_cities = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 models.MyModel.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyModel', qName: 'models.MyModel'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js b/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
index f9900ab..d82c257 100644
--- a/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/wildcard_import_result.js
@@ -28,6 +28,14 @@ goog.inherits(wildcard_import, org.apache.flex.core.Application);
 
 
 /**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+wildcard_import.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'wildcard_import', qName: 'wildcard_import' }] };
+
+
+/**
  * @private
  */
 wildcard_import.prototype.tmp = function() {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
index a0a92d4..a1ffd1e 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
@@ -20,7 +20,8 @@ goog.inherits(Test, classes.A);
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test'}], interfaces: [interfaces.IA, interfaces.IE] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
index f7737af..16dcb0f 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
@@ -15,7 +15,8 @@ goog.inherits(classes.A, classes.C);
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
index a7d250f..644202e 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
@@ -10,6 +10,8 @@ classes.B = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
  */
 classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
index a95f0d3..599a015 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
@@ -10,7 +10,8 @@ classes.C = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
index e36644d..c688372 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
@@ -13,7 +13,8 @@ interfaces.IA = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA'}], interfaces: [interfaces.IC] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
index 3262c47..e7cd439 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
@@ -10,7 +10,8 @@ interfaces.IB = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
index 2fd03a0..0b57f53 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
@@ -13,7 +13,8 @@ interfaces.IC = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC'}], interfaces: [interfaces.ID] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
index 8de5be3..a37ff63 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
@@ -10,7 +10,8 @@ interfaces.ID = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 interfaces.ID.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ID', qName: 'interfaces.ID'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
index 11b4eed..17849a0 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
@@ -10,7 +10,8 @@ interfaces.IE = function() {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 interfaces.IE.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IE', qName: 'interfaces.IE'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js b/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
index 716d5fe..ae64b48 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
@@ -38,7 +38,8 @@ Base.prototype.set_text = function(value) {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 Base.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Base', qName: 'Base'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/719e3ff3/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js b/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
index f7c0c4a..6d455b3 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
@@ -37,7 +37,8 @@ Super.prototype.set_text = function(value) {
 
 
 /**
- * @const
+ * Metadata
+ *
  * @type {Object.<string, Array.<Object>>}
  */
 Super.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Super', qName: 'Super'}] };


[2/8] git commit: [flex-falcon] [refs/heads/develop] - Adjusted tests for 'name' and 'qName' metadata

Posted by er...@apache.org.
Adjusted tests for 'name' and 'qName' metadata

Signed-off-by: Erik de Bruin <er...@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/d8936d91
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/d8936d91
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/d8936d91

Branch: refs/heads/develop
Commit: d8936d910043ed14e5636ef458c61d9adcca55f3
Parents: 45ae776
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 09:27:34 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 09:27:34 2013 +0100

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/TestFlexJSEmiter.java        | 6 +++---
 .../internal/codegen/js/flexjs/TestFlexJSPackage.java       | 8 ++++----
 .../internal/codegen/js/flexjs/TestFlexJSStatements.java    | 2 +-
 .../test-files/flexjs/files/LocalFunction_result.js         | 8 ++++++++
 .../flexjs/files/controllers/MyController_result.js         | 3 ++-
 .../test-files/flexjs/files/models/MyModel_result.js        | 8 ++++++++
 .../test-files/flexjs/projects/interfaces/Test_result.js    | 3 ++-
 .../flexjs/projects/interfaces/classes/A_result.js          | 7 +++++++
 .../flexjs/projects/interfaces/classes/B_result.js          | 6 ++++++
 .../flexjs/projects/interfaces/classes/C_result.js          | 7 +++++++
 .../flexjs/projects/interfaces/interfaces/IA_result.js      | 3 ++-
 .../flexjs/projects/interfaces/interfaces/IB_result.js      | 7 +++++++
 .../flexjs/projects/interfaces/interfaces/IC_result.js      | 3 ++-
 .../flexjs/projects/interfaces/interfaces/ID_result.js      | 7 +++++++
 .../flexjs/projects/interfaces/interfaces/IE_result.js      | 7 +++++++
 .../test-files/flexjs/projects/super/Base_result.js         | 7 +++++++
 .../test-files/flexjs/projects/super/Super_result.js        | 9 ++++++++-
 17 files changed, 88 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
index c2fa6c9..3b79f54 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSEmiter.java
@@ -54,7 +54,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
                 + "return \"Don't \" + _privateVar + value; }";
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('com.example.components.MyTextButton');\n\n\n\n/**\n * @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton = function() {\n  goog.base(this);\n  if (foo() != 42) {\n    bar();\n  }\n};\ngoog.inherits(com.example.components.MyTextButton, spark.components.Button);\n\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar = \"do \";\n\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty = 100;\n\n\n/**\n * @expose\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction = function(value) {\n  return \"Don't \" + this._privateVar + value;\n};");
+        assertOut("goog.provide('com.example.components.MyTextButton');\n\n\n\n/**\n * @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton = function() {\n  goog.base(this);\n  if (foo() != 42) {\n    bar();\n  }\n};\ngoog.inherits(com.example.components.MyTextButton, spark.components.Button);\n\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar = \"do \";\n\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty = 100;\n\n\n/**\n * @expose\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction = function(value) {\n  return \"Don't \" + this._privateVar + value;\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.MyTextButton.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyTextButton', qName: 'com.example.components.MyTextButton'}] };\n");
     }
 
     @Override
@@ -65,7 +65,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
                 + "public interface TestInterface { } }";
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('com.example.components.TestInterface');\n\n\n\n/**\n * @interface\n */\ncom.example.components.TestInterface = function() {\n};");
+        assertOut("goog.provide('com.example.components.TestInterface');\n\n\n\n/**\n * @interface\n */\ncom.example.components.TestInterface = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestInterface.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestInterface', qName: 'com.example.components.TestInterface'}] };\n");
     }
 
     @Override
@@ -76,7 +76,7 @@ public class TestFlexJSEmiter extends TestGoogEmiter
                 + "public class TestClass { } }";
         IFileNode node = compileAS(code);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('com.example.components.TestClass');\n\n\n\n/**\n * @constructor\n */\ncom.example.components.TestClass = function() {\n};");
+        assertOut("goog.provide('com.example.components.TestClass');\n\n\n\n/**\n * @constructor\n */\ncom.example.components.TestClass = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\ncom.example.components.TestClass.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'TestClass', qName: 'com.example.components.TestClass'}] };\n");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
index 79bc179..45c3c85 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSPackage.java
@@ -53,7 +53,7 @@ public class TestFlexJSPackage extends TestGoogPackage
 
         IFileNode node = compileAS("package {public class A{}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('A');\n\n\n\n/**\n * @constructor\n */\nA = function() {\n};");
+        assertOut("goog.provide('A');\n\n\n\n/**\n * @constructor\n */\nA = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'A'}] };\n");
     }
 
     @Override
@@ -62,7 +62,7 @@ public class TestFlexJSPackage extends TestGoogPackage
     {
         IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};");
+        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
     }
 
     @Override
@@ -71,7 +71,7 @@ public class TestFlexJSPackage extends TestGoogPackage
     {
         IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};");
+        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
     }
 
     @Override
@@ -80,7 +80,7 @@ public class TestFlexJSPackage extends TestGoogPackage
     {
         IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n  if (a) {\n    for (var /** @type {Object} */ i in obj) {\n      doit();\n    }\n  }\n};");
+        assertOut("goog.provide('foo.bar.baz.A');\n\n\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n  if (a) {\n    for (var /** @type {Object} */ i in obj) {\n      doit();\n    }\n  }\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nfoo.bar.baz.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'foo.bar.baz.A'}] };\n");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
index e0d6083..fbadff8 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSStatements.java
@@ -424,7 +424,7 @@ public class TestFlexJSStatements extends TestGoogStatements
                         + "foo: for each(var i:int in obj) break foo;",
                 IFileNode.class);
         asBlockWalker.visitFile(node);
-        assertOut("goog.provide('FalconTest_A');\n\n\n\n/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nFalconTest_A.prototype.falconTest_a = function() {\n  try {\n    a;\n  } catch (e) {\n    if (a) {\n      if (b) {\n        if (c)\n          b;\n        else if (f)\n          a;\n        else\n          e;\n      }\n    }\n  } finally {\n  }\n  if (d)\n    for (var /** @type {number} */ i = 0; i < len; i++)\n      break;\n  if (a) {\n    with (ab) {\n      c();\n    }\n    do {\n      a++;\n      do\n        a++;\n      while (a > b);\n    } while (c > d);\n  }\n  if (b) {\n    try {\n      a;\n      throw new Error('foo');\n    } catch (e) {\n      switch (i) {\n        case 1:\n          break;\n        default:\n          return;\n      }\n    } finally {\n      d;\n      var /** @type {Object} */ a = function(foo, bar) {\n        bar = typeof bar !== 'undefined' ? bar : 'goo';\n        return -1;\n      };\n      eee.dd;\n      eee.dd;\n      eee.dd;\n      e
 ee.dd;\n    }\n  }\n  foo : for (var foreachiter0 in obj) \n  {\n  var i = obj[foreachiter0];\n  \n    break foo;}\n  ;\n};");
+        assertOut("goog.provide('FalconTest_A');\n\n\n\n/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\nFalconTest_A.prototype.falconTest_a = function() {\n  try {\n    a;\n  } catch (e) {\n    if (a) {\n      if (b) {\n        if (c)\n          b;\n        else if (f)\n          a;\n        else\n          e;\n      }\n    }\n  } finally {\n  }\n  if (d)\n    for (var /** @type {number} */ i = 0; i < len; i++)\n      break;\n  if (a) {\n    with (ab) {\n      c();\n    }\n    do {\n      a++;\n      do\n        a++;\n      while (a > b);\n    } while (c > d);\n  }\n  if (b) {\n    try {\n      a;\n      throw new Error('foo');\n    } catch (e) {\n      switch (i) {\n        case 1:\n          break;\n        default:\n          return;\n      }\n    } finally {\n      d;\n      var /** @type {Object} */ a = function(foo, bar) {\n        bar = typeof bar !== 'undefined' ? bar : 'goo';\n        return -1;\n      };\n      eee.dd;\n      eee.dd;\n      eee.dd;\n      e
 ee.dd;\n    }\n  }\n  foo : for (var foreachiter0 in obj) \n  {\n  var i = obj[foreachiter0];\n  \n    break foo;}\n  ;\n};\n\n\n/**\n * @const\n * @type {Object.<string, Array.<Object>>}\n */\nFalconTest_A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'FalconTest_A', qName: 'FalconTest_A'}] };\n");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
index 9a7580b..69b41a2 100644
--- a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
@@ -34,3 +34,11 @@ LocalFunction.prototype.myMemberMethod = function(value) {
 LocalFunction.prototype.doIt = function() {
   this.myMemberMethod(624);
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+LocalFunction.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'LocalFunction', qName: 'LocalFunction'}] };
+

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
index 36d2f14..032f349 100644
--- a/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/controllers/MyController_result.js
@@ -121,6 +121,7 @@ controllers.MyController.prototype.setDocument = function(document, id) {
 
 /**
  * @const
+ * @type {Object.<string, Array.<Object>>}
  */
-controllers.MyController.prototype.FLEXJS_CLASS_INFO = { interfaces: [org.apache.flex.core.IDocument] };
+controllers.MyController.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyController', qName: 'controllers.MyController'}], interfaces: [org.apache.flex.core.IDocument] };
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
index c87ffe9..e05b83e 100644
--- a/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/models/MyModel_result.js
@@ -70,3 +70,11 @@ models.MyModel.prototype._cities = ["London", "Miami", "Paris", "Sydney", "Tokyo
 models.MyModel.prototype.get_cities = function() {
   return this._cities;
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+models.MyModel.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'MyModel', qName: 'models.MyModel'}] };
+

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
index ace15bb..a0a92d4 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/Test_result.js
@@ -21,5 +21,6 @@ goog.inherits(Test, classes.A);
 
 /**
  * @const
+ * @type {Object.<string, Array.<Object>>}
  */
-Test.prototype.FLEXJS_CLASS_INFO = { interfaces: [interfaces.IA, interfaces.IE] };
+Test.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Test', qName: 'Test'}], interfaces: [interfaces.IA, interfaces.IE] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
index 1df9f5d..f7737af 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/A_result.js
@@ -12,3 +12,10 @@ classes.A = function() {
   goog.base(this);
 };
 goog.inherits(classes.A, classes.C);
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.A.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'A', qName: 'classes.A'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
index 3dd8adb..a7d250f 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/B_result.js
@@ -7,3 +7,9 @@ goog.provide('classes.B');
  */
 classes.B = function() {
 };
+
+
+/**
+ * @const
+ */
+classes.B.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'B', qName: 'classes.B'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
index 9c7bb13..a95f0d3 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/classes/C_result.js
@@ -7,3 +7,10 @@ goog.provide('classes.C');
  */
 classes.C = function() {
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+classes.C.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'C', qName: 'classes.C'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
index 360c807..e36644d 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IA_result.js
@@ -14,5 +14,6 @@ interfaces.IA = function() {
 
 /**
  * @const
+ * @type {Object.<string, Array.<Object>>}
  */
-interfaces.IA.prototype.FLEXJS_CLASS_INFO = { interfaces: [interfaces.IC] };
+interfaces.IA.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IA', qName: 'interfaces.IA'}], interfaces: [interfaces.IC] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
index 611cfb6..3262c47 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IB_result.js
@@ -7,3 +7,10 @@ goog.provide('interfaces.IB');
  */
 interfaces.IB = function() {
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IB.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IB', qName: 'interfaces.IB'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
index 35f794d..2fd03a0 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IC_result.js
@@ -14,5 +14,6 @@ interfaces.IC = function() {
 
 /**
  * @const
+ * @type {Object.<string, Array.<Object>>}
  */
-interfaces.IC.prototype.FLEXJS_CLASS_INFO = { interfaces: [interfaces.ID] };
+interfaces.IC.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IC', qName: 'interfaces.IC'}], interfaces: [interfaces.ID] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
index dfa6505..8de5be3 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/ID_result.js
@@ -7,3 +7,10 @@ goog.provide('interfaces.ID');
  */
 interfaces.ID = function() {
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.ID.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'ID', qName: 'interfaces.ID'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
index c91f544..11b4eed 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/interfaces/interfaces/IE_result.js
@@ -7,3 +7,10 @@ goog.provide('interfaces.IE');
  */
 interfaces.IE = function() {
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+interfaces.IE.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'IE', qName: 'interfaces.IE'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js b/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
index 7c578a1..716d5fe 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/super/Base_result.js
@@ -35,3 +35,10 @@ Base.prototype.set_text = function(value) {
     goog.base(this, 'set_text', "B" + value);
   }
 };
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+Base.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Base', qName: 'Base'}] };

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d8936d91/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js b/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
index 08c344c..f7c0c4a 100644
--- a/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
+++ b/compiler.jx.tests/test-files/flexjs/projects/super/Super_result.js
@@ -33,4 +33,11 @@ Super.prototype.set_text = function(value) {
   if (value != this._text) {
     this._text = value;
   }
-};
\ No newline at end of file
+};
+
+
+/**
+ * @const
+ * @type {Object.<string, Array.<Object>>}
+ */
+Super.prototype.FLEXJS_CLASS_INFO = { names: [{ name: 'Super', qName: 'Super'}] };


[6/8] git commit: [flex-falcon] [refs/heads/develop] - The 'AddEventListener' method is marked 'deprecated' in the goog library, so the compiler complains we use it. This makes it ignore those warnings.

Posted by er...@apache.org.
The 'AddEventListener' method is marked 'deprecated' in the goog library, so the compiler complains we use it. This makes it ignore those warnings.

Signed-off-by: Erik de Bruin <er...@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/5a80ec0d
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/5a80ec0d
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/5a80ec0d

Branch: refs/heads/develop
Commit: 5a80ec0d37c78d099abef3e34c598c569d8d5abd
Parents: 40dddef
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 15:16:46 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 15:16:46 2013 +0100

----------------------------------------------------------------------
 .../compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/5a80ec0d/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index 34438a2..a0b3f5c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -240,6 +240,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
             optionList.add("--jscomp_warning=constantProperty");
             optionList.add("--jscomp_warning=strictModuleDepCheck");
             optionList.add("--jscomp_warning=visibility");
+            optionList.add("--jscomp_off=deprecated");
         }
         
         optionList.add("--closure_entry_point=" + projectName);


[3/8] git commit: [flex-falcon] [refs/heads/develop] - FLEX-33903 emit class coercions as 'as()' method calls, with a third argument to force an exception to be thrown is the type check fails

Posted by er...@apache.org.
FLEX-33903 emit class coercions as 'as()' method calls, with a third argument to force an exception to be thrown is the type check fails

Signed-off-by: Erik de Bruin <er...@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/b4a91abc
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/b4a91abc
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/b4a91abc

Branch: refs/heads/develop
Commit: b4a91abc74f5133b861cd576f05d866b499f6257
Parents: d8936d9
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 11:19:55 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 11:19:55 2013 +0100

----------------------------------------------------------------------
 .../codegen/js/flexjs/JSFlexJSEmitter.java      | 56 ++++++++++++--------
 1 file changed, 34 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b4a91abc/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 721050a..a756ab4 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
@@ -47,6 +47,7 @@ import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
 import org.apache.flex.compiler.internal.definitions.AccessorDefinition;
 import org.apache.flex.compiler.internal.definitions.ClassDefinition;
 import org.apache.flex.compiler.internal.definitions.FunctionDefinition;
+import org.apache.flex.compiler.internal.definitions.InterfaceDefinition;
 import org.apache.flex.compiler.internal.definitions.ParameterDefinition;
 import org.apache.flex.compiler.internal.definitions.VariableDefinition;
 import org.apache.flex.compiler.internal.projects.CompilerProject;
@@ -404,8 +405,9 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 
                 def = node.getNameNode().resolve(project);
 
-                isClassCast = def instanceof ClassDefinition
-                        && !(NativeUtils.isJSNative(def.getBaseName()));
+                isClassCast = (def instanceof ClassDefinition ||
+                        def instanceof InterfaceDefinition) && 
+                        !(NativeUtils.isJSNative(def.getBaseName()));
             }
 
             if (node.isNewExpression())
@@ -446,9 +448,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             }
             else
             {
-                walkArguments(node.getArgumentNodes());
-
-                write("/** Cast to " + def.getQualifiedName() + " */");
+                emitIsAs(node.getArgumentNodes()[0], node.getNameNode(), ASTNodeID.Op_AsID, true);
             }
         }
         else
@@ -908,23 +908,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         }
         else if (id == ASTNodeID.Op_IsID || id == ASTNodeID.Op_AsID)
         {
-            write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
-            write(ASEmitterTokens.MEMBER_ACCESS);
-            if (id == ASTNodeID.Op_AsID)
-                write(ASEmitterTokens.AS);
-            else
-                write(ASEmitterTokens.IS);
-            write(ASEmitterTokens.PAREN_OPEN);
-            getWalker().walk(node.getLeftOperandNode());
-            writeToken(ASEmitterTokens.COMMA);
-
-            IDefinition dnode = (node.getRightOperandNode()).resolve(project);
-            if (dnode != null)
-                write(dnode.getQualifiedName());
-            else
-                getWalker().walk(node.getRightOperandNode());
-            
-            write(ASEmitterTokens.PAREN_CLOSE);
+            emitIsAs(node.getLeftOperandNode(), node.getRightOperandNode(), id, false);
         }
         else if (id == ASTNodeID.Op_InstanceOfID)
         {
@@ -1001,6 +985,34 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         }
     }
 
+    private void emitIsAs(IExpressionNode left, IExpressionNode right, 
+            ASTNodeID id, boolean coercion)
+    {
+        write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
+        write(ASEmitterTokens.MEMBER_ACCESS);
+        if (id == ASTNodeID.Op_IsID)
+            write(ASEmitterTokens.IS);
+        else
+            write(ASEmitterTokens.AS);
+        write(ASEmitterTokens.PAREN_OPEN);
+        getWalker().walk(left);
+        writeToken(ASEmitterTokens.COMMA);
+
+        IDefinition dnode = (right).resolve(project);
+        if (dnode != null)
+            write(dnode.getQualifiedName());
+        else
+            getWalker().walk(right);
+        
+        if (coercion) 
+        {
+            writeToken(ASEmitterTokens.COMMA);
+            write(ASEmitterTokens.TRUE);
+        }
+        
+        write(ASEmitterTokens.PAREN_CLOSE);
+    }
+    
     @Override
     public void emitMemberAccessExpression(IMemberAccessExpressionNode node)
     {


[7/8] git commit: [flex-falcon] [refs/heads/develop] - We want the 'goog.require' statements in the top most file possible. The prior recursion caused it to sometimes be included in the bottom most file. 'Unwinding' the recursion a bit now results in pro

Posted by er...@apache.org.
We want the 'goog.require' statements in the top most file possible. The prior recursion caused it to sometimes be included in the bottom most file. 'Unwinding' the recursion a bit now results in proper emission.

Signed-off-by: Erik de Bruin <er...@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/9821b48d
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/9821b48d
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/9821b48d

Branch: refs/heads/develop
Commit: 9821b48de243358bbee485e67a220d884604759b
Parents: 5a80ec0
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 15 15:19:44 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 15 15:19:44 2013 +0100

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/graph/GoogDepsWriter.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9821b48d/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index 11cf320..4c2d905 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -121,8 +121,11 @@ public class GoogDepsWriter {
 		        continue;
 		    }
 			gd.deps.add(dep);
-			addDeps(dep);
 		}
+        for (String dep : deps)
+        {
+            addDeps(dep);
+        }
 		if (circulars.size() > 0)
 		{
 		    // remove requires that would cause circularity
@@ -190,7 +193,7 @@ public class GoogDepsWriter {
                 return inheritLine.substring(c + 1, c2).trim();            
 	        }
 	    }
-	    System.out.println("couldn't find base class for " + className);
+	    //System.out.println(className + " has no base class");
 	    return null;
 	}