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

Side by Side Diff: pkg/compiler/lib/src/inferrer/node_tracer.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 compiler.src.inferrer.node_tracer; 5 library compiler.src.inferrer.node_tracer;
6 6
7 import '../common/names.dart' show Identifiers; 7 import '../common/names.dart' show Identifiers;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../elements/entities.dart';
10 import '../types/types.dart' show ContainerTypeMask, MapTypeMask; 11 import '../types/types.dart' show ContainerTypeMask, MapTypeMask;
11 import '../util/util.dart' show Setlet; 12 import '../util/util.dart' show Setlet;
12 import 'debug.dart' as debug; 13 import 'debug.dart' as debug;
13 import 'inferrer_engine.dart'; 14 import 'inferrer_engine.dart';
14 import 'type_graph_nodes.dart'; 15 import 'type_graph_nodes.dart';
15 16
16 // A set of selectors we know do not escape the elements inside the 17 // A set of selectors we know do not escape the elements inside the
17 // list. 18 // list.
18 Set<String> doesNotEscapeListSet = new Set<String>.from(const <String>[ 19 Set<String> doesNotEscapeListSet = new Set<String>.from(const <String>[
19 // From Object. 20 // From Object.
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bailoutIfReaches(isParameterOfListAddingMethod); 384 bailoutIfReaches(isParameterOfListAddingMethod);
384 } 385 }
385 } 386 }
386 387
387 if (info.targetsIncludeComplexNoSuchMethod(inferrer) && 388 if (info.targetsIncludeComplexNoSuchMethod(inferrer) &&
388 info.arguments != null && 389 info.arguments != null &&
389 info.arguments.contains(currentUser)) { 390 info.arguments.contains(currentUser)) {
390 bailout('Passed to noSuchMethod'); 391 bailout('Passed to noSuchMethod');
391 } 392 }
392 393
393 Iterable<Element> inferredTargetTypes = 394 Iterable<TypeInformation> inferredTargetTypes =
394 info.targets.map((MemberElement element) { 395 info.targets.map((MemberEntity entity) {
395 // Issue 29886. 396 MemberElement element = entity;
396 // ignore: RETURN_OF_INVALID_TYPE
397 return inferrer.types.getInferredTypeOf(element); 397 return inferrer.types.getInferredTypeOf(element);
398 }); 398 });
399 if (inferredTargetTypes.any((user) => user == currentUser)) { 399 if (inferredTargetTypes.any((user) => user == currentUser)) {
400 addNewEscapeInformation(info); 400 addNewEscapeInformation(info);
401 } 401 }
402 } 402 }
403 403
404 /** 404 /**
405 * Check whether element is the parameter of a list adding method. 405 * Check whether element is the parameter of a list adding method.
406 * The definition of what a list adding method is has to stay in sync with 406 * The definition of what a list adding method is has to stay in sync with
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 if (isParameterOfListAddingMethod(element) || 474 if (isParameterOfListAddingMethod(element) ||
475 isParameterOfMapAddingMethod(element)) { 475 isParameterOfMapAddingMethod(element)) {
476 // These elements are being handled in 476 // These elements are being handled in
477 // [visitDynamicCallSiteTypeInformation]. 477 // [visitDynamicCallSiteTypeInformation].
478 return; 478 return;
479 } 479 }
480 addNewEscapeInformation(info); 480 addNewEscapeInformation(info);
481 } 481 }
482 } 482 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/locals_handler.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698