flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [1/2] git commit: [flex-falcon] [refs/heads/develop] - Make room for more class metadata on JS classes: FLEXJS_CLASS_INFO. Changed implementation of interface info array to match the new wrapping info object.
Date Wed, 06 Nov 2013 09:03:12 GMT
Updated Branches:
  refs/heads/develop 20296ebb1 -> e87761e50


Make room for more class metadata on JS classes: FLEXJS_CLASS_INFO. Changed implementation
of interface info array to match the new wrapping info object.

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

Branch: refs/heads/develop
Commit: abc189b90dcde2d8ab253217926959f064ad7de7
Parents: 20296eb
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Wed Nov 6 10:01:09 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Wed Nov 6 10:01:09 2013 +0100

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


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/abc189b9/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 932c3c3..3f3ad05 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
@@ -950,15 +950,21 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                 writeNewline();
                 writeNewline();
                 getDoc().begin();
-                getDoc().emitConst(null);
+                getDoc().emitPublic(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.AFJS_INTERFACES);
+                writeToken(JSFlexJSEmitterTokens.FLEXJS_CLASS_INFO);
                 writeToken(ASEmitterTokens.EQUAL);
+                writeToken(ASEmitterTokens.BLOCK_OPEN);
+                
+                // interfaces
+                write(JSFlexJSEmitterTokens.INTERFACES);
+                writeToken(ASEmitterTokens.COLON);
                 write(ASEmitterTokens.SQUARE_OPEN);
                 int i = 0;
                 for (IExpressionNode enode : enodes)
@@ -969,6 +975,9 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                     i++;
                 }
                 write(ASEmitterTokens.SQUARE_CLOSE);
+
+                write(ASEmitterTokens.SPACE);
+                write(ASEmitterTokens.BLOCK_CLOSE);
                 writeNewline(ASEmitterTokens.SEMICOLON);
             }
         }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/abc189b9/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 0acef43..10ff880 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
@@ -26,7 +26,8 @@ import org.apache.flex.compiler.codegen.IEmitterTokens;
  */
 public enum JSFlexJSEmitterTokens implements IEmitterTokens
 {
-    AFJS_INTERFACES("AFJS_INTERFACES"),
+    FLEXJS_CLASS_INFO("FLEXJS_CLASS_INFO"),
+    INTERFACES("interfaces"),
     LANGUAGE_QNAME("org.apache.flex.utils.Language"),
     UNDERSCORE("_"),
     ;


Mime
View raw message