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

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

Issue 1394793004: Move WorldImpact to universe/world_impact.dart (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/compiler/lib/src/serialization/task.dart ('k') | tests/compiler/dart2js/exit_code_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/world_impact.dart
diff --git a/pkg/compiler/lib/src/universe/world_impact.dart b/pkg/compiler/lib/src/universe/world_impact.dart
new file mode 100644
index 0000000000000000000000000000000000000000..263ba2a921b635d4f05640fd1680bc2382c0f150
--- /dev/null
+++ b/pkg/compiler/lib/src/universe/world_impact.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.universe.world_impact;
+
+import '../dart_types.dart' show
+ DartType,
+ InterfaceType;
+import '../elements/elements.dart' show
+ Element,
+ LocalFunctionElement,
+ MethodElement;
+import 'universe.dart' show
+ UniverseSelector;
+
+class WorldImpact {
+ const WorldImpact();
+
+ Iterable<UniverseSelector> get dynamicInvocations =>
+ const <UniverseSelector>[];
+ Iterable<UniverseSelector> get dynamicGetters => const <UniverseSelector>[];
+ Iterable<UniverseSelector> get dynamicSetters => const <UniverseSelector>[];
+
+ // TODO(johnniwinther): Split this into more precise subsets.
+ Iterable<Element> get staticUses => const <Element>[];
+
+ // TODO(johnniwinther): Replace this by called constructors with type
+ // arguments.
+ Iterable<InterfaceType> get instantiatedTypes => const <InterfaceType>[];
+
+ // TODO(johnniwinther): Collect checked types for checked mode separately to
+ // support serialization.
+ Iterable<DartType> get isChecks => const <DartType>[];
+
+ Iterable<DartType> get checkedModeChecks => const <DartType>[];
+
+ Iterable<DartType> get asCasts => const <DartType>[];
+
+ Iterable<MethodElement> get closurizedFunctions => const <MethodElement>[];
+
+ Iterable<LocalFunctionElement> get closures => const <LocalFunctionElement>[];
+
+ Iterable<DartType> get typeLiterals => const <DartType>[];
+
+ String toString() {
+ StringBuffer sb = new StringBuffer();
+
+ void add(String title, Iterable iterable) {
+ if (iterable.isNotEmpty) {
+ sb.write('\n $title:');
+ iterable.forEach((e) => sb.write('\n $e'));
+ }
+ }
+
+ add('dynamic invocations', dynamicInvocations);
+ add('dynamic getters', dynamicGetters);
+ add('dynamic setters', dynamicSetters);
+ add('static uses', staticUses);
+ add('instantiated types', instantiatedTypes);
+ add('is-checks', isChecks);
+ add('checked-mode checks', checkedModeChecks);
+ add('as-casts', asCasts);
+ add('closurized functions', closurizedFunctions);
+ add('closures', closures);
+ add('type literals', typeLiterals);
+
+ return sb.toString();
+ }
+}
« no previous file with comments | « pkg/compiler/lib/src/serialization/task.dart ('k') | tests/compiler/dart2js/exit_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698