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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 return OFFSET_OF(ObjectStore, library_load_error_table_); | 426 return OFFSET_OF(ObjectStore, library_load_error_table_); |
427 } | 427 } |
428 | 428 |
429 RawArray* compile_time_constants() const { | 429 RawArray* compile_time_constants() const { |
430 return compile_time_constants_; | 430 return compile_time_constants_; |
431 } | 431 } |
432 void set_compile_time_constants(const Array& value) { | 432 void set_compile_time_constants(const Array& value) { |
433 compile_time_constants_ = value.raw(); | 433 compile_time_constants_ = value.raw(); |
434 } | 434 } |
435 | 435 |
| 436 RawGrowableObjectArray* megamorphic_cache_table() const { |
| 437 return megamorphic_cache_table_; |
| 438 } |
| 439 void set_megamorphic_cache_table(const GrowableObjectArray& value) { |
| 440 megamorphic_cache_table_ = value.raw(); |
| 441 } |
| 442 RawCode* megamorphic_miss_code() const { |
| 443 return megamorphic_miss_code_; |
| 444 } |
| 445 void set_megamorphic_miss_code(const Code& value) { |
| 446 megamorphic_miss_code_ = value.raw(); |
| 447 } |
| 448 RawFunction* megamorphic_miss_function() const { |
| 449 return megamorphic_miss_function_; |
| 450 } |
| 451 void set_megamorphic_miss_function(const Function& value) { |
| 452 megamorphic_miss_function_ = value.raw(); |
| 453 } |
| 454 |
436 // Visit all object pointers. | 455 // Visit all object pointers. |
437 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 456 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
438 | 457 |
439 // Called to initialize objects required by the vm but which invoke | 458 // Called to initialize objects required by the vm but which invoke |
440 // dart code. If an error occurs then false is returned and error | 459 // dart code. If an error occurs then false is returned and error |
441 // information is stored in sticky_error(). | 460 // information is stored in sticky_error(). |
442 bool PreallocateObjects(); | 461 bool PreallocateObjects(); |
443 | 462 |
444 void InitKnownObjects(); | 463 void InitKnownObjects(); |
445 | 464 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 RawContext* empty_context_; | 535 RawContext* empty_context_; |
517 RawInstance* stack_overflow_; | 536 RawInstance* stack_overflow_; |
518 RawInstance* out_of_memory_; | 537 RawInstance* out_of_memory_; |
519 RawUnhandledException* preallocated_unhandled_exception_; | 538 RawUnhandledException* preallocated_unhandled_exception_; |
520 RawStacktrace* preallocated_stack_trace_; | 539 RawStacktrace* preallocated_stack_trace_; |
521 RawFunction* lookup_port_handler_; | 540 RawFunction* lookup_port_handler_; |
522 RawTypedData* empty_uint32_array_; | 541 RawTypedData* empty_uint32_array_; |
523 RawFunction* handle_message_function_; | 542 RawFunction* handle_message_function_; |
524 RawArray* library_load_error_table_; | 543 RawArray* library_load_error_table_; |
525 RawArray* compile_time_constants_; | 544 RawArray* compile_time_constants_; |
526 RawObject** to() { | 545 RawObject** to_snapshot() { |
527 return reinterpret_cast<RawObject**>(&compile_time_constants_); | 546 return reinterpret_cast<RawObject**>(&compile_time_constants_); |
528 } | 547 } |
| 548 RawGrowableObjectArray* megamorphic_cache_table_; |
| 549 RawCode* megamorphic_miss_code_; |
| 550 RawFunction* megamorphic_miss_function_; |
| 551 RawObject** to() { |
| 552 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); |
| 553 } |
529 | 554 |
| 555 friend class FullSnapshotWriter; |
530 friend class SnapshotReader; | 556 friend class SnapshotReader; |
531 friend class VmIsolateSnapshotReader; | 557 friend class VmIsolateSnapshotReader; |
532 | 558 |
533 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 559 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
534 }; | 560 }; |
535 | 561 |
536 } // namespace dart | 562 } // namespace dart |
537 | 563 |
538 #endif // VM_OBJECT_STORE_H_ | 564 #endif // VM_OBJECT_STORE_H_ |
OLD | NEW |