flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [2/4] git commit: [flex-falcon] [refs/heads/develop] - Initial commit of 'correct' whitespace emission.
Date Tue, 12 Nov 2013 11:05:15 GMT
Initial commit of 'correct' whitespace emission.

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/c4bdbf59
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c4bdbf59
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c4bdbf59

Branch: refs/heads/develop
Commit: c4bdbf59a5c84fd337797af066ce3783addcd7ad
Parents: 026a53c
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Tue Nov 12 00:18:18 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Tue Nov 12 00:18:18 2013 +0100

----------------------------------------------------------------------
 .../js/flexjs/TestFlexJSAccessorMembers.java    |  12 +-
 .../codegen/js/flexjs/TestFlexJSAccessors.java  |   8 +-
 .../codegen/js/flexjs/TestFlexJSClass.java      |  97 ++++-
 .../codegen/js/flexjs/TestFlexJSEmiter.java     |  48 ++-
 .../js/flexjs/TestFlexJSExpressions.java        |  54 ++-
 .../js/flexjs/TestFlexJSGlobalClasses.java      |   4 +-
 .../js/flexjs/TestFlexJSMethodMembers.java      |  54 +--
 .../codegen/js/flexjs/TestFlexJSPackage.java    |  38 +-
 .../codegen/js/flexjs/TestFlexJSStatements.java | 317 ++++++++++++++-
 .../flexjs/files/FlexJSTest_again_result.js     | 170 ++++----
 .../flexjs/files/LocalFunction_result.js        |  17 +-
 .../flexjs/files/MyInitialView_result.js        | 402 +++++++++----------
 .../files/controllers/MyController_result.js    |  58 ++-
 .../flexjs/files/models/MyModel_result.js       |  27 +-
 .../flexjs/files/wildcard_import_result.js      |  35 +-
 .../flexjs/projects/interfaces/Test_result.js   |   9 +-
 .../projects/interfaces/classes/A_result.js     |   8 +-
 .../projects/interfaces/classes/B_result.js     |   3 +-
 .../projects/interfaces/classes/C_result.js     |   3 +-
 .../projects/interfaces/interfaces/IA_result.js |   3 +
 .../projects/interfaces/interfaces/IB_result.js |   2 +
 .../projects/interfaces/interfaces/IC_result.js |   3 +
 .../projects/interfaces/interfaces/ID_result.js |   1 +
 .../projects/interfaces/interfaces/IE_result.js |   1 +
 .../codegen/js/flexjs/JSFlexJSEmitter.java      | 177 +++++++-
 .../js/flexjs/JSFlexJSEmitterTokens.java        |   1 +
 .../internal/codegen/js/goog/JSGoogEmitter.java |   6 +-
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  |  21 +-
 28 files changed, 1130 insertions(+), 449 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
index 751d232..bddaeab 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
@@ -46,7 +46,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     {
         IGetterNode node = (IGetterNode) getAccessor("function get foo():int{return -1;}");
         asBlockWalker.visitGetter(node);
-        assertOut("/**\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n\treturn -1;\n}");
+        assertOut("/**\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n  return -1;\n}");
     }
 
     @Override
@@ -55,7 +55,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     {
         IGetterNode node = (IGetterNode) getAccessor("public function get foo():int{return -1;}");
         asBlockWalker.visitGetter(node);
-        assertOut("/**\n * @expose\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @return {number}\n */\nFalconTest_A.prototype.get_foo = function() {\n  return -1;\n}");
     }
 
     @Override
@@ -64,7 +64,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     {
         IGetterNode node = (IGetterNode) getAccessor("public override function get foo():int{super.foo(); return -1;}");
         asBlockWalker.visitGetter(node);
-        assertOut("/**\n * @expose\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.get_foo = function() {\n\tgoog.base(this, 'get_foo');\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.get_foo = function() {\n  goog.base(this, 'get_foo');\n  return -1;\n}");
     }
 
     @Override
@@ -73,7 +73,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     {
         IGetterNode node = (IGetterNode) getAccessor("public static function get foo():int{return -1;}");
         asBlockWalker.visitGetter(node);
-        assertOut("/**\n * @expose\n * @return {number}\n */\nFalconTest_A.get_foo = function() {\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @return {number}\n */\nFalconTest_A.get_foo = function() {\n  return -1;\n}");
     }
 
     @Override
@@ -91,7 +91,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     {
         ISetterNode node = (ISetterNode) getAccessor("function set foo(value:int):void{fetch('haai');}");
         asBlockWalker.visitSetter(node);
-        assertOut("/**\n * @param {number} value\n */\nFalconTest_A.prototype.set_foo = function(value) {\n\tfetch('haai');\n}");
+        assertOut("/**\n * @param {number} value\n */\nFalconTest_A.prototype.set_foo = function(value) {\n  fetch('haai');\n}");
     }
 
     @Override
@@ -109,7 +109,7 @@ public class TestFlexJSAccessorMembers extends TestGoogAccessorMembers
     {
         ISetterNode node = (ISetterNode) getAccessor("public override function set foo(value:int):void{super.foo();}");
         asBlockWalker.visitSetter(node);
-        assertOut("/**\n * @expose\n * @param {number} value\n * @override\n */\nFalconTest_A.prototype.set_foo = function(value) {\n\tgoog.base(this, 'set_foo');\n}");
+        assertOut("/**\n * @expose\n * @param {number} value\n * @override\n */\nFalconTest_A.prototype.set_foo = function(value) {\n  goog.base(this, 'set_foo');\n}");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
index 1a85d91..fc656ef 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessors.java
@@ -38,7 +38,7 @@ public class TestFlexJSAccessors extends ASTestBase
                 "public function doStuff():void {label = 'hello, bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
                 IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n/**\n * @expose\n */\nFalconTest_A.prototype.doStuff = function() {\n\tthis.set_label('hello, bye');\n\tvar /** @type {string} */ theLabel = this.get_label();\n};\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n/**\n * @expose\n * @return {string}\n */\nFalconTest_A.prototype.get_label = function() {\n\treturn this._label;\n};\n\n/**\n * @expose\n * @param {string} value\n */\nFalconTest_A.prototype.set_label = function(value) {\n\tthis._label = value;\n};";
+        String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @expose\n */\nFalconTest_A.prototype.doStuff = function() {\n  this.set_label('hello, bye');\n  var /** @type {string} */ theLabel = this.get_label();\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n/**\n * @expose\n * @return {string}\n */\nFalconTest_A.prototype.get_label = function() {\n  return this._label;\n};\n\n\n/**\n * @expose\n * @param {string} value\n */\nFalconTest_A.prototype.set_label = function(value) {\n  this._label = value;\n};";
         assertOut(expected);
     }
 
@@ -49,7 +49,7 @@ public class TestFlexJSAccessors extends ASTestBase
                 "public class B { public function B() {}; public function doStuff():void {this.label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n/**\n * @expose\n * @this {B}\n */\nB.prototype.doStuff = function() {\n\tthis.set_label(this.get_label() + 'bye');\n\tvar /** @type {string} */ theLabel = this.get_label();\n};\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n/**\n * @expose\n * @return {string}\n */\nB.prototype.get_label = function() {\n\treturn this._label;\n};\n\n/**\n * @expose\n * @param {string} value\n */\nB.prototype.set_label = function(value) {\n\tthis._label = value;\n};"; 
+        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @expose\n * @this {B}\n */\nB.prototype.doStuff = function() {\n  this.set_label(this.get_label() + 'bye');\n  var /** @type {string} */ theLabel = this.get_label();\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n/**\n * @expose\n * @return {string}\n */\nB.prototype.get_label = function() {\n  return this._label;\n};\n\n\n/**\n * @expose\n * @param {string} value\n */\nB.prototype.set_label = function(value) {\n  this._label = value;\n};"; 
         assertOut(expected);
     }
 
@@ -60,7 +60,7 @@ public class TestFlexJSAccessors extends ASTestBase
                 "public function doStuff():void {label = label + 'bye'; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value}; ",
                 IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n/**\n * @expose\n */\nFalconTest_A.prototype.doStuff = function() {\n\tthis.set_label(this.get_label() + 'bye');\n\tvar /** @type {string} */ theLabel = this.get_label();\n};\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n/**\n * @expose\n * @return {string}\n */\nFalconTest_A.prototype.get_label = function() {\n\treturn this._label;\n};\n\n/**\n * @expose\n * @param {string} value\n */\nFalconTest_A.prototype.set_label = function(value) {\n\tthis._label = value;\n};";
+        String expected = "/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @expose\n */\nFalconTest_A.prototype.doStuff = function() {\n  this.set_label(this.get_label() + 'bye');\n  var /** @type {string} */ theLabel = this.get_label();\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype._label;\n\n\n/**\n * @expose\n * @return {string}\n */\nFalconTest_A.prototype.get_label = function() {\n  return this._label;\n};\n\n\n/**\n * @expose\n * @param {string} value\n */\nFalconTest_A.prototype.set_label = function(value) {\n  this._label = value;\n};";
         assertOut(expected);
     }
     
