| Index: runtime/vm/raw_object.h
|
| ===================================================================
|
| --- runtime/vm/raw_object.h (revision 41056)
|
| +++ runtime/vm/raw_object.h (working copy)
|
| @@ -216,6 +216,7 @@
|
| DISALLOW_ALLOCATION(); \
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(Raw##object)
|
|
|
| +// TODO(koda): Make ptr() return const*, like Object::raw_ptr().
|
| #define RAW_HEAP_OBJECT_IMPLEMENTATION(object) \
|
| private: \
|
| RAW_OBJECT_IMPLEMENTATION(object); \
|
| @@ -458,6 +459,7 @@
|
| class ReservedBits : public
|
| BitField<intptr_t, kReservedTagPos, kReservedTagSize> {}; // NOLINT
|
|
|
| + // TODO(koda): Return const*, like Object::raw_ptr().
|
| RawObject* ptr() const {
|
| ASSERT(IsHeapObject());
|
| return reinterpret_cast<RawObject*>(
|
| @@ -589,6 +591,9 @@
|
| RawSmi* length_;
|
|
|
| // Variable length data follows here.
|
| + RawAbstractType* const* types() const {
|
| + OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
|
| + }
|
| RawAbstractType** types() {
|
| OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
|
| }
|
| @@ -896,6 +901,7 @@
|
|
|
| // Variable length data follows here.
|
| int32_t* data() { OPEN_ARRAY_START(int32_t, int32_t); }
|
| + const int32_t* data() const { OPEN_ARRAY_START(int32_t, int32_t); }
|
|
|
| friend class StackFrame;
|
| friend class MarkingVisitor;
|
| @@ -1011,6 +1017,7 @@
|
|
|
| // Variable length data follows here.
|
| uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); }
|
| + const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, intptr_t); }
|
|
|
| friend class Object;
|
| };
|
| @@ -1039,6 +1046,7 @@
|
|
|
| // Variable length data follows here (bitmap of the stack layout).
|
| uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
|
| + const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
|
| };
|
|
|
|
|
| @@ -1138,6 +1146,7 @@
|
| RawArray* handled_types_data_;
|
|
|
| // Exception handler info of length [num_entries_].
|
| + const HandlerInfo* data() const { OPEN_ARRAY_START(HandlerInfo, intptr_t); }
|
| HandlerInfo* data() { OPEN_ARRAY_START(HandlerInfo, intptr_t); }
|
|
|
| friend class Object;
|
| @@ -1153,6 +1162,7 @@
|
|
|
| // Variable length data follows here.
|
| intptr_t* data() { OPEN_ARRAY_START(intptr_t, intptr_t); }
|
| + const intptr_t* data() const { OPEN_ARRAY_START(intptr_t, intptr_t); }
|
| };
|
|
|
|
|
| @@ -1167,6 +1177,9 @@
|
|
|
| // Variable length data follows here.
|
| RawInstance** data() { OPEN_ARRAY_START(RawInstance*, RawInstance*); }
|
| + RawInstance* const* data() const {
|
| + OPEN_ARRAY_START(RawInstance*, RawInstance*);
|
| + }
|
| RawObject** to(intptr_t num_vars) {
|
| return reinterpret_cast<RawObject**>(&ptr()->data()[num_vars - 1]);
|
| }
|
| @@ -1495,6 +1508,7 @@
|
|
|
| // Variable length data follows here.
|
| uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
|
| + const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
|
|
|
| friend class ApiMessageReader;
|
| friend class SnapshotReader;
|
| @@ -1506,6 +1520,7 @@
|
|
|
| // Variable length data follows here.
|
| uint16_t* data() { OPEN_ARRAY_START(uint16_t, uint16_t); }
|
| + const uint16_t* data() const { OPEN_ARRAY_START(uint16_t, uint16_t); }
|
|
|
| friend class SnapshotReader;
|
| };
|
| @@ -1568,6 +1583,7 @@
|
| RawSmi* length_;
|
| // Variable length data follows here.
|
| RawObject** data() { OPEN_ARRAY_START(RawObject*, RawObject*); }
|
| + RawObject* const* data() const { OPEN_ARRAY_START(RawObject*, RawObject*); }
|
| RawObject** to(intptr_t length) {
|
| return reinterpret_cast<RawObject**>(&ptr()->data()[length - 1]);
|
| }
|
| @@ -1684,6 +1700,7 @@
|
| RawSmi* length_;
|
| // Variable length data follows here.
|
| uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
|
| + const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
|
| RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
|
|
|
| friend class Api;
|
|
|