| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 empty_uint32_array_ = array.raw(); | 425 empty_uint32_array_ = array.raw(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 RawFunction* handle_message_function() const { | 428 RawFunction* handle_message_function() const { |
| 429 return handle_message_function_; | 429 return handle_message_function_; |
| 430 } | 430 } |
| 431 void set_handle_message_function(const Function& function) { | 431 void set_handle_message_function(const Function& function) { |
| 432 handle_message_function_ = function.raw(); | 432 handle_message_function_ = function.raw(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 RawUserTag* default_tag() const { | |
| 436 return default_tag_; | |
| 437 } | |
| 438 void set_default_tag(const UserTag& tag) { | |
| 439 // Only set once. | |
| 440 ASSERT(default_tag_ == UserTag::null()); | |
| 441 ASSERT(!tag.IsNull()); | |
| 442 default_tag_ = tag.raw(); | |
| 443 } | |
| 444 static intptr_t default_tag_offset() { | |
| 445 return OFFSET_OF(ObjectStore, default_tag_); | |
| 446 } | |
| 447 | |
| 448 RawArray* library_load_error_table() const { | 435 RawArray* library_load_error_table() const { |
| 449 return library_load_error_table_; | 436 return library_load_error_table_; |
| 450 } | 437 } |
| 451 void set_library_load_error_table(const Array& table) { | 438 void set_library_load_error_table(const Array& table) { |
| 452 library_load_error_table_ = table.raw(); | 439 library_load_error_table_ = table.raw(); |
| 453 } | 440 } |
| 454 static intptr_t library_load_error_table_offset() { | 441 static intptr_t library_load_error_table_offset() { |
| 455 return OFFSET_OF(ObjectStore, library_load_error_table_); | 442 return OFFSET_OF(ObjectStore, library_load_error_table_); |
| 456 } | 443 } |
| 457 | 444 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 RawString* unhandled_exception_handler_; | 524 RawString* unhandled_exception_handler_; |
| 538 RawContext* empty_context_; | 525 RawContext* empty_context_; |
| 539 RawInstance* stack_overflow_; | 526 RawInstance* stack_overflow_; |
| 540 RawInstance* out_of_memory_; | 527 RawInstance* out_of_memory_; |
| 541 RawUnhandledException* preallocated_unhandled_exception_; | 528 RawUnhandledException* preallocated_unhandled_exception_; |
| 542 RawStacktrace* preallocated_stack_trace_; | 529 RawStacktrace* preallocated_stack_trace_; |
| 543 RawFunction* lookup_port_handler_; | 530 RawFunction* lookup_port_handler_; |
| 544 RawTypedData* empty_uint32_array_; | 531 RawTypedData* empty_uint32_array_; |
| 545 RawFunction* handle_message_function_; | 532 RawFunction* handle_message_function_; |
| 546 RawArray* library_load_error_table_; | 533 RawArray* library_load_error_table_; |
| 547 RawUserTag* default_tag_; | |
| 548 RawObject** to() { | 534 RawObject** to() { |
| 549 return reinterpret_cast<RawObject**>(&library_load_error_table_); | 535 return reinterpret_cast<RawObject**>(&library_load_error_table_); |
| 550 } | 536 } |
| 551 | 537 |
| 552 friend class SnapshotReader; | 538 friend class SnapshotReader; |
| 553 | 539 |
| 554 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 540 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 555 }; | 541 }; |
| 556 | 542 |
| 557 } // namespace dart | 543 } // namespace dart |
| 558 | 544 |
| 559 #endif // VM_OBJECT_STORE_H_ | 545 #endif // VM_OBJECT_STORE_H_ |
| OLD | NEW |