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 13735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13746 const intptr_t len = NumberOfChecks(); | 13746 const intptr_t len = NumberOfChecks(); |
13747 for (intptr_t i = 1; i < len; i++) { | 13747 for (intptr_t i = 1; i < len; i++) { |
13748 if (IsUsedAt(i) && (GetTargetAt(i) != first_target.raw())) { | 13748 if (IsUsedAt(i) && (GetTargetAt(i) != first_target.raw())) { |
13749 return false; | 13749 return false; |
13750 } | 13750 } |
13751 } | 13751 } |
13752 return true; | 13752 return true; |
13753 } | 13753 } |
13754 | 13754 |
13755 | 13755 |
13756 bool ICData::HasOnlyDispatcherOrImplicitAccessorTargets() const { | |
13757 const intptr_t len = NumberOfChecks(); | |
13758 Function& target = Function::Handle(); | |
13759 for (intptr_t i = 0; i < len; i++) { | |
13760 target = GetTargetAt(i); | |
13761 if (!target.IsDispatcherOrImplicitAccessor()) { | |
13762 return false; | |
13763 } | |
13764 } | |
13765 return true; | |
13766 } | |
13767 | |
13768 | |
13769 void ICData::GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first, | 13756 void ICData::GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first, |
13770 GrowableArray<intptr_t>* second) const { | 13757 GrowableArray<intptr_t>* second) const { |
13771 ASSERT(NumArgsTested() == 2); | 13758 ASSERT(NumArgsTested() == 2); |
13772 first->Clear(); | 13759 first->Clear(); |
13773 second->Clear(); | 13760 second->Clear(); |
13774 GrowableArray<intptr_t> class_ids; | 13761 GrowableArray<intptr_t> class_ids; |
13775 const intptr_t len = NumberOfChecks(); | 13762 const intptr_t len = NumberOfChecks(); |
13776 for (intptr_t i = 0; i < len; i++) { | 13763 for (intptr_t i = 0; i < len; i++) { |
13777 if (GetCountAt(i) > 0) { | 13764 if (GetCountAt(i) > 0) { |
13778 GetClassIdsAt(i, &class_ids); | 13765 GetClassIdsAt(i, &class_ids); |
(...skipping 9300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23079 return UserTag::null(); | 23066 return UserTag::null(); |
23080 } | 23067 } |
23081 | 23068 |
23082 | 23069 |
23083 const char* UserTag::ToCString() const { | 23070 const char* UserTag::ToCString() const { |
23084 const String& tag_label = String::Handle(label()); | 23071 const String& tag_label = String::Handle(label()); |
23085 return tag_label.ToCString(); | 23072 return tag_label.ToCString(); |
23086 } | 23073 } |
23087 | 23074 |
23088 } // namespace dart | 23075 } // namespace dart |
OLD | NEW |