flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [45/50] git commit: [flex-falcon] [refs/heads/feature/maven-migration] - compiler.jx: JSSubEmitters no longer call getEmitter() before startMapping() or endMapping() (just migrating some of the older code to the new style)
Date Mon, 11 Apr 2016 14:00:12 GMT
compiler.jx: JSSubEmitters no longer call getEmitter() before startMapping() or endMapping()
(just migrating some of the older code to the new style)


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

Branch: refs/heads/feature/maven-migration
Commit: 4cc081b01c8a86e4408e28d018ab2e14876151fe
Parents: 584f433
Author: Josh Tynjala <joshtynjala@apache.org>
Authored: Fri Apr 8 14:17:56 2016 -0700
Committer: Josh Tynjala <joshtynjala@apache.org>
Committed: Fri Apr 8 14:17:56 2016 -0700

----------------------------------------------------------------------
 .../internal/codegen/js/jx/AsIsEmitter.java     | 22 ++++++++++----------
 .../codegen/js/jx/BinaryOperatorEmitter.java    | 12 +++++------
 .../internal/codegen/js/jx/FieldEmitter.java    |  8 +++----
 .../codegen/js/jx/FunctionCallEmitter.java      | 12 +++++------
 .../internal/codegen/js/jx/LiteralEmitter.java  |  4 ++--
 .../codegen/js/jx/MemberAccessEmitter.java      |  8 +++----
 .../internal/codegen/js/jx/MethodEmitter.java   |  8 +++----
 .../codegen/js/jx/VarDeclarationEmitter.java    | 14 ++++++-------
 8 files changed, 44 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
index 36e2cd0..793b14f 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/AsIsEmitter.java
@@ -136,11 +136,11 @@ public class AsIsEmitter extends JSSubEmitter
         if (node instanceof IBinaryOperatorNode)
         {
             IBinaryOperatorNode binaryOperatorNode = (IBinaryOperatorNode) node; 
-            getEmitter().startMapping(node, binaryOperatorNode.getLeftOperandNode());
+            startMapping(node, binaryOperatorNode.getLeftOperandNode());
         }
         else
         {
-            getEmitter().startMapping(node);
+            startMapping(node);
         }
         write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
         write(ASEmitterTokens.MEMBER_ACCESS);
@@ -151,26 +151,26 @@ public class AsIsEmitter extends JSSubEmitter
             write(ASEmitterTokens.AS);
 
         write(ASEmitterTokens.PAREN_OPEN);
-        getEmitter().endMapping(node);
+        endMapping(node);
         
         getWalker().walk(left);
         if (node instanceof IBinaryOperatorNode)
         {
             IBinaryOperatorNode binaryOperatorNode = (IBinaryOperatorNode) node;
-            getEmitter().startMapping(node, binaryOperatorNode.getLeftOperandNode());
+            startMapping(node, binaryOperatorNode.getLeftOperandNode());
         }
         else
         {
-            getEmitter().startMapping(node);
+            startMapping(node);
         }
         writeToken(ASEmitterTokens.COMMA);
