Make object accessors more const-correct.

Getting closer to making our IsFOO and FOO::cast methods const-correct...

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/349623002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1fd638e2
This diff is collapsed.
This diff is collapsed.
......@@ -283,6 +283,10 @@ class MemoryChunk {
static MemoryChunk* FromAddress(Address a) {
return reinterpret_cast<MemoryChunk*>(OffsetFrom(a) & ~kAlignmentMask);
}
static const MemoryChunk* FromAddress(const byte* a) {
return reinterpret_cast<const MemoryChunk*>(
OffsetFrom(a) & ~kAlignmentMask);
}
// Only works for addresses in pointer spaces, not data or code spaces.
static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
......@@ -627,7 +631,7 @@ class MemoryChunk {
void InsertAfter(MemoryChunk* other);
void Unlink();
inline Heap* heap() { return heap_; }
inline Heap* heap() const { return heap_; }
static const int kFlagsOffset = kPointerSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment