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

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

Issue 2875313002: Access BackendUsage through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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 '../types/types.dart' show ContainerTypeMask, MapTypeMask; 10 import '../types/types.dart' show ContainerTypeMask, MapTypeMask;
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 } 443 }
444 444
445 void visitMemberTypeInformation(MemberTypeInformation info) { 445 void visitMemberTypeInformation(MemberTypeInformation info) {
446 if (info.isClosurized) { 446 if (info.isClosurized) {
447 bailout('Returned from a closurized method'); 447 bailout('Returned from a closurized method');
448 } 448 }
449 if (isClosure(info.element)) { 449 if (isClosure(info.element)) {
450 bailout('Returned from a closure'); 450 bailout('Returned from a closure');
451 } 451 }
452 if (info.element.isField && 452 if (info.element.isField &&
453 !inferrer.compiler.backend 453 !inferrer.compiler.backend.canFieldBeUsedForGlobalOptimizations(
454 .canFieldBeUsedForGlobalOptimizations(info.element)) { 454 info.element, inferrer.closedWorld)) {
455 bailout('Escape to code that has special backend treatment'); 455 bailout('Escape to code that has special backend treatment');
456 } 456 }
457 addNewEscapeInformation(info); 457 addNewEscapeInformation(info);
458 } 458 }
459 459
460 void visitParameterTypeInformation(ParameterTypeInformation info) { 460 void visitParameterTypeInformation(ParameterTypeInformation info) {
461 ParameterElement element = info.element; 461 ParameterElement element = info.element;
462 if (inferrer.isNativeMember(element.functionDeclaration)) { 462 if (inferrer.isNativeMember(element.functionDeclaration)) {
463 bailout('Passed to a native method'); 463 bailout('Passed to a native method');
464 } 464 }
465 if (!inferrer.compiler.backend 465 if (!inferrer.compiler.backend
466 .canFunctionParametersBeUsedForGlobalOptimizations( 466 .canFunctionParametersBeUsedForGlobalOptimizations(
467 element.functionDeclaration)) { 467 element.functionDeclaration, inferrer.closedWorld)) {
468 bailout('Escape to code that has special backend treatment'); 468 bailout('Escape to code that has special backend treatment');
469 } 469 }
470 if (isParameterOfListAddingMethod(element) || 470 if (isParameterOfListAddingMethod(element) ||
471 isParameterOfMapAddingMethod(element)) { 471 isParameterOfMapAddingMethod(element)) {
472 // These elements are being handled in 472 // These elements are being handled in
473 // [visitDynamicCallSiteTypeInformation]. 473 // [visitDynamicCallSiteTypeInformation].
474 return; 474 return;
475 } 475 }
476 addNewEscapeInformation(info); 476 addNewEscapeInformation(info);
477 } 477 }
478 } 478 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/frontend_strategy.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