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

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

Issue 22839003: Polymorphic inlining for some recognized methods in the optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed modulo performance regression Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/parser.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 4062 matching lines...) Expand 10 before | Expand all | Expand 10 after
4073 ASSERT(num_optional_parameters >= 0); 4073 ASSERT(num_optional_parameters >= 0);
4074 set_num_optional_parameters(are_optional_positional ? 4074 set_num_optional_parameters(are_optional_positional ?
4075 num_optional_parameters : 4075 num_optional_parameters :
4076 -num_optional_parameters); 4076 -num_optional_parameters);
4077 } 4077 }
4078 4078
4079 4079
4080 bool Function::is_optimizable() const { 4080 bool Function::is_optimizable() const {
4081 if (OptimizableBit::decode(raw_ptr()->kind_tag_) && 4081 if (OptimizableBit::decode(raw_ptr()->kind_tag_) &&
4082 (script() != Script::null()) && 4082 (script() != Script::null()) &&
4083 !is_native() &&
4084 ((end_token_pos() - token_pos()) < FLAG_huge_method_cutoff_in_tokens)) { 4083 ((end_token_pos() - token_pos()) < FLAG_huge_method_cutoff_in_tokens)) {
4085 // Additional check needed for implicit getters. 4084 // Additional check needed for implicit getters.
4086 if (HasCode() && 4085 if (HasCode() &&
4087 (Code::Handle(unoptimized_code()).Size() >= 4086 (Code::Handle(unoptimized_code()).Size() >=
4088 FLAG_huge_method_cutoff_in_code_size)) { 4087 FLAG_huge_method_cutoff_in_code_size)) {
4089 return false; 4088 return false;
4090 } else { 4089 } else {
4091 return true; 4090 return true;
4092 } 4091 }
4093 } 4092 }
(...skipping 10570 matching lines...) Expand 10 before | Expand all | Expand 10 after
14664 } 14663 }
14665 14664
14666 14665
14667 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14666 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14668 stream->OpenObject(); 14667 stream->OpenObject();
14669 stream->CloseObject(); 14668 stream->CloseObject();
14670 } 14669 }
14671 14670
14672 14671
14673 } // namespace dart 14672 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698