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

Unified Diff: src/spaces.h

Issue 245963007: Clean up some uses of Failures and MaybeObjects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
« src/objects.h ('K') | « src/objects-inl.h ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index 1fb856265bcb2ed1dce6d91d9deeeb15bf9e1569..d00b41e86f268ab8b2a0b90d857464c1914fa4dd 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -1725,7 +1725,7 @@ class PagedSpace : public Space {
// in this space, or Failure::Exception() if it is not. The implementation
Michael Starzinger 2014/04/23 14:34:52 Comment is outdated.
Yang 2014/04/23 15:07:55 Done.
// iterates over objects in the page containing the address, the cost is
// linear in the number of objects in the page. It may be slow.
- MUST_USE_RESULT MaybeObject* FindObject(Address addr);
+ MUST_USE_RESULT Object* FindObject(Address addr);
Michael Starzinger 2014/04/23 14:34:52 nit: I think the MUST_USE_RESULT is overzealous he
Yang 2014/04/23 15:07:55 Done.
// During boot the free_space_map is created, and afterwards we may need
// to write it into the free list nodes that were already created.
@@ -2844,7 +2844,7 @@ class LargeObjectSpace : public Space {
// Finds an object for a given address, returns Failure::Exception()
Michael Starzinger 2014/04/23 14:34:52 Comment is outdated.
Yang 2014/04/23 15:07:55 Done.
// if it is not found. The function iterates through all objects in this
// space, may be slow.
- MaybeObject* FindObject(Address a);
+ Object* FindObject(Address a);
// Finds a large object page containing the given address, returns NULL
// if such a page doesn't exist.
@@ -2872,7 +2872,7 @@ class LargeObjectSpace : public Space {
#endif
// Checks whether an address is in the object area in this space. It
// iterates all objects in the space. May be slow.
- bool SlowContains(Address addr) { return !FindObject(addr)->IsFailure(); }
+ bool SlowContains(Address addr) { return FindObject(addr)->IsHeapObject(); }
private:
intptr_t max_capacity_;
« src/objects.h ('K') | « src/objects-inl.h ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698