| 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/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 // Variable length data follows here. | 784 // Variable length data follows here. |
| 785 int32_t data_[0]; | 785 int32_t data_[0]; |
| 786 | 786 |
| 787 friend class StackFrame; | 787 friend class StackFrame; |
| 788 }; | 788 }; |
| 789 | 789 |
| 790 | 790 |
| 791 class RawInstructions : public RawObject { | 791 class RawInstructions : public RawObject { |
| 792 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); | 792 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); |
| 793 | 793 |
| 794 RawObject** from() { |
| 795 return reinterpret_cast<RawObject**>(&ptr()->code_); |
| 796 } |
| 794 RawCode* code_; | 797 RawCode* code_; |
| 798 RawArray* object_pool_; |
| 799 RawObject** to() { |
| 800 return reinterpret_cast<RawObject**>(&ptr()->object_pool_); |
| 801 } |
| 795 intptr_t size_; | 802 intptr_t size_; |
| 796 | 803 |
| 797 // Variable length data follows here. | 804 // Variable length data follows here. |
| 798 uint8_t data_[0]; | 805 uint8_t data_[0]; |
| 799 | 806 |
| 800 // Private helper function used while visiting stack frames. The | 807 // Private helper function used while visiting stack frames. The |
| 801 // code which iterates over dart frames is also called during GC and | 808 // code which iterates over dart frames is also called during GC and |
| 802 // is not allowed to create handles. | 809 // is not allowed to create handles. |
| 803 static bool ContainsPC(RawObject* raw_obj, uword pc); | 810 static bool ContainsPC(RawObject* raw_obj, uword pc); |
| 804 | 811 |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && | 1699 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && |
| 1693 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && | 1700 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && |
| 1694 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && | 1701 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && |
| 1695 kStacktraceCid == kExternalInt8ArrayCid + 11); | 1702 kStacktraceCid == kExternalInt8ArrayCid + 11); |
| 1696 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); | 1703 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); |
| 1697 } | 1704 } |
| 1698 | 1705 |
| 1699 } // namespace dart | 1706 } // namespace dart |
| 1700 | 1707 |
| 1701 #endif // VM_RAW_OBJECT_H_ | 1708 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |