| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 dart2js.compiler_base; | 5 library dart2js.compiler_base; |
| 6 | 6 |
| 7 import 'dart:async' show EventSink, Future; | 7 import 'dart:async' show EventSink, Future; |
| 8 | 8 |
| 9 import '../compiler_new.dart' as api; | 9 import '../compiler_new.dart' as api; |
| 10 import 'closure.dart' as closureMapping show ClosureTask; | 10 import 'closure.dart' as closureMapping show ClosureTask; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 tasks.addAll(backend.tasks); | 260 tasks.addAll(backend.tasks); |
| 261 } | 261 } |
| 262 | 262 |
| 263 /// Creates the backend. | 263 /// Creates the backend. |
| 264 /// | 264 /// |
| 265 /// Override this to mock the backend for testing. | 265 /// Override this to mock the backend for testing. |
| 266 js_backend.JavaScriptBackend createBackend() { | 266 js_backend.JavaScriptBackend createBackend() { |
| 267 return new js_backend.JavaScriptBackend(this, | 267 return new js_backend.JavaScriptBackend(this, |
| 268 generateSourceMap: options.generateSourceMap, | 268 generateSourceMap: options.generateSourceMap, |
| 269 useStartupEmitter: options.useStartupEmitter, | 269 useStartupEmitter: options.useStartupEmitter, |
| 270 useMultiSourceInfo: options.useMultiSourceInfo, |
| 270 useNewSourceInfo: options.useNewSourceInfo, | 271 useNewSourceInfo: options.useNewSourceInfo, |
| 271 useKernel: options.useKernel); | 272 useKernel: options.useKernel); |
| 272 } | 273 } |
| 273 | 274 |
| 274 /// Creates the scanner task. | 275 /// Creates the scanner task. |
| 275 /// | 276 /// |
| 276 /// Override this to mock the scanner for testing. | 277 /// Override this to mock the scanner for testing. |
| 277 ScannerTask createScannerTask() => | 278 ScannerTask createScannerTask() => |
| 278 new ScannerTask(dietParser, reporter, measurer, | 279 new ScannerTask(dietParser, reporter, measurer, |
| 279 preserveComments: options.preserveComments, commentMap: commentMap); | 280 preserveComments: options.preserveComments, commentMap: commentMap); |
| (...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 if (library != null && library.isSynthesized) { | 2070 if (library != null && library.isSynthesized) { |
| 2070 return null; | 2071 return null; |
| 2071 } | 2072 } |
| 2072 if (library == null && required) { | 2073 if (library == null && required) { |
| 2073 throw new SpannableAssertionFailure( | 2074 throw new SpannableAssertionFailure( |
| 2074 library, "The library '${uri}' was not found."); | 2075 library, "The library '${uri}' was not found."); |
| 2075 } | 2076 } |
| 2076 return library; | 2077 return library; |
| 2077 } | 2078 } |
| 2078 } | 2079 } |
| OLD | NEW |