Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: pkg/compiler/lib/src/io/position_information.dart

Issue 1785633002: Make source information mandatory for building send-like node in CPS (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/io/source_information.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/io/position_information.dart
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 1a561cdff8299abce1b025de3cc595a669531a28..e2ddf039e2ad73a77f83bbd7281c954c864b301f 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -222,6 +222,8 @@ class PositionSourceInformationBuilder implements SourceInformationBuilder {
sourceFile, right.getBeginToken().charOffset, name));
}
+ // TODO(johnniwinther): Clean up the use of this and [buildBinary],
+ // [buildIndex], etc.
@override
SourceInformation buildCall(Node receiver, Node call) {
return new PositionSourceInformation(
@@ -266,6 +268,42 @@ class PositionSourceInformationBuilder implements SourceInformationBuilder {
SourceInformationBuilder forContext(AstElement element) {
return new PositionSourceInformationBuilder(element);
}
+
+ @override
+ SourceInformation buildForeignCode(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildStringInterpolation(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildForInIterator(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildForInMoveNext(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildForInCurrent(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildForInSet(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildIndex(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildIndexSet(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildBinary(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildCatch(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildIs(Node node) => buildBegin(node);
+
+ @override
+ SourceInformation buildAs(Node node) => buildBegin(node);
}
/// The start, end and closing offsets for a [js.Node].
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/io/source_information.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698