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 RUNTIME_VM_RAW_OBJECT_H_ | 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ |
6 #define RUNTIME_VM_RAW_OBJECT_H_ | 6 #define RUNTIME_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/exceptions.h" | 10 #include "vm/exceptions.h" |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 #endif | 886 #endif |
887 } | 887 } |
888 | 888 |
889 NOT_IN_PRECOMPILED(TokenPosition token_pos_); | 889 NOT_IN_PRECOMPILED(TokenPosition token_pos_); |
890 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); | 890 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); |
891 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code | 891 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code |
892 // (JIT only). | 892 // (JIT only). |
893 uint32_t kind_tag_; // See Function::KindTagBits. | 893 uint32_t kind_tag_; // See Function::KindTagBits. |
894 int16_t num_fixed_parameters_; | 894 int16_t num_fixed_parameters_; |
895 int16_t num_optional_parameters_; // > 0: positional; < 0: named. | 895 int16_t num_optional_parameters_; // > 0: positional; < 0: named. |
896 NOT_IN_PRECOMPILED(intptr_t kernel_offset_); | 896 NOT_IN_PRECOMPILED(void* kernel_function_); |
897 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); | 897 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); |
898 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); | 898 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); |
899 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); | 899 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); |
900 NOT_IN_PRECOMPILED(int8_t was_compiled_); | 900 NOT_IN_PRECOMPILED(int8_t was_compiled_); |
901 }; | 901 }; |
902 | 902 |
903 | 903 |
904 class RawClosureData : public RawObject { | 904 class RawClosureData : public RawObject { |
905 private: | 905 private: |
906 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); | 906 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 TokenPosition token_pos_; | 998 TokenPosition token_pos_; |
999 classid_t guarded_cid_; | 999 classid_t guarded_cid_; |
1000 classid_t is_nullable_; // kNullCid if field can contain null value and | 1000 classid_t is_nullable_; // kNullCid if field can contain null value and |
1001 // any other value otherwise. | 1001 // any other value otherwise. |
1002 // Offset to the guarded length field inside an instance of class matching | 1002 // Offset to the guarded length field inside an instance of class matching |
1003 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code | 1003 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code |
1004 // generated on platforms with weak addressing modes (ARM, MIPS). | 1004 // generated on platforms with weak addressing modes (ARM, MIPS). |
1005 int8_t guarded_list_length_in_object_offset_; | 1005 int8_t guarded_list_length_in_object_offset_; |
1006 | 1006 |
1007 uint8_t kind_bits_; // static, final, const, has initializer.... | 1007 uint8_t kind_bits_; // static, final, const, has initializer.... |
1008 NOT_IN_PRECOMPILED(intptr_t kernel_offset_); | 1008 NOT_IN_PRECOMPILED(void* kernel_field_); |
1009 | 1009 |
1010 friend class CidRewriteVisitor; | 1010 friend class CidRewriteVisitor; |
1011 }; | 1011 }; |
1012 | 1012 |
1013 | 1013 |
1014 class RawLiteralToken : public RawObject { | 1014 class RawLiteralToken : public RawObject { |
1015 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); | 1015 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); |
1016 | 1016 |
1017 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->literal_); } | 1017 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->literal_); } |
1018 RawString* literal_; // Literal characters as they appear in source text. | 1018 RawString* literal_; // Literal characters as they appear in source text. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 break; | 1080 break; |
1081 } | 1081 } |
1082 UNREACHABLE(); | 1082 UNREACHABLE(); |
1083 return NULL; | 1083 return NULL; |
1084 } | 1084 } |
1085 | 1085 |
1086 int32_t line_offset_; | 1086 int32_t line_offset_; |
1087 int32_t col_offset_; | 1087 int32_t col_offset_; |
1088 int8_t kind_; // Of type Kind. | 1088 int8_t kind_; // Of type Kind. |
1089 int64_t load_timestamp_; | 1089 int64_t load_timestamp_; |
1090 const uint8_t* kernel_data_; | |
1091 intptr_t kernel_data_size_; | |
1092 }; | 1090 }; |
1093 | 1091 |
1094 | 1092 |
1095 class RawLibrary : public RawObject { | 1093 class RawLibrary : public RawObject { |
1096 enum LibraryState { | 1094 enum LibraryState { |
1097 kAllocated, // Initial state. | 1095 kAllocated, // Initial state. |
1098 kLoadRequested, // Compiler or script requested load of library. | 1096 kLoadRequested, // Compiler or script requested load of library. |
1099 kLoadInProgress, // Library is in the process of being loaded. | 1097 kLoadInProgress, // Library is in the process of being loaded. |
1100 kLoaded, // Library is loaded. | 1098 kLoaded, // Library is loaded. |
1101 kLoadError, // Error occurred during load of the Library. | 1099 kLoadError, // Error occurred during load of the Library. |
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 kTypedDataInt8ArrayViewCid + 15); | 2494 kTypedDataInt8ArrayViewCid + 15); |
2497 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2495 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2498 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2496 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2499 return (kNullCid - kTypedDataInt8ArrayCid); | 2497 return (kNullCid - kTypedDataInt8ArrayCid); |
2500 } | 2498 } |
2501 | 2499 |
2502 | 2500 |
2503 } // namespace dart | 2501 } // namespace dart |
2504 | 2502 |
2505 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2503 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
OLD | NEW |