| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 7776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7787 intptr_t ICData::GetCountAt(intptr_t index) const { | 7787 intptr_t ICData::GetCountAt(intptr_t index) const { |
| 7788 const Array& data = Array::Handle(ic_data()); | 7788 const Array& data = Array::Handle(ic_data()); |
| 7789 const intptr_t data_pos = index * TestEntryLength() + | 7789 const intptr_t data_pos = index * TestEntryLength() + |
| 7790 CountIndexFor(num_args_tested()); | 7790 CountIndexFor(num_args_tested()); |
| 7791 Smi& smi = Smi::Handle(); | 7791 Smi& smi = Smi::Handle(); |
| 7792 smi ^= data.At(data_pos); | 7792 smi ^= data.At(data_pos); |
| 7793 return smi.Value(); | 7793 return smi.Value(); |
| 7794 } | 7794 } |
| 7795 | 7795 |
| 7796 | 7796 |
| 7797 intptr_t ICData::AggregateCount() const { |
| 7798 const intptr_t len = NumberOfChecks(); |
| 7799 intptr_t count = 0; |
| 7800 for (intptr_t i = 0; i < len; i++) { |
| 7801 count += GetCountAt(i); |
| 7802 } |
| 7803 return count; |
| 7804 } |
| 7805 |
| 7806 |
| 7797 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const { | 7807 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const { |
| 7798 const intptr_t len = NumberOfChecks(); | 7808 const intptr_t len = NumberOfChecks(); |
| 7799 for (intptr_t i = 0; i < len; i++) { | 7809 for (intptr_t i = 0; i < len; i++) { |
| 7800 if (GetReceiverClassIdAt(i) == class_id) { | 7810 if (GetReceiverClassIdAt(i) == class_id) { |
| 7801 return GetTargetAt(i); | 7811 return GetTargetAt(i); |
| 7802 } | 7812 } |
| 7803 } | 7813 } |
| 7804 return Function::null(); | 7814 return Function::null(); |
| 7805 } | 7815 } |
| 7806 | 7816 |
| (...skipping 4643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12450 } | 12460 } |
| 12451 return result.raw(); | 12461 return result.raw(); |
| 12452 } | 12462 } |
| 12453 | 12463 |
| 12454 | 12464 |
| 12455 const char* WeakProperty::ToCString() const { | 12465 const char* WeakProperty::ToCString() const { |
| 12456 return "_WeakProperty"; | 12466 return "_WeakProperty"; |
| 12457 } | 12467 } |
| 12458 | 12468 |
| 12459 } // namespace dart | 12469 } // namespace dart |
| OLD | NEW |