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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 kSourceTag, | 937 kSourceTag, |
938 kPatchTag, | 938 kPatchTag, |
939 kEvaluateTag, | 939 kEvaluateTag, |
940 }; | 940 }; |
941 | 941 |
942 private: | 942 private: |
943 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); | 943 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); |
944 | 944 |
945 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } | 945 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } |
946 RawString* url_; | 946 RawString* url_; |
| 947 RawObject** to_precompiled_snapshot() { |
| 948 return reinterpret_cast<RawObject**>(&ptr()->url_); |
| 949 } |
947 RawTokenStream* tokens_; | 950 RawTokenStream* tokens_; |
948 RawObject** to_snapshot() { | 951 RawObject** to_snapshot() { |
949 return reinterpret_cast<RawObject**>(&ptr()->tokens_); | 952 return reinterpret_cast<RawObject**>(&ptr()->tokens_); |
950 } | 953 } |
951 RawString* source_; | 954 RawString* source_; |
952 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); } | 955 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); } |
953 | 956 |
954 int32_t line_offset_; | 957 int32_t line_offset_; |
955 int32_t col_offset_; | 958 int32_t col_offset_; |
956 int8_t kind_; // Of type Kind. | 959 int8_t kind_; // Of type Kind. |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2263 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2261 kTypedDataInt8ArrayViewCid + 15); | 2264 kTypedDataInt8ArrayViewCid + 15); |
2262 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2265 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2263 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2266 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2264 return (kNullCid - kTypedDataInt8ArrayCid); | 2267 return (kNullCid - kTypedDataInt8ArrayCid); |
2265 } | 2268 } |
2266 | 2269 |
2267 } // namespace dart | 2270 } // namespace dart |
2268 | 2271 |
2269 #endif // VM_RAW_OBJECT_H_ | 2272 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |