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

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

Issue 143643002: Be more aggressive when inlining getters and setters (we assume they are typically simple, efficien… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « no previous file | 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 return k##enum_name; \ 401 return k##enum_name; \
402 } 402 }
403 RECOGNIZED_LIST(RECOGNIZE_FUNCTION) 403 RECOGNIZED_LIST(RECOGNIZE_FUNCTION)
404 #undef RECOGNIZE_FUNCTION 404 #undef RECOGNIZE_FUNCTION
405 UNREACHABLE(); 405 UNREACHABLE();
406 return kUnknown; 406 return kUnknown;
407 } 407 }
408 408
409 409
410 bool MethodRecognizer::AlwaysInline(const Function& function) { 410 bool MethodRecognizer::AlwaysInline(const Function& function) {
411 if (function.IsImplicitGetterFunction() || function.IsGetterFunction() ||
412 function.IsImplicitSetterFunction() || function.IsSetterFunction()) {
413 return true;
414 }
415
411 const Class& function_class = Class::Handle(function.Owner()); 416 const Class& function_class = Class::Handle(function.Owner());
412 const Library& lib = Library::Handle(function_class.library()); 417 const Library& lib = Library::Handle(function_class.library());
413 if (!IsRecognizedLibrary(lib)) { 418 if (!IsRecognizedLibrary(lib)) {
414 return false; 419 return false;
415 } 420 }
416 421
417 const String& function_name = String::Handle(function.name()); 422 const String& function_name = String::Handle(function.name());
418 const String& class_name = String::Handle(function_class.Name()); 423 const String& class_name = String::Handle(function_class.Name());
419 424
420 #define RECOGNIZE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ 425 #define RECOGNIZE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 case Token::kTRUNCDIV: return 0; 3100 case Token::kTRUNCDIV: return 0;
3096 case Token::kMOD: return 1; 3101 case Token::kMOD: return 1;
3097 default: UNIMPLEMENTED(); return -1; 3102 default: UNIMPLEMENTED(); return -1;
3098 } 3103 }
3099 } 3104 }
3100 3105
3101 3106
3102 #undef __ 3107 #undef __
3103 3108
3104 } // namespace dart 3109 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698