| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 8697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8708 | 8708 |
| 8709 intptr_t ICData::GetCountAt(intptr_t index) const { | 8709 intptr_t ICData::GetCountAt(intptr_t index) const { |
| 8710 const Array& data = Array::Handle(ic_data()); | 8710 const Array& data = Array::Handle(ic_data()); |
| 8711 const intptr_t data_pos = index * TestEntryLength() + | 8711 const intptr_t data_pos = index * TestEntryLength() + |
| 8712 CountIndexFor(num_args_tested()); | 8712 CountIndexFor(num_args_tested()); |
| 8713 return Smi::Value(Smi::RawCast(data.At(data_pos))); | 8713 return Smi::Value(Smi::RawCast(data.At(data_pos))); |
| 8714 } | 8714 } |
| 8715 | 8715 |
| 8716 | 8716 |
| 8717 intptr_t ICData::AggregateCount() const { | 8717 intptr_t ICData::AggregateCount() const { |
| 8718 if (IsNull()) return 0; |
| 8718 const intptr_t len = NumberOfChecks(); | 8719 const intptr_t len = NumberOfChecks(); |
| 8719 intptr_t count = 0; | 8720 intptr_t count = 0; |
| 8720 for (intptr_t i = 0; i < len; i++) { | 8721 for (intptr_t i = 0; i < len; i++) { |
| 8721 count += GetCountAt(i); | 8722 count += GetCountAt(i); |
| 8722 } | 8723 } |
| 8723 return count; | 8724 return count; |
| 8724 } | 8725 } |
| 8725 | 8726 |
| 8726 | 8727 |
| 8727 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const { | 8728 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const { |
| (...skipping 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13676 space); | 13677 space); |
| 13677 return reinterpret_cast<RawWeakProperty*>(raw); | 13678 return reinterpret_cast<RawWeakProperty*>(raw); |
| 13678 } | 13679 } |
| 13679 | 13680 |
| 13680 | 13681 |
| 13681 const char* WeakProperty::ToCString() const { | 13682 const char* WeakProperty::ToCString() const { |
| 13682 return "_WeakProperty"; | 13683 return "_WeakProperty"; |
| 13683 } | 13684 } |
| 13684 | 13685 |
| 13685 } // namespace dart | 13686 } // namespace dart |
| OLD | NEW |