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