Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: runtime/vm/raw_object.h

Issue 612133004: Write barrier audit: const raw_ptr() (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 40889)
+++ runtime/vm/raw_object.h (working copy)
@@ -589,6 +589,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 +899,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 +1015,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 +1044,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 +1144,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 +1160,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 +1175,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 +1506,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 +1518,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 +1581,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 +1698,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;

Powered by Google App Engine
This is Rietveld 408576698