| 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 #endif | 843 #endif |
| 844 } | 844 } |
| 845 | 845 |
| 846 NOT_IN_PRECOMPILED(TokenPosition token_pos_); | 846 NOT_IN_PRECOMPILED(TokenPosition token_pos_); |
| 847 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); | 847 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); |
| 848 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code | 848 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code |
| 849 // (JIT only). | 849 // (JIT only). |
| 850 uint32_t kind_tag_; // See Function::KindTagBits. | 850 uint32_t kind_tag_; // See Function::KindTagBits. |
| 851 int16_t num_fixed_parameters_; | 851 int16_t num_fixed_parameters_; |
| 852 int16_t num_optional_parameters_; // > 0: positional; < 0: named. | 852 int16_t num_optional_parameters_; // > 0: positional; < 0: named. |
| 853 NOT_IN_PRECOMPILED(void* kernel_function_); | 853 NOT_IN_PRECOMPILED(intptr_t kernel_offset_); |
| 854 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); | 854 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); |
| 855 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); | 855 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); |
| 856 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); | 856 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); |
| 857 NOT_IN_PRECOMPILED(int8_t was_compiled_); | 857 NOT_IN_PRECOMPILED(int8_t was_compiled_); |
| 858 }; | 858 }; |
| 859 | 859 |
| 860 | 860 |
| 861 class RawClosureData : public RawObject { | 861 class RawClosureData : public RawObject { |
| 862 private: | 862 private: |
| 863 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); | 863 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 TokenPosition token_pos_; | 955 TokenPosition token_pos_; |
| 956 classid_t guarded_cid_; | 956 classid_t guarded_cid_; |
| 957 classid_t is_nullable_; // kNullCid if field can contain null value and | 957 classid_t is_nullable_; // kNullCid if field can contain null value and |
| 958 // any other value otherwise. | 958 // any other value otherwise. |
| 959 // Offset to the guarded length field inside an instance of class matching | 959 // Offset to the guarded length field inside an instance of class matching |
| 960 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code | 960 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code |
| 961 // generated on platforms with weak addressing modes (ARM, MIPS). | 961 // generated on platforms with weak addressing modes (ARM, MIPS). |
| 962 int8_t guarded_list_length_in_object_offset_; | 962 int8_t guarded_list_length_in_object_offset_; |
| 963 | 963 |
| 964 uint8_t kind_bits_; // static, final, const, has initializer.... | 964 uint8_t kind_bits_; // static, final, const, has initializer.... |
| 965 NOT_IN_PRECOMPILED(void* kernel_field_); | 965 NOT_IN_PRECOMPILED(intptr_t kernel_offset_); |
| 966 | 966 |
| 967 friend class CidRewriteVisitor; | 967 friend class CidRewriteVisitor; |
| 968 }; | 968 }; |
| 969 | 969 |
| 970 | 970 |
| 971 class RawLiteralToken : public RawObject { | 971 class RawLiteralToken : public RawObject { |
| 972 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); | 972 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); |
| 973 | 973 |
| 974 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->literal_); } | 974 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->literal_); } |
| 975 RawString* literal_; // Literal characters as they appear in source text. | 975 RawString* literal_; // Literal characters as they appear in source text. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 break; | 1037 break; |
| 1038 } | 1038 } |
| 1039 UNREACHABLE(); | 1039 UNREACHABLE(); |
| 1040 return NULL; | 1040 return NULL; |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 int32_t line_offset_; | 1043 int32_t line_offset_; |
| 1044 int32_t col_offset_; | 1044 int32_t col_offset_; |
| 1045 int8_t kind_; // Of type Kind. | 1045 int8_t kind_; // Of type Kind. |
| 1046 int64_t load_timestamp_; | 1046 int64_t load_timestamp_; |
| 1047 const uint8_t* kernel_data_; |
| 1048 intptr_t kernel_data_size_; |
| 1047 }; | 1049 }; |
| 1048 | 1050 |
| 1049 | 1051 |
| 1050 class RawLibrary : public RawObject { | 1052 class RawLibrary : public RawObject { |
| 1051 enum LibraryState { | 1053 enum LibraryState { |
| 1052 kAllocated, // Initial state. | 1054 kAllocated, // Initial state. |
| 1053 kLoadRequested, // Compiler or script requested load of library. | 1055 kLoadRequested, // Compiler or script requested load of library. |
| 1054 kLoadInProgress, // Library is in the process of being loaded. | 1056 kLoadInProgress, // Library is in the process of being loaded. |
| 1055 kLoaded, // Library is loaded. | 1057 kLoaded, // Library is loaded. |
| 1056 kLoadError, // Error occurred during load of the Library. | 1058 kLoadError, // Error occurred during load of the Library. |
| (...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2451 kTypedDataInt8ArrayViewCid + 15); | 2453 kTypedDataInt8ArrayViewCid + 15); |
| 2452 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2454 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2453 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2455 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2454 return (kNullCid - kTypedDataInt8ArrayCid); | 2456 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2455 } | 2457 } |
| 2456 | 2458 |
| 2457 | 2459 |
| 2458 } // namespace dart | 2460 } // namespace dart |
| 2459 | 2461 |
| 2460 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2462 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
| OLD | NEW |