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 RUNTIME_VM_OBJECT_STORE_H_ | 5 #ifndef RUNTIME_VM_OBJECT_STORE_H_ |
6 #define RUNTIME_VM_OBJECT_STORE_H_ | 6 #define RUNTIME_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 } | 425 } |
426 void SetMegamorphicMissHandler(const Code& code, const Function& func) { | 426 void SetMegamorphicMissHandler(const Code& code, const Function& func) { |
427 // Hold onto the code so it is traced and not detached from the function. | 427 // Hold onto the code so it is traced and not detached from the function. |
428 megamorphic_miss_code_ = code.raw(); | 428 megamorphic_miss_code_ = code.raw(); |
429 megamorphic_miss_function_ = func.raw(); | 429 megamorphic_miss_function_ = func.raw(); |
430 } | 430 } |
431 | 431 |
432 RawFunction* simple_instance_of_function() const { | 432 RawFunction* simple_instance_of_function() const { |
433 return simple_instance_of_function_; | 433 return simple_instance_of_function_; |
434 } | 434 } |
| 435 void set_simple_instance_of_function(const Function& value) { |
| 436 simple_instance_of_function_ = value.raw(); |
| 437 } |
435 RawFunction* simple_instance_of_true_function() const { | 438 RawFunction* simple_instance_of_true_function() const { |
436 return simple_instance_of_true_function_; | 439 return simple_instance_of_true_function_; |
437 } | 440 } |
| 441 void set_simple_instance_of_true_function(const Function& value) { |
| 442 simple_instance_of_true_function_ = value.raw(); |
| 443 } |
438 RawFunction* simple_instance_of_false_function() const { | 444 RawFunction* simple_instance_of_false_function() const { |
439 return simple_instance_of_false_function_; | 445 return simple_instance_of_false_function_; |
440 } | 446 } |
| 447 void set_simple_instance_of_false_function(const Function& value) { |
| 448 simple_instance_of_false_function_ = value.raw(); |
| 449 } |
441 RawFunction* async_clear_thread_stack_trace() const { | 450 RawFunction* async_clear_thread_stack_trace() const { |
442 return async_clear_thread_stack_trace_; | 451 return async_clear_thread_stack_trace_; |
443 } | 452 } |
444 void set_async_clear_thread_stack_trace(const Function& func) { | 453 void set_async_clear_thread_stack_trace(const Function& func) { |
445 async_clear_thread_stack_trace_ = func.raw(); | 454 async_clear_thread_stack_trace_ = func.raw(); |
446 ASSERT(async_clear_thread_stack_trace_ != Object::null()); | 455 ASSERT(async_clear_thread_stack_trace_ != Object::null()); |
447 } | 456 } |
448 RawFunction* async_set_thread_stack_trace() const { | 457 RawFunction* async_set_thread_stack_trace() const { |
449 return async_set_thread_stack_trace_; | 458 return async_set_thread_stack_trace_; |
450 } | 459 } |
451 void set_async_set_thread_stack_trace(const Function& func) { | 460 void set_async_set_thread_stack_trace(const Function& func) { |
452 async_set_thread_stack_trace_ = func.raw(); | 461 async_set_thread_stack_trace_ = func.raw(); |
453 ASSERT(async_set_thread_stack_trace_ != Object::null()); | |
454 } | 462 } |
455 RawFunction* async_star_move_next_helper() const { | 463 RawFunction* async_star_move_next_helper() const { |
456 return async_star_move_next_helper_; | 464 return async_star_move_next_helper_; |
457 } | 465 } |
458 void set_async_star_move_next_helper(const Function& func) { | 466 void set_async_star_move_next_helper(const Function& func) { |
459 async_star_move_next_helper_ = func.raw(); | 467 async_star_move_next_helper_ = func.raw(); |
460 ASSERT(async_star_move_next_helper_ != Object::null()); | |
461 } | 468 } |
462 RawFunction* complete_on_async_return() const { | 469 RawFunction* complete_on_async_return() const { |
463 return complete_on_async_return_; | 470 return complete_on_async_return_; |
464 } | 471 } |
465 void set_complete_on_async_return(const Function& func) { | 472 void set_complete_on_async_return(const Function& func) { |
466 complete_on_async_return_ = func.raw(); | 473 complete_on_async_return_ = func.raw(); |
467 ASSERT(complete_on_async_return_ != Object::null()); | |
468 } | 474 } |
469 RawClass* async_star_stream_controller() const { | 475 RawClass* async_star_stream_controller() const { |
470 return async_star_stream_controller_; | 476 return async_star_stream_controller_; |
471 } | 477 } |
472 void set_async_star_stream_controller(const Class& cls) { | 478 void set_async_star_stream_controller(const Class& cls) { |
473 async_star_stream_controller_ = cls.raw(); | 479 async_star_stream_controller_ = cls.raw(); |
474 ASSERT(async_star_stream_controller_ != Object::null()); | |
475 } | 480 } |
476 | 481 |
477 // Visit all object pointers. | 482 // Visit all object pointers. |
478 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 483 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
479 | 484 |
480 // Called to initialize objects required by the vm but which invoke | 485 // Called to initialize objects required by the vm but which invoke |
481 // dart code. If an error occurs the error object is returned otherwise | 486 // dart code. If an error occurs the error object is returned otherwise |
482 // a null object is returned. | 487 // a null object is returned. |
483 RawError* PreallocateObjects(); | 488 RawError* PreallocateObjects(); |
484 | 489 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 620 |
616 friend class Serializer; | 621 friend class Serializer; |
617 friend class Deserializer; | 622 friend class Deserializer; |
618 | 623 |
619 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 624 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
620 }; | 625 }; |
621 | 626 |
622 } // namespace dart | 627 } // namespace dart |
623 | 628 |
624 #endif // RUNTIME_VM_OBJECT_STORE_H_ | 629 #endif // RUNTIME_VM_OBJECT_STORE_H_ |
OLD | NEW |