Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E43CD18943 for ; Mon, 18 Apr 2016 13:31:50 +0000 (UTC) Received: (qmail 86389 invoked by uid 500); 18 Apr 2016 13:31:50 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 86329 invoked by uid 500); 18 Apr 2016 13:31:50 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 86132 invoked by uid 99); 18 Apr 2016 13:31:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 13:31:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 38341E1777; Mon, 18 Apr 2016 13:31:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: cdutz@apache.org To: commits@flex.apache.org Date: Mon, 18 Apr 2016 13:31:57 -0000 Message-Id: <6a77fcb1267b4100b4679686c3d4772a@git.apache.org> In-Reply-To: <8df1c9c589fc425ba7cd86f6f28b40f9@git.apache.org> References: <8df1c9c589fc425ba7cd86f6f28b40f9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/14] git commit: [flex-falcon] [refs/heads/feature/maven-migration-test] - compiler.jx: updated JSEmitter to support new getEndLine() and getEndColumn(), and tweaked some sub-emitters to use this change compiler.jx: updated JSEmitter to support new getEndLine() and getEndColumn(), and tweaked some sub-emitters to use this change Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/01629b23 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/01629b23 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/01629b23 Branch: refs/heads/feature/maven-migration-test Commit: 01629b238544b16f934a91e863f0300956ba6d94 Parents: af3e883 Author: Josh Tynjala Authored: Sun Apr 17 22:46:54 2016 -0700 Committer: Josh Tynjala Committed: Sun Apr 17 22:46:54 2016 -0700 ---------------------------------------------------------------------- .../org/apache/flex/compiler/codegen/js/IJSEmitter.java | 2 +- .../flex/compiler/internal/codegen/js/JSEmitter.java | 10 +++++----- .../flex/compiler/internal/codegen/js/JSSubEmitter.java | 4 ++-- .../internal/codegen/js/jx/BlockCloseEmitter.java | 2 +- .../internal/codegen/js/jx/LiteralContainerEmitter.java | 2 +- .../codegen/js/jx/ObjectLiteralValuePairEmitter.java | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/01629b23/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSEmitter.java index 218b5be..287b8c8 100644 --- a/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/codegen/js/IJSEmitter.java @@ -59,7 +59,7 @@ public interface IJSEmitter extends IASEmitter * Adds a node to the source map after a particular node instead using the * node's own line and column. */ - void startMapping(ISourceLocation node, ISourceLocation nodeBeforeMapping); + void startMapping(ISourceLocation node, ISourceLocation afterNode); /** * Commits a mapping to the source map. http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/01629b23/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java index 1a73cf6..d0a4aa8 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSEmitter.java @@ -366,11 +366,6 @@ public class JSEmitter extends ASEmitter implements IJSEmitter { startMapping(node, node.getLine(), node.getColumn()); } - - public void startMapping(ISourceLocation node, ISourceLocation nodeBeforeMapping) - { - startMapping(node, nodeBeforeMapping.getLine(), nodeBeforeMapping.getColumn() + nodeBeforeMapping.getAbsoluteEnd() - nodeBeforeMapping.getAbsoluteStart()); - } public void startMapping(ISourceLocation node, int line, int column) { @@ -414,6 +409,11 @@ public class JSEmitter extends ASEmitter implements IJSEmitter lastMapping = mapping; } + public void startMapping(ISourceLocation node, ISourceLocation afterNode) + { + startMapping(node, afterNode.getEndLine(), afterNode.getEndColumn()); + } + public void endMapping(ISourceLocation node) { if (lastMapping == null) http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/01629b23/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSubEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSubEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSubEmitter.java index be0b9d1..f947af6 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSubEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/JSSubEmitter.java @@ -114,9 +114,9 @@ public class JSSubEmitter emitter.startMapping(node, line, column); } - protected void startMapping(ISourceLocation node, ISourceLocation nodeBeforeMapping) + protected void startMapping(ISourceLocation node, ISourceLocation afterNode) { - emitter.startMapping(node, nodeBeforeMapping); + emitter.startMapping(node, afterNode); } protected void endMapping(ISourceLocation node) http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/01629b23/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BlockCloseEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BlockCloseEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BlockCloseEmitter.java index 3099eda..058d132 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BlockCloseEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/BlockCloseEmitter.java @@ -36,7 +36,7 @@ public class BlockCloseEmitter extends JSSubEmitter implements @Override public void emit(IContainerNode node) { - startMapping(node); + startMapping(node, node); write(ASEmitterTokens.BLOCK_CLOSE); endMapping(node); } http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/01629b23/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java index d1d24fd..5e0fdce 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/LiteralContainerEmitter.java @@ -88,7 +88,7 @@ public class LiteralContainerEmitter extends JSSubEmitter implements if (postFix != null) { - startMapping(node, node.getLine(), node.getColumn() + node.getAbsoluteEnd() - node.getAbsoluteStart() - 1); + startMapping(node, node.getEndLine(), node.getEndColumn() - postFix.length()); write(postFix); endMapping(node); } http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/01629b23/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/ObjectLiteralValuePairEmitter.java ---------------------------------------------------------------------- diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/ObjectLiteralValuePairEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/ObjectLiteralValuePairEmitter.java index d93d701..ad12b77 100644 --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/ObjectLiteralValuePairEmitter.java +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/jx/ObjectLiteralValuePairEmitter.java @@ -38,14 +38,14 @@ public class ObjectLiteralValuePairEmitter extends JSSubEmitter implements @Override public void emit(IObjectLiteralValuePairNode node) { - ISourceLocation sourceLocationNode = (ISourceLocation) node; + ISourceLocation location = (ISourceLocation) node; IExpressionNode nameNode = node.getNameNode(); getWalker().walk(nameNode); - startMapping(sourceLocationNode, nameNode); + startMapping(location, nameNode); write(ASEmitterTokens.COLON); - endMapping(sourceLocationNode); + endMapping(location); IExpressionNode valueNode = node.getValueNode(); getWalker().walk(valueNode);