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

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

Issue 2616103002: Flatten inferrer implementation (Closed)
Patch Set: Updated cf. comment. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 compiler.src.inferrer.map_tracer; 5 library compiler.src.inferrer.map_tracer;
6 6
7 import '../elements/elements.dart'; 7 import '../elements/elements.dart';
8 import '../js_backend/backend_helpers.dart'; 8 import '../js_backend/backend_helpers.dart';
9 import '../universe/selector.dart' show Selector; 9 import '../universe/selector.dart' show Selector;
10 import 'node_tracer.dart'; 10 import 'node_tracer.dart';
(...skipping 13 matching lines...) Expand all
24 "keys", 24 "keys",
25 "length", 25 "length",
26 "values", 26 "values",
27 "clear", 27 "clear",
28 "containsKey", 28 "containsKey",
29 "containsValue", 29 "containsValue",
30 "forEach", 30 "forEach",
31 "remove" 31 "remove"
32 ]); 32 ]);
33 33
34 class MapTracerVisitor extends TracerVisitor<MapTypeInformation> { 34 class MapTracerVisitor extends TracerVisitor {
35 // These lists are used to keep track of newly discovered assignments to 35 // These lists are used to keep track of newly discovered assignments to
36 // the map. Note that elements at corresponding indices are expected to 36 // the map. Note that elements at corresponding indices are expected to
37 // belong to the same assignment operation. 37 // belong to the same assignment operation.
38 List<TypeInformation> keyAssignments = <TypeInformation>[]; 38 List<TypeInformation> keyAssignments = <TypeInformation>[];
39 List<TypeInformation> valueAssignments = <TypeInformation>[]; 39 List<TypeInformation> valueAssignments = <TypeInformation>[];
40 // This list is used to keep track of assignments of entire maps to 40 // This list is used to keep track of assignments of entire maps to
41 // this map. 41 // this map.
42 List<MapTypeInformation> mapAssignments = <MapTypeInformation>[]; 42 List<MapTypeInformation> mapAssignments = <MapTypeInformation>[];
43 43
44 MapTracerVisitor(tracedType, inferrer) : super(tracedType, inferrer); 44 MapTracerVisitor(tracedType, inferrer) : super(tracedType, inferrer);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return; 121 return;
122 } 122 }
123 } 123 }
124 } else if (selector.isCall && 124 } else if (selector.isCall &&
125 !info.targets.every((element) => element.isFunction)) { 125 !info.targets.every((element) => element.isFunction)) {
126 bailout('Passed to a closure'); 126 bailout('Passed to a closure');
127 return; 127 return;
128 } 128 }
129 } 129 }
130 } 130 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/list_tracer.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