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

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

Issue 2381793003: Rename Universe to WorldBuilder. (Closed)
Patch Set: Created 4 years, 3 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
Index: pkg/compiler/lib/src/universe/world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/world_builder.dart
similarity index 96%
rename from pkg/compiler/lib/src/universe/universe.dart
rename to pkg/compiler/lib/src/universe/world_builder.dart
index 03fc3c1d213e936a5099b4a4ccb5dfb9a1b027c8..9c628f1196905187138b31ed232de851cbc31df4 100644
--- a/pkg/compiler/lib/src/universe/universe.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -87,7 +87,7 @@ abstract class SelectorConstraints {
bool needsNoSuchMethodHandling(Selector selector, World world);
}
-/// A mutable [SelectorConstraints] used in [Universe].
+/// A mutable [SelectorConstraints] used in [WorldBuilder].
abstract class UniverseSelectorConstraints extends SelectorConstraints {
/// Adds [constraint] to these selector constraints. Return `true` if the set
/// of potential receivers expanded due to the new constraint.
@@ -102,14 +102,15 @@ abstract class SelectorConstraintsStrategy {
UniverseSelectorConstraints createSelectorConstraints(Selector selector);
}
-/// The [Universe] is an auxiliary class used in the process of computing the
-/// [ClosedWorld]. The concepts here and in [ClosedWorld] are very similar -- in
-/// the same way that the "universe expands" you can think of this as a mutable
-/// world that is expanding as we visit and discover parts of the program.
+/// The [WorldBuilder] is an auxiliary class used in the process of computing
+/// the [ClosedWorld]. The concepts here and in [ClosedWorld] are very similar
Siggi Cherem (dart-lang) 2016/09/29 18:14:48 nit: remove everything after the first sentence
+/// -- in the same way that the "universe expands" you can think of this as a
+/// mutable world that is expanding as we visit and discover parts of the
+/// program.
// TODO(sigmund): rename to "growing/expanding/mutable world"?
Siggi Cherem (dart-lang) 2016/09/29 18:14:48 remove TODO :)
Johnni Winther 2016/09/30 08:43:14 Done.
// TODO(johnniwinther): Move common implementation to a [UniverseBase] when
// universes and worlds have been unified.
-abstract class Universe {
+abstract class WorldBuilder {
/// All directly instantiated classes, that is, classes with a generative
/// constructor that has been called directly and not only through a
/// super-call.
@@ -132,7 +133,7 @@ abstract class Universe {
bool hasInvokedSetter(Element member, World world);
}
-abstract class ResolutionUniverse implements Universe {
+abstract class ResolutionWorldBuilder implements WorldBuilder {
/// Set of (live) local functions (closures) whose signatures reference type
/// variables.
///
@@ -161,7 +162,7 @@ abstract class ResolutionUniverse implements Universe {
Iterable<Element> get fieldSetters;
}
-class ResolutionUniverseImpl implements ResolutionUniverse {
+class ResolutionWorldBuilderImpl implements ResolutionWorldBuilder {
/// The set of all directly instantiated classes, that is, classes with a
/// generative constructor that has been called directly and not only through
/// a super-call.
@@ -233,7 +234,7 @@ class ResolutionUniverseImpl implements ResolutionUniverse {
final SelectorConstraintsStrategy selectorConstraintsStrategy;
- ResolutionUniverseImpl(this.selectorConstraintsStrategy);
+ ResolutionWorldBuilderImpl(this.selectorConstraintsStrategy);
/// All directly instantiated classes, that is, classes with a generative
/// constructor that has been called directly and not only through a
@@ -407,10 +408,10 @@ class ResolutionUniverseImpl implements ResolutionUniverse {
}
}
-/// Universe specific to codegen.
+/// World builder specific to codegen.
///
/// This adds additional access to liveness of selectors and elements.
-abstract class CodegenUniverse implements Universe {
+abstract class CodegenWorldBuilder implements WorldBuilder {
void forEachInvokedName(
f(String name, Map<Selector, SelectorConstraints> selectors));
@@ -437,7 +438,7 @@ abstract class CodegenUniverse implements Universe {
Iterable<FieldElement> get allReferencedStaticFields;
}
-class CodegenUniverseImpl implements CodegenUniverse {
+class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
/// The set of all directly instantiated classes, that is, classes with a
/// generative constructor that has been called directly and not only through
/// a super-call.
@@ -482,7 +483,7 @@ class CodegenUniverseImpl implements CodegenUniverse {
final SelectorConstraintsStrategy selectorConstraintsStrategy;
- CodegenUniverseImpl(this.selectorConstraintsStrategy);
+ CodegenWorldBuilderImpl(this.selectorConstraintsStrategy);
/// All directly instantiated classes, that is, classes with a generative
/// constructor that has been called directly and not only through a

Powered by Google App Engine
This is Rietveld 408576698