| 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_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 RawObject** to() { | 329 RawObject** to() { |
| 330 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); | 330 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); |
| 331 } | 331 } |
| 332 | 332 |
| 333 cpp_vtable handle_vtable_; | 333 cpp_vtable handle_vtable_; |
| 334 intptr_t instance_size_; | 334 intptr_t instance_size_; |
| 335 ObjectKind instance_kind_; | 335 ObjectKind instance_kind_; |
| 336 intptr_t type_arguments_instance_field_offset_; // May be kNoTypeArguments. | 336 intptr_t type_arguments_instance_field_offset_; // May be kNoTypeArguments. |
| 337 intptr_t next_field_offset_; // Offset of then next instance field. | 337 intptr_t next_field_offset_; // Offset of then next instance field. |
| 338 intptr_t num_native_fields_; // Number of native fields in class. | 338 intptr_t num_native_fields_; // Number of native fields in class. |
| 339 intptr_t token_index_; |
| 339 int8_t class_state_; // Of type ClassState. | 340 int8_t class_state_; // Of type ClassState. |
| 340 bool is_const_; | 341 bool is_const_; |
| 341 bool is_interface_; | 342 bool is_interface_; |
| 342 | 343 |
| 343 friend class Object; | 344 friend class Object; |
| 344 friend class RawInstance; | 345 friend class RawInstance; |
| 345 friend RawClass* AllocateFakeClass(); | 346 friend RawClass* AllocateFakeClass(); |
| 346 friend class SnapshotReader; | 347 friend class SnapshotReader; |
| 347 }; | 348 }; |
| 348 | 349 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 class RawType : public RawAbstractType { | 382 class RawType : public RawAbstractType { |
| 382 private: | 383 private: |
| 383 RAW_HEAP_OBJECT_IMPLEMENTATION(Type); | 384 RAW_HEAP_OBJECT_IMPLEMENTATION(Type); |
| 384 | 385 |
| 385 RawObject** from() { | 386 RawObject** from() { |
| 386 return reinterpret_cast<RawObject**>(&ptr()->type_class_); | 387 return reinterpret_cast<RawObject**>(&ptr()->type_class_); |
| 387 } | 388 } |
| 388 RawObject* type_class_; // Either resolved class or unresolved class. | 389 RawObject* type_class_; // Either resolved class or unresolved class. |
| 389 RawAbstractTypeArguments* arguments_; | 390 RawAbstractTypeArguments* arguments_; |
| 390 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->arguments_); } | 391 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->arguments_); } |
| 392 intptr_t token_index_; |
| 391 int8_t type_state_; | 393 int8_t type_state_; |
| 392 }; | 394 }; |
| 393 | 395 |
| 394 | 396 |
| 395 class RawTypeParameter : public RawAbstractType { | 397 class RawTypeParameter : public RawAbstractType { |
| 396 private: | 398 private: |
| 397 RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter); | 399 RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter); |
| 398 | 400 |
| 399 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 401 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 400 RawString* name_; | 402 RawString* name_; |
| 401 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 403 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 402 intptr_t index_; | 404 intptr_t index_; |
| 405 intptr_t token_index_; |
| 403 int8_t type_state_; | 406 int8_t type_state_; |
| 404 }; | 407 }; |
| 405 | 408 |
| 406 | 409 |
| 407 class RawInstantiatedType : public RawAbstractType { | 410 class RawInstantiatedType : public RawAbstractType { |
| 408 private: | 411 private: |
| 409 RAW_HEAP_OBJECT_IMPLEMENTATION(InstantiatedType); | 412 RAW_HEAP_OBJECT_IMPLEMENTATION(InstantiatedType); |
| 410 | 413 |
| 411 RawObject** from() { | 414 RawObject** from() { |
| 412 return reinterpret_cast<RawObject**>(&ptr()->uninstantiated_type_); | 415 return reinterpret_cast<RawObject**>(&ptr()->uninstantiated_type_); |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 intptr_t type_; // Uninitialized, simple or complex. | 1041 intptr_t type_; // Uninitialized, simple or complex. |
| 1039 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 1042 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 1040 | 1043 |
| 1041 // Variable length data follows here. | 1044 // Variable length data follows here. |
| 1042 uint8_t data_[0]; | 1045 uint8_t data_[0]; |
| 1043 }; | 1046 }; |
| 1044 | 1047 |
| 1045 } // namespace dart | 1048 } // namespace dart |
| 1046 | 1049 |
| 1047 #endif // VM_RAW_OBJECT_H_ | 1050 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |