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

Side by Side Diff: pkg/compiler/lib/src/inferrer/locals_handler.dart

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 locals_handler; 5 library locals_handler;
6 6
7 import 'dart:collection' show IterableMixin; 7 import 'dart:collection' show IterableMixin;
8 8
9 import '../options.dart' show CompilerOptions; 9 import '../options.dart' show CompilerOptions;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 void forEach(void f(TypeInformation type)) { 204 void forEach(void f(TypeInformation type)) {
205 positional.forEach(f); 205 positional.forEach(f);
206 named.values.forEach(f); 206 named.values.forEach(f);
207 } 207 }
208 208
209 bool every(bool f(TypeInformation type)) { 209 bool every(bool f(TypeInformation type)) {
210 return positional.every(f) && named.values.every(f); 210 return positional.every(f) && named.values.every(f);
211 } 211 }
212 212
213 bool contains(TypeInformation type) { 213 bool contains(Object type) {
214 return positional.contains(type) || named.containsValue(type); 214 return positional.contains(type) || named.containsValue(type);
215 } 215 }
216 } 216 }
217 217
218 class ArgumentsTypesIterator implements Iterator<TypeInformation> { 218 class ArgumentsTypesIterator implements Iterator<TypeInformation> {
219 final Iterator<TypeInformation> positional; 219 final Iterator<TypeInformation> positional;
220 final Iterator<TypeInformation> named; 220 final Iterator<TypeInformation> named;
221 bool _iteratePositional = true; 221 bool _iteratePositional = true;
222 222
223 ArgumentsTypesIterator(ArgumentsTypes iteratee) 223 ArgumentsTypesIterator(ArgumentsTypes iteratee)
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 if (newType != type) { 544 if (newType != type) {
545 locals[variable] = newType; 545 locals[variable] = newType;
546 } 546 }
547 }); 547 });
548 } 548 }
549 549
550 void updateField(Element element, TypeInformation type) { 550 void updateField(Element element, TypeInformation type) {
551 fieldScope.updateField(element, type); 551 fieldScope.updateField(element, type);
552 } 552 }
553 } 553 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder.dart ('k') | pkg/compiler/lib/src/inferrer/node_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698