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/atomic.h" | 9 #include "vm/atomic.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 kSmiTagMask = 1, | 209 kSmiTagMask = 1, |
210 kSmiTagShift = 1, | 210 kSmiTagShift = 1, |
211 }; | 211 }; |
212 | 212 |
213 enum TypedDataElementType { | 213 enum TypedDataElementType { |
214 #define V(name) k##name##Element, | 214 #define V(name) k##name##Element, |
215 CLASS_LIST_TYPED_DATA(V) | 215 CLASS_LIST_TYPED_DATA(V) |
216 #undef V | 216 #undef V |
217 }; | 217 }; |
218 | 218 |
219 enum { | |
220 kNoDilNode = 0 | |
rmacnak
2016/10/13 00:56:39
NULL
Vyacheslav Egorov (Google)
2016/10/13 14:37:58
Good point. Done.
| |
221 }; | |
222 | |
219 #define SNAPSHOT_WRITER_SUPPORT() \ | 223 #define SNAPSHOT_WRITER_SUPPORT() \ |
220 void WriteTo( \ | 224 void WriteTo( \ |
221 SnapshotWriter* writer, intptr_t object_id, \ | 225 SnapshotWriter* writer, intptr_t object_id, \ |
222 Snapshot::Kind kind, bool as_reference); \ | 226 Snapshot::Kind kind, bool as_reference); \ |
223 friend class SnapshotWriter; \ | 227 friend class SnapshotWriter; \ |
224 | 228 |
225 #define VISITOR_SUPPORT(object) \ | 229 #define VISITOR_SUPPORT(object) \ |
226 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ | 230 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ |
227 ObjectPointerVisitor* visitor); | 231 ObjectPointerVisitor* visitor); |
228 | 232 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
862 #endif | 866 #endif |
863 } | 867 } |
864 | 868 |
865 NOT_IN_PRECOMPILED(TokenPosition token_pos_); | 869 NOT_IN_PRECOMPILED(TokenPosition token_pos_); |
866 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); | 870 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); |
867 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code | 871 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code |
868 // (JIT only). | 872 // (JIT only). |
869 uint32_t kind_tag_; // See Function::KindTagBits. | 873 uint32_t kind_tag_; // See Function::KindTagBits. |
870 int16_t num_fixed_parameters_; | 874 int16_t num_fixed_parameters_; |
871 int16_t num_optional_parameters_; // > 0: positional; < 0: named. | 875 int16_t num_optional_parameters_; // > 0: positional; < 0: named. |
876 NOT_IN_PRECOMPILED(intptr_t dil_function_); | |
rmacnak
2016/10/13 00:56:39
void* ?
I think it would make more sense to have
Kevin Millikin (Google)
2016/10/13 04:38:35
That's a good idea. We do have that. jenj@ is cu
Vyacheslav Egorov (Google)
2016/10/13 14:37:58
I made it void*.
We can try to fold it into Scrip
| |
872 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); | 877 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); |
873 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); | 878 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); |
874 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); | 879 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); |
875 NOT_IN_PRECOMPILED(int8_t was_compiled_); | 880 NOT_IN_PRECOMPILED(int8_t was_compiled_); |
876 }; | 881 }; |
877 | 882 |
878 | 883 |
879 class RawClosureData : public RawObject { | 884 class RawClosureData : public RawObject { |
880 private: | 885 private: |
881 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); | 886 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
957 TokenPosition token_pos_; | 962 TokenPosition token_pos_; |
958 classid_t guarded_cid_; | 963 classid_t guarded_cid_; |
959 classid_t is_nullable_; // kNullCid if field can contain null value and | 964 classid_t is_nullable_; // kNullCid if field can contain null value and |
960 // any other value otherwise. | 965 // any other value otherwise. |
961 // Offset to the guarded length field inside an instance of class matching | 966 // Offset to the guarded length field inside an instance of class matching |
962 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code | 967 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code |
963 // generated on platforms with weak addressing modes (ARM, MIPS). | 968 // generated on platforms with weak addressing modes (ARM, MIPS). |
964 int8_t guarded_list_length_in_object_offset_; | 969 int8_t guarded_list_length_in_object_offset_; |
965 | 970 |
966 uint8_t kind_bits_; // static, final, const, has initializer.... | 971 uint8_t kind_bits_; // static, final, const, has initializer.... |
972 intptr_t dil_field_; | |
rmacnak
2016/10/13 00:56:39
void* ?
Vyacheslav Egorov (Google)
2016/10/13 14:37:58
Done. Also made it NOT_IN_PRECOMPILED.
| |
967 | 973 |
968 friend class CidRewriteVisitor; | 974 friend class CidRewriteVisitor; |
969 }; | 975 }; |
970 | 976 |
971 | 977 |
972 class RawLiteralToken : public RawObject { | 978 class RawLiteralToken : public RawObject { |
973 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); | 979 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); |
974 | 980 |
975 RawObject** from() { | 981 RawObject** from() { |
976 return reinterpret_cast<RawObject**>(&ptr()->literal_); | 982 return reinterpret_cast<RawObject**>(&ptr()->literal_); |
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2482 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2488 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2483 kTypedDataInt8ArrayViewCid + 15); | 2489 kTypedDataInt8ArrayViewCid + 15); |
2484 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2490 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2485 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2491 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2486 return (kNullCid - kTypedDataInt8ArrayCid); | 2492 return (kNullCid - kTypedDataInt8ArrayCid); |
2487 } | 2493 } |
2488 | 2494 |
2489 } // namespace dart | 2495 } // namespace dart |
2490 | 2496 |
2491 #endif // VM_RAW_OBJECT_H_ | 2497 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |