| 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_STORE_H_ | 5 #ifndef VM_OBJECT_STORE_H_ |
| 6 #define VM_OBJECT_STORE_H_ | 6 #define VM_OBJECT_STORE_H_ |
| 7 | 7 |
| 8 #include "vm/object.h" | 8 #include "vm/object.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 kNone = 0, | 23 kNone = 0, |
| 24 kAsync, | 24 kAsync, |
| 25 kCore, | 25 kCore, |
| 26 kCollection, | 26 kCollection, |
| 27 kConvert, | 27 kConvert, |
| 28 kInternal, | 28 kInternal, |
| 29 kIsolate, | 29 kIsolate, |
| 30 kMath, | 30 kMath, |
| 31 kMirrors, | 31 kMirrors, |
| 32 kTypedData, | 32 kTypedData, |
| 33 kProfiler, |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 ~ObjectStore(); | 36 ~ObjectStore(); |
| 36 | 37 |
| 37 RawClass* object_class() const { | 38 RawClass* object_class() const { |
| 38 ASSERT(object_class_ != Object::null()); | 39 ASSERT(object_class_ != Object::null()); |
| 39 return object_class_; | 40 return object_class_; |
| 40 } | 41 } |
| 41 void set_object_class(const Class& value) { object_class_ = value.raw(); } | 42 void set_object_class(const Class& value) { object_class_ = value.raw(); } |
| 42 static intptr_t object_class_offset() { | 43 static intptr_t object_class_offset() { |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 weak_property_class_ = value.raw(); | 268 weak_property_class_ = value.raw(); |
| 268 } | 269 } |
| 269 | 270 |
| 270 RawClass* mirror_reference_class() const { | 271 RawClass* mirror_reference_class() const { |
| 271 return mirror_reference_class_; | 272 return mirror_reference_class_; |
| 272 } | 273 } |
| 273 void set_mirror_reference_class(const Class& value) { | 274 void set_mirror_reference_class(const Class& value) { |
| 274 mirror_reference_class_ = value.raw(); | 275 mirror_reference_class_ = value.raw(); |
| 275 } | 276 } |
| 276 | 277 |
| 278 RawClass* user_tag_class() const { |
| 279 return user_tag_class_; |
| 280 } |
| 281 void set_user_tag_class(const Class& value) { |
| 282 user_tag_class_ = value.raw(); |
| 283 } |
| 284 |
| 277 RawArray* symbol_table() const { return symbol_table_; } | 285 RawArray* symbol_table() const { return symbol_table_; } |
| 278 void set_symbol_table(const Array& value) { symbol_table_ = value.raw(); } | 286 void set_symbol_table(const Array& value) { symbol_table_ = value.raw(); } |
| 279 | 287 |
| 280 RawArray* canonical_type_arguments() const { | 288 RawArray* canonical_type_arguments() const { |
| 281 return canonical_type_arguments_; | 289 return canonical_type_arguments_; |
| 282 } | 290 } |
| 283 void set_canonical_type_arguments(const Array& value) { | 291 void set_canonical_type_arguments(const Array& value) { |
| 284 canonical_type_arguments_ = value.raw(); | 292 canonical_type_arguments_ = value.raw(); |
| 285 } | 293 } |
| 286 | 294 |
| 287 RawLibrary* async_library() const { return async_library_; } | 295 RawLibrary* async_library() const { return async_library_; } |
| 288 RawLibrary* builtin_library() const { return builtin_library_; } | 296 RawLibrary* builtin_library() const { return builtin_library_; } |
| 289 RawLibrary* core_library() const { return core_library_; } | 297 RawLibrary* core_library() const { return core_library_; } |
| 290 RawLibrary* collection_library() const { return collection_library_; } | 298 RawLibrary* collection_library() const { return collection_library_; } |
| 291 RawLibrary* convert_library() const { return convert_library_; } | 299 RawLibrary* convert_library() const { return convert_library_; } |
| 292 RawLibrary* internal_library() const { return internal_library_; } | 300 RawLibrary* internal_library() const { return internal_library_; } |
| 293 RawLibrary* isolate_library() const { return isolate_library_; } | 301 RawLibrary* isolate_library() const { return isolate_library_; } |
| 294 RawLibrary* math_library() const { return math_library_; } | 302 RawLibrary* math_library() const { return math_library_; } |
| 295 RawLibrary* mirrors_library() const { return mirrors_library_; } | 303 RawLibrary* mirrors_library() const { return mirrors_library_; } |
| 296 RawLibrary* typed_data_library() const { return typed_data_library_; } | 304 RawLibrary* typed_data_library() const { return typed_data_library_; } |
| 305 RawLibrary* profiler_library() const { return profiler_library_; } |
| 297 void set_bootstrap_library(BootstrapLibraryId index, const Library& value) { | 306 void set_bootstrap_library(BootstrapLibraryId index, const Library& value) { |
| 298 switch (index) { | 307 switch (index) { |
| 299 case kAsync: | 308 case kAsync: |
| 300 async_library_ = value.raw(); | 309 async_library_ = value.raw(); |
| 301 break; | 310 break; |
| 302 case kCore: | 311 case kCore: |
| 303 core_library_ = value.raw(); | 312 core_library_ = value.raw(); |
| 304 break; | 313 break; |
| 305 case kCollection: | 314 case kCollection: |
| 306 collection_library_ = value.raw(); | 315 collection_library_ = value.raw(); |
| 307 break; | 316 break; |
| 308 case kConvert: | 317 case kConvert: |
| 309 convert_library_ = value.raw(); | 318 convert_library_ = value.raw(); |
| 310 break; | 319 break; |
| 311 case kInternal: | 320 case kInternal: |
| 312 internal_library_ = value.raw(); | 321 internal_library_ = value.raw(); |
| 313 break; | 322 break; |
| 314 case kIsolate: | 323 case kIsolate: |
| 315 isolate_library_ = value.raw(); | 324 isolate_library_ = value.raw(); |
| 316 break; | 325 break; |
| 317 case kMath: | 326 case kMath: |
| 318 math_library_ = value.raw(); | 327 math_library_ = value.raw(); |
| 319 break; | 328 break; |
| 320 case kMirrors: | 329 case kMirrors: |
| 321 mirrors_library_ = value.raw(); | 330 mirrors_library_ = value.raw(); |
| 322 break; | 331 break; |
| 323 case kTypedData: | 332 case kTypedData: |
| 324 typed_data_library_ = value.raw(); | 333 typed_data_library_ = value.raw(); |
| 325 break; | 334 break; |
| 335 case kProfiler: |
| 336 profiler_library_ = value.raw(); |
| 337 break; |
| 326 default: | 338 default: |
| 327 UNREACHABLE(); | 339 UNREACHABLE(); |
| 328 } | 340 } |
| 329 } | 341 } |
| 330 | 342 |
| 331 void set_builtin_library(const Library& value) { | 343 void set_builtin_library(const Library& value) { |
| 332 builtin_library_ = value.raw(); | 344 builtin_library_ = value.raw(); |
| 333 } | 345 } |
| 334 | 346 |
| 335 RawLibrary* native_wrappers_library() const { | 347 RawLibrary* native_wrappers_library() const { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 RawClass* growable_object_array_class_; | 480 RawClass* growable_object_array_class_; |
| 469 RawClass* float32x4_class_; | 481 RawClass* float32x4_class_; |
| 470 RawClass* int32x4_class_; | 482 RawClass* int32x4_class_; |
| 471 RawClass* float64x2_class_; | 483 RawClass* float64x2_class_; |
| 472 RawArray* typed_data_classes_; | 484 RawArray* typed_data_classes_; |
| 473 RawClass* error_class_; | 485 RawClass* error_class_; |
| 474 RawClass* stacktrace_class_; | 486 RawClass* stacktrace_class_; |
| 475 RawClass* jsregexp_class_; | 487 RawClass* jsregexp_class_; |
| 476 RawClass* weak_property_class_; | 488 RawClass* weak_property_class_; |
| 477 RawClass* mirror_reference_class_; | 489 RawClass* mirror_reference_class_; |
| 490 RawClass* user_tag_class_; |
| 478 RawArray* symbol_table_; | 491 RawArray* symbol_table_; |
| 479 RawArray* canonical_type_arguments_; | 492 RawArray* canonical_type_arguments_; |
| 480 RawLibrary* async_library_; | 493 RawLibrary* async_library_; |
| 481 RawLibrary* builtin_library_; | 494 RawLibrary* builtin_library_; |
| 482 RawLibrary* core_library_; | 495 RawLibrary* core_library_; |
| 483 RawLibrary* collection_library_; | 496 RawLibrary* collection_library_; |
| 484 RawLibrary* convert_library_; | 497 RawLibrary* convert_library_; |
| 485 RawLibrary* internal_library_; | 498 RawLibrary* internal_library_; |
| 486 RawLibrary* isolate_library_; | 499 RawLibrary* isolate_library_; |
| 487 RawLibrary* math_library_; | 500 RawLibrary* math_library_; |
| 488 RawLibrary* mirrors_library_; | 501 RawLibrary* mirrors_library_; |
| 489 RawLibrary* native_wrappers_library_; | 502 RawLibrary* native_wrappers_library_; |
| 490 RawLibrary* root_library_; | 503 RawLibrary* root_library_; |
| 491 RawLibrary* typed_data_library_; | 504 RawLibrary* typed_data_library_; |
| 505 RawLibrary* profiler_library_; |
| 492 RawGrowableObjectArray* libraries_; | 506 RawGrowableObjectArray* libraries_; |
| 493 RawGrowableObjectArray* pending_classes_; | 507 RawGrowableObjectArray* pending_classes_; |
| 494 RawGrowableObjectArray* pending_functions_; | 508 RawGrowableObjectArray* pending_functions_; |
| 495 RawError* sticky_error_; | 509 RawError* sticky_error_; |
| 496 RawString* unhandled_exception_handler_; | 510 RawString* unhandled_exception_handler_; |
| 497 RawContext* empty_context_; | 511 RawContext* empty_context_; |
| 498 RawInstance* stack_overflow_; | 512 RawInstance* stack_overflow_; |
| 499 RawInstance* out_of_memory_; | 513 RawInstance* out_of_memory_; |
| 500 RawStacktrace* preallocated_stack_trace_; | 514 RawStacktrace* preallocated_stack_trace_; |
| 501 RawFunction* receive_port_create_function_; | 515 RawFunction* receive_port_create_function_; |
| 502 RawFunction* lookup_receive_port_function_; | 516 RawFunction* lookup_receive_port_function_; |
| 503 RawFunction* handle_message_function_; | 517 RawFunction* handle_message_function_; |
| 504 RawObject** to() { | 518 RawObject** to() { |
| 505 return reinterpret_cast<RawObject**>(&handle_message_function_); | 519 return reinterpret_cast<RawObject**>(&handle_message_function_); |
| 506 } | 520 } |
| 507 | 521 |
| 508 friend class SnapshotReader; | 522 friend class SnapshotReader; |
| 509 | 523 |
| 510 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 524 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 511 }; | 525 }; |
| 512 | 526 |
| 513 } // namespace dart | 527 } // namespace dart |
| 514 | 528 |
| 515 #endif // VM_OBJECT_STORE_H_ | 529 #endif // VM_OBJECT_STORE_H_ |
| OLD | NEW |