| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 void set_default_tag(const UserTag& tag) { | 428 void set_default_tag(const UserTag& tag) { |
| 429 // Only set once. | 429 // Only set once. |
| 430 ASSERT(default_tag_ == UserTag::null()); | 430 ASSERT(default_tag_ == UserTag::null()); |
| 431 ASSERT(!tag.IsNull()); | 431 ASSERT(!tag.IsNull()); |
| 432 default_tag_ = tag.raw(); | 432 default_tag_ = tag.raw(); |
| 433 } | 433 } |
| 434 static intptr_t default_tag_offset() { | 434 static intptr_t default_tag_offset() { |
| 435 return OFFSET_OF(ObjectStore, default_tag_); | 435 return OFFSET_OF(ObjectStore, default_tag_); |
| 436 } | 436 } |
| 437 | 437 |
| 438 RawArray* library_load_error_table() const { |
| 439 return library_load_error_table_; |
| 440 } |
| 441 void set_library_load_error_table(const Array& table) { |
| 442 library_load_error_table_ = table.raw(); |
| 443 } |
| 444 static intptr_t library_load_error_table_offset() { |
| 445 return OFFSET_OF(ObjectStore, library_load_error_table_); |
| 446 } |
| 447 |
| 438 // Visit all object pointers. | 448 // Visit all object pointers. |
| 439 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 449 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 440 | 450 |
| 441 // Called to initialize objects required by the vm but which invoke | 451 // Called to initialize objects required by the vm but which invoke |
| 442 // dart code. If an error occurs then false is returned and error | 452 // dart code. If an error occurs then false is returned and error |
| 443 // information is stored in sticky_error(). | 453 // information is stored in sticky_error(). |
| 444 bool PreallocateObjects(); | 454 bool PreallocateObjects(); |
| 445 | 455 |
| 446 static void Init(Isolate* isolate); | 456 static void Init(Isolate* isolate); |
| 447 | 457 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 RawGrowableObjectArray* resume_capabilities_; | 525 RawGrowableObjectArray* resume_capabilities_; |
| 516 RawError* sticky_error_; | 526 RawError* sticky_error_; |
| 517 RawString* unhandled_exception_handler_; | 527 RawString* unhandled_exception_handler_; |
| 518 RawContext* empty_context_; | 528 RawContext* empty_context_; |
| 519 RawInstance* stack_overflow_; | 529 RawInstance* stack_overflow_; |
| 520 RawInstance* out_of_memory_; | 530 RawInstance* out_of_memory_; |
| 521 RawUnhandledException* preallocated_unhandled_exception_; | 531 RawUnhandledException* preallocated_unhandled_exception_; |
| 522 RawStacktrace* preallocated_stack_trace_; | 532 RawStacktrace* preallocated_stack_trace_; |
| 523 RawFunction* lookup_port_handler_; | 533 RawFunction* lookup_port_handler_; |
| 524 RawFunction* handle_message_function_; | 534 RawFunction* handle_message_function_; |
| 535 RawArray* library_load_error_table_; |
| 525 RawUserTag* default_tag_; | 536 RawUserTag* default_tag_; |
| 526 RawObject** to() { | 537 RawObject** to() { |
| 527 return reinterpret_cast<RawObject**>(&handle_message_function_); | 538 return reinterpret_cast<RawObject**>(&library_load_error_table_); |
| 528 } | 539 } |
| 529 | 540 |
| 530 friend class SnapshotReader; | 541 friend class SnapshotReader; |
| 531 | 542 |
| 532 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 543 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 533 }; | 544 }; |
| 534 | 545 |
| 535 } // namespace dart | 546 } // namespace dart |
| 536 | 547 |
| 537 #endif // VM_OBJECT_STORE_H_ | 548 #endif // VM_OBJECT_STORE_H_ |
| OLD | NEW |