| OLD | NEW |
| 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 13393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13404 const intptr_t len = NumberOfChecks(); | 13404 const intptr_t len = NumberOfChecks(); |
| 13405 for (intptr_t i = 1; i < len; i++) { | 13405 for (intptr_t i = 1; i < len; i++) { |
| 13406 if (IsUsedAt(i) && (GetTargetAt(i) != first_target.raw())) { | 13406 if (IsUsedAt(i) && (GetTargetAt(i) != first_target.raw())) { |
| 13407 return false; | 13407 return false; |
| 13408 } | 13408 } |
| 13409 } | 13409 } |
| 13410 return true; | 13410 return true; |
| 13411 } | 13411 } |
| 13412 | 13412 |
| 13413 | 13413 |
| 13414 bool ICData::HasOnlyDispatcherTargets() const { |
| 13415 const intptr_t len = NumberOfChecks(); |
| 13416 Function& target = Function::Handle(); |
| 13417 for (intptr_t i = 0; i < len; i++) { |
| 13418 target = GetTargetAt(i); |
| 13419 if (!target.IsNoSuchMethodDispatcher() && |
| 13420 !target.IsInvokeFieldDispatcher()) { |
| 13421 return false; |
| 13422 } |
| 13423 } |
| 13424 return true; |
| 13425 } |
| 13426 |
| 13427 |
| 13414 void ICData::GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first, | 13428 void ICData::GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first, |
| 13415 GrowableArray<intptr_t>* second) const { | 13429 GrowableArray<intptr_t>* second) const { |
| 13416 ASSERT(NumArgsTested() == 2); | 13430 ASSERT(NumArgsTested() == 2); |
| 13417 first->Clear(); | 13431 first->Clear(); |
| 13418 second->Clear(); | 13432 second->Clear(); |
| 13419 GrowableArray<intptr_t> class_ids; | 13433 GrowableArray<intptr_t> class_ids; |
| 13420 const intptr_t len = NumberOfChecks(); | 13434 const intptr_t len = NumberOfChecks(); |
| 13421 for (intptr_t i = 0; i < len; i++) { | 13435 for (intptr_t i = 0; i < len; i++) { |
| 13422 if (GetCountAt(i) > 0) { | 13436 if (GetCountAt(i) > 0) { |
| 13423 GetClassIdsAt(i, &class_ids); | 13437 GetClassIdsAt(i, &class_ids); |
| (...skipping 9341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22765 return UserTag::null(); | 22779 return UserTag::null(); |
| 22766 } | 22780 } |
| 22767 | 22781 |
| 22768 | 22782 |
| 22769 const char* UserTag::ToCString() const { | 22783 const char* UserTag::ToCString() const { |
| 22770 const String& tag_label = String::Handle(label()); | 22784 const String& tag_label = String::Handle(label()); |
| 22771 return tag_label.ToCString(); | 22785 return tag_label.ToCString(); |
| 22772 } | 22786 } |
| 22773 | 22787 |
| 22774 } // namespace dart | 22788 } // namespace dart |
| OLD | NEW |