| 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 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3765 | 3758 |
| 3766 // New is a private method as RawInstruction and RawCode objects should | 3759 // New is a private method as RawInstruction and RawCode objects should |
| 3767 // only be created using the Code::FinalizeCode method. This method creates | 3760 // only be created using the Code::FinalizeCode method. This method creates |
| 3768 // the RawInstruction and RawCode objects, sets up the pointer offsets | 3761 // the RawInstruction and RawCode objects, sets up the pointer offsets |
| 3769 // and links the two in a GC safe manner. | 3762 // and links the two in a GC safe manner. |
| 3770 static RawInstructions* New(intptr_t size); | 3763 static RawInstructions* New(intptr_t size); |
| 3771 | 3764 |
| 3772 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); | 3765 FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object); |
| 3773 friend class Class; | 3766 friend class Class; |
| 3774 friend class Code; | 3767 friend class Code; |
| 3768 friend class InstructionsWriter; |
| 3775 }; | 3769 }; |
| 3776 | 3770 |
| 3777 | 3771 |
| 3778 class LocalVarDescriptors : public Object { | 3772 class LocalVarDescriptors : public Object { |
| 3779 public: | 3773 public: |
| 3780 intptr_t Length() const; | 3774 intptr_t Length() const; |
| 3781 | 3775 |
| 3782 RawString* GetName(intptr_t var_index) const; | 3776 RawString* GetName(intptr_t var_index) const; |
| 3783 | 3777 |
| 3784 void SetVar(intptr_t var_index, | 3778 void SetVar(intptr_t var_index, |
| (...skipping 4345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8130 | 8124 |
| 8131 | 8125 |
| 8132 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8126 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8133 intptr_t index) { | 8127 intptr_t index) { |
| 8134 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8128 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8135 } | 8129 } |
| 8136 | 8130 |
| 8137 } // namespace dart | 8131 } // namespace dart |
| 8138 | 8132 |
| 8139 #endif // VM_OBJECT_H_ | 8133 #endif // VM_OBJECT_H_ |
| OLD | NEW |