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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart

Issue 110643006: Fix a bug in the container tracer, where the returned value of a closurized method was not traced c… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart » ('j') | 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) 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 part of type_graph_inferrer; 5 part of type_graph_inferrer;
6 6
7 /** 7 /**
8 * A set of selector names that [List] implements, that we know do not 8 * A set of selector names that [List] implements, that we know do not
9 * change the element type of the list, or let the list escape to code 9 * change the element type of the list, or let the list escape to code
10 * that might change the element type. 10 * that might change the element type.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (element.getEnclosingClass() != compiler.backend.listImplementation) { 381 if (element.getEnclosingClass() != compiler.backend.listImplementation) {
382 return false; 382 return false;
383 } 383 }
384 Element method = element.enclosingElement; 384 Element method = element.enclosingElement;
385 return (method.name == '[]=') 385 return (method.name == '[]=')
386 || (method.name == 'add') 386 || (method.name == 'add')
387 || (method.name == 'insert'); 387 || (method.name == 'insert');
388 } 388 }
389 389
390 visitElementTypeInformation(ElementTypeInformation info) { 390 visitElementTypeInformation(ElementTypeInformation info) {
391 if (info.isClosurized()) {
392 bailout('Returned from a closurized method');
393 }
391 if (isClosure(info.element)) { 394 if (isClosure(info.element)) {
392 bailout('Returned from a closure'); 395 bailout('Returned from a closure');
393 } 396 }
394 if (compiler.backend.isNeededForReflection(info.element)) { 397 if (compiler.backend.isNeededForReflection(info.element)) {
395 bailout('Escape in reflection'); 398 bailout('Escape in reflection');
396 } 399 }
397 if (isParameterOfListAddingMethod(info.element)) { 400 if (isParameterOfListAddingMethod(info.element)) {
398 // These elements are being handled in 401 // These elements are being handled in
399 // [visitDynamicCallSiteTypeInformation]. 402 // [visitDynamicCallSiteTypeInformation].
400 return; 403 return;
401 } 404 }
402 addNewEscapeInformation(info); 405 addNewEscapeInformation(info);
403 } 406 }
404 } 407 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698