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

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

Issue 1881293002: dart2js: use IdGenerator for all id generation (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
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 import 'typechecker.dart' show TypeCheckerTask; 82 import 'typechecker.dart' show TypeCheckerTask;
83 import 'types/types.dart' as ti; 83 import 'types/types.dart' as ti;
84 import 'universe/call_structure.dart' show CallStructure; 84 import 'universe/call_structure.dart' show CallStructure;
85 import 'universe/selector.dart' show Selector; 85 import 'universe/selector.dart' show Selector;
86 import 'universe/universe.dart' show Universe; 86 import 'universe/universe.dart' show Universe;
87 import 'universe/use.dart' show StaticUse; 87 import 'universe/use.dart' show StaticUse;
88 import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact; 88 import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact;
89 import 'util/util.dart' show Link, Setlet; 89 import 'util/util.dart' show Link, Setlet;
90 import 'world.dart' show World; 90 import 'world.dart' show World;
91 91
92 abstract class Compiler implements LibraryLoaderListener, IdGenerator { 92 abstract class Compiler implements LibraryLoaderListener {
93 final Stopwatch totalCompileTime = new Stopwatch(); 93 final Stopwatch totalCompileTime = new Stopwatch();
94 final IdGenerator idGenerator = new IdGenerator(); 94 final IdGenerator idGenerator = new IdGenerator();
95 World world; 95 World world;
96 Types types; 96 Types types;
97 _CompilerCoreTypes _coreTypes; 97 _CompilerCoreTypes _coreTypes;
98 _CompilerDiagnosticReporter _reporter; 98 _CompilerDiagnosticReporter _reporter;
99 _CompilerResolution _resolution; 99 _CompilerResolution _resolution;
100 _CompilerParsing _parsing; 100 _CompilerParsing _parsing;
101 101
102 final CacheStrategy cacheStrategy; 102 final CacheStrategy cacheStrategy;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 Universe get resolverWorld => enqueuer.resolution.universe; 384 Universe get resolverWorld => enqueuer.resolution.universe;
385 Universe get codegenWorld => enqueuer.codegen.universe; 385 Universe get codegenWorld => enqueuer.codegen.universe;
386 386
387 bool get analyzeAll => options.analyzeAll || compileAll; 387 bool get analyzeAll => options.analyzeAll || compileAll;
388 388
389 bool get compileAll => false; 389 bool get compileAll => false;
390 390
391 bool get disableTypeInference => 391 bool get disableTypeInference =>
392 options.disableTypeInference || compilationFailed; 392 options.disableTypeInference || compilationFailed;
393 393
394 // TODO(het): remove this and pass idGenerator directly instead
395 @deprecated
396 int getNextFreeId() => idGenerator.getNextFreeId();
397
398 void unimplemented(Spannable spannable, String methodName) { 394 void unimplemented(Spannable spannable, String methodName) {
399 reporter.internalError(spannable, "$methodName not implemented."); 395 reporter.internalError(spannable, "$methodName not implemented.");
400 } 396 }
401 397
402 // Compiles the dart script at [uri]. 398 // Compiles the dart script at [uri].
403 // 399 //
404 // The resulting future will complete with true if the compilation 400 // The resulting future will complete with true if the compilation
405 // succeded. 401 // succeded.
406 Future<bool> run(Uri uri) { 402 Future<bool> run(Uri uri) {
407 totalCompileTime.start(); 403 totalCompileTime.start();
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 _ElementScanner(this.scanner); 2069 _ElementScanner(this.scanner);
2074 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2070 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2075 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2071 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2076 } 2072 }
2077 2073
2078 class _EmptyEnvironment implements Environment { 2074 class _EmptyEnvironment implements Environment {
2079 const _EmptyEnvironment(); 2075 const _EmptyEnvironment();
2080 2076
2081 String valueOf(String key) => null; 2077 String valueOf(String key) => null;
2082 } 2078 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698