Chromium Code Reviews| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 557 RawContext* empty_context_; | 557 RawContext* empty_context_; |
| 558 RawInstance* stack_overflow_; | 558 RawInstance* stack_overflow_; |
| 559 RawInstance* out_of_memory_; | 559 RawInstance* out_of_memory_; |
| 560 RawUnhandledException* preallocated_unhandled_exception_; | 560 RawUnhandledException* preallocated_unhandled_exception_; |
| 561 RawStacktrace* preallocated_stack_trace_; | 561 RawStacktrace* preallocated_stack_trace_; |
| 562 RawFunction* lookup_port_handler_; | 562 RawFunction* lookup_port_handler_; |
| 563 RawTypedData* empty_uint32_array_; | 563 RawTypedData* empty_uint32_array_; |
| 564 RawFunction* handle_message_function_; | 564 RawFunction* handle_message_function_; |
| 565 RawArray* library_load_error_table_; | 565 RawArray* library_load_error_table_; |
| 566 RawArray* compile_time_constants_; | 566 RawArray* compile_time_constants_; |
| 567 RawObject** to_snapshot() { | |
| 568 return reinterpret_cast<RawObject**>(&compile_time_constants_); | |
| 569 } | |
| 570 RawArray* unique_dynamic_targets_; | 567 RawArray* unique_dynamic_targets_; |
| 571 RawGrowableObjectArray* token_objects_; | 568 RawGrowableObjectArray* token_objects_; |
| 572 RawArray* token_objects_map_; | 569 RawArray* token_objects_map_; |
| 573 RawGrowableObjectArray* megamorphic_cache_table_; | 570 RawGrowableObjectArray* megamorphic_cache_table_; |
| 574 RawCode* megamorphic_miss_code_; | 571 RawCode* megamorphic_miss_code_; |
| 575 RawFunction* megamorphic_miss_function_; | 572 RawFunction* megamorphic_miss_function_; |
| 576 RawObject** to() { | 573 RawObject** to() { |
| 577 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); | 574 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); |
| 578 } | 575 } |
| 576 RawObject** to_snapshot(Snapshot::Kind kind) { | |
| 577 switch (kind) { | |
| 578 case Snapshot::kCore: | |
| 579 return reinterpret_cast<RawObject**>(&compile_time_constants_); | |
| 580 case Snapshot::kAppWithJIT: | |
| 581 case Snapshot::kAppNoJIT: | |
| 582 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); | |
|
siva
2016/04/26 22:27:47
return to();
rmacnak
2016/04/26 23:38:23
Done.
| |
| 583 case Snapshot::kScript: | |
| 584 case Snapshot::kMessage: | |
| 585 break; | |
| 586 } | |
| 587 UNREACHABLE(); | |
| 588 return NULL; | |
| 589 } | |
| 579 | 590 |
| 580 friend class FullSnapshotWriter; | 591 friend class FullSnapshotWriter; |
| 581 friend class SnapshotReader; | 592 friend class SnapshotReader; |
| 582 friend class VmIsolateSnapshotReader; | 593 friend class VmIsolateSnapshotReader; |
| 583 | 594 |
| 584 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 595 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 585 }; | 596 }; |
| 586 | 597 |
| 587 } // namespace dart | 598 } // namespace dart |
| 588 | 599 |
| 589 #endif // VM_OBJECT_STORE_H_ | 600 #endif // VM_OBJECT_STORE_H_ |
| OLD | NEW |