| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 void set_out_of_memory(const Instance& value) { | 462 void set_out_of_memory(const Instance& value) { |
| 463 out_of_memory_ = value.raw(); | 463 out_of_memory_ = value.raw(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 RawArray* keyword_symbols() const { return keyword_symbols_; } | 466 RawArray* keyword_symbols() const { return keyword_symbols_; } |
| 467 void set_keyword_symbols(const Array& value) { | 467 void set_keyword_symbols(const Array& value) { |
| 468 keyword_symbols_ = value.raw(); | 468 keyword_symbols_ = value.raw(); |
| 469 } | 469 } |
| 470 void InitKeywordTable(); | 470 void InitKeywordTable(); |
| 471 | 471 |
| 472 RawFunction* receive_port_create_function() const { |
| 473 return receive_port_create_function_; |
| 474 } |
| 475 void set_receive_port_create_function(const Function& function) { |
| 476 receive_port_create_function_ = function.raw(); |
| 477 } |
| 478 |
| 479 RawFunction* handle_message_function() const { |
| 480 return handle_message_function_; |
| 481 } |
| 482 void set_handle_message_function(const Function& function) { |
| 483 handle_message_function_ = function.raw(); |
| 484 } |
| 485 |
| 472 // Visit all object pointers. | 486 // Visit all object pointers. |
| 473 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 487 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 474 | 488 |
| 475 // Called to initialize objects required by the vm but which invoke | 489 // Called to initialize objects required by the vm but which invoke |
| 476 // dart code. If an error occurs then false is returned and error | 490 // dart code. If an error occurs then false is returned and error |
| 477 // information is stored in sticky_error(). | 491 // information is stored in sticky_error(). |
| 478 bool PreallocateObjects(); | 492 bool PreallocateObjects(); |
| 479 | 493 |
| 480 static void Init(Isolate* isolate); | 494 static void Init(Isolate* isolate); |
| 481 | 495 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 RawLibrary* builtin_library_; | 567 RawLibrary* builtin_library_; |
| 554 RawLibrary* root_library_; | 568 RawLibrary* root_library_; |
| 555 RawGrowableObjectArray* libraries_; | 569 RawGrowableObjectArray* libraries_; |
| 556 RawGrowableObjectArray* pending_classes_; | 570 RawGrowableObjectArray* pending_classes_; |
| 557 RawError* sticky_error_; | 571 RawError* sticky_error_; |
| 558 RawString* unhandled_exception_handler_; | 572 RawString* unhandled_exception_handler_; |
| 559 RawContext* empty_context_; | 573 RawContext* empty_context_; |
| 560 RawInstance* stack_overflow_; | 574 RawInstance* stack_overflow_; |
| 561 RawInstance* out_of_memory_; | 575 RawInstance* out_of_memory_; |
| 562 RawArray* keyword_symbols_; | 576 RawArray* keyword_symbols_; |
| 577 RawFunction* receive_port_create_function_; |
| 578 RawFunction* handle_message_function_; |
| 563 RawObject** to() { return reinterpret_cast<RawObject**>(&keyword_symbols_); } | 579 RawObject** to() { return reinterpret_cast<RawObject**>(&keyword_symbols_); } |
| 564 | 580 |
| 565 friend class SnapshotReader; | 581 friend class SnapshotReader; |
| 566 | 582 |
| 567 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 583 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 568 }; | 584 }; |
| 569 | 585 |
| 570 } // namespace dart | 586 } // namespace dart |
| 571 | 587 |
| 572 #endif // VM_OBJECT_STORE_H_ | 588 #endif // VM_OBJECT_STORE_H_ |
| OLD | NEW |