| 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 } | |
| 497 | 491 |
| 498 static RawClass* class_class() { return class_class_; } | 492 static RawClass* class_class() { return class_class_; } |
| 499 static RawClass* dynamic_class() { return dynamic_class_; } | 493 static RawClass* dynamic_class() { return dynamic_class_; } |
| 500 static RawClass* void_class() { return void_class_; } | 494 static RawClass* void_class() { return void_class_; } |
| 501 static RawType* dynamic_type() { return dynamic_type_; } | 495 static RawType* dynamic_type() { return dynamic_type_; } |
| 502 static RawType* void_type() { return void_type_; } | 496 static RawType* void_type() { return void_type_; } |
| 503 static RawClass* unresolved_class_class() { return unresolved_class_class_; } | 497 static RawClass* unresolved_class_class() { return unresolved_class_class_; } |
| 504 static RawClass* type_arguments_class() { return type_arguments_class_; } | 498 static RawClass* type_arguments_class() { return type_arguments_class_; } |
| 505 static RawClass* patch_class_class() { return patch_class_class_; } | 499 static RawClass* patch_class_class() { return patch_class_class_; } |
| 506 static RawClass* function_class() { return function_class_; } | 500 static RawClass* function_class() { return function_class_; } |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 static Instance* sentinel_; | 806 static Instance* sentinel_; |
| 813 static Instance* transition_sentinel_; | 807 static Instance* transition_sentinel_; |
| 814 static Instance* unknown_constant_; | 808 static Instance* unknown_constant_; |
| 815 static Instance* non_constant_; | 809 static Instance* non_constant_; |
| 816 static Bool* bool_true_; | 810 static Bool* bool_true_; |
| 817 static Bool* bool_false_; | 811 static Bool* bool_false_; |
| 818 static Smi* smi_illegal_cid_; | 812 static Smi* smi_illegal_cid_; |
| 819 static LanguageError* snapshot_writer_error_; | 813 static LanguageError* snapshot_writer_error_; |
| 820 static LanguageError* branch_offset_error_; | 814 static LanguageError* branch_offset_error_; |
| 821 static Array* vm_isolate_snapshot_object_table_; | 815 static Array* vm_isolate_snapshot_object_table_; |
| 822 static const uint8_t* instructions_snapshot_buffer_; | |
| 823 | 816 |
| 824 friend void ClassTable::Register(const Class& cls); | 817 friend void ClassTable::Register(const Class& cls); |
| 825 friend void RawObject::Validate(Isolate* isolate) const; | 818 friend void RawObject::Validate(Isolate* isolate) const; |
| 826 friend class Closure; | 819 friend class Closure; |
| 827 friend class SnapshotReader; | 820 friend class SnapshotReader; |
| 828 friend class OneByteString; | 821 friend class OneByteString; |
| 829 friend class TwoByteString; | 822 friend class TwoByteString; |
| 830 friend class ExternalOneByteString; | 823 friend class ExternalOneByteString; |
| 831 friend class ExternalTwoByteString; | 824 friend class ExternalTwoByteString; |
| 832 friend class Isolate; | 825 friend class Isolate; |
| (...skipping 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 | 3762 |
| 3770 // New is a private method as RawInstruction and RawCode objects should | 3763 // New is a private method as RawInstruction and RawCode objects should |
| 3771 // only be created using the Code::FinalizeCode method. This method creates | 3764 // only be created using the Code::FinalizeCode method. This method creates |
| 3772 // the RawInstruction and RawCode objects, sets up the pointer offsets | 3765 // the RawInstruction and RawCode objects, sets up the pointer offsets |
| 3773 // and links the two in a GC safe manner. | 3766 // and links the two in a GC safe manner. |
| 3774 static RawInstructions* New(intptr_t size); | 3767 static RawInstructions* New(intptr_t size); |
| 3775 | 3768 |
| 3776 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); | 3769 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); |
| 3777 friend class Class; | 3770 friend class Class; |
| 3778 friend class Code; | 3771 friend class Code; |
| 3772 friend class InstructionsWriter; |
| 3779 }; | 3773 }; |
| 3780 | 3774 |
| 3781 | 3775 |
| 3782 class LocalVarDescriptors : public Object { | 3776 class LocalVarDescriptors : public Object { |
| 3783 public: | 3777 public: |
| 3784 intptr_t Length() const; | 3778 intptr_t Length() const; |
| 3785 | 3779 |
| 3786 RawString* GetName(intptr_t var_index) const; | 3780 RawString* GetName(intptr_t var_index) const; |
| 3787 | 3781 |
| 3788 void SetVar(intptr_t var_index, | 3782 void SetVar(intptr_t var_index, |
| (...skipping 4345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8134 | 8128 |
| 8135 | 8129 |
| 8136 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8130 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8137 intptr_t index) { | 8131 intptr_t index) { |
| 8138 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8132 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8139 } | 8133 } |
| 8140 | 8134 |
| 8141 } // namespace dart | 8135 } // namespace dart |
| 8142 | 8136 |
| 8143 #endif // VM_OBJECT_H_ | 8137 #endif // VM_OBJECT_H_ |
| OLD | NEW |