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

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

Issue 2572543003: Treat dispatchers and implicit accessors the same for inlining decisions. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « runtime/vm/object.h ('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) 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/become.h" 10 #include "vm/become.h"
(...skipping 13423 matching lines...) Expand 10 before | Expand all | Expand 10 after
13434 const intptr_t len = NumberOfChecks(); 13434 const intptr_t len = NumberOfChecks();
13435 for (intptr_t i = 1; i < len; i++) { 13435 for (intptr_t i = 1; i < len; i++) {
13436 if (IsUsedAt(i) && (GetTargetAt(i) != first_target.raw())) { 13436 if (IsUsedAt(i) && (GetTargetAt(i) != first_target.raw())) {
13437 return false; 13437 return false;
13438 } 13438 }
13439 } 13439 }
13440 return true; 13440 return true;
13441 } 13441 }
13442 13442
13443 13443
13444 bool ICData::HasOnlyDispatcherTargets() const { 13444 bool ICData::HasOnlyDispatcherOrImplicitAccessorTargets() const {
13445 const intptr_t len = NumberOfChecks(); 13445 const intptr_t len = NumberOfChecks();
13446 Function& target = Function::Handle(); 13446 Function& target = Function::Handle();
13447 for (intptr_t i = 0; i < len; i++) { 13447 for (intptr_t i = 0; i < len; i++) {
13448 target = GetTargetAt(i); 13448 target = GetTargetAt(i);
13449 if (!target.IsNoSuchMethodDispatcher() && 13449 if (!target.IsDispatcherOrImplicitAccessor()) {
13450 !target.IsInvokeFieldDispatcher()) {
13451 return false; 13450 return false;
13452 } 13451 }
13453 } 13452 }
13454 return true; 13453 return true;
13455 } 13454 }
13456 13455
13457 13456
13458 void ICData::GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first, 13457 void ICData::GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first,
13459 GrowableArray<intptr_t>* second) const { 13458 GrowableArray<intptr_t>* second) const {
13460 ASSERT(NumArgsTested() == 2); 13459 ASSERT(NumArgsTested() == 2);
(...skipping 9305 matching lines...) Expand 10 before | Expand all | Expand 10 after
22766 return UserTag::null(); 22765 return UserTag::null();
22767 } 22766 }
22768 22767
22769 22768
22770 const char* UserTag::ToCString() const { 22769 const char* UserTag::ToCString() const {
22771 const String& tag_label = String::Handle(label()); 22770 const String& tag_label = String::Handle(label());
22772 return tag_label.ToCString(); 22771 return tag_label.ToCString();
22773 } 22772 }
22774 22773
22775 } // namespace dart 22774 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698