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/resolution/registry.dart

Issue 1568213003: Add EnumSet. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 11 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/universe/class_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/registry.dart
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 5fc06e1f13f5d345974e0505fff4d94207f46d8f..b3c7686a01e8af07a73eea221be031de2ebdf0f5 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -36,7 +36,10 @@ import '../universe/use.dart' show
TypeUse;
import '../universe/world_impact.dart' show
WorldImpactBuilder;
-import '../world.dart' show World;
+import '../util/enumset.dart' show
+ EnumSet;
+import '../world.dart' show
+ World;
import 'send_structure.dart';
@@ -47,7 +50,7 @@ import 'tree_elements.dart' show
class _ResolutionWorldImpact extends ResolutionImpact with WorldImpactBuilder {
final String name;
- Setlet<Feature> _features;
+ EnumSet<Feature> _features;
Setlet<MapLiteralUse> _mapLiterals;
Setlet<ListLiteralUse> _listLiterals;
Setlet<String> _constSymbolNames;
@@ -98,14 +101,15 @@ class _ResolutionWorldImpact extends ResolutionImpact with WorldImpactBuilder {
void registerFeature(Feature feature) {
if (_features == null) {
- _features = new Setlet<Feature>();
+ _features = new EnumSet<Feature>();
}
_features.add(feature);
}
@override
Iterable<Feature> get features {
- return _features != null ? _features : const <Feature>[];
+ return _features != null
+ ? _features.iterable(Feature.values) : const <Feature>[];
}
void registerConstantLiteral(ConstantExpression constant) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/universe/class_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698