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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/inline.dart

Issue 2239193002: Rerun formatter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 cps_ir.optimization.inline; 5 library cps_ir.optimization.inline;
6 6
7 import 'package:js_ast/js_ast.dart' as js; 7 import 'package:js_ast/js_ast.dart' as js;
8 8
9 import '../dart_types.dart' show DartType, GenericType; 9 import '../dart_types.dart' show DartType, GenericType;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 489 }
490 490
491 // We have not seen this combination of target and abstract arguments 491 // We have not seen this combination of target and abstract arguments
492 // before. Make an inlining decision. 492 // before. Make an inlining decision.
493 assert(cachedResult == InliningCache.ABSENT); 493 assert(cachedResult == InliningCache.ABSENT);
494 Primitive doNotInline() { 494 Primitive doNotInline() {
495 _inliner.cache.putNegative( 495 _inliner.cache.putNegative(
496 target, callStructure, abstractReceiverInMethod, abstractArguments); 496 target, callStructure, abstractReceiverInMethod, abstractArguments);
497 return null; 497 return null;
498 } 498 }
499
499 if (backend.annotations.noInline(target)) return doNotInline(); 500 if (backend.annotations.noInline(target)) return doNotInline();
500 if (isRecursive(target, callStructure)) return doNotInline(); 501 if (isRecursive(target, callStructure)) return doNotInline();
501 502
502 FunctionDefinition function; 503 FunctionDefinition function;
503 if (callStructure != null && 504 if (callStructure != null &&
504 target.functionSignature.parameterCount != 505 target.functionSignature.parameterCount !=
505 callStructure.argumentCount) { 506 callStructure.argumentCount) {
506 // The argument count at the call site does not match the target's 507 // The argument count at the call site does not match the target's
507 // formal parameter count. Build the IR term for an adapter function 508 // formal parameter count. Build the IR term for an adapter function
508 // body. 509 // body.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 (enclosingClass == backend.helpers.jsNumberClass || 605 (enclosingClass == backend.helpers.jsNumberClass ||
605 enclosingClass == backend.helpers.jsDoubleClass || 606 enclosingClass == backend.helpers.jsDoubleClass ||
606 enclosingClass == backend.helpers.jsIntClass)) { 607 enclosingClass == backend.helpers.jsIntClass)) {
607 // These should be handled by operator specialization. 608 // These should be handled by operator specialization.
608 return true; 609 return true;
609 } 610 }
610 if (target == backend.helpers.stringInterpolationHelper) return true; 611 if (target == backend.helpers.stringInterpolationHelper) return true;
611 return false; 612 return false;
612 } 613 }
613 } 614 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart ('k') | pkg/compiler/lib/src/cps_ir/octagon.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698