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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 kSourceTag, | 988 kSourceTag, |
989 kPatchTag, | 989 kPatchTag, |
990 kEvaluateTag, | 990 kEvaluateTag, |
991 }; | 991 }; |
992 | 992 |
993 private: | 993 private: |
994 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); | 994 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); |
995 | 995 |
996 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } | 996 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } |
997 RawString* url_; | 997 RawString* url_; |
| 998 RawArray* compile_time_constants_; |
998 RawTokenStream* tokens_; | 999 RawTokenStream* tokens_; |
999 RawString* source_; | 1000 RawString* source_; |
1000 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); } | 1001 RawObject** to() {return reinterpret_cast<RawObject**>(&ptr()->source_); } |
1001 RawObject** to_snapshot(Snapshot::Kind kind) { | 1002 RawObject** to_snapshot(Snapshot::Kind kind) { |
1002 switch (kind) { | 1003 switch (kind) { |
1003 case Snapshot::kAppNoJIT: | 1004 case Snapshot::kAppNoJIT: |
1004 return reinterpret_cast<RawObject**>(&ptr()->url_); | 1005 return reinterpret_cast<RawObject**>(&ptr()->url_); |
1005 case Snapshot::kCore: | 1006 case Snapshot::kCore: |
1006 case Snapshot::kAppWithJIT: | 1007 case Snapshot::kAppWithJIT: |
1007 case Snapshot::kScript: | 1008 case Snapshot::kScript: |
1008 return reinterpret_cast<RawObject**>(&ptr()->tokens_); | 1009 return reinterpret_cast<RawObject**>(&ptr()->tokens_); |
1009 case Snapshot::kMessage: | 1010 case Snapshot::kMessage: |
1010 case Snapshot::kNone: | 1011 case Snapshot::kNone: |
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2426 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2427 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2427 kTypedDataInt8ArrayViewCid + 15); | 2428 kTypedDataInt8ArrayViewCid + 15); |
2428 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2429 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2429 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2430 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2430 return (kNullCid - kTypedDataInt8ArrayCid); | 2431 return (kNullCid - kTypedDataInt8ArrayCid); |
2431 } | 2432 } |
2432 | 2433 |
2433 } // namespace dart | 2434 } // namespace dart |
2434 | 2435 |
2435 #endif // VM_RAW_OBJECT_H_ | 2436 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |