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_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 static const LanguageError& branch_offset_error() { | 475 static const LanguageError& branch_offset_error() { |
476 ASSERT(branch_offset_error_ != NULL); | 476 ASSERT(branch_offset_error_ != NULL); |
477 return *branch_offset_error_; | 477 return *branch_offset_error_; |
478 } | 478 } |
479 | 479 |
480 static const Array& vm_isolate_snapshot_object_table() { | 480 static const Array& vm_isolate_snapshot_object_table() { |
481 ASSERT(vm_isolate_snapshot_object_table_ != NULL); | 481 ASSERT(vm_isolate_snapshot_object_table_ != NULL); |
482 return *vm_isolate_snapshot_object_table_; | 482 return *vm_isolate_snapshot_object_table_; |
483 } | 483 } |
484 static void InitVmIsolateSnapshotObjectTable(intptr_t len); | 484 static void InitVmIsolateSnapshotObjectTable(intptr_t len); |
| 485 static const uint8_t* instructions_snapshot_buffer() { |
| 486 return instructions_snapshot_buffer_; |
| 487 } |
| 488 static void set_instructions_snapshot_buffer(const uint8_t* buffer) { |
| 489 instructions_snapshot_buffer_ = buffer; |
| 490 } |
485 | 491 |
486 static RawClass* class_class() { return class_class_; } | 492 static RawClass* class_class() { return class_class_; } |
487 static RawClass* dynamic_class() { return dynamic_class_; } | 493 static RawClass* dynamic_class() { return dynamic_class_; } |
488 static RawClass* void_class() { return void_class_; } | 494 static RawClass* void_class() { return void_class_; } |
489 static RawType* dynamic_type() { return dynamic_type_; } | 495 static RawType* dynamic_type() { return dynamic_type_; } |
490 static RawType* void_type() { return void_type_; } | 496 static RawType* void_type() { return void_type_; } |
491 static RawClass* unresolved_class_class() { return unresolved_class_class_; } | 497 static RawClass* unresolved_class_class() { return unresolved_class_class_; } |
492 static RawClass* type_arguments_class() { return type_arguments_class_; } | 498 static RawClass* type_arguments_class() { return type_arguments_class_; } |
493 static RawClass* patch_class_class() { return patch_class_class_; } | 499 static RawClass* patch_class_class() { return patch_class_class_; } |
494 static RawClass* function_class() { return function_class_; } | 500 static RawClass* function_class() { return function_class_; } |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 static Instance* sentinel_; | 805 static Instance* sentinel_; |
800 static Instance* transition_sentinel_; | 806 static Instance* transition_sentinel_; |
801 static Instance* unknown_constant_; | 807 static Instance* unknown_constant_; |
802 static Instance* non_constant_; | 808 static Instance* non_constant_; |
803 static Bool* bool_true_; | 809 static Bool* bool_true_; |
804 static Bool* bool_false_; | 810 static Bool* bool_false_; |
805 static Smi* smi_illegal_cid_; | 811 static Smi* smi_illegal_cid_; |
806 static LanguageError* snapshot_writer_error_; | 812 static LanguageError* snapshot_writer_error_; |
807 static LanguageError* branch_offset_error_; | 813 static LanguageError* branch_offset_error_; |
808 static Array* vm_isolate_snapshot_object_table_; | 814 static Array* vm_isolate_snapshot_object_table_; |
| 815 static const uint8_t* instructions_snapshot_buffer_; |
809 | 816 |
810 friend void ClassTable::Register(const Class& cls); | 817 friend void ClassTable::Register(const Class& cls); |
811 friend void RawObject::Validate(Isolate* isolate) const; | 818 friend void RawObject::Validate(Isolate* isolate) const; |
812 friend class Closure; | 819 friend class Closure; |
813 friend class SnapshotReader; | 820 friend class SnapshotReader; |
814 friend class OneByteString; | 821 friend class OneByteString; |
815 friend class TwoByteString; | 822 friend class TwoByteString; |
816 friend class ExternalOneByteString; | 823 friend class ExternalOneByteString; |
817 friend class ExternalTwoByteString; | 824 friend class ExternalTwoByteString; |
818 friend class Isolate; | 825 friend class Isolate; |
(...skipping 7229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8048 | 8055 |
8049 | 8056 |
8050 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8057 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8051 intptr_t index) { | 8058 intptr_t index) { |
8052 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8059 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8053 } | 8060 } |
8054 | 8061 |
8055 } // namespace dart | 8062 } // namespace dart |
8056 | 8063 |
8057 #endif // VM_OBJECT_H_ | 8064 #endif // VM_OBJECT_H_ |
OLD | NEW |