| 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 4934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4945 TYPED_GETTER_SETTER(Int8, int8_t) | 4945 TYPED_GETTER_SETTER(Int8, int8_t) |
| 4946 TYPED_GETTER_SETTER(Uint8, uint8_t) | 4946 TYPED_GETTER_SETTER(Uint8, uint8_t) |
| 4947 TYPED_GETTER_SETTER(Int16, int16_t) | 4947 TYPED_GETTER_SETTER(Int16, int16_t) |
| 4948 TYPED_GETTER_SETTER(Uint16, uint16_t) | 4948 TYPED_GETTER_SETTER(Uint16, uint16_t) |
| 4949 TYPED_GETTER_SETTER(Int32, int32_t) | 4949 TYPED_GETTER_SETTER(Int32, int32_t) |
| 4950 TYPED_GETTER_SETTER(Uint32, uint32_t) | 4950 TYPED_GETTER_SETTER(Uint32, uint32_t) |
| 4951 TYPED_GETTER_SETTER(Int64, int64_t) | 4951 TYPED_GETTER_SETTER(Int64, int64_t) |
| 4952 TYPED_GETTER_SETTER(Uint64, uint64_t) | 4952 TYPED_GETTER_SETTER(Uint64, uint64_t) |
| 4953 TYPED_GETTER_SETTER(Float32, float) | 4953 TYPED_GETTER_SETTER(Float32, float) |
| 4954 TYPED_GETTER_SETTER(Float64, double) | 4954 TYPED_GETTER_SETTER(Float64, double) |
| 4955 simd_value_t GetFloat32x4(intptr_t byte_offset) const { |
| 4956 return simd_value_safe_load(DataAddr(byte_offset)); |
| 4957 } |
| 4958 void SetFloat32x4(intptr_t byte_offset, simd_value_t value) const { |
| 4959 simd_value_safe_store(DataAddr(byte_offset), value); |
| 4960 } |
| 4955 | 4961 |
| 4956 static intptr_t length_offset() { | 4962 static intptr_t length_offset() { |
| 4957 return OFFSET_OF(RawTypedData, length_); | 4963 return OFFSET_OF(RawTypedData, length_); |
| 4958 } | 4964 } |
| 4959 | 4965 |
| 4960 static intptr_t InstanceSize() { | 4966 static intptr_t InstanceSize() { |
| 4961 ASSERT(sizeof(RawTypedData) == OFFSET_OF(RawTypedData, data_)); | 4967 ASSERT(sizeof(RawTypedData) == OFFSET_OF(RawTypedData, data_)); |
| 4962 return 0; | 4968 return 0; |
| 4963 } | 4969 } |
| 4964 | 4970 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5022 TYPED_GETTER_SETTER(Int8, int8_t) | 5028 TYPED_GETTER_SETTER(Int8, int8_t) |
| 5023 TYPED_GETTER_SETTER(Uint8, uint8_t) | 5029 TYPED_GETTER_SETTER(Uint8, uint8_t) |
| 5024 TYPED_GETTER_SETTER(Int16, int16_t) | 5030 TYPED_GETTER_SETTER(Int16, int16_t) |
| 5025 TYPED_GETTER_SETTER(Uint16, uint16_t) | 5031 TYPED_GETTER_SETTER(Uint16, uint16_t) |
| 5026 TYPED_GETTER_SETTER(Int32, int32_t) | 5032 TYPED_GETTER_SETTER(Int32, int32_t) |
| 5027 TYPED_GETTER_SETTER(Uint32, uint32_t) | 5033 TYPED_GETTER_SETTER(Uint32, uint32_t) |
| 5028 TYPED_GETTER_SETTER(Int64, int64_t) | 5034 TYPED_GETTER_SETTER(Int64, int64_t) |
| 5029 TYPED_GETTER_SETTER(Uint64, uint64_t) | 5035 TYPED_GETTER_SETTER(Uint64, uint64_t) |
| 5030 TYPED_GETTER_SETTER(Float32, float) | 5036 TYPED_GETTER_SETTER(Float32, float) |
| 5031 TYPED_GETTER_SETTER(Float64, double) | 5037 TYPED_GETTER_SETTER(Float64, double) |
| 5038 simd_value_t GetFloat32x4(intptr_t byte_offset) const { |
| 5039 return simd_value_safe_load(DataAddr(byte_offset)); |
| 5040 } |
| 5041 void SetFloat32x4(intptr_t byte_offset, simd_value_t value) const { |
| 5042 simd_value_safe_store(DataAddr(byte_offset), value); |
| 5043 } |
| 5032 | 5044 |
| 5033 FinalizablePersistentHandle* AddFinalizer( | 5045 FinalizablePersistentHandle* AddFinalizer( |
| 5034 void* peer, Dart_WeakPersistentHandleFinalizer callback) const; | 5046 void* peer, Dart_WeakPersistentHandleFinalizer callback) const; |
| 5035 | 5047 |
| 5036 static intptr_t length_offset() { | 5048 static intptr_t length_offset() { |
| 5037 return OFFSET_OF(RawExternalTypedData, length_); | 5049 return OFFSET_OF(RawExternalTypedData, length_); |
| 5038 } | 5050 } |
| 5039 | 5051 |
| 5040 static intptr_t data_offset() { | 5052 static intptr_t data_offset() { |
| 5041 return OFFSET_OF(RawExternalTypedData, data_); | 5053 return OFFSET_OF(RawExternalTypedData, data_); |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6814 | 6826 |
| 6815 | 6827 |
| 6816 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6828 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6817 intptr_t index) { | 6829 intptr_t index) { |
| 6818 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6830 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6819 } | 6831 } |
| 6820 | 6832 |
| 6821 } // namespace dart | 6833 } // namespace dart |
| 6822 | 6834 |
| 6823 #endif // VM_OBJECT_H_ | 6835 #endif // VM_OBJECT_H_ |
| OLD | NEW |