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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 }; | 877 }; |
878 | 878 |
879 | 879 |
880 class RawScript : public RawObject { | 880 class RawScript : public RawObject { |
881 public: | 881 public: |
882 enum Kind { | 882 enum Kind { |
883 kScriptTag = 0, | 883 kScriptTag = 0, |
884 kLibraryTag, | 884 kLibraryTag, |
885 kSourceTag, | 885 kSourceTag, |
886 kPatchTag, | 886 kPatchTag, |
| 887 kEvaluateTag, |
887 }; | 888 }; |
888 | 889 |
889 private: | 890 private: |
890 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); | 891 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); |
891 | 892 |
892 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } | 893 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } |
893 RawString* url_; | 894 RawString* url_; |
894 RawTokenStream* tokens_; | 895 RawTokenStream* tokens_; |
895 RawObject** to_snapshot() { | 896 RawObject** to_snapshot() { |
896 return reinterpret_cast<RawObject**>(&ptr()->tokens_); | 897 return reinterpret_cast<RawObject**>(&ptr()->tokens_); |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2179 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2179 kTypedDataInt8ArrayViewCid + 15); | 2180 kTypedDataInt8ArrayViewCid + 15); |
2180 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2181 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2181 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2182 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2182 return (kNullCid - kTypedDataInt8ArrayCid); | 2183 return (kNullCid - kTypedDataInt8ArrayCid); |
2183 } | 2184 } |
2184 | 2185 |
2185 } // namespace dart | 2186 } // namespace dart |
2186 | 2187 |
2187 #endif // VM_RAW_OBJECT_H_ | 2188 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |