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

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 133073019: Improve inlining decision: --inline_getters_setters_smaller_than (default 10). Don not inline gette… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('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) 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 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 return k##enum_name; \ 432 return k##enum_name; \
433 } 433 }
434 RECOGNIZED_LIST(RECOGNIZE_FUNCTION) 434 RECOGNIZED_LIST(RECOGNIZE_FUNCTION)
435 #undef RECOGNIZE_FUNCTION 435 #undef RECOGNIZE_FUNCTION
436 UNREACHABLE(); 436 UNREACHABLE();
437 return kUnknown; 437 return kUnknown;
438 } 438 }
439 439
440 440
441 bool MethodRecognizer::AlwaysInline(const Function& function) { 441 bool MethodRecognizer::AlwaysInline(const Function& function) {
442 if (function.IsImplicitGetterFunction() || function.IsGetterFunction() ||
443 function.IsImplicitSetterFunction() || function.IsSetterFunction()) {
444 return true;
445 }
446
447 const Class& function_class = Class::Handle(function.Owner()); 442 const Class& function_class = Class::Handle(function.Owner());
448 const Library& lib = Library::Handle(function_class.library()); 443 const Library& lib = Library::Handle(function_class.library());
449 if (!IsRecognizedLibrary(lib)) { 444 if (!IsRecognizedLibrary(lib)) {
450 return false; 445 return false;
451 } 446 }
452 447
453 const String& function_name = String::Handle(function.name()); 448 const String& function_name = String::Handle(function.name());
454 const String& class_name = String::Handle(function_class.Name()); 449 const String& class_name = String::Handle(function_class.Name());
455 450
456 #define RECOGNIZE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ 451 #define RECOGNIZE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 case Token::kTRUNCDIV: return 0; 3137 case Token::kTRUNCDIV: return 0;
3143 case Token::kMOD: return 1; 3138 case Token::kMOD: return 1;
3144 default: UNIMPLEMENTED(); return -1; 3139 default: UNIMPLEMENTED(); return -1;
3145 } 3140 }
3146 } 3141 }
3147 3142
3148 3143
3149 #undef __ 3144 #undef __
3150 3145
3151 } // namespace dart 3146 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698