@@ -71,7 +71,7 @@ public class TestFlexJSAccessors extends ASTestBase
                 "public class B { public function B() {}; public function doStuff():void {label = this.label; var theLabel:String = label;}; private var _label:String; public function get label():String {return _label}; public function set label(value:String):void {_label = value};}",
                 IClassNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n/**\n * @expose\n * @this {B}\n */\nB.prototype.doStuff = function() {\n\tthis.set_label(this.get_label());\n\tvar /** @type {string} */ theLabel = this.get_label();\n};\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n/**\n * @expose\n * @return {string}\n */\nB.prototype.get_label = function() {\n\treturn this._label;\n};\n\n/**\n * @expose\n * @param {string} value\n */\nB.prototype.set_label = function(value) {\n\tthis._label = value;\n};";
+        String expected = "/**\n * @constructor\n */\nB = function() {\n};\n\n\n/**\n * @expose\n * @this {B}\n */\nB.prototype.doStuff = function() {\n  this.set_label(this.get_label());\n  var /** @type {string} */ theLabel = this.get_label();\n};\n\n\n/**\n * @private\n * @type {string}\n */\nB.prototype._label;\n\n\n/**\n * @expose\n * @return {string}\n */\nB.prototype.get_label = function() {\n  return this._label;\n};\n\n\n/**\n * @expose\n * @param {string} value\n */\nB.prototype.set_label = function(value) {\n  this._label = value;\n};";
         assertOut(expected);
     }
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
index d710904..49ce793 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSClass.java
@@ -37,7 +37,52 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class A {public function A() { super(); }}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n\t;\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n  ;\n};");
+    }
+
+    @Override
+    @Test
+    public void testSimpleExtends()
+    {
+        IClassNode node = getClassNode("public class A extends Button {public function A() {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n */\norg.apache.flex.A = function() {\n  goog.base(this);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+    }
+
+    @Override
+    @Test
+    public void testSimpleExtendsImplements()
+    {
+        IClassNode node = getClassNode("public class A extends Button implements IEventDispatcher {public function A() {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n */\norg.apache.flex.A = function() {\n  goog.base(this);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+    }
+
+    @Override
+    @Test
+    public void testSimpleExtendsImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public class A extends Button implements IEventDispatcher, ILogger {public function A() {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n * @implements {mx.logging.ILogger}\n */\norg.apache.flex.A = function() {\n  goog.base(this);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+    }
+
+    @Override
+    @Test
+    public void testSimpleFinalExtendsImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public final class A extends Button implements IEventDispatcher, ILogger {public function A() {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n * @implements {mx.logging.ILogger}\n */\norg.apache.flex.A = function() {\n  goog.base(this);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+    }
+
+    @Override
+    @Test
+    public void testQualifiedExtendsImplementsMultiple()
+    {
+        IClassNode node = getClassNode("public class A extends spark.components.Button implements flash.events.IEventDispatcher, mx.logging.ILogger {public function A() {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @implements {flash.events.IEventDispatcher}\n * @implements {mx.logging.ILogger}\n */\norg.apache.flex.A = function() {\n  goog.base(this);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
     }
 
     @Override
@@ -46,7 +91,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class A extends spark.components.Button { public function A() { super('foo', 42);}}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n */\norg.apache.flex.A = function() {\n\tgoog.base(this, 'foo', 42);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n */\norg.apache.flex.A = function() {\n  goog.base(this, 'foo', 42);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
     }
 
     @Test
@@ -54,7 +99,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B {public function B(arg1:String) {this.arg1 = arg1}; public var arg1:String;}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg.apache.flex.B = function(arg1) {\n\tthis.arg1 = arg1;\n};\n\n/**\n * @type {string}\n */\norg.apache.flex.B.prototype.arg1;";
+        String expected = "/**\n * @constructor\n * @param {string} arg1\n */\norg.apache.flex.B = function(arg1) {\n  this.arg1 = arg1;\n};\n\n\n/**\n * @type {string}\n */\norg.apache.flex.B.prototype.arg1;";
         assertOut(expected);
     }
 
@@ -63,7 +108,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public var button:Button = new Button(); public function foo():String {return button.label;};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n/**\n * @type {spark.components.Button}\n */\norg.apache.flex.B.prototype.button = new spark.components.Button();\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo = function() {\n\treturn this.button.get_label();\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @type {spark.components.Button}\n */\norg.apache.flex.B.prototype.button = new spark.components.Button();\n\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo = function() {\n  return this.button.get_label();\n};";
         assertOut(expected);
     }
 
@@ -72,7 +117,7 @@ public class TestFlexJSClass extends TestGoogClass
     {
         IClassNode node = getClassNode("public class B {public function B() {}; public function foo():void {};}");
         asBlockWalker.visitClass(node);
-        String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n/**\n * @expose\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
+        String expected = "/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @expose\n */\norg.apache.flex.B.prototype.foo = function() {\n};";
         assertOut(expected);
     }
 
@@ -123,6 +168,38 @@ public class TestFlexJSClass extends TestGoogClass
 
     @Override
     @Test
+    public void testExtendsConstructor_withArguments()
+    {
+        IClassNode node = getClassNode("public class A extends spark.components.Button {public function A(arg1:String, arg2:int) {}}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n * @extends {spark.components.Button}\n * @param {string} arg1\n * @param {number} arg2\n */\norg.apache.flex.A = function(arg1, arg2) {\n  goog.base(this, arg1, arg2);\n}\ngoog.inherits(org.apache.flex.A, spark.components.Button);");
+    }
+
+    @Override
+    @Test
+    public void testFields()
+    {
+        IClassNode node = getClassNode("public class A {public var a:Object;protected var b:String; "
+                + "private var c:int; internal var d:uint; var e:Number}");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @type {Object}\n */\norg.apache.flex.A.prototype.a;\n\n\n/**\n * @protected\n * @type {string}\n */\norg.apache.flex.A.prototype.b;\n\n\n/**\n * @private\n * @type {number}\n */\norg.apache.flex.A.prototype.c;\n\n\n/**\n * @type {number}\n */\norg.apache.flex.A.prototype.d;\n\n\n/**\n * @type {number}\n */\norg.apache.flex.A.prototype.e;");
+    }
+
+    @Override
+    @Test
+    public void testConstants()
+    {
+        IClassNode node = getClassNode("public class A {"
+                + "public static const A:int = 42;"
+                + "protected static const B:Number = 42;"
+                + "private static const C:Number = 42;"
+                + "foo_bar static const C:String = 'me' + 'you';");
+        asBlockWalker.visitClass(node);
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @const\n * @type {number}\n */\norg.apache.flex.A.A = 42;\n\n\n/**\n * @protected\n * @const\n * @type {number}\n */\norg.apache.flex.A.B = 42;\n\n\n/**\n * @private\n * @const\n * @type {number}\n */\norg.apache.flex.A.C = 42;\n\n\n/**\n * @const\n * @type {string}\n */\norg.apache.flex.A.C = 'me' + 'you';");
+    }
+
+    @Override
+    @Test
     public void testAccessors()
     {
         IClassNode node = getClassNode("public class A {"
@@ -137,7 +214,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "foo_bar function get foo6():Object{return null;}"
                 + "foo_bar function set foo6(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo1 = function() {\n\treturn null;\n};\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo1 = function(value) {\n};\n\n/**\n * @protected\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo2 = function() {\n\treturn null;\n};\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo2 = function(value) {\n};\n\n/**\n * @private\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo3 = function() {\n\treturn null;\n};\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo3 = function(value) {\n};\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo5 = function() {\n\treturn null;\n};\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo5 = function(value) {\n};\n\n/**\n *
  @return {Object}\n */\norg.apache.flex.A.prototype.get_foo6 = function() {\n\treturn null;\n};\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo6 = function(value) {\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo1 = function() {\n  return null;\n};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo1 = function(value) {\n};\n\n\n/**\n * @protected\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo2 = function() {\n  return null;\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo3 = function() {\n  return null;\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo3 = function(value) {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo5 = function() {\n  return null;\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo5 = function(value) 
 {\n};\n\n\n/**\n * @return {Object}\n */\norg.apache.flex.A.prototype.get_foo6 = function() {\n  return null;\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.set_foo6 = function(value) {\n};");
     }
 
     @Override
@@ -155,7 +232,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "public static function foo7(value:Object):void{}"
                 + "foo_bar static function foo7(value:Object):void{}" + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n\treturn null;\n};\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n\treturn null;\n};\n\n/**\n * @expose\n * @return {Object}\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n\treturn goog.base(this, 'foo1b');\n};\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo6 = function(value) {\n};\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};\n\n/**\n * @param {Object}
  value\n */\norg.apache.flex.A.foo7 = function(value) {\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.A = function() {\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1 = function() {\n  return null;\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.A.prototype.foo1a = function() {\n  return null;\n};\n\n\n/**\n * @expose\n * @return {Object}\n * @override\n */\norg.apache.flex.A.prototype.foo1b = function() {\n  return goog.base(this, 'foo1b');\n};\n\n\n/**\n * @protected\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo2 = function(value) {\n};\n\n\n/**\n * @private\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo3 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo5 = function(value) {\n};\n\n\n/**\n * @param {Object} value\n */\norg.apache.flex.A.prototype.foo6 = function(value) {\n};\n\n\n/**\n * @expose\n * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};\n\n\n/**\n
  * @param {Object} value\n */\norg.apache.flex.A.foo7 = function(value) {\n};");
     }
 
     @Test
@@ -166,7 +243,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "public function foo2():Object{function bar2(param1:Object):Object {return null;}; return bar2('foo');}"
                 + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n\tfunction bar1() {\n\t\treturn null;\n\t};\n\treturn goog.bind(bar1, this)();\n};\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n\tfunction bar2(param1) {\n\t\treturn null;\n\t};\n\treturn goog.bind(bar2, this)('foo');\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n  function bar1() {\n    return null;\n  };\n  return goog.bind(bar1, this)();\n};\n\n\n/**\n * @expose\n * @return {Object}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n  function bar2(param1) {\n    return null;\n  };\n  return goog.bind(bar2, this)('foo');\n};");
     }
 
     @Test
@@ -178,7 +255,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "public function foo2():String{function bar2(param1:String):String {return param1 + baz1;}; return bar2('foo');}"
                 + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n/**\n * @type {string}\n */\norg.apache.flex.B.prototype.baz1;\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n\tfunction bar1() {\n\t\treturn this.baz1;\n\t};\n\treturn goog.bind(bar1, this)();\n};\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n\tfunction bar2(param1) {\n\t\treturn param1 + this.baz1;\n\t};\n\treturn goog.bind(bar2, this)('foo');\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @type {string}\n */\norg.apache.flex.B.prototype.baz1;\n\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo1 = function() {\n  function bar1() {\n    return this.baz1;\n  };\n  return goog.bind(bar1, this)();\n};\n\n\n/**\n * @expose\n * @return {string}\n */\norg.apache.flex.B.prototype.foo2 = function() {\n  function bar2(param1) {\n    return param1 + this.baz1;\n  };\n  return goog.bind(bar2, this)('foo');\n};");
     }
 
     @Test
@@ -198,7 +275,7 @@ public class TestFlexJSClass extends TestGoogClass
                 + "public function clone():B { return new B() }"
                 + "}");
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n/**\n * @expose\n * @return {org.apache.flex.B}\n */\norg.apache.flex.B.prototype.clone = function() {\n\treturn new org.apache.flex.B();\n};");
+        assertOut("/**\n * @constructor\n */\norg.apache.flex.B = function() {\n};\n\n\n/**\n * @expose\n * @return {org.apache.flex.B}\n */\norg.apache.flex.B.prototype.clone = function() {\n  return new org.apache.flex.B();\n};");
     }
 
     protected IBackend createBackend()

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/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 3b9d14f..5ede669 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,29 @@ 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 * @constructor\n * @extends {spark.components.Button}\n */\ncom.example.components.MyTextButton = function() {\n\tgoog.base(this);\n\tif (foo() != 42) {\n\t\tbar();\n\t}\n}\ngoog.inherits(com.example.components.MyTextButton, spark.components.Button);\n\n/**\n * @private\n * @type {string}\n */\ncom.example.components.MyTextButton.prototype._privateVar = \"do \";\n\n/**\n * @type {number}\n */\ncom.example.components.MyTextButton.prototype.publicProperty = 100;\n\n/**\n * @expose\n * @param {string} value\n * @return {string}\n */\ncom.example.components.MyTextButton.prototype.myFunction = function(value) {\n\treturn \"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};");
+    }
+
+    @Override
+    @Test
+    public void testSimpleInterface()
+    {
+        String code = "package com.example.components {"
+                + "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};");
+    }
+
+    @Override
+    @Test
+    public void testSimpleClass()
+    {
+        String code = "package com.example.components {"
+                + "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};");
     }
 
     @Override
@@ -65,9 +87,9 @@ public class TestFlexJSEmiter extends TestGoogEmiter
         asBlockWalker.visitFunction(node);
         assertOut("/**\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
                 + "foo.bar.FalconTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
-                + "\tp3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
-                + "\tp4 = typeof p4 !== 'undefined' ? p4 : 4;\n"
-                + "\treturn p1 + p2 + p3 + p4;\n}");
+                + "  p3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
+                + "  p4 = typeof p4 !== 'undefined' ? p4 : 4;\n"
+                + "  return p1 + p2 + p3 + p4;\n}");
     }
 
     @Override
