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 RUNTIME_VM_RAW_OBJECT_H_ | 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ |
6 #define RUNTIME_VM_RAW_OBJECT_H_ | 6 #define RUNTIME_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/exceptions.h" | 10 #include "vm/exceptions.h" |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->parent_); } | 1431 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->parent_); } |
1432 RawContext* parent_; | 1432 RawContext* parent_; |
1433 | 1433 |
1434 // Variable length data follows here. | 1434 // Variable length data follows here. |
1435 RawObject** data() { OPEN_ARRAY_START(RawObject*, RawObject*); } | 1435 RawObject** data() { OPEN_ARRAY_START(RawObject*, RawObject*); } |
1436 RawObject* const* data() const { OPEN_ARRAY_START(RawObject*, RawObject*); } | 1436 RawObject* const* data() const { OPEN_ARRAY_START(RawObject*, RawObject*); } |
1437 RawObject** to(intptr_t num_vars) { | 1437 RawObject** to(intptr_t num_vars) { |
1438 return reinterpret_cast<RawObject**>(&ptr()->data()[num_vars - 1]); | 1438 return reinterpret_cast<RawObject**>(&ptr()->data()[num_vars - 1]); |
1439 } | 1439 } |
1440 | 1440 |
| 1441 friend class Object; |
1441 friend class SnapshotReader; | 1442 friend class SnapshotReader; |
1442 }; | 1443 }; |
1443 | 1444 |
1444 | 1445 |
1445 class RawContextScope : public RawObject { | 1446 class RawContextScope : public RawObject { |
1446 RAW_HEAP_OBJECT_IMPLEMENTATION(ContextScope); | 1447 RAW_HEAP_OBJECT_IMPLEMENTATION(ContextScope); |
1447 | 1448 |
1448 // TODO(iposva): Switch to conventional enum offset based structure to avoid | 1449 // TODO(iposva): Switch to conventional enum offset based structure to avoid |
1449 // alignment mishaps. | 1450 // alignment mishaps. |
1450 struct VariableDesc { | 1451 struct VariableDesc { |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2434 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2435 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2435 kTypedDataInt8ArrayViewCid + 15); | 2436 kTypedDataInt8ArrayViewCid + 15); |
2436 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2437 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2437 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2438 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2438 return (kNullCid - kTypedDataInt8ArrayCid); | 2439 return (kNullCid - kTypedDataInt8ArrayCid); |
2439 } | 2440 } |
2440 | 2441 |
2441 } // namespace dart | 2442 } // namespace dart |
2442 | 2443 |
2443 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2444 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
OLD | NEW |