| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // for global dependencies. | 249 // for global dependencies. |
| 250 globalDependencies = new GlobalDependencyRegistry(this); | 250 globalDependencies = new GlobalDependencyRegistry(this); |
| 251 | 251 |
| 252 if (makeBackend != null) { | 252 if (makeBackend != null) { |
| 253 backend = makeBackend(this); | 253 backend = makeBackend(this); |
| 254 } else { | 254 } else { |
| 255 js_backend.JavaScriptBackend jsBackend = new js_backend.JavaScriptBackend( | 255 js_backend.JavaScriptBackend jsBackend = new js_backend.JavaScriptBackend( |
| 256 this, | 256 this, |
| 257 generateSourceMap: options.generateSourceMap, | 257 generateSourceMap: options.generateSourceMap, |
| 258 useStartupEmitter: options.useStartupEmitter, | 258 useStartupEmitter: options.useStartupEmitter, |
| 259 useNewSourceInfo: options.useNewSourceInfo); | 259 useNewSourceInfo: options.useNewSourceInfo, |
| 260 useKernel: options.useKernel); |
| 260 backend = jsBackend; | 261 backend = jsBackend; |
| 261 } | 262 } |
| 262 | 263 |
| 263 if (options.dumpInfo && options.useStartupEmitter) { | 264 if (options.dumpInfo && options.useStartupEmitter) { |
| 264 throw new ArgumentError( | 265 throw new ArgumentError( |
| 265 '--dump-info is not supported with the fast startup emitter'); | 266 '--dump-info is not supported with the fast startup emitter'); |
| 266 } | 267 } |
| 267 | 268 |
| 268 tasks = [ | 269 tasks = [ |
| 269 dietParser = | 270 dietParser = |
| (...skipping 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 _ElementScanner(this.scanner); | 2234 _ElementScanner(this.scanner); |
| 2234 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 2235 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
| 2235 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 2236 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
| 2236 } | 2237 } |
| 2237 | 2238 |
| 2238 class _EmptyEnvironment implements Environment { | 2239 class _EmptyEnvironment implements Environment { |
| 2239 const _EmptyEnvironment(); | 2240 const _EmptyEnvironment(); |
| 2240 | 2241 |
| 2241 String valueOf(String key) => null; | 2242 String valueOf(String key) => null; |
| 2242 } | 2243 } |
| OLD | NEW |