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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 2696483005: Move global dependencies to BackendUsage (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index dd3249e13d6f3e0cccd5fe5e1234255f3bb97dec..a5c07d0b610b228f88a54bfe68bd73246367b57a 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -43,7 +43,6 @@ import 'enqueue.dart' show Enqueuer, EnqueueTask, ResolutionEnqueuer;
import 'environment.dart';
import 'id_generator.dart';
import 'io/source_information.dart' show SourceInformation;
-import 'js_backend/backend_helpers.dart' as js_backend show BackendHelpers;
import 'js_backend/js_backend.dart' as js_backend show JavaScriptBackend;
import 'library_loader.dart'
show
@@ -77,7 +76,7 @@ import 'universe/world_builder.dart'
import 'universe/use.dart' show StaticUse, TypeUse;
import 'universe/world_impact.dart'
show ImpactStrategy, WorldImpact, WorldImpactBuilderImpl;
-import 'util/util.dart' show Link, Setlet;
+import 'util/util.dart' show Link;
import 'world.dart' show ClosedWorld, ClosedWorldRefiner, ClosedWorldImpl;
typedef CompilerDiagnosticReporter MakeReporterFunction(
@@ -101,15 +100,6 @@ abstract class Compiler implements LibraryLoaderListener {
*/
final TokenMap commentMap = new TokenMap();
- /**
- * Records global dependencies, that is, dependencies that don't
- * correspond to a particular element.
- *
- * We should get rid of this and ensure that all dependencies are
- * associated with a particular element.
- */
- GlobalDependencyRegistry globalDependencies;
-
/// Options provided from command-line arguments.
final CompilerOptions options;
@@ -213,10 +203,6 @@ abstract class Compiler implements LibraryLoaderListener {
progress = new Stopwatch()..start();
}
- // TODO(johnniwinther): Separate the dependency tracking from the enqueuing
- // for global dependencies.
- globalDependencies = new GlobalDependencyRegistry();
-
backend = createBackend();
enqueuer = backend.makeEnqueuer();
@@ -1898,26 +1884,6 @@ class CompilerResolution implements Resolution {
}
}
-class GlobalDependencyRegistry {
- Setlet<Element> _otherDependencies;
-
- GlobalDependencyRegistry();
-
- void registerDependency(Element element) {
- if (element == null) return;
- if (_otherDependencies == null) {
- _otherDependencies = new Setlet<Element>();
- }
- _otherDependencies.add(element.implementation);
- }
-
- Iterable<Element> get otherDependencies {
- return _otherDependencies != null ? _otherDependencies : const <Element>[];
- }
-
- String get name => 'GlobalDependencies';
-}
-
class _ScriptLoader implements ScriptLoader {
Compiler compiler;
_ScriptLoader(this.compiler);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698