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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 static const LanguageError& branch_offset_error() { | 481 static const LanguageError& branch_offset_error() { |
482 ASSERT(branch_offset_error_ != NULL); | 482 ASSERT(branch_offset_error_ != NULL); |
483 return *branch_offset_error_; | 483 return *branch_offset_error_; |
484 } | 484 } |
485 | 485 |
486 static const Array& vm_isolate_snapshot_object_table() { | 486 static const Array& vm_isolate_snapshot_object_table() { |
487 ASSERT(vm_isolate_snapshot_object_table_ != NULL); | 487 ASSERT(vm_isolate_snapshot_object_table_ != NULL); |
488 return *vm_isolate_snapshot_object_table_; | 488 return *vm_isolate_snapshot_object_table_; |
489 } | 489 } |
490 static void InitVmIsolateSnapshotObjectTable(intptr_t len); | 490 static void InitVmIsolateSnapshotObjectTable(intptr_t len); |
| 491 static const uint8_t* instructions_snapshot_buffer() { |
| 492 return instructions_snapshot_buffer_; |
| 493 } |
| 494 static void set_instructions_snapshot_buffer(const uint8_t* buffer) { |
| 495 instructions_snapshot_buffer_ = buffer; |
| 496 } |
491 | 497 |
492 static RawClass* class_class() { return class_class_; } | 498 static RawClass* class_class() { return class_class_; } |
493 static RawClass* dynamic_class() { return dynamic_class_; } | 499 static RawClass* dynamic_class() { return dynamic_class_; } |
494 static RawClass* void_class() { return void_class_; } | 500 static RawClass* void_class() { return void_class_; } |
495 static RawType* dynamic_type() { return dynamic_type_; } | 501 static RawType* dynamic_type() { return dynamic_type_; } |
496 static RawType* void_type() { return void_type_; } | 502 static RawType* void_type() { return void_type_; } |
497 static RawClass* unresolved_class_class() { return unresolved_class_class_; } | 503 static RawClass* unresolved_class_class() { return unresolved_class_class_; } |
498 static RawClass* type_arguments_class() { return type_arguments_class_; } | 504 static RawClass* type_arguments_class() { return type_arguments_class_; } |
499 static RawClass* patch_class_class() { return patch_class_class_; } | 505 static RawClass* patch_class_class() { return patch_class_class_; } |
500 static RawClass* function_class() { return function_class_; } | 506 static RawClass* function_class() { return function_class_; } |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 static Instance* sentinel_; | 812 static Instance* sentinel_; |
807 static Instance* transition_sentinel_; | 813 static Instance* transition_sentinel_; |
808 static Instance* unknown_constant_; | 814 static Instance* unknown_constant_; |
809 static Instance* non_constant_; | 815 static Instance* non_constant_; |
810 static Bool* bool_true_; | 816 static Bool* bool_true_; |
811 static Bool* bool_false_; | 817 static Bool* bool_false_; |
812 static Smi* smi_illegal_cid_; | 818 static Smi* smi_illegal_cid_; |
813 static LanguageError* snapshot_writer_error_; | 819 static LanguageError* snapshot_writer_error_; |
814 static LanguageError* branch_offset_error_; | 820 static LanguageError* branch_offset_error_; |
815 static Array* vm_isolate_snapshot_object_table_; | 821 static Array* vm_isolate_snapshot_object_table_; |
| 822 static const uint8_t* instructions_snapshot_buffer_; |
816 | 823 |
817 friend void ClassTable::Register(const Class& cls); | 824 friend void ClassTable::Register(const Class& cls); |
818 friend void RawObject::Validate(Isolate* isolate) const; | 825 friend void RawObject::Validate(Isolate* isolate) const; |
819 friend class Closure; | 826 friend class Closure; |
820 friend class SnapshotReader; | 827 friend class SnapshotReader; |
821 friend class OneByteString; | 828 friend class OneByteString; |
822 friend class TwoByteString; | 829 friend class TwoByteString; |
823 friend class ExternalOneByteString; | 830 friend class ExternalOneByteString; |
824 friend class ExternalTwoByteString; | 831 friend class ExternalTwoByteString; |
825 friend class Isolate; | 832 friend class Isolate; |
(...skipping 7235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8061 | 8068 |
8062 | 8069 |
8063 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8070 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8064 intptr_t index) { | 8071 intptr_t index) { |
8065 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8072 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8066 } | 8073 } |
8067 | 8074 |
8068 } // namespace dart | 8075 } // namespace dart |
8069 | 8076 |
8070 #endif // VM_OBJECT_H_ | 8077 #endif // VM_OBJECT_H_ |
OLD | NEW |