-        getEmitter().endMapping(node);
+        endMapping(node);
 
         if (dnode instanceof IClassDefinition)
         {
-            getEmitter().startMapping(right);
+            startMapping(right);
             write(getEmitter().formatQualifiedName(dnode.getQualifiedName()));
-            getEmitter().endMapping(right);
+            endMapping(right);
         }
         else
         {
@@ -180,11 +180,11 @@ public class AsIsEmitter extends JSSubEmitter
         if (node instanceof IBinaryOperatorNode)
         {
             IBinaryOperatorNode binaryOperatorNode = (IBinaryOperatorNode) node;
-            getEmitter().startMapping(node, binaryOperatorNode.getLeftOperandNode());
+            startMapping(node, binaryOperatorNode.getLeftOperandNode());
         }
         else
         {
-            getEmitter().startMapping(node);
+            startMapping(node);
         }
         if (coercion)
         {
@@ -193,7 +193,7 @@ public class AsIsEmitter extends JSSubEmitter
         }
 
         write(ASEmitterTokens.PAREN_CLOSE);
-        getEmitter().endMapping(node);
+        endMapping(node);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
index d97c20a..6e5cc75 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BinaryOperatorEmitter.java
@@ -71,10 +71,10 @@ public class BinaryOperatorEmitter extends JSSubEmitter implements
         {
             getWalker().walk(node.getLeftOperandNode());
 
-            getEmitter().startMapping(node, node.getLeftOperandNode());
+            startMapping(node, node.getLeftOperandNode());
             write(ASEmitterTokens.SPACE);
             writeToken(ASEmitterTokens.INSTANCEOF);
-            getEmitter().endMapping(node);
+            endMapping(node);
 
             IDefinition dnode = (node.getRightOperandNode())
                     .resolve(getProject());
@@ -330,7 +330,7 @@ public class BinaryOperatorEmitter extends JSSubEmitter implements
         {
             getWalker().walk(node.getLeftOperandNode());
 
-            getEmitter().startMapping(node, node.getLeftOperandNode());
+            startMapping(node, node.getLeftOperandNode());
             
             if (id != ASTNodeID.Op_CommaID)
                 write(ASEmitterTokens.SPACE);
@@ -343,10 +343,10 @@ public class BinaryOperatorEmitter extends JSSubEmitter implements
                         .getLeftOperandNode();
 
                 writeToken(ASEmitterTokens.EQUAL);
-                getEmitter().endMapping(node);
+                endMapping(node);
                 write(lnode.getName());
 
-                getEmitter().startMapping(node, node.getLeftOperandNode());
+                startMapping(node, node.getLeftOperandNode());
                 write(ASEmitterTokens.SPACE);
                 write((id == ASTNodeID.Op_LogicalAndAssignID) ? ASEmitterTokens.LOGICAL_AND
                         : ASEmitterTokens.LOGICAL_OR);
@@ -357,7 +357,7 @@ public class BinaryOperatorEmitter extends JSSubEmitter implements
             }
 
             write(ASEmitterTokens.SPACE);
-            getEmitter().endMapping(node);
+            endMapping(node);
 
             /*
             IDefinition definition = node.getRightOperandNode().resolve(getProject());

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
index 8e03b91..402751f 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FieldEmitter.java
@@ -84,11 +84,11 @@ public class FieldEmitter extends JSSubEmitter implements
             if (definition == null)
                 definition = ndef.getContainingScope().getDefinition();
 
-            getEmitter().startMapping(node.getNameExpressionNode());
+            startMapping(node.getNameExpressionNode());
             write(getEmitter().formatQualifiedName(definition.getQualifiedName())
                     + ASEmitterTokens.MEMBER_ACCESS.getToken() + root);
             write(node.getName());
-            getEmitter().endMapping(node.getNameExpressionNode());
+            endMapping(node.getNameExpressionNode());
         }
 
         if (node.getNodeID() == ASTNodeID.BindableVariableID)
@@ -101,10 +101,10 @@ public class FieldEmitter extends JSSubEmitter implements
         if (vnode != null &&
                 (ndef.isStatic() || EmitterUtils.isScalar(vnode) || isPackageOrFileMember))
         {
-            getEmitter().startMapping(node);
+            startMapping(node);
             write(ASEmitterTokens.SPACE);
             writeToken(ASEmitterTokens.EQUAL);
-            getEmitter().endMapping(node);
+            endMapping(node);
             getEmitter().getWalker().walk(vnode);
         }
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
index ed55481..f1f1923 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/FunctionCallEmitter.java
@@ -76,9 +76,9 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
             {
                 if (!(node.getChild(1) instanceof VectorLiteralNode))
                 {
-                    getEmitter().startMapping(node.getNewKeywordNode());
+                    startMapping(node.getNewKeywordNode());
                     writeToken(ASEmitterTokens.NEW);
-                    getEmitter().endMapping(node.getNewKeywordNode());
+                    endMapping(node.getNewKeywordNode());
                 }
                 else
                 {
@@ -113,9 +113,9 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
                 // all new calls to a class should be fully qualified names
                 if (def instanceof ClassDefinition)
                 {
-                    getEmitter().startMapping(nameNode);
+                    startMapping(nameNode);
                     write(getEmitter().formatQualifiedName(def.getQualifiedName()));
-                    getEmitter().endMapping(nameNode);
+                    endMapping(nameNode);
                 }
                 else
                 {
@@ -144,12 +144,12 @@ public class FunctionCallEmitter extends JSSubEmitter implements ISubEmitter<IFu
                         ICompilerProject project = this.getProject();
                         if (project instanceof FlexJSProject)
                             ((FlexJSProject) project).needLanguage = true;
-                        getEmitter().startMapping(node.getNameNode());
+                        startMapping(node.getNameNode());
                         write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
                         write(ASEmitterTokens.MEMBER_ACCESS);
                         if (isInt)
                             write(JSFlexJSEmitterTokens.UNDERSCORE);
-                        getEmitter().endMapping(node.getNameNode());
+                        endMapping(node.getNameNode());
                     }
                     else if (def != null && def.getBaseName().equals("sortOn"))
                 	{

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralEmitter.java
index e3827e6..a332f23 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralEmitter.java
@@ -122,9 +122,9 @@ public class LiteralEmitter extends JSSubEmitter implements
 
         if (!isWritten)
         {
-			getEmitter().startMapping(node);
+			startMapping(node);
             write(s);
-			getEmitter().endMapping(node);
+			endMapping(node);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
index 1756487..7088431 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MemberAccessEmitter.java
@@ -246,9 +246,9 @@ public class MemberAccessEmitter extends JSSubEmitter implements
         	continueWalk = writeLeftSide(node, leftNode, rightNode);
             if (continueWalk)
             {
-                getEmitter().startMapping(node, node.getLeftOperandNode());
+                startMapping(node, node.getLeftOperandNode());
                 write(node.getOperator().getOperatorText());
-                getEmitter().endMapping(node);
+                endMapping(node);
             }
         }
 
@@ -313,9 +313,9 @@ public class MemberAccessEmitter extends JSSubEmitter implements
         }
         else
         {
-            getEmitter().startMapping(leftNode);
+            startMapping(leftNode);
             write(ASEmitterTokens.THIS);
-            getEmitter().endMapping(leftNode);
+            endMapping(leftNode);
         }
         return true;
     }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MethodEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MethodEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MethodEmitter.java
index ee2b499..b624621 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MethodEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/MethodEmitter.java
@@ -74,7 +74,7 @@ public class MethodEmitter extends JSSubEmitter implements
         }
         else
         {
-            getEmitter().startMapping(node.getNameExpressionNode());
+            startMapping(node.getNameExpressionNode());
             ITypeDefinition typeDef = EmitterUtils.getTypeDefinition(node);
             if (typeDef != null)
             {
@@ -97,14 +97,14 @@ public class MethodEmitter extends JSSubEmitter implements
             {
                 fjs.emitMemberName(node);
             }
-            getEmitter().endMapping(node.getNameExpressionNode());
+            endMapping(node.getNameExpressionNode());
         }
 
-        getEmitter().startMapping(node);
+        startMapping(node);
         write(ASEmitterTokens.SPACE);
         writeToken(ASEmitterTokens.EQUAL);
         write(ASEmitterTokens.FUNCTION);
-        getEmitter().endMapping(node);
+        endMapping(node);
 
         fjs.emitParameters(node.getParametersContainerNode());
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4cc081b0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
index 322c778..f43b288 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
@@ -56,7 +56,7 @@ public class VarDeclarationEmitter extends JSSubEmitter implements
         IExpressionNode variableTypeNode = node.getVariableTypeNode();
         if(variableTypeNode.getLine() >= 0)
         {
-            getEmitter().startMapping(variableTypeNode,
+            startMapping(variableTypeNode,
                     variableTypeNode.getLine(),
                     variableTypeNode.getColumn() - 1); //include the :
         }
@@ -67,7 +67,7 @@ public class VarDeclarationEmitter extends JSSubEmitter implements
             //the compiler generates a node for type *.
             //in this case, put it at the end of the name expression.
             IExpressionNode nameExpressionNode = node.getNameExpressionNode();
-            getEmitter().startMapping(variableTypeNode, nameExpressionNode.getLine(),
+            startMapping(variableTypeNode, nameExpressionNode.getLine(),
                     nameExpressionNode.getColumn() + nameExpressionNode.getAbsoluteEnd()
- nameExpressionNode.getAbsoluteStart());
         }
         IExpressionNode avnode = node.getAssignedValueNode();
@@ -85,7 +85,7 @@ public class VarDeclarationEmitter extends JSSubEmitter implements
         {
             fjs.getDocEmitter().emitVarDoc(node, null, getWalker().getProject());
         }
-        getEmitter().endMapping(variableTypeNode);
+        endMapping(variableTypeNode);
 
         if (!(node instanceof ChainedVariableNode) && node.isConst())
         {
@@ -95,10 +95,10 @@ public class VarDeclarationEmitter extends JSSubEmitter implements
         fjs.emitDeclarationName(node);
         if (avnode != null && !(avnode instanceof IEmbedNode))
         {
-            getEmitter().startMapping(node, node.getVariableTypeNode());
+            startMapping(node, node.getVariableTypeNode());
             write(ASEmitterTokens.SPACE);
             writeToken(ASEmitterTokens.EQUAL);
-            getEmitter().endMapping(node);
+            endMapping(node);
             fjs.emitAssignedValue(avnode);
         }
 
@@ -111,9 +111,9 @@ public class VarDeclarationEmitter extends JSSubEmitter implements
                 IASNode child = node.getChild(i);
                 if (child instanceof ChainedVariableNode)
                 {
-                    getEmitter().startMapping(node, node.getChild(i - 1));
+                    startMapping(node, node.getChild(i - 1));
                     writeToken(ASEmitterTokens.COMMA);
-                    getEmitter().endMapping(node);
+                    endMapping(node);
                     fjs.emitVarDeclaration((IVariableNode) child);
                 }
             }


Mime
View raw message