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

Side by Side Diff: pkg/kernel/lib/type_propagation/builder.dart

Issue 2712983002: Add LookupTable class for finding classes and members by name.
Patch Set: Created 3 years, 9 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/kernel/lib/transformations/treeshaker.dart ('k') | no next file » | 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 library kernel.type_propagation.builder; 4 library kernel.type_propagation.builder;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../class_hierarchy.dart'; 7 import '../class_hierarchy.dart';
8 import '../core_types.dart'; 8 import '../core_types.dart';
9 import 'canonicalizer.dart'; 9 import 'canonicalizer.dart';
10 import 'constraints.dart'; 10 import 'constraints.dart';
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 streamNode = getExternalInstanceVariable(coreTypes.streamClass); 229 streamNode = getExternalInstanceVariable(coreTypes.streamClass);
230 functionValueNode = getExternalInstanceVariable(coreTypes.functionClass); 230 functionValueNode = getExternalInstanceVariable(coreTypes.functionClass);
231 nullNode = newVariable(null, 'Null'); 231 nullNode = newVariable(null, 'Null');
232 232
233 iteratorField = getPropertyField(Names.iterator); 233 iteratorField = getPropertyField(Names.iterator);
234 currentField = getPropertyField(Names.current); 234 currentField = getPropertyField(Names.current);
235 235
236 latticePointForAllFunctions = 236 latticePointForAllFunctions =
237 getLatticePointForSubtypesOfClass(coreTypes.functionClass); 237 getLatticePointForSubtypesOfClass(coreTypes.functionClass);
238 238
239 identicalFunction = coreTypes.getCoreProcedure('dart:core', 'identical'); 239 identicalFunction = coreTypes.getTopLevelMember('dart:core', 'identical');
240 240
241 // Seed bitmasks for built-in values. 241 // Seed bitmasks for built-in values.
242 constraints.addBitmaskInput(ValueBit.null_, nullNode); 242 constraints.addBitmaskInput(ValueBit.null_, nullNode);
243 constraints.addBitmaskInput(ValueBit.all, dynamicNode); 243 constraints.addBitmaskInput(ValueBit.all, dynamicNode);
244 244
245 for (Library library in program.libraries) { 245 for (Library library in program.libraries) {
246 for (Procedure procedure in library.procedures) { 246 for (Procedure procedure in library.procedures) {
247 buildProcedure(null, procedure); 247 buildProcedure(null, procedure);
248 } 248 }
249 for (Field field in library.fields) { 249 for (Field field in library.fields) {
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 environment.addStore(input, field, argument); 1968 environment.addStore(input, field, argument);
1969 } 1969 }
1970 } 1970 }
1971 for (int arity = minArity; arity <= maxArity; ++arity) { 1971 for (int arity = minArity; arity <= maxArity; ++arity) {
1972 int returnLocation = 1972 int returnLocation =
1973 environment.getLoad(input, fieldNames.getReturnField(arity)); 1973 environment.getLoad(input, fieldNames.getReturnField(arity));
1974 visitContravariant(node.returnType, returnLocation); 1974 visitContravariant(node.returnType, returnLocation);
1975 } 1975 }
1976 } 1976 }
1977 } 1977 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/transformations/treeshaker.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698