OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library sourcemap.helper; | 5 library sourcemap.helper; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'package:compiler/compiler_new.dart'; | 8 import 'package:compiler/compiler_new.dart'; |
9 import 'package:compiler/src/apiimpl.dart' as api; | 9 import 'package:compiler/src/apiimpl.dart' as api; |
10 import 'package:compiler/src/null_compiler_output.dart' show NullSink; | 10 import 'package:compiler/src/null_compiler_output.dart' show NullSink; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 Future<List<SourceMapInfo>> process( | 113 Future<List<SourceMapInfo>> process( |
114 List<String> options, | 114 List<String> options, |
115 {bool verbose: true}) async { | 115 {bool verbose: true}) async { |
116 OutputProvider outputProvider = outputToFile | 116 OutputProvider outputProvider = outputToFile |
117 ? new OutputProvider() | 117 ? new OutputProvider() |
118 : new CloningOutputProvider(targetUri, sourceMapFileUri); | 118 : new CloningOutputProvider(targetUri, sourceMapFileUri); |
119 if (options.contains('--use-new-source-info')) { | 119 if (options.contains('--use-new-source-info')) { |
120 if (verbose) print('Using the new source information system.'); | 120 if (verbose) print('Using the new source information system.'); |
121 useNewSourceInfo = true; | 121 useNewSourceInfo = true; |
122 } | 122 } |
123 api.Compiler compiler = await compilerFor( | 123 api.CompilerImpl compiler = await compilerFor( |
124 outputProvider: outputProvider, | 124 outputProvider: outputProvider, |
125 // TODO(johnniwinther): Use [verbose] to avoid showing diagnostics. | 125 // TODO(johnniwinther): Use [verbose] to avoid showing diagnostics. |
126 options: ['--out=$targetUri', '--source-map=$sourceMapFileUri'] | 126 options: ['--out=$targetUri', '--source-map=$sourceMapFileUri'] |
127 ..addAll(options)); | 127 ..addAll(options)); |
128 if (options.contains('--disable-inlining')) { | 128 if (options.contains('--disable-inlining')) { |
129 if (verbose) print('Inlining disabled'); | 129 if (verbose) print('Inlining disabled'); |
130 compiler.disableInlining = true; | 130 compiler.disableInlining = true; |
131 } | 131 } |
132 | 132 |
133 JavaScriptBackend backend = compiler.backend; | 133 JavaScriptBackend backend = compiler.backend; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 this.jsCode, | 329 this.jsCode, |
330 this.sourceLocation, | 330 this.sourceLocation, |
331 this.dartCode, | 331 this.dartCode, |
332 {this.isMissing: false}); | 332 {this.isMissing: false}); |
333 | 333 |
334 String toString() { | 334 String toString() { |
335 return 'CodePoint[kind=$kind,js=$jsCode,dart=$dartCode,' | 335 return 'CodePoint[kind=$kind,js=$jsCode,dart=$dartCode,' |
336 'location=$sourceLocation]'; | 336 'location=$sourceLocation]'; |
337 } | 337 } |
338 } | 338 } |
OLD | NEW |