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

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: 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
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 4067 matching lines...) Expand 10 before | Expand all | Expand 10 after
4078 ASSERT(num_optional_parameters >= 0); 4078 ASSERT(num_optional_parameters >= 0);
4079 set_num_optional_parameters(are_optional_positional ? 4079 set_num_optional_parameters(are_optional_positional ?
4080 num_optional_parameters : 4080 num_optional_parameters :
4081 -num_optional_parameters); 4081 -num_optional_parameters);
4082 } 4082 }
4083 4083
4084 4084
4085 bool Function::is_optimizable() const { 4085 bool Function::is_optimizable() const {
4086 if (OptimizableBit::decode(raw_ptr()->kind_tag_) && 4086 if (OptimizableBit::decode(raw_ptr()->kind_tag_) &&
4087 (script() != Script::null()) && 4087 (script() != Script::null()) &&
4088 !is_native() &&
4089 ((end_token_pos() - token_pos()) < FLAG_huge_method_cutoff_in_tokens)) { 4088 ((end_token_pos() - token_pos()) < FLAG_huge_method_cutoff_in_tokens)) {
4090 // Additional check needed for implicit getters. 4089 // Additional check needed for implicit getters.
4091 if (HasCode() && 4090 if (HasCode() &&
4092 (Code::Handle(unoptimized_code()).Size() >= 4091 (Code::Handle(unoptimized_code()).Size() >=
4093 FLAG_huge_method_cutoff_in_code_size)) { 4092 FLAG_huge_method_cutoff_in_code_size)) {
4094 return false; 4093 return false;
4095 } else { 4094 } else {
4096 return true; 4095 return true;
4097 } 4096 }
4098 } 4097 }
(...skipping 10511 matching lines...) Expand 10 before | Expand all | Expand 10 after
14610 } 14609 }
14611 14610
14612 14611
14613 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14612 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14614 stream->OpenObject(); 14613 stream->OpenObject();
14615 stream->CloseObject(); 14614 stream->CloseObject();
14616 } 14615 }
14617 14616
14618 14617
14619 } // namespace dart 14618 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698