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

Side by Side Diff: pkg/compiler/lib/src/util/enumset.dart

Issue 2239193002: Rerun formatter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/universe/class_set.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.util.enumset; 5 library dart2js.util.enumset;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 /// A set of enum values based on a bit mask of the shifted enum indices. 9 /// A set of enum values based on a bit mask of the shifted enum indices.
10 abstract class EnumSet<E> { 10 abstract class EnumSet<E> {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 const _ConstEnumSet(this.value) : super._(); 125 const _ConstEnumSet(this.value) : super._();
126 126
127 factory _ConstEnumSet.fromValues(Iterable<E> values) { 127 factory _ConstEnumSet.fromValues(Iterable<E> values) {
128 int value = 0; 128 int value = 0;
129 void add(E enumValue) { 129 void add(E enumValue) {
130 if (enumValue != null) { 130 if (enumValue != null) {
131 value |= 1 << (enumValue as dynamic).index; 131 value |= 1 << (enumValue as dynamic).index;
132 } 132 }
133 } 133 }
134
134 values.forEach(add); 135 values.forEach(add);
135 return new _ConstEnumSet(value); 136 return new _ConstEnumSet(value);
136 } 137 }
137 138
138 @override 139 @override
139 void add(E enumValue) { 140 void add(E enumValue) {
140 throw new UnsupportedError('EnumSet.add'); 141 throw new UnsupportedError('EnumSet.add');
141 } 142 }
142 143
143 @override 144 @override
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 _mask >>= 1; 191 _mask >>= 1;
191 _index--; 192 _index--;
192 if (_current != null) { 193 if (_current != null) {
193 break; 194 break;
194 } 195 }
195 } 196 }
196 return _current != null; 197 return _current != null;
197 } 198 }
198 } 199 }
199 } 200 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/class_set.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698