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