| 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 RawFunction* megamorphic_miss_handler() const { |
| 443 return megamorphic_miss_handler_; |
| 444 } |
| 445 void set_megamorphic_miss_handler(const Function& value) { |
| 446 megamorphic_miss_handler_ = value.raw(); |
| 447 } |
| 448 |
| 436 // Visit all object pointers. | 449 // Visit all object pointers. |
| 437 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 450 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 438 | 451 |
| 439 // Called to initialize objects required by the vm but which invoke | 452 // Called to initialize objects required by the vm but which invoke |
| 440 // dart code. If an error occurs then false is returned and error | 453 // dart code. If an error occurs then false is returned and error |
| 441 // information is stored in sticky_error(). | 454 // information is stored in sticky_error(). |
| 442 bool PreallocateObjects(); | 455 bool PreallocateObjects(); |
| 443 | 456 |
| 444 void InitKnownObjects(); | 457 void InitKnownObjects(); |
| 445 | 458 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 RawContext* empty_context_; | 529 RawContext* empty_context_; |
| 517 RawInstance* stack_overflow_; | 530 RawInstance* stack_overflow_; |
| 518 RawInstance* out_of_memory_; | 531 RawInstance* out_of_memory_; |
| 519 RawUnhandledException* preallocated_unhandled_exception_; | 532 RawUnhandledException* preallocated_unhandled_exception_; |
| 520 RawStacktrace* preallocated_stack_trace_; | 533 RawStacktrace* preallocated_stack_trace_; |
| 521 RawFunction* lookup_port_handler_; | 534 RawFunction* lookup_port_handler_; |
| 522 RawTypedData* empty_uint32_array_; | 535 RawTypedData* empty_uint32_array_; |
| 523 RawFunction* handle_message_function_; | 536 RawFunction* handle_message_function_; |
| 524 RawArray* library_load_error_table_; | 537 RawArray* library_load_error_table_; |
| 525 RawArray* compile_time_constants_; | 538 RawArray* compile_time_constants_; |
| 539 RawGrowableObjectArray* megamorphic_cache_table_; |
| 540 RawFunction* megamorphic_miss_handler_; |
| 526 RawObject** to() { | 541 RawObject** to() { |
| 527 return reinterpret_cast<RawObject**>(&compile_time_constants_); | 542 return reinterpret_cast<RawObject**>(&megamorphic_miss_handler_); |
| 528 } | 543 } |
| 529 | 544 |
| 530 friend class SnapshotReader; | 545 friend class SnapshotReader; |
| 531 friend class VmIsolateSnapshotReader; | 546 friend class VmIsolateSnapshotReader; |
| 532 | 547 |
| 533 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 548 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 534 }; | 549 }; |
| 535 | 550 |
| 536 } // namespace dart | 551 } // namespace dart |
| 537 | 552 |
| 538 #endif // VM_OBJECT_STORE_H_ | 553 #endif // VM_OBJECT_STORE_H_ |
| OLD | NEW |