| 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 friend class MarkingVisitor; | 899 friend class MarkingVisitor; |
| 900 friend class Function; | 900 friend class Function; |
| 901 }; | 901 }; |
| 902 | 902 |
| 903 | 903 |
| 904 class RawPcDescriptors : public RawObject { | 904 class RawPcDescriptors : public RawObject { |
| 905 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 905 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
| 906 | 906 |
| 907 intptr_t length_; // Number of descriptors. | 907 intptr_t length_; // Number of descriptors. |
| 908 | 908 |
| 909 struct PcDescriptorRec { |
| 910 uword pc; |
| 911 int32_t deopt_id; |
| 912 int32_t token_pos; // Or deopt reason. |
| 913 int16_t try_index; // Or deopt index. |
| 914 int8_t kind; |
| 915 }; |
| 916 |
| 909 // Variable length data follows here. | 917 // Variable length data follows here. |
| 910 intptr_t* data() { OPEN_ARRAY_START(intptr_t, intptr_t); } | 918 PcDescriptorRec* data() { OPEN_ARRAY_START(PcDescriptorRec, intptr_t); } |
| 911 | 919 |
| 912 friend class Object; | 920 friend class Object; |
| 913 }; | 921 }; |
| 914 | 922 |
| 915 | 923 |
| 916 // Stackmap is an immutable representation of the layout of the stack at a | 924 // Stackmap is an immutable representation of the layout of the stack at a |
| 917 // PC. The stack map representation consists of a bit map which marks each | 925 // PC. The stack map representation consists of a bit map which marks each |
| 918 // live object index starting from the base of the frame. | 926 // live object index starting from the base of the frame. |
| 919 // | 927 // |
| 920 // The Stackmap also consists of a link to the code object corresponding to | 928 // The Stackmap also consists of a link to the code object corresponding to |
| (...skipping 19 matching lines...) Expand all Loading... |
| 940 enum VarInfoKind { | 948 enum VarInfoKind { |
| 941 kStackVar = 1, | 949 kStackVar = 1, |
| 942 kContextVar, | 950 kContextVar, |
| 943 kContextLevel, | 951 kContextLevel, |
| 944 kSavedEntryContext, | 952 kSavedEntryContext, |
| 945 kSavedCurrentContext | 953 kSavedCurrentContext |
| 946 }; | 954 }; |
| 947 | 955 |
| 948 struct VarInfo { | 956 struct VarInfo { |
| 949 intptr_t index; // Slot index on stack or in context. | 957 intptr_t index; // Slot index on stack or in context. |
| 950 int8_t kind; // Entry kind of type VarInfoKind. | |
| 951 int16_t scope_id; // Scope to which the variable belongs. | |
| 952 intptr_t begin_pos; // Token position of scope start. | 958 intptr_t begin_pos; // Token position of scope start. |
| 953 intptr_t end_pos; // Token position of scope end. | 959 intptr_t end_pos; // Token position of scope end. |
| 960 int16_t scope_id; // Scope to which the variable belongs. |
| 961 int8_t kind; // Entry kind of type VarInfoKind. |
| 954 }; | 962 }; |
| 955 | 963 |
| 956 private: | 964 private: |
| 957 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors); | 965 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors); |
| 958 intptr_t length_; // Number of descriptors. | 966 intptr_t length_; // Number of descriptors. |
| 959 RawArray* names_; // Array of [length_] variable names. | 967 RawArray* names_; // Array of [length_] variable names. |
| 960 | 968 |
| 961 // Variable info with [length_] entries. | 969 // Variable info with [length_] entries. |
| 962 VarInfo* data() { OPEN_ARRAY_START(VarInfo, intptr_t); } | 970 VarInfo* data() { OPEN_ARRAY_START(VarInfo, intptr_t); } |
| 963 }; | 971 }; |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1873 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1881 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1874 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1882 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 1875 kTypedDataInt8ArrayViewCid + 15); | 1883 kTypedDataInt8ArrayViewCid + 15); |
| 1876 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1884 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1877 return (kNullCid - kTypedDataInt8ArrayCid); | 1885 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1878 } | 1886 } |
| 1879 | 1887 |
| 1880 } // namespace dart | 1888 } // namespace dart |
| 1881 | 1889 |
| 1882 #endif // VM_RAW_OBJECT_H_ | 1890 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |