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

Unified Diff: pkg/compiler/lib/src/inferrer/list_tracer.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/inferrer/map_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/list_tracer.dart
diff --git a/pkg/compiler/lib/src/inferrer/list_tracer.dart b/pkg/compiler/lib/src/inferrer/list_tracer.dart
index a57087f2ebd5d08aa1664b7a871f357366c5f653..83f2e8b4a5675e01592ff4e143bbbba63f709f75 100644
--- a/pkg/compiler/lib/src/inferrer/list_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/list_tracer.dart
@@ -16,122 +16,119 @@ import 'type_graph_nodes.dart';
* change the element type of the list, or let the list escape to code
* that might change the element type.
*/
-Set<String> okListSelectorsSet = new Set<String>.from(
- const <String>[
- // From Object.
- '==',
- 'hashCode',
- 'toString',
- 'noSuchMethod',
- 'runtimeType',
-
- // From Iterable.
- 'iterator',
- 'map',
- 'where',
- 'expand',
- 'contains',
- 'forEach',
- 'reduce',
- 'fold',
- 'every',
- 'join',
- 'any',
- 'toList',
- 'toSet',
- 'length',
- 'isEmpty',
- 'isNotEmpty',
- 'take',
- 'takeWhile',
- 'skip',
- 'skipWhile',
- 'first',
- 'last',
- 'single',
- 'firstWhere',
- 'lastWhere',
- 'singleWhere',
- 'elementAt',
-
- // From List.
- '[]',
- 'length',
- 'reversed',
- 'sort',
- 'indexOf',
- 'lastIndexOf',
- 'clear',
- 'remove',
- 'removeAt',
- 'removeLast',
- 'removeWhere',
- 'retainWhere',
- 'sublist',
- 'getRange',
- 'removeRange',
- 'asMap',
-
- // From JSArray.
- 'checkMutable',
- 'checkGrowable',
- ]);
-
-Set<String> doNotChangeLengthSelectorsSet = new Set<String>.from(
- const <String>[
- // From Object.
- '==',
- 'hashCode',
- 'toString',
- 'noSuchMethod',
- 'runtimeType',
-
- // From Iterable.
- 'iterator',
- 'map',
- 'where',
- 'expand',
- 'contains',
- 'forEach',
- 'reduce',
- 'fold',
- 'every',
- 'join',
- 'any',
- 'toList',
- 'toSet',
- 'length',
- 'isEmpty',
- 'isNotEmpty',
- 'take',
- 'takeWhile',
- 'skip',
- 'skipWhile',
- 'first',
- 'last',
- 'single',
- 'firstWhere',
- 'lastWhere',
- 'singleWhere',
- 'elementAt',
-
- // From List.
- '[]',
- '[]=',
- 'length',
- 'reversed',
- 'sort',
- 'indexOf',
- 'lastIndexOf',
- 'sublist',
- 'getRange',
- 'asMap',
-
- // From JSArray.
- 'checkMutable',
- 'checkGrowable',
- ]);
-
+Set<String> okListSelectorsSet = new Set<String>.from(const <String>[
+ // From Object.
+ '==',
+ 'hashCode',
+ 'toString',
+ 'noSuchMethod',
+ 'runtimeType',
+
+ // From Iterable.
+ 'iterator',
+ 'map',
+ 'where',
+ 'expand',
+ 'contains',
+ 'forEach',
+ 'reduce',
+ 'fold',
+ 'every',
+ 'join',
+ 'any',
+ 'toList',
+ 'toSet',
+ 'length',
+ 'isEmpty',
+ 'isNotEmpty',
+ 'take',
+ 'takeWhile',
+ 'skip',
+ 'skipWhile',
+ 'first',
+ 'last',
+ 'single',
+ 'firstWhere',
+ 'lastWhere',
+ 'singleWhere',
+ 'elementAt',
+
+ // From List.
+ '[]',
+ 'length',
+ 'reversed',
+ 'sort',
+ 'indexOf',
+ 'lastIndexOf',
+ 'clear',
+ 'remove',
+ 'removeAt',
+ 'removeLast',
+ 'removeWhere',
+ 'retainWhere',
+ 'sublist',
+ 'getRange',
+ 'removeRange',
+ 'asMap',
+
+ // From JSArray.
+ 'checkMutable',
+ 'checkGrowable',
+]);
+
+Set<String> doNotChangeLengthSelectorsSet = new Set<String>.from(const <String>[
+ // From Object.
+ '==',
+ 'hashCode',
+ 'toString',
+ 'noSuchMethod',
+ 'runtimeType',
+
+ // From Iterable.
+ 'iterator',
+ 'map',
+ 'where',
+ 'expand',
+ 'contains',
+ 'forEach',
+ 'reduce',
+ 'fold',
+ 'every',
+ 'join',
+ 'any',
+ 'toList',
+ 'toSet',
+ 'length',
+ 'isEmpty',
+ 'isNotEmpty',
+ 'take',
+ 'takeWhile',
+ 'skip',
+ 'skipWhile',
+ 'first',
+ 'last',
+ 'single',
+ 'firstWhere',
+ 'lastWhere',
+ 'singleWhere',
+ 'elementAt',
+
+ // From List.
+ '[]',
+ '[]=',
+ 'length',
+ 'reversed',
+ 'sort',
+ 'indexOf',
+ 'lastIndexOf',
+ 'sublist',
+ 'getRange',
+ 'asMap',
+
+ // From JSArray.
+ 'checkMutable',
+ 'checkGrowable',
+]);
class ListTracerVisitor extends TracerVisitor<ListTypeInformation> {
// The [Set] of found assignments to the list.
@@ -208,7 +205,7 @@ class ListTracerVisitor extends TracerVisitor<ListTypeInformation> {
assignments.add(inferrer.types.nullType);
}
} else if (selector.isCall &&
- !info.targets.every((element) => element.isFunction)) {
+ !info.targets.every((element) => element.isFunction)) {
bailout('Passed to a closure');
return;
}
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/inferrer/map_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698