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 | |
285 RawGrowableObjectArray* tag_table() const { return tag_table_; } | |
286 void set_tag_table(const GrowableObjectArray& value) { | |
287 tag_table_ = value.raw(); | |
288 } | |
289 | |
290 RawUserTag* current_tag() const { return current_tag_; } | |
291 void set_current_tag(const UserTag& tag) { | |
292 current_tag_ = tag.raw(); | |
293 } | |
294 void clear_current_tag() { | |
295 current_tag_ = UserTag::null(); | |
296 } | |
297 | |
277 RawArray* symbol_table() const { return symbol_table_; } | 298 RawArray* symbol_table() const { return symbol_table_; } |
278 void set_symbol_table(const Array& value) { symbol_table_ = value.raw(); } | 299 void set_symbol_table(const Array& value) { symbol_table_ = value.raw(); } |
279 | 300 |
280 RawArray* canonical_type_arguments() const { | 301 RawArray* canonical_type_arguments() const { |
281 return canonical_type_arguments_; | 302 return canonical_type_arguments_; |
282 } | 303 } |
283 void set_canonical_type_arguments(const Array& value) { | 304 void set_canonical_type_arguments(const Array& value) { |
284 canonical_type_arguments_ = value.raw(); | 305 canonical_type_arguments_ = value.raw(); |
285 } | 306 } |
286 | 307 |
287 RawLibrary* async_library() const { return async_library_; } | 308 RawLibrary* async_library() const { return async_library_; } |
288 RawLibrary* builtin_library() const { return builtin_library_; } | 309 RawLibrary* builtin_library() const { return builtin_library_; } |
289 RawLibrary* core_library() const { return core_library_; } | 310 RawLibrary* core_library() const { return core_library_; } |
290 RawLibrary* collection_library() const { return collection_library_; } | 311 RawLibrary* collection_library() const { return collection_library_; } |
291 RawLibrary* convert_library() const { return convert_library_; } | 312 RawLibrary* convert_library() const { return convert_library_; } |
292 RawLibrary* internal_library() const { return internal_library_; } | 313 RawLibrary* internal_library() const { return internal_library_; } |
293 RawLibrary* isolate_library() const { return isolate_library_; } | 314 RawLibrary* isolate_library() const { return isolate_library_; } |
294 RawLibrary* math_library() const { return math_library_; } | 315 RawLibrary* math_library() const { return math_library_; } |
295 RawLibrary* mirrors_library() const { return mirrors_library_; } | 316 RawLibrary* mirrors_library() const { return mirrors_library_; } |
296 RawLibrary* typed_data_library() const { return typed_data_library_; } | 317 RawLibrary* typed_data_library() const { return typed_data_library_; } |
318 RawLibrary* profiler_library() const { return profiler_library_; } | |
297 void set_bootstrap_library(BootstrapLibraryId index, const Library& value) { | 319 void set_bootstrap_library(BootstrapLibraryId index, const Library& value) { |
298 switch (index) { | 320 switch (index) { |
299 case kAsync: | 321 case kAsync: |
300 async_library_ = value.raw(); | 322 async_library_ = value.raw(); |
301 break; | 323 break; |
302 case kCore: | 324 case kCore: |
303 core_library_ = value.raw(); | 325 core_library_ = value.raw(); |
304 break; | 326 break; |
305 case kCollection: | 327 case kCollection: |
306 collection_library_ = value.raw(); | 328 collection_library_ = value.raw(); |
307 break; | 329 break; |
308 case kConvert: | 330 case kConvert: |
309 convert_library_ = value.raw(); | 331 convert_library_ = value.raw(); |
310 break; | 332 break; |
311 case kInternal: | 333 case kInternal: |
312 internal_library_ = value.raw(); | 334 internal_library_ = value.raw(); |
313 break; | 335 break; |
314 case kIsolate: | 336 case kIsolate: |
315 isolate_library_ = value.raw(); | 337 isolate_library_ = value.raw(); |
316 break; | 338 break; |
317 case kMath: | 339 case kMath: |
318 math_library_ = value.raw(); | 340 math_library_ = value.raw(); |
319 break; | 341 break; |
320 case kMirrors: | 342 case kMirrors: |
321 mirrors_library_ = value.raw(); | 343 mirrors_library_ = value.raw(); |
322 break; | 344 break; |
323 case kTypedData: | 345 case kTypedData: |
324 typed_data_library_ = value.raw(); | 346 typed_data_library_ = value.raw(); |
325 break; | 347 break; |
348 case kProfiler: | |
349 profiler_library_ = value.raw(); | |
350 break; | |
326 default: | 351 default: |
327 UNREACHABLE(); | 352 UNREACHABLE(); |
328 } | 353 } |
329 } | 354 } |
330 | 355 |
331 void set_builtin_library(const Library& value) { | 356 void set_builtin_library(const Library& value) { |
332 builtin_library_ = value.raw(); | 357 builtin_library_ = value.raw(); |
333 } | 358 } |
334 | 359 |
335 RawLibrary* native_wrappers_library() const { | 360 RawLibrary* native_wrappers_library() const { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
468 RawClass* growable_object_array_class_; | 493 RawClass* growable_object_array_class_; |
469 RawClass* float32x4_class_; | 494 RawClass* float32x4_class_; |
470 RawClass* int32x4_class_; | 495 RawClass* int32x4_class_; |
471 RawClass* float64x2_class_; | 496 RawClass* float64x2_class_; |
472 RawArray* typed_data_classes_; | 497 RawArray* typed_data_classes_; |
473 RawClass* error_class_; | 498 RawClass* error_class_; |
474 RawClass* stacktrace_class_; | 499 RawClass* stacktrace_class_; |
475 RawClass* jsregexp_class_; | 500 RawClass* jsregexp_class_; |
476 RawClass* weak_property_class_; | 501 RawClass* weak_property_class_; |
477 RawClass* mirror_reference_class_; | 502 RawClass* mirror_reference_class_; |
503 RawClass* user_tag_class_; | |
504 RawGrowableObjectArray* tag_table_; | |
505 RawUserTag* current_tag_; | |
siva
2014/04/09 21:32:01
current_tag_ and tag_table_ move to the isolate st
| |
478 RawArray* symbol_table_; | 506 RawArray* symbol_table_; |
479 RawArray* canonical_type_arguments_; | 507 RawArray* canonical_type_arguments_; |
480 RawLibrary* async_library_; | 508 RawLibrary* async_library_; |
481 RawLibrary* builtin_library_; | 509 RawLibrary* builtin_library_; |
482 RawLibrary* core_library_; | 510 RawLibrary* core_library_; |
483 RawLibrary* collection_library_; | 511 RawLibrary* collection_library_; |
484 RawLibrary* convert_library_; | 512 RawLibrary* convert_library_; |
485 RawLibrary* internal_library_; | 513 RawLibrary* internal_library_; |
486 RawLibrary* isolate_library_; | 514 RawLibrary* isolate_library_; |
487 RawLibrary* math_library_; | 515 RawLibrary* math_library_; |
488 RawLibrary* mirrors_library_; | 516 RawLibrary* mirrors_library_; |
489 RawLibrary* native_wrappers_library_; | 517 RawLibrary* native_wrappers_library_; |
490 RawLibrary* root_library_; | 518 RawLibrary* root_library_; |
491 RawLibrary* typed_data_library_; | 519 RawLibrary* typed_data_library_; |
520 RawLibrary* profiler_library_; | |
492 RawGrowableObjectArray* libraries_; | 521 RawGrowableObjectArray* libraries_; |
493 RawGrowableObjectArray* pending_classes_; | 522 RawGrowableObjectArray* pending_classes_; |
494 RawGrowableObjectArray* pending_functions_; | 523 RawGrowableObjectArray* pending_functions_; |
495 RawError* sticky_error_; | 524 RawError* sticky_error_; |
496 RawString* unhandled_exception_handler_; | 525 RawString* unhandled_exception_handler_; |
497 RawContext* empty_context_; | 526 RawContext* empty_context_; |
498 RawInstance* stack_overflow_; | 527 RawInstance* stack_overflow_; |
499 RawInstance* out_of_memory_; | 528 RawInstance* out_of_memory_; |
500 RawStacktrace* preallocated_stack_trace_; | 529 RawStacktrace* preallocated_stack_trace_; |
501 RawFunction* receive_port_create_function_; | 530 RawFunction* receive_port_create_function_; |
502 RawFunction* lookup_receive_port_function_; | 531 RawFunction* lookup_receive_port_function_; |
503 RawFunction* handle_message_function_; | 532 RawFunction* handle_message_function_; |
504 RawObject** to() { | 533 RawObject** to() { |
505 return reinterpret_cast<RawObject**>(&handle_message_function_); | 534 return reinterpret_cast<RawObject**>(&handle_message_function_); |
506 } | 535 } |
507 | 536 |
508 friend class SnapshotReader; | 537 friend class SnapshotReader; |
509 | 538 |
510 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 539 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
511 }; | 540 }; |
512 | 541 |
513 } // namespace dart | 542 } // namespace dart |
514 | 543 |
515 #endif // VM_OBJECT_STORE_H_ | 544 #endif // VM_OBJECT_STORE_H_ |
OLD | NEW |