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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 uword raw_value() const { | 359 uword raw_value() const { |
360 return reinterpret_cast<uword>(raw()); | 360 return reinterpret_cast<uword>(raw()); |
361 } | 361 } |
362 | 362 |
363 inline void SetRaw(RawObject* value); | 363 inline void SetRaw(RawObject* value); |
364 | 364 |
365 cpp_vtable vtable() const { return bit_copy<cpp_vtable>(*this); } | 365 cpp_vtable vtable() const { return bit_copy<cpp_vtable>(*this); } |
366 void set_vtable(cpp_vtable value) { *vtable_address() = value; } | 366 void set_vtable(cpp_vtable value) { *vtable_address() = value; } |
367 | 367 |
368 static RawObject* Allocate(const Class& cls, | 368 static RawObject* Allocate(intptr_t cls_id, |
369 intptr_t size, | 369 intptr_t size, |
370 Heap::Space space); | 370 Heap::Space space); |
371 | 371 |
372 static intptr_t RoundedAllocationSize(intptr_t size) { | 372 static intptr_t RoundedAllocationSize(intptr_t size) { |
373 return Utils::RoundUp(size, kObjectAlignment); | 373 return Utils::RoundUp(size, kObjectAlignment); |
374 } | 374 } |
375 | 375 |
376 template<typename type> void StorePointer(type* addr, type value) const { | 376 template<typename type> void StorePointer(type* addr, type value) const { |
377 // TODO(iposva): Implement real store barrier here. | 377 // TODO(iposva): Implement real store barrier here. |
378 *addr = value; | 378 *addr = value; |
(...skipping 4789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5168 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5168 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
5169 return false; | 5169 return false; |
5170 } | 5170 } |
5171 } | 5171 } |
5172 return true; | 5172 return true; |
5173 } | 5173 } |
5174 | 5174 |
5175 } // namespace dart | 5175 } // namespace dart |
5176 | 5176 |
5177 #endif // VM_OBJECT_H_ | 5177 #endif // VM_OBJECT_H_ |
OLD | NEW |