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

Side by Side Diff: pkg/compiler/lib/src/compiler.dart

Issue 1851753002: Enable conditional directives by default. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 7 import 'dart:async' show
8 EventSink, 8 EventSink,
9 Future; 9 Future;
10 10
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 backend = jsBackend; 392 backend = jsBackend;
393 } else { 393 } else {
394 backend = new dart_backend.DartBackend(this, options.strips, 394 backend = new dart_backend.DartBackend(this, options.strips,
395 multiFile: options.dart2dartMultiFile); 395 multiFile: options.dart2dartMultiFile);
396 if (options.dumpInfo) { 396 if (options.dumpInfo) {
397 throw new ArgumentError('--dump-info is not supported for dart2dart.'); 397 throw new ArgumentError('--dump-info is not supported for dart2dart.');
398 } 398 }
399 } 399 }
400 400
401 tasks = [ 401 tasks = [
402 dietParser = new DietParserTask( 402 dietParser = new DietParserTask(this),
403 this, enableConditionalDirectives: options.enableConditionalDirectives ),
404 scanner = createScannerTask(), 403 scanner = createScannerTask(),
405 serialization = new SerializationTask(this), 404 serialization = new SerializationTask(this),
406 libraryLoader = new LibraryLoaderTask(this, 405 libraryLoader = new LibraryLoaderTask(this,
407 new _ResolvedUriTranslator(this), 406 new _ResolvedUriTranslator(this),
408 new _ScriptLoader(this), 407 new _ScriptLoader(this),
409 new _ElementScanner(scanner), 408 new _ElementScanner(scanner),
410 this.serialization, 409 this.serialization,
411 this, 410 this,
412 environment), 411 environment),
413 parser = new ParserTask(this, 412 parser = new ParserTask(this),
414 enableConditionalDirectives: options.enableConditionalDirectives), 413 patchParser = new PatchParserTask(this),
415 patchParser = new PatchParserTask(
416 this, enableConditionalDirectives: options.enableConditionalDirectives ),
417 resolver = createResolverTask(), 414 resolver = createResolverTask(),
418 closureToClassMapper = new closureMapping.ClosureTask(this), 415 closureToClassMapper = new closureMapping.ClosureTask(this),
419 checker = new TypeCheckerTask(this), 416 checker = new TypeCheckerTask(this),
420 typesTask = new ti.TypesTask(this), 417 typesTask = new ti.TypesTask(this),
421 constants = backend.constantCompilerTask, 418 constants = backend.constantCompilerTask,
422 deferredLoadTask = new DeferredLoadTask(this), 419 deferredLoadTask = new DeferredLoadTask(this),
423 mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this), 420 mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this),
424 enqueuer = new EnqueueTask(this), 421 enqueuer = new EnqueueTask(this),
425 dumpInfoTask = new DumpInfoTask(this), 422 dumpInfoTask = new DumpInfoTask(this),
426 reuseLibraryTask = new GenericTask('Reuse library', this), 423 reuseLibraryTask = new GenericTask('Reuse library', this),
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 _ElementScanner(this.scanner); 2154 _ElementScanner(this.scanner);
2158 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2155 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2159 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2156 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2160 } 2157 }
2161 2158
2162 class _EmptyEnvironment implements Environment { 2159 class _EmptyEnvironment implements Environment {
2163 const _EmptyEnvironment(); 2160 const _EmptyEnvironment();
2164 2161
2165 String valueOf(String key) => null; 2162 String valueOf(String key) => null;
2166 } 2163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698