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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 6785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6796 intptr_t Length() const { | 6796 intptr_t Length() const { |
6797 ASSERT(!IsNull()); | 6797 ASSERT(!IsNull()); |
6798 return Smi::Value(raw_ptr()->length_); | 6798 return Smi::Value(raw_ptr()->length_); |
6799 } | 6799 } |
6800 | 6800 |
6801 intptr_t ElementSizeInBytes() const { | 6801 intptr_t ElementSizeInBytes() const { |
6802 intptr_t cid = raw()->GetClassId(); | 6802 intptr_t cid = raw()->GetClassId(); |
6803 return ElementSizeInBytes(cid); | 6803 return ElementSizeInBytes(cid); |
6804 } | 6804 } |
6805 | 6805 |
6806 | |
6807 TypedDataElementType ElementType() const { | 6806 TypedDataElementType ElementType() const { |
6808 intptr_t cid = raw()->GetClassId(); | 6807 intptr_t cid = raw()->GetClassId(); |
6809 return ElementType(cid); | 6808 return ElementType(cid); |
6810 } | 6809 } |
6811 | 6810 |
6812 intptr_t LengthInBytes() const { | 6811 intptr_t LengthInBytes() const { |
6813 intptr_t cid = raw()->GetClassId(); | 6812 intptr_t cid = raw()->GetClassId(); |
6814 return (ElementSizeInBytes(cid) * Length()); | 6813 return (ElementSizeInBytes(cid) * Length()); |
6815 } | 6814 } |
6816 | 6815 |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7854 | 7853 |
7855 | 7854 |
7856 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7855 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7857 intptr_t index) { | 7856 intptr_t index) { |
7858 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7857 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7859 } | 7858 } |
7860 | 7859 |
7861 } // namespace dart | 7860 } // namespace dart |
7862 | 7861 |
7863 #endif // VM_OBJECT_H_ | 7862 #endif // VM_OBJECT_H_ |
OLD | NEW |