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

Unified Diff: src/spaces.h

Issue 7744023: Two tiny refactorings: Removed a bit of copy-n-paste. Moved LargeObjectChunk::Free from header to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 9014)
+++ src/spaces.h (working copy)
@@ -2144,7 +2144,7 @@
static LargeObjectChunk* New(int size_in_bytes, Executability executable);
// Free the memory associated with the chunk.
- inline void Free(Executability executable);
+ void Free(Executability executable);
// Interpret a raw address as a large object chunk.
static LargeObjectChunk* FromAddress(Address address) {
@@ -2154,13 +2154,17 @@
// Returns the address of this chunk.
Address address() { return reinterpret_cast<Address>(this); }
+ Page* GetPage() {
+ return Page::FromAddress(RoundUp(address(), Page::kPageSize));
+ }
+
// Accessors for the fields of the chunk.
LargeObjectChunk* next() { return next_; }
void set_next(LargeObjectChunk* chunk) { next_ = chunk; }
size_t size() { return size_ & ~Page::kPageFlagMask; }
// Compute the start address in the chunk.
- inline Address GetStartAddress();
+ Address GetStartAddress() { return GetPage()->ObjectAreaStart(); }
// Returns the object in this chunk.
HeapObject* GetObject() { return HeapObject::FromAddress(GetStartAddress()); }
« no previous file with comments | « no previous file | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698