You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2017/06/11 02:32:04 UTC
git commit: [flex-falcon] [refs/heads/initializers] - initialise
Boolean to false and Numbers to NaN
Repository: flex-falcon
Updated Branches:
refs/heads/initializers [created] c17bdc9a5
initialise Boolean to false and Numbers to NaN
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/c17bdc9a
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c17bdc9a
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c17bdc9a
Branch: refs/heads/initializers
Commit: c17bdc9a5ac163b0b265343f518364ebb3631556
Parents: 7121b45
Author: Justin Mclean <jm...@apache.org>
Authored: Sun Jun 11 12:31:38 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sun Jun 11 12:31:38 2017 +1000
----------------------------------------------------------------------
.../codegen/js/jx/VarDeclarationEmitter.java | 22 ++++++++++++++++++++
1 file changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c17bdc9a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
index 4e35e39..67ae28f 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
@@ -194,6 +194,28 @@ public class VarDeclarationEmitter extends JSSubEmitter implements
write("0");
}
}
+ else if (defName.equals("Boolean"))
+ {
+ if (node.getParent() != null &&
+ node.getParent().getParent() != null &&
+ node.getParent().getParent().getNodeID() != ASTNodeID.Op_InID)
+ {
+ write(ASEmitterTokens.SPACE);
+ writeToken(ASEmitterTokens.EQUAL);
+ write(ASEmitterTokens.FALSE);
+ }
+ }
+ else if (defName.equals("Number"))
+ {
+ if (node.getParent() != null &&
+ node.getParent().getParent() != null &&
+ node.getParent().getParent().getNodeID() != ASTNodeID.Op_InID)
+ {
+ write(ASEmitterTokens.SPACE);
+ writeToken(ASEmitterTokens.EQUAL);
+ write("NaN");
+ }
+ }
}
}