| 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 kLibraryTag, | 786 kLibraryTag, |
| 787 kSourceTag, | 787 kSourceTag, |
| 788 kPatchTag, | 788 kPatchTag, |
| 789 }; | 789 }; |
| 790 | 790 |
| 791 private: | 791 private: |
| 792 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); | 792 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); |
| 793 | 793 |
| 794 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } | 794 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } |
| 795 RawString* url_; | 795 RawString* url_; |
| 796 RawTokenStream* tokens_; |
| 797 RawObject** to_snapshot() { |
| 798 return reinterpret_cast<RawObject**>(&ptr()->tokens_); |
| 799 } |
| 796 RawString* source_; | 800 RawString* source_; |
| 797 RawTokenStream* tokens_; | 801 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); } |
| 798 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); } | |
| 799 | 802 |
| 800 int32_t line_offset_; | 803 int32_t line_offset_; |
| 801 int32_t col_offset_; | 804 int32_t col_offset_; |
| 802 int8_t kind_; // Of type Kind. | 805 int8_t kind_; // Of type Kind. |
| 803 }; | 806 }; |
| 804 | 807 |
| 805 | 808 |
| 806 class RawLibrary : public RawObject { | 809 class RawLibrary : public RawObject { |
| 807 enum LibraryState { | 810 enum LibraryState { |
| 808 kAllocated, // Initial state. | 811 kAllocated, // Initial state. |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2066 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2069 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2067 kTypedDataInt8ArrayViewCid + 15); | 2070 kTypedDataInt8ArrayViewCid + 15); |
| 2068 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2071 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2069 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2072 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2070 return (kNullCid - kTypedDataInt8ArrayCid); | 2073 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2071 } | 2074 } |
| 2072 | 2075 |
| 2073 } // namespace dart | 2076 } // namespace dart |
| 2074 | 2077 |
| 2075 #endif // VM_RAW_OBJECT_H_ | 2078 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |