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 4207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4218 Error* bound_error) const; | 4218 Error* bound_error) const; |
4219 | 4219 |
4220 bool IsValidNativeIndex(int index) const { | 4220 bool IsValidNativeIndex(int index) const { |
4221 return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_)); | 4221 return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_)); |
4222 } | 4222 } |
4223 | 4223 |
4224 intptr_t* NativeFieldsDataAddr() const; | 4224 intptr_t* NativeFieldsDataAddr() const; |
4225 inline intptr_t GetNativeField(int index) const; | 4225 inline intptr_t GetNativeField(int index) const; |
4226 inline void GetNativeFields(uint16_t num_fields, | 4226 inline void GetNativeFields(uint16_t num_fields, |
4227 intptr_t* field_values) const; | 4227 intptr_t* field_values) const; |
| 4228 void SetNativeFields(uint16_t num_fields, |
| 4229 const intptr_t* field_values) const; |
4228 | 4230 |
4229 uint16_t NumNativeFields() const { | 4231 uint16_t NumNativeFields() const { |
4230 return clazz()->ptr()->num_native_fields_; | 4232 return clazz()->ptr()->num_native_fields_; |
4231 } | 4233 } |
4232 | 4234 |
4233 void SetNativeField(int index, intptr_t value) const; | 4235 void SetNativeField(int index, intptr_t value) const; |
4234 | 4236 |
4235 // Returns true if the instance is a closure object. | 4237 // Returns true if the instance is a closure object. |
4236 bool IsClosure() const; | 4238 bool IsClosure() const; |
4237 | 4239 |
(...skipping 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7128 | 7130 |
7129 | 7131 |
7130 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7132 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7131 intptr_t index) { | 7133 intptr_t index) { |
7132 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7134 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7133 } | 7135 } |
7134 | 7136 |
7135 } // namespace dart | 7137 } // namespace dart |
7136 | 7138 |
7137 #endif // VM_OBJECT_H_ | 7139 #endif // VM_OBJECT_H_ |
OLD | NEW |