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/globals.h" | 10 #include "vm/globals.h" |
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1775 return reinterpret_cast<RawObject**>(&ptr()->mixin_types_); | 1775 return reinterpret_cast<RawObject**>(&ptr()->mixin_types_); |
1776 } | 1776 } |
1777 }; | 1777 }; |
1778 | 1778 |
1779 | 1779 |
1780 class RawClosure : public RawInstance { | 1780 class RawClosure : public RawInstance { |
1781 private: | 1781 private: |
1782 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); | 1782 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); |
1783 | 1783 |
1784 RawObject** from() { | 1784 RawObject** from() { |
1785 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); | 1785 return reinterpret_cast<RawObject**>(&ptr()->instantiator_); |
1786 } | 1786 } |
1787 | 1787 |
1788 RawTypeArguments* type_arguments_; | 1788 // These 3 fields are also declared in the Dart source of class _Closure. |
Cutch
2017/02/24 22:15:37
Add a note here that no fields can be added *befor
regis
2017/02/24 22:54:41
Done.
| |
1789 RawTypeArguments* instantiator_; | |
1789 RawFunction* function_; | 1790 RawFunction* function_; |
1790 RawContext* context_; | 1791 RawContext* context_; |
1791 | 1792 |
1792 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->context_); } | 1793 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->context_); } |
1793 }; | 1794 }; |
1794 | 1795 |
1795 | 1796 |
1796 class RawNumber : public RawInstance { | 1797 class RawNumber : public RawInstance { |
1797 RAW_OBJECT_IMPLEMENTATION(Number); | 1798 RAW_OBJECT_IMPLEMENTATION(Number); |
1798 }; | 1799 }; |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2433 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2434 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2434 kTypedDataInt8ArrayViewCid + 15); | 2435 kTypedDataInt8ArrayViewCid + 15); |
2435 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2436 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2436 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2437 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2437 return (kNullCid - kTypedDataInt8ArrayCid); | 2438 return (kNullCid - kTypedDataInt8ArrayCid); |
2438 } | 2439 } |
2439 | 2440 |
2440 } // namespace dart | 2441 } // namespace dart |
2441 | 2442 |
2442 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2443 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
OLD | NEW |