@@ -78,9 +100,21 @@ public class TestFlexJSEmiter extends TestGoogEmiter
         asBlockWalker.visitFunction(node);
         assertOut("/**\n * @param {number=} bar\n * @param {number=} bax\n */\n"
                 + "foo.bar.FalconTest_A.prototype.method1 = function(bar, bax) {\n"
-                + "\tbar = typeof bar !== 'undefined' ? bar : 42;\n"
-                + "\tbax = typeof bax !== 'undefined' ? bax : 4;\n"
-                + "\tif (a)\n\t\tfoo();\n}");
+                + "  bar = typeof bar !== 'undefined' ? bar : 42;\n"
+                + "  bax = typeof bax !== 'undefined' ? bax : 4;\n"
+                + "  if (a)\n    foo();\n}");
+    }
+
+    @Override
+    @Test
+    public void testDefaultParameter_NoBody()
+    {
+        IFunctionNode node = getMethodWithPackage("function method1(p1:int, p2:int, p3:int = 3, p4:int = 4):int{}");
+        asBlockWalker.visitFunction(node);
+        assertOut("/**\n * @param {number} p1\n * @param {number} p2\n * @param {number=} p3\n * @param {number=} p4\n * @return {number}\n */\n"
+                + "foo.bar.FalconTest_A.prototype.method1 = function(p1, p2, p3, p4) {\n"
+                + "  p3 = typeof p3 !== 'undefined' ? p3 : 3;\n"
+                + "  p4 = typeof p4 !== 'undefined' ? p4 : 4;\n}");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/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 6057016..19ba3b8 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
@@ -28,8 +28,10 @@ import org.apache.flex.compiler.internal.tree.as.NodeBase;
 import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
 import org.apache.flex.compiler.tree.as.IClassNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
+import org.apache.flex.compiler.tree.as.IFunctionCallNode;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 import org.apache.flex.compiler.tree.as.IMemberAccessExpressionNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -57,7 +59,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){if (a) super.foo();}");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.foo = function() {\n\tif (a)\n\t\tgoog.base(this, 'foo');\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  if (a)\n    goog.base(this, 'foo');\n}");
     }
 
     @Override
