| 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 8018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8029 ASSERT(is_static()); // Valid only for static dart fields. | 8029 ASSERT(is_static()); // Valid only for static dart fields. |
| 8030 return raw_ptr()->value_.static_value_; | 8030 return raw_ptr()->value_.static_value_; |
| 8031 } | 8031 } |
| 8032 | 8032 |
| 8033 | 8033 |
| 8034 void Field::SetStaticValue(const Instance& value, | 8034 void Field::SetStaticValue(const Instance& value, |
| 8035 bool save_initial_value) const { | 8035 bool save_initial_value) const { |
| 8036 ASSERT(is_static()); // Valid only for static dart fields. | 8036 ASSERT(is_static()); // Valid only for static dart fields. |
| 8037 StorePointer(&raw_ptr()->value_.static_value_, value.raw()); | 8037 StorePointer(&raw_ptr()->value_.static_value_, value.raw()); |
| 8038 if (save_initial_value) { | 8038 if (save_initial_value) { |
| 8039 ASSERT(!HasPrecompiledInitializer()); |
| 8039 StorePointer(&raw_ptr()->initializer_.saved_value_, value.raw()); | 8040 StorePointer(&raw_ptr()->initializer_.saved_value_, value.raw()); |
| 8040 } | 8041 } |
| 8041 } | 8042 } |
| 8042 | 8043 |
| 8043 | 8044 |
| 8044 void Context::SetAt(intptr_t index, const Object& value) const { | 8045 void Context::SetAt(intptr_t index, const Object& value) const { |
| 8045 StorePointer(ObjectAddr(index), value.raw()); | 8046 StorePointer(ObjectAddr(index), value.raw()); |
| 8046 } | 8047 } |
| 8047 | 8048 |
| 8048 | 8049 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8129 | 8130 |
| 8130 | 8131 |
| 8131 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8132 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8132 intptr_t index) { | 8133 intptr_t index) { |
| 8133 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8134 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8134 } | 8135 } |
| 8135 | 8136 |
| 8136 } // namespace dart | 8137 } // namespace dart |
| 8137 | 8138 |
| 8138 #endif // VM_OBJECT_H_ | 8139 #endif // VM_OBJECT_H_ |
| OLD | NEW |