| 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 'cache_strategy.dart' show CacheStrategy; | 10 import 'cache_strategy.dart' show CacheStrategy; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // for global dependencies. | 223 // for global dependencies. |
| 224 globalDependencies = new GlobalDependencyRegistry(); | 224 globalDependencies = new GlobalDependencyRegistry(); |
| 225 | 225 |
| 226 if (makeBackend != null) { | 226 if (makeBackend != null) { |
| 227 backend = makeBackend(this); | 227 backend = makeBackend(this); |
| 228 } else { | 228 } else { |
| 229 backend = createBackend(); | 229 backend = createBackend(); |
| 230 } | 230 } |
| 231 enqueuer = backend.makeEnqueuer(); | 231 enqueuer = backend.makeEnqueuer(); |
| 232 | 232 |
| 233 if (options.dumpInfo && options.useStartupEmitter) { | |
| 234 throw new ArgumentError( | |
| 235 '--dump-info is not supported with the fast startup emitter'); | |
| 236 } | |
| 237 | |
| 238 tasks = [ | 233 tasks = [ |
| 239 dietParser = new DietParserTask(idGenerator, backend, reporter, measurer), | 234 dietParser = new DietParserTask(idGenerator, backend, reporter, measurer), |
| 240 scanner = createScannerTask(), | 235 scanner = createScannerTask(), |
| 241 serialization = new SerializationTask(this), | 236 serialization = new SerializationTask(this), |
| 242 libraryLoader = new LibraryLoaderTask( | 237 libraryLoader = new LibraryLoaderTask( |
| 243 resolvedUriTranslator, | 238 resolvedUriTranslator, |
| 244 options.compileOnly | 239 options.compileOnly |
| 245 ? new _NoScriptLoader(this) | 240 ? new _NoScriptLoader(this) |
| 246 : new _ScriptLoader(this), | 241 : new _ScriptLoader(this), |
| 247 new _ElementScanner(scanner), | 242 new _ElementScanner(scanner), |
| (...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 _ElementScanner(this.scanner); | 2227 _ElementScanner(this.scanner); |
| 2233 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2228 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
| 2234 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2229 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
| 2235 } | 2230 } |
| 2236 | 2231 |
| 2237 class _EmptyEnvironment implements Environment { | 2232 class _EmptyEnvironment implements Environment { |
| 2238 const _EmptyEnvironment(); | 2233 const _EmptyEnvironment(); |
| 2239 | 2234 |
| 2240 String valueOf(String key) => null; | 2235 String valueOf(String key) => null; |
| 2241 } | 2236 } |
| OLD | NEW |