@@ -66,7 +68,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){if (a) super.foo(a, b, c);}");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.foo = function() {\n\tif (a)\n\t\tgoog.base(this, 'foo', a, b, c);\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  if (a)\n    goog.base(this, 'foo', a, b, c);\n}");
     }
 
     //----------------------------------
@@ -550,7 +552,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {public function b() { function c(f:Function):void {}; function d():void {}; c(d); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n\tfunction c(f) {\n\t};\n\tfunction d() {\n\t};\n\tgoog.bind(c, this)(goog.bind(d, this));\n}");
+        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n  function c(f) {\n  };\n  function d() {\n  };\n  goog.bind(c, this)(goog.bind(d, this));\n}");
     }
 
     @Test
@@ -560,7 +562,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {public function b() { function c(s:String, f:Function):void {}; function d():void {}; c('foo', d); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n\tfunction c(s, f) {\n\t};\n\tfunction d() {\n\t};\n\tgoog.bind(c, this)('foo', goog.bind(d, this));\n}");
+        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n  function c(s, f) {\n  };\n  function d() {\n  };\n  goog.bind(c, this)('foo', goog.bind(d, this));\n}");
     }
 
     @Test
@@ -570,7 +572,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {public function b() {  c('foo', d); function c(s:String, f:Function):void {}; function d():void {};}}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n\tgoog.bind(c, this)('foo', goog.bind(d, this));\n\tfunction c(s, f) {\n\t};\n\tfunction d() {\n\t};\n}");
+        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n  goog.bind(c, this)('foo', goog.bind(d, this));\n  function c(s, f) {\n  };\n  function d() {\n  };\n}");
     }
 
     @Test
@@ -580,7 +582,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {public function b() { function d():void {}; c('foo', d); } public function c(s:String, f:Function):void {};}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n\tfunction d() {\n\t};\n\tthis.c('foo', goog.bind(d, this));\n}");
+        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n  function d() {\n  };\n  this.c('foo', goog.bind(d, this));\n}");
     }
 
     @Test
@@ -590,7 +592,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {public function b() { function c(f:Function):void {}; c(b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n\tfunction c(f) {\n\t};\n\tgoog.bind(c, this)(goog.bind(this.b, this));\n}");
+        assertOut("/**\n * @expose\n */\nB.prototype.b = function() {\n  function c(f) {\n  };\n  goog.bind(c, this)(goog.bind(this.b, this));\n}");
     }
 
     @Test
@@ -600,7 +602,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {static public function b() { function c(f:Function):void {}; c(b); }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n */\nfoo.bar.B.b = function() {\n\tfunction c(f) {\n\t};\n\tgoog.bind(c, this)(foo.bar.B.b);\n}");
+        assertOut("/**\n * @expose\n */\nfoo.bar.B.b = function() {\n  function c(f) {\n  };\n  goog.bind(c, this)(foo.bar.B.b);\n}");
     }
 
     @Test
@@ -611,7 +613,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
         // String.length is a getter but is a property in JS, so don't generate set_length() call.
-        assertOut("/**\n * @expose\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n\tvar /** @type {string} */ s;\n\treturn s.length;\n}");
+        assertOut("/**\n * @expose\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {string} */ s;\n  return s.length;\n}");
     }
 
     @Test
@@ -622,7 +624,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
         // String.length is a getter but is a property in JS, so don't generate set_length() call.
-        assertOut("/**\n * @expose\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n\tvar /** @type {Vector.<string>} */ a;\n\treturn a.length;\n}");
+        assertOut("/**\n * @expose\n * @return {number}\n */\nfoo.bar.B.prototype.b = function() {\n  var /** @type {Vector.<string>} */ a;\n  return a.length;\n}");
     }
 
     //----------------------------------
@@ -634,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\tb/** Cast to spark.components.Button */.set_label('');\n};");
+        assertOut("/**\n * @constructor\n * @implements {spark.components.Button}\n */\nB = function() {\n  b/** Cast to spark.components.Button */.set_label('');\n};");
     }
 
     @Test
@@ -642,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\tvar /** @type {Object} */ foo = this.get_bar()/** Cast to FalconTest_A */.set_bar('');\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  var /** @type {Object} */ foo = this.get_bar()/** Cast to FalconTest_A */.set_bar('');\n}");
     }
 
     @Test
@@ -650,7 +652,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(){bar(b).text = '';}");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.foo = function() {\n\tbar(b).text = '';\n}");
+        assertOut("FalconTest_A.prototype.foo = function() {\n  bar(b).text = '';\n}");
     }
 
     @Test
@@ -658,7 +660,29 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     {
         IFunctionNode node = getMethod("function foo(b:Boolean):Boolean {var c:String; var d:String; if (!(b ? c : d)) { return b;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {boolean} b\n * @return {boolean}\n */\nFalconTest_A.prototype.foo = function(b) {\n\tvar /** @type {string} */ c;\n\tvar /** @type {string} */ d;\n\tif (!(b ? c : d)) {\n\t\treturn b;\n\t}\n}");
+        assertOut("/**\n * @param {boolean} b\n * @return {boolean}\n */\nFalconTest_A.prototype.foo = function(b) {\n  var /** @type {string} */ c;\n  var /** @type {string} */ d;\n  if (!(b ? c : d)) {\n    return b;\n  }\n}");
+    }
+
+    @Override
+    @Test
+    public void testAnonymousFunctionWithParamsReturn()
+    {
+        IVariableNode node = (IVariableNode) getNode(
+                "var a:Object = function(foo:int, bar:String = 'goo'):int{return -1;};",
+                IVariableNode.class);
+        asBlockWalker.visitVariable(node);
+        assertOut("var /** @type {Object} */ a = function(foo, bar) {\n  bar = typeof bar !== 'undefined' ? bar : 'goo';\n  return -1;\n}");
+    }
+
+    @Override
+    @Test
+    public void testAnonymousFunctionAsArgument()
+    {
+        IFunctionCallNode node = (IFunctionCallNode) getNode(
+                "addListener('foo', function(event:Object):void{doit();})",
+                IFunctionCallNode.class);
+        asBlockWalker.visitFunctionCall(node);
+        assertOut("addListener('foo', function(event) {\n  doit();\n})");
     }
 
     @Override
