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

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

Issue 1182053010: Revert "Split TypedSelector into Selector and TypeMask." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/dart_backend/dart_backend.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dump_info.dart
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index 3e4cda2c9d38e231d9438ef524cdabfcf521237f..076ea9c9bd457e52836c5b657509cd23401c2dc7 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -22,7 +22,7 @@ import 'types/types.dart' show TypeMask;
import 'deferred_load.dart' show OutputUnit;
import 'js_backend/js_backend.dart' show JavaScriptBackend;
import 'js/js.dart' as jsAst;
-import 'universe/universe.dart' show Selector, UniverseSelector;
+import 'universe/universe.dart' show Selector;
import 'util/util.dart' show NO_LOCATION_SPANNABLE;
/// Maps objects to an id. Supports lookups in
@@ -389,8 +389,8 @@ class ElementToJsonVisitor
class Selection {
final Element selectedElement;
- final TypeMask mask;
- Selection(this.selectedElement, this.mask);
+ final Selector selector;
+ Selection(this.selectedElement, this.selector);
}
class DumpInfoTask extends CompilerTask {
@@ -415,7 +415,7 @@ class DumpInfoTask extends CompilerTask {
// pretty-printed contents.
final Map<jsAst.Node, int> _nodeToSize = <jsAst.Node, int>{};
- final Map<Element, Set<UniverseSelector>> selectorsFromElement = {};
+ final Map<Element, Set<Selector>> selectorsFromElement = {};
final Map<Element, int> inlineCount = <Element, int>{};
// A mapping from an element to a list of elements that are
// inlined inside of it.
@@ -437,10 +437,10 @@ class DumpInfoTask extends CompilerTask {
* Registers that a function uses a selector in the
* function body
*/
- void elementUsesSelector(Element element, UniverseSelector selector) {
+ void elementUsesSelector(Element element, Selector selector) {
if (compiler.dumpInfo) {
selectorsFromElement
- .putIfAbsent(element, () => new Set<UniverseSelector>())
+ .putIfAbsent(element, () => new Set<Selector>())
.add(selector);
}
}
@@ -455,11 +455,9 @@ class DumpInfoTask extends CompilerTask {
return const <Selection>[];
} else {
return selectorsFromElement[element].expand(
- (UniverseSelector selector) {
- return compiler.world.allFunctions.filter(
- selector.selector, selector.mask)
- .map((element) {
- return new Selection(element, selector.mask);
+ (selector) {
+ return compiler.world.allFunctions.filter(selector).map((element) {
+ return new Selection(element, selector);
});
});
}
@@ -565,7 +563,7 @@ class DumpInfoTask extends CompilerTask {
.map((selection) {
return <String, String>{
"id": infoCollector.idOf(selection.selectedElement),
- "mask": selection.mask.toString()
+ "mask": selection.selector.mask.toString()
};
})
// Filter non-null ids for the same reason as above.
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/dart_backend.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698