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

Unified Diff: tests/compiler/dart2js/sourcemaps/sourcemap_helper.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 | « tests/compiler/dart2js/sourcemaps/source_mapping_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
diff --git a/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart b/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
index d7aa763be8dc34f44ac9c2243d9688a64552e893..b0dfb21357da0137c2a3fa8aa3f6a4fe2f2bb242 100644
--- a/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
@@ -7,7 +7,8 @@ library sourcemap.helper;
import 'dart:async';
import 'package:compiler/src/apiimpl.dart' as api;
import 'package:compiler/src/dart2jslib.dart' show NullSink;
-import "package:compiler/src/elements/elements.dart";
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/helpers/helpers.dart';
import 'package:compiler/src/filenames.dart';
import 'package:compiler/src/io/source_file.dart';
import 'package:compiler/src/io/source_information.dart';
@@ -106,20 +107,23 @@ class SourceMapProcessor {
}
/// Computes the [SourceMapInfo] for the compiled elements.
- Future<List<SourceMapInfo>> process(List<String> options) async {
+ Future<List<SourceMapInfo>> process(
+ List<String> options,
+ {bool verbose: true}) async {
OutputProvider outputProvider = outputToFile
? new OutputProvider()
: new CloningOutputProvider(targetUri, sourceMapFileUri);
if (options.contains('--use-new-source-info')) {
- print('Using the new source information system.');
+ if (verbose) print('Using the new source information system.');
useNewSourceInfo = true;
}
api.Compiler compiler = await compilerFor({},
outputProvider: outputProvider,
+ // TODO(johnniwinther): Use [verbose] to avoid showing diagnostics.
options: ['--out=$targetUri', '--source-map=$sourceMapFileUri']
..addAll(options));
if (options.contains('--disable-inlining')) {
- print('Inlining disabled');
+ if (verbose) print('Inlining disabled');
compiler.disableInlining = true;
}
« no previous file with comments | « tests/compiler/dart2js/sourcemaps/source_mapping_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698