@@ -677,7 +701,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
                 "public class B {public function b(o:Object):int { var a:B; a = o as B; }}",
                 IFunctionNode.class, WRAP_LEVEL_PACKAGE, true);
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n\tvar /** @type {B} */ a;\n\ta = org.apache.flex.utils.Language.as(o, foo.bar.B);\n}");
+        assertOut("/**\n * @expose\n * @param {Object} o\n * @return {number}\n */\nfoo.bar.B.prototype.b = function(o) {\n  var /** @type {B} */ a;\n  a = org.apache.flex.utils.Language.as(o, foo.bar.B);\n}");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
index 721e9ff..2b2176c 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
@@ -42,9 +42,9 @@ public class TestFlexJSGlobalClasses extends TestGoogGlobalClasses
     @Test
     public void testArguments()
     {
-        IFunctionNode node = getMethod("function a():void {\ttrace(arguments);}");
+        IFunctionNode node = getMethod("function a():void {  trace(arguments);}");
         asBlockWalker.visitFunction(node);
-        assertOut("FalconTest_A.prototype.a = function() {\n\torg.apache.flex.utils.Language.trace(arguments);\n}");
+        assertOut("FalconTest_A.prototype.a = function() {\n  org.apache.flex.utils.Language.trace(arguments);\n}");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
index 09dab88..d362bdb 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSMethodMembers.java
@@ -36,63 +36,63 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     @Test
     public void testMethod_withReturnType()
     {
-        IFunctionNode node = getMethod("function foo():int{\treturn -1;}");
+        IFunctionNode node = getMethod("function foo():int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @return {number}\n */\nFalconTest_A.prototype.foo = function() {\n\treturn -1;\n}");
+        assertOut("/**\n * @return {number}\n */\nFalconTest_A.prototype.foo = function() {\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withParameterReturnType()
     {
-        IFunctionNode node = getMethod("function foo(bar):int{\treturn -1;}");
+        IFunctionNode node = getMethod("function foo(bar):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {*} bar\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar) {\n\treturn -1;\n}");
+        assertOut("/**\n * @param {*} bar\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar) {\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withParameterTypeReturnType()
     {
-        IFunctionNode node = getMethod("function foo(bar:String):int{\treturn -1;}");
+        IFunctionNode node = getMethod("function foo(bar:String):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {string} bar\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar) {\n\treturn -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar) {\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withDefaultParameterTypeReturnType()
     {
-        IFunctionNode node = getMethod("function foo(bar:String = \"baz\"):int{\treturn -1;}");
+        IFunctionNode node = getMethod("function foo(bar:String = \"baz\"):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {string=} bar\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar) {\n\tbar = typeof bar !== 'undefined' ? bar : \"baz\";\n\treturn -1;\n}");
+        assertOut("/**\n * @param {string=} bar\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar) {\n  bar = typeof bar !== 'undefined' ? bar : \"baz\";\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withMultipleDefaultParameterTypeReturnType()
     {
-        IFunctionNode node = getMethod("function foo(bar:String, baz:int = null):int{\treturn -1;}");
+        IFunctionNode node = getMethod("function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n\tbaz = typeof baz !== 'undefined' ? baz : null;\n\treturn -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withRestParameterTypeReturnType()
     {
-        IFunctionNode node = getMethod("function foo(bar:String, ...rest):int{\treturn -1;}");
+        IFunctionNode node = getMethod("function foo(bar:String, ...rest):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {string} bar\n * @param {...} rest\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, rest) {\n\trest = Array.prototype.slice.call(arguments, 1);\n\treturn -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {...} rest\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, rest) {\n  rest = Array.prototype.slice.call(arguments, 1);\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withNamespaceCustom()
     {
-        IFunctionNode node = getMethod("mx_internal function foo(bar:String, baz:int = null):int{\treturn -1;}");
+        IFunctionNode node = getMethod("mx_internal function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n\tbaz = typeof baz !== 'undefined' ? baz : null;\n\treturn -1;\n}");
+        assertOut("/**\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     //--------------------------------------------------------------------------
@@ -105,7 +105,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IClassNode node = (IClassNode) getNode("public function FalconTest_A(){this.foo();}; private function foo():String{return '';};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\tthis.foo();\n};\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n\treturn '';\n};");
+        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n  this.foo();\n};\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n  return '';\n};");
     }
 
     @Test
@@ -113,7 +113,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IClassNode node = (IClassNode) getNode("public function FalconTest_A(){foo();}; private function foo():String{return '';};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n\tthis.foo();\n};\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n\treturn '';\n};");
+        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n  this.foo();\n};\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n  return '';\n};");
     }
 
     @Override
@@ -122,7 +122,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private var baz:String; private function foo():String{return this.baz;};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-         assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n/**\n * @private\n * @this {FalconTest_A}\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n\treturn this.baz;\n};");
+         assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n\n/**\n * @private\n * @this {FalconTest_A}\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n  return this.baz;\n};");
     }
 
     @Test
@@ -130,7 +130,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private var baz:String; private function foo():String{return baz;};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-         assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n\treturn this.baz;\n};");
+         assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @type {string}\n */\nFalconTest_A.prototype.baz;\n\n\n/**\n * @private\n * @return {string}\n */\nFalconTest_A.prototype.foo = function() {\n  return this.baz;\n};");
     }
 
     @Override
@@ -139,7 +139,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private function foo(value:int):String{return value;}; private function bar():String{if(true){while(i){return this.foo(42);}}};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n\treturn value;\n};\n\n/**\n * @private\n * @this {FalconTest_A}\n * @return {string}\n */\nFalconTest_A.prototype.bar = function() {\n\tif (true) {\n\t\twhile (i) {\n\t\t\treturn this.foo(42);\n\t\t}\n\t}\n};");
+        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n  return value;\n};\n\n\n/**\n * @private\n * @this {FalconTest_A}\n * @return {string}\n */\nFalconTest_A.prototype.bar = function() {\n  if (true) {\n    while (i) {\n      return this.foo(42);\n    }\n  }\n};");
     }
 
     @Test
@@ -147,38 +147,38 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IClassNode node = (IClassNode) getNode("public function FalconTest_A(){}; private function foo(value:int):String{return value;}; private function bar():void{if(true){while(i){foo(42);}}};", IClassNode.class, WRAP_LEVEL_CLASS);
         asBlockWalker.visitClass(node);
-        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n\treturn value;\n};\n\n/**\n * @private\n */\nFalconTest_A.prototype.bar = function() {\n\tif (true) {\n\t\twhile (i) {\n\t\t\tthis.foo(42);\n\t\t}\n\t}\n};");
+        assertOut("/**\n * @constructor\n */\nFalconTest_A = function() {\n};\n\n\n/**\n * @private\n * @param {number} value\n * @return {string}\n */\nFalconTest_A.prototype.foo = function(value) {\n  return value;\n};\n\n\n/**\n * @private\n */\nFalconTest_A.prototype.bar = function() {\n  if (true) {\n    while (i) {\n      this.foo(42);\n    }\n  }\n};");
     }
 
     @Override
     @Test
     public void testMethod_withNamespace()
     {
-        IFunctionNode node = getMethod("public function foo(bar:String, baz:int = null):int{\treturn -1;}");
+        IFunctionNode node = getMethod("public function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
         // we ignore the 'public' namespace completely
-        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n\tbaz = typeof baz !== 'undefined' ? baz : null;\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withNamespaceModifiers()
     {
-        IFunctionNode node = getMethod("public static function foo(bar:String, baz:int = null):int{\treturn -1;}");
+        IFunctionNode node = getMethod("public static function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
         // (erikdebruin) here we actually DO want to declare the method
         //               directly on the 'class' constructor instead of the
         //               prototype!
-        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.foo = function(bar, baz) {\n\tbaz = typeof baz !== 'undefined' ? baz : null;\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n */\nFalconTest_A.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
     @Test
     public void testMethod_withNamespaceModifierOverride()
     {
-        IFunctionNode node = getMethod("public override function foo(bar:String, baz:int = null):int{\treturn -1;}");
+        IFunctionNode node = getMethod("public override function foo(bar:String, baz:int = null):int{  return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n\tbaz = typeof baz !== 'undefined' ? baz : null;\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override
@@ -187,7 +187,7 @@ public class TestFlexJSMethodMembers extends TestGoogMethodMembers
     {
         IFunctionNode node = getMethod("override public function foo(bar:String, baz:int = null):int{return -1;}");
         asBlockWalker.visitFunction(node);
-        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n\tbaz = typeof baz !== 'undefined' ? baz : null;\n\treturn -1;\n}");
+        assertOut("/**\n * @expose\n * @param {string} bar\n * @param {number=} baz\n * @return {number}\n * @override\n */\nFalconTest_A.prototype.foo = function(bar, baz) {\n  baz = typeof baz !== 'undefined' ? baz : null;\n  return -1;\n}");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/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 8278769..79bc179 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
@@ -40,11 +40,47 @@ public class TestFlexJSPackage extends TestGoogPackage
     
     @Override
     @Test
+    public void testPackageSimple_Class()
+    {
+        // does JS need a implicit constructor function? ... always?
+        // All class nodes in AST get either an implicit or explicit constructor
+        // this is an implicit and the way I have the before/after handler working
+        // with block disallows implicit blocks from getting { }
+
+        // (erikdebruin) the constuctor IS the class definition, in 'goog' JS,
+        //               therefor we need to write out implicit constructors 
+        //               (if I understand the term correctly)
+
+        IFileNode node = compileAS("package {public class A{}}");
+        asBlockWalker.visitFile(node);
+        assertOut("goog.provide('A');\n\n\n\n/**\n * @constructor\n */\nA = function() {\n};");
+    }
+
+    @Override
+    @Test
+    public void testPackageQualified_Class()
+    {
+        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};");
+    }
+
+    @Override
+    @Test
+    public void testPackageQualified_ClassBody()
+    {
+        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};");
+    }
+
+    @Override
+    @Test
     public void testPackageQualified_ClassBodyMethodContents()
     {
         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 * @constructor\n */\nfoo.bar.baz.A = function() {\n\tif (a) {\n\t\tfor (var /** @type {Object} */ i in obj) {\n\t\t\tdoit();\n\t\t}\n\t}\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};");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/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 b919436..e0d6083 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
@@ -26,7 +26,12 @@ import org.apache.flex.compiler.internal.projects.FlexJSProject;
 import org.apache.flex.compiler.internal.tree.as.LabeledStatementNode;
 import org.apache.flex.compiler.tree.as.IFileNode;
 import org.apache.flex.compiler.tree.as.IForLoopNode;
+import org.apache.flex.compiler.tree.as.IIfNode;
+import org.apache.flex.compiler.tree.as.ISwitchNode;
+import org.apache.flex.compiler.tree.as.ITryNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.apache.flex.compiler.tree.as.IWhileLoopNode;
+import org.apache.flex.compiler.tree.as.IWithNode;
 import org.junit.Test;
 
 /**
@@ -50,6 +55,51 @@ public class TestFlexJSStatements extends TestGoogStatements
         assertOut("var /** @type {string} */ a = \"\\n\"");
     }
 
+    //----------------------------------
+    // for () { }
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitFor_1a()
+    {
+        IForLoopNode node = (IForLoopNode) getNode(
+                "for (var i:int = 0; i < len; i++) { break; }",
+                IForLoopNode.class);
+        asBlockWalker.visitForLoop(node);
+        assertOut("for (var /** @type {number} */ i = 0; i < len; i++) {\n  break;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitFor_1b()
+    {
+        IForLoopNode node = (IForLoopNode) getNode(
+                "for (var i:int = 0; i < len; i++) break;", IForLoopNode.class);
+        asBlockWalker.visitForLoop(node);
+        assertOut("for (var /** @type {number} */ i = 0; i < len; i++)\n  break;");
+    }
+
+    @Override
+    @Test
+    public void testVisitForIn_1()
+    {
+        IForLoopNode node = (IForLoopNode) getNode(
+                "for (var i:int in obj) { break; }", IForLoopNode.class);
+        asBlockWalker.visitForLoop(node);
+        assertOut("for (var /** @type {number} */ i in obj) {\n  break;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitForIn_1a()
+    {
+        IForLoopNode node = (IForLoopNode) getNode(
+                "for (var i:int in obj)  break; ", IForLoopNode.class);
+        asBlockWalker.visitForLoop(node);
+        assertOut("for (var /** @type {number} */ i in obj)\n  break;");
+    }
+
     @Override
     @Test
     public void testVisitForEach_1()
@@ -57,7 +107,7 @@ public class TestFlexJSStatements extends TestGoogStatements
         IForLoopNode node = (IForLoopNode) getNode(
                 "for each(var i:int in obj) { break; }", IForLoopNode.class);
         asBlockWalker.visitForLoop(node);
-        assertOut("for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n{\n\tbreak;\n}}\n");
+        assertOut("for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n{\n  break;\n}}\n");
     }
 
     @Override
@@ -67,7 +117,7 @@ public class TestFlexJSStatements extends TestGoogStatements
         IForLoopNode node = (IForLoopNode) getNode(
                 "for each(var i:int in obj)  break; ", IForLoopNode.class);
         asBlockWalker.visitForLoop(node);
-        assertOut("for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n\n\tbreak;}\n");
+        assertOut("for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n\n  break;}\n");
     }
 
     @Test
@@ -76,18 +126,253 @@ public class TestFlexJSStatements extends TestGoogStatements
         IForLoopNode node = (IForLoopNode) getNode(
                 "var i:int; for each(i in obj)  break; ", IForLoopNode.class);
         asBlockWalker.visitForLoop(node);
-        assertOut("for (var foreachiter0 in obj) \n{\ni = obj[foreachiter0];\n\n\tbreak;}\n");
+        assertOut("for (var foreachiter0 in obj) \n{\ni = obj[foreachiter0];\n\n  break;}\n");
+    }
+
+    //----------------------------------
+    // try {} catch () {} finally {}
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitTry_Catch()
+    {
+        ITryNode node = (ITryNode) getNode("try { a; } catch (e:Error) { b; }",
+                ITryNode.class);
+        asBlockWalker.visitTry(node);
+        assertOut("try {\n  a;\n} catch (e) {\n  b;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitTry_Catch_Finally()
+    {
+        ITryNode node = (ITryNode) getNode(
+                "try { a; } catch (e:Error) { b; } finally { c; }",
+                ITryNode.class);
+        asBlockWalker.visitTry(node);
+        assertOut("try {\n  a;\n} catch (e) {\n  b;\n} finally {\n  c;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitTry_Catch_Catch_Finally()
+    {
+        // TODO (erikdebruin) handle multiple 'catch' statements (FW in Wiki)
+        ITryNode node = (ITryNode) getNode(
+                "try { a; } catch (e:Error) { b; } catch (f:Error) { c; } finally { d; }",
+                ITryNode.class);
+        asBlockWalker.visitTry(node);
+        assertOut("try {\n  a;\n} catch (e) {\n  b;\n} catch (f) {\n  c;\n} finally {\n  d;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitTry_CatchEmpty_FinallyEmpty_()
+    {
+        ITryNode node = (ITryNode) getNode(
+                "try { a; } catch (e:Error) {  } finally {  }", ITryNode.class);
+        asBlockWalker.visitTry(node);
+        assertOut("try {\n  a;\n} catch (e) {\n} finally {\n}");
+    }
+
+    //----------------------------------
+    // switch {}
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitSwitch_1()
+    {
+        ISwitchNode node = (ISwitchNode) getNode("switch(i){case 1: break;}",
+                ISwitchNode.class);
+        asBlockWalker.visitSwitch(node);
+        assertOut("switch (i) {\n  case 1:\n    break;\n}");
     }
 
     @Override
     @Test
+    public void testVisitSwitch_1a()
+    {
+        ISwitchNode node = (ISwitchNode) getNode(
+                "switch(i){case 1: { break; }}", ISwitchNode.class);
+        asBlockWalker.visitSwitch(node);
+        // (erikdebruin) the code is valid without the extra braces, 
+        //               i.e. we're good, we "don't care"
+        assertOut("switch (i) {\n  case 1:\n    break;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitSwitch_2()
+    {
+        ISwitchNode node = (ISwitchNode) getNode(
+                "switch(i){case 1: break; default: return;}", ISwitchNode.class);
+        asBlockWalker.visitSwitch(node);
+        assertOut("switch (i) {\n  case 1:\n    break;\n  default:\n    return;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitSwitch_3()
+    {
+        ISwitchNode node = (ISwitchNode) getNode(
+                "switch(i){case 1: { var x:int = 42; break; }; case 2: { var y:int = 66; break; }}", ISwitchNode.class);
+        asBlockWalker.visitSwitch(node);
+        assertOut("switch (i) {\n  case 1:\n    var /** @type {number} */ x = 42;\n    break;\n  case 2:\n    var /** @type {number} */ y = 66;\n    break;\n}");
+    }
+
+    //----------------------------------
+    // if ()
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitIf_1()
+    {
+        IIfNode node = (IIfNode) getNode("if (a) b++;", IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a)\n  b++;");
+    }
+
+    @Override
+    @Test
+    public void testVisitIf_2()
+    {
+        IIfNode node = (IIfNode) getNode("if (a) b++; else c++;", IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a)\n  b++;\nelse\n  c++;");
+    }
+
+    @Override
+    @Test
+    public void testVisitIf_4()
+    {
+        IIfNode node = (IIfNode) getNode(
+                "if (a) b++; else if (c) d++; else if(e) --f;", IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a)\n  b++;\nelse if (c)\n  d++;\nelse if (e)\n  --f;");
+    }
+
+    //----------------------------------
+    // if () { }
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitIf_1a()
+    {
+        IIfNode node = (IIfNode) getNode("if (a) { b++; }", IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a) {\n  b++;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitIf_1b()
+    {
+        IIfNode node = (IIfNode) getNode("if (a) { b++; } else { c++; }",
+                IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a) {\n  b++;\n} else {\n  c++;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitIf_1c()
+    {
+        IIfNode node = (IIfNode) getNode(
+                "if (a) { b++; } else if (b) { c++; } else { d++; }",
+                IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a) {\n  b++;\n} else if (b) {\n  c++;\n} else {\n  d++;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitIf_3()
+    {
+        IIfNode node = (IIfNode) getNode(
+                "if (a) b++; else if (c) d++; else --e;", IIfNode.class);
+        asBlockWalker.visitIf(node);
+        assertOut("if (a)\n  b++;\nelse if (c)\n  d++;\nelse\n  --e;");
+    }
+
+    //----------------------------------
+    // label : for () {}
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitFor_2()
+    {
+        IForLoopNode node = (IForLoopNode) getNode("for (;;) { break; }",
+                IForLoopNode.class);
+        asBlockWalker.visitForLoop(node);
+        assertOut("for (;;) {\n  break;\n}");
+    }
+    
+    //----------------------------------
+    // while () { }
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitWhileLoop_1()
+    {
+        IWhileLoopNode node = (IWhileLoopNode) getNode(
+                "while(a > b){a++;--b;}", IWhileLoopNode.class);
+        asBlockWalker.visitWhileLoop(node);
+        assertOut("while (a > b) {\n  a++;\n  --b;\n}");
+    }
+
+    @Override
+    @Test
+    public void testVisitWhileLoop_1a()
+    {
+        IWhileLoopNode node = (IWhileLoopNode) getNode("while(a > b) a++;",
+                IWhileLoopNode.class);
+        asBlockWalker.visitWhileLoop(node);
+        assertOut("while (a > b)\n  a++;");
+    }
+
+    //----------------------------------
+    // do {} while ()
+    //----------------------------------
+
+    @Override
+    @Test
+    public void testVisitWhileLoop_Do_1()
+    {
+        IWhileLoopNode node = (IWhileLoopNode) getNode(
+                "do {a++;--b;} while(a > b);", IWhileLoopNode.class);
+        asBlockWalker.visitWhileLoop(node);
+        assertOut("do {\n  a++;\n  --b;\n} while (a > b);");
+    }
+
+    @Override
+    @Test
+    public void testVisitWhileLoop_Do_1a()
+    {
+        IWhileLoopNode node = (IWhileLoopNode) getNode("do a++; while(a > b);",
+                IWhileLoopNode.class);
+        asBlockWalker.visitWhileLoop(node);
+        assertOut("do\n  a++;\nwhile (a > b);");
+    }
+
+    //----------------------------------
+    // label : for () {}
+    //----------------------------------
+
+    @Override
+    @Test
     public void testVisitLabel_1()
     {
         LabeledStatementNode node = (LabeledStatementNode) getNode(
                 "foo: for each(var i:int in obj) { break foo; }",
                 LabeledStatementNode.class);
         asBlockWalker.visitLabeledStatement(node);
-        assertOut("foo : for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n{\n\tbreak foo;\n}}\n");
+        assertOut("foo : for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n{\n  break foo;\n}}\n");
     }
 
     @Override
@@ -99,7 +384,27 @@ public class TestFlexJSStatements extends TestGoogStatements
                 "foo: for each(var i:int in obj) break foo;",
                 LabeledStatementNode.class);
         asBlockWalker.visitLabeledStatement(node);
-        assertOut("foo : for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n\n\tbreak foo;}\n");
+        assertOut("foo : for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n\n  break foo;}\n");
+    }
+
+    //----------------------------------
+    // with () {}
+    //----------------------------------
+
+    @Test
+    public void testVisitWith()
+    {
+        IWithNode node = (IWithNode) getNode("with (a) { b; }", IWithNode.class);
+        asBlockWalker.visitWith(node);
+        assertOut("with (a) {\n  b;\n}");
+    }
+
+    @Test
+    public void testVisitWith_1a()
+    {
+        IWithNode node = (IWithNode) getNode("with (a) b;", IWithNode.class);
+        asBlockWalker.visitWith(node);
+        assertOut("with (a)\n  b;");
     }
 
     @Override
@@ -119,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 * @constructor\n */\nFalconTest_A = function() {\n};\n\nFalconTest_A.prototype.falconTest_a = function() {\n\ttry {\n\t\ta;\n\t} catch (e) {\n\t\tif (a) {\n\t\t\tif (b) {\n\t\t\t\tif (c)\n\t\t\t\t\tb;\n\t\t\t\telse if (f)\n\t\t\t\t\ta;\n\t\t\t\telse\n\t\t\t\t\te;\n\t\t\t}\n\t\t}\n\t} finally {\n\t}\n\tif (d)\n\t\tfor (var /** @type {number} */ i = 0; i < len; i++)\n\t\t\tbreak;\n\tif (a) {\n\t\twith (ab) {\n\t\t\tc();\n\t\t}\n\t\tdo {\n\t\t\ta++;\n\t\t\tdo\n\t\t\t\ta++;\n\t\t\twhile (a > b);\n\t\t} while (c > d);\n\t}\n\tif (b) {\n\t\ttry {\n\t\t\ta;\n\t\t\tthrow new Error('foo');\n\t\t} catch (e) {\n\t\t\tswitch (i) {\n\t\t\t\tcase 1:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t} finally {\n\t\t\td;\n\t\t\tvar /** @type {Object} */ a = function(foo, bar) {\n\t\t\t\tbar = typeof bar !== 'undefined' ? bar : 'goo';\n\t\t\t\treturn -1;\n\t\t\t};\n\t\t\teee.dd;\n\t\t\teee.dd;\n\t\t\teee.dd;\n\t\t\teee.dd;
 \n\t\t}\n\t}\n\tfoo : for (var foreachiter0 in obj) \n\t{\n\tvar i = obj[foreachiter0];\n\t\n\t\tbreak foo;}\n\t;\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};");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/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 dc592ed..c5f3109 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
@@ -11,75 +11,78 @@ goog.require('org.apache.flex.net.JSONInputParser');
 goog.require('StockDataJSONItemConverter');
 goog.require('org.apache.flex.events.Event');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.Application}
  */
 FlexJSTest_again = function() {
-	goog.base(this);
-	
-	/**
-	 * @private
-	 * @type {org.apache.flex.core.SimpleCSSValuesImpl}
-	 */
-	this.$ID0;
-	
-	/**
-	 * @private
-	 * @type {MyInitialView}
-	 */
-	this.$ID1;
-	
-	/**
-	 * @private
-	 * @type {models.MyModel}
-	 */
-	this.$ID2;
-	
-	/**
-	 * @private
-	 * @type {controllers.MyController}
-	 */
-	this.$ID3;
-	
-	/**
-	 * @private
-	 * @type {org.apache.flex.net.HTTPService}
-	 */
-	this.service;
-	
-	/**
-	 * @private
-	 * @type {org.apache.flex.net.dataConverters.LazyCollection}
-	 */
-	this.collection;
-	
-	/**
-	 * @private
-	 * @type {org.apache.flex.net.JSONInputParser}
-	 */
-	this.$ID4;
-	
-	/**
-	 * @private
-	 * @type {StockDataJSONItemConverter}
-	 */
-	this.$ID5;
-	
-	/**
-	 * @private
-	 * @type {Array}
-	 */
-	this.mxmldd;
-	
-	/**
-	 * @private
-	 * @type {Array}
-	 */
-	this.mxmldp;
+  goog.base(this);
+  
+  /**
+   * @private
+   * @type {org.apache.flex.core.SimpleCSSValuesImpl}
+   */
+  this.$ID0;
+  
+  /**
+   * @private
+   * @type {MyInitialView}
+   */
+  this.$ID1;
+  
+  /**
+   * @private
+   * @type {models.MyModel}
+   */
+  this.$ID2;
+  
+  /**
+   * @private
+   * @type {controllers.MyController}
+   */
+  this.$ID3;
+  
+  /**
+   * @private
+   * @type {org.apache.flex.net.HTTPService}
+   */
+  this.service;
+  
+  /**
+   * @private
+   * @type {org.apache.flex.net.dataConverters.LazyCollection}
+   */
+  this.collection;
+  
+  /**
+   * @private
+   * @type {org.apache.flex.net.JSONInputParser}
+   */
+  this.$ID4;
+  
+  /**
+   * @private
+   * @type {StockDataJSONItemConverter}
+   */
+  this.$ID5;
+  
+  /**
+   * @private
+   * @type {Array}
+   */
+  this.mxmldd;
+  
+  /**
+   * @private
+   * @type {Array}
+   */
+  this.mxmldp;
 };
 goog.inherits(FlexJSTest_again, org.apache.flex.core.Application);
 
+
 /**
  * @this {FlexJSTest_again}
  * @expose
@@ -87,9 +90,10 @@ 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');
+  this.model/** Cast to models.MyModel */.set_labelText('Hello World');
 };
 
+
 /**
  * @expose
  * @this {FlexJSTest_again}
@@ -97,9 +101,10 @@ FlexJSTest_again.prototype.$EH0 = function(event)
  */
 FlexJSTest_again.prototype.get_service = function()
 {
-	return this.service;
+  return this.service;
 };
 
+
 /**
  * @expose
  * @this {FlexJSTest_again}
@@ -107,10 +112,11 @@ FlexJSTest_again.prototype.get_service = function()
  */
 FlexJSTest_again.prototype.set_service = function(value)
 {
-	if (value != this.service)
-		this.service = value;
+  if (value != this.service)
+    this.service = value;
 };
 
+
 /**
  * @expose
  * @this {FlexJSTest_again}
@@ -118,9 +124,10 @@ FlexJSTest_again.prototype.set_service = function(value)
  */
 FlexJSTest_again.prototype.get_collection = function()
 {
-	return this.collection;
+  return this.collection;
 };
 
+
 /**
  * @expose
  * @this {FlexJSTest_again}
@@ -128,10 +135,11 @@ FlexJSTest_again.prototype.get_collection = function()
  */
 FlexJSTest_again.prototype.set_collection = function(value)
 {
-	if (value != this.collection)
-		this.collection = value;
+  if (value != this.collection)
+    this.collection = value;
 };
 
+
 /**
  * @override
  * @this {FlexJSTest_again}
@@ -139,12 +147,12 @@ FlexJSTest_again.prototype.set_collection = function(value)
  */
 FlexJSTest_again.prototype.get_MXMLProperties = function()
 {
-	if (this.mxmldp == undefined)
-	{
-		/** @type {Array} */
-		var arr = goog.base(this, 'get_MXMLProperties');
-		/** @type {Array} */
-		var data = [
+  if (this.mxmldp == undefined)
+  {
+    /** @type {Array} */
+    var arr = goog.base(this, 'get_MXMLProperties');
+    /** @type {Array} */
+    var data = [
 5,
 'model',
 false,
@@ -165,12 +173,12 @@ null, [org.apache.flex.net.HTTPService, 2, 'id', true, 'service', 'beads', null,
 'initialize',
 this.$EH0
 ];
-	
-		if (arr)
-			this.mxmldp = arr.concat(data);
-		else
-			this.mxmldp = data;
-	}
-	return this.mxmldp;
+  
+    if (arr)
+      this.mxmldp = arr.concat(data);
+    else
+      this.mxmldp = data;
+  }
+  return this.mxmldp;
 };
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4bdbf59/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 d8ae10c..9a7580b 100644
--- a/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/LocalFunction_result.js
@@ -1,31 +1,36 @@
 goog.provide('LocalFunction');
 
+
+
 /**
  * @constructor
  */
 LocalFunction = function() {
 };
 
+
 /**
  * @private
  * @type {string}
  */
 LocalFunction.prototype.myMemberProperty = "got it: ";
 
+
 /**
  * @private
  * @param {number} value
  */
 LocalFunction.prototype.myMemberMethod = function(value) {
-	function myLocalFunction(value) {
-		return this.myMemberProperty + value;
-	};
-	org.apache.flex.utils.Language.trace("WOW! :: " + goog.bind(myLocalFunction, this)(value + 42));
+  function myLocalFunction(value) {
+    return this.myMemberProperty + value;
+  };
+  org.apache.flex.utils.Language.trace("WOW! :: " + goog.bind(myLocalFunction, this)(value + 42));
 };
 
+
 /**
  * @expose
  */
 LocalFunction.prototype.doIt = function() {
-	this.myMemberMethod(624);
-};
\ No newline at end of file
+  this.myMemberMethod(624);
+};


Mime
View raw message