| 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_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 | 873 |
| 874 friend class RawCode; | 874 friend class RawCode; |
| 875 friend class Code; | 875 friend class Code; |
| 876 friend class StackFrame; | 876 friend class StackFrame; |
| 877 }; | 877 }; |
| 878 | 878 |
| 879 | 879 |
| 880 class RawPcDescriptors : public RawObject { | 880 class RawPcDescriptors : public RawObject { |
| 881 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 881 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
| 882 | 882 |
| 883 RawSmi* length_; // Number of descriptors. | 883 intptr_t length_; // Number of descriptors. |
| 884 | 884 |
| 885 // Variable length data follows here. | 885 // Variable length data follows here. |
| 886 intptr_t data_[0]; | 886 intptr_t data_[0]; |
| 887 | 887 |
| 888 friend class Object; | 888 friend class Object; |
| 889 }; | 889 }; |
| 890 | 890 |
| 891 | 891 |
| 892 // Stackmap is an immutable representation of the layout of the stack at a | 892 // Stackmap is an immutable representation of the layout of the stack at a |
| 893 // PC. The stack map representation consists of a bit map which marks each | 893 // PC. The stack map representation consists of a bit map which marks each |
| 894 // live object index starting from the base of the frame. | 894 // live object index starting from the base of the frame. |
| 895 // | 895 // |
| 896 // The Stackmap also consists of a link to the code object corresponding to | 896 // The Stackmap also consists of a link to the code object corresponding to |
| 897 // the frame which the stack map is describing. The bit map representation | 897 // the frame which the stack map is describing. The bit map representation |
| 898 // is optimized for dense and small bit maps, without any upper bound. | 898 // is optimized for dense and small bit maps, without any upper bound. |
| 899 class RawStackmap : public RawObject { | 899 class RawStackmap : public RawObject { |
| 900 RAW_HEAP_OBJECT_IMPLEMENTATION(Stackmap); | 900 RAW_HEAP_OBJECT_IMPLEMENTATION(Stackmap); |
| 901 | 901 |
| 902 RawCode* code_; // Code object corresponding to the frame described. | |
| 903 | |
| 904 // TODO(kmillikin): We need a small number of bits to encode the register | 902 // TODO(kmillikin): We need a small number of bits to encode the register |
| 905 // count. Consider packing them in with the length. | 903 // count. Consider packing them in with the length. |
| 906 intptr_t length_; // Length of payload, in bits. | 904 intptr_t length_; // Length of payload, in bits. |
| 907 intptr_t register_bit_count_; // Live register bits, included in length_. | 905 intptr_t register_bit_count_; // Live register bits, included in length_. |
| 908 | 906 |
| 909 uword pc_; // PC corresponding to this stack map representation. | 907 uword pc_; // PC corresponding to this stack map representation. |
| 910 | 908 |
| 911 // Variable length data follows here (bitmap of the stack layout). | 909 // Variable length data follows here (bitmap of the stack layout). |
| 912 uint8_t data_[0]; | 910 uint8_t data_[0]; |
| 913 }; | 911 }; |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 // Make sure this is updated when new TypedData types are added. | 1776 // Make sure this is updated when new TypedData types are added. |
| 1779 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1777 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1780 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); | 1778 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); |
| 1781 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1779 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1782 return (kNullCid - kTypedDataInt8ArrayCid); | 1780 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1783 } | 1781 } |
| 1784 | 1782 |
| 1785 } // namespace dart | 1783 } // namespace dart |
| 1786 | 1784 |
| 1787 #endif // VM_RAW_OBJECT_H_ | 1785 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |