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

Unified Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart

Issue 1229673006: Generated source mapping through CPS. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 5 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/ssa/builder.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
index 9dd0d2aa211f5db652bd13c9719e2b50c2a1535c..6fda009eb9f3c3c88e8f903c043b4fd8a9ef2468 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
@@ -6,6 +6,7 @@ library tree_ir.optimization.statement_rewriter;
import 'optimization.dart' show Pass;
import '../tree_ir_nodes.dart';
+import '../../io/source_information.dart';
/**
* Translates to direct-style.
@@ -924,7 +925,11 @@ class StatementRewriter extends Transformer implements Pass {
if (s is Return && t is Return) {
CombinedExpressions values = combineExpressions(s.value, t.value);
if (values != null) {
- return new Return(values.combined);
+ // TODO(johnniwinther): Handle multiple source informations.
+ SourceInformation sourceInformation = s.sourceInformation != null
+ ? s.sourceInformation : t.sourceInformation;
+ return new Return(values.combined,
+ sourceInformation: sourceInformation);
}
}
if (s is ExpressionStatement && t is ExpressionStatement) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698