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

Unified Diff: src/objects.h

Issue 7029030: Use page header information to test for InNewSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index dcc1c5339c331469a118e80424c323fd2ec54da1..cca0f4bda71e59fcf895bc20d6879866b4ce51cf 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -631,6 +631,7 @@ struct ValueInfo : public Malloced {
// A template-ized version of the IsXXX functions.
template <class C> static inline bool Is(Object* obj);
+class Failure;
Erik Corry 2011/05/19 07:22:32 It would perhaps be neater to group this with the
Lasse Reichstein 2011/05/19 08:40:40 Done.
class MaybeObject BASE_EMBEDDED {
public:
@@ -644,6 +645,10 @@ class MaybeObject BASE_EMBEDDED {
*obj = reinterpret_cast<Object*>(this);
return true;
}
+ inline Failure* ToFailureUnchecked() {
+ ASSERT(IsFailure());
+ return reinterpret_cast<Failure*>(this);
+ }
inline Object* ToObjectUnchecked() {
ASSERT(!IsFailure());
return reinterpret_cast<Object*>(this);

Powered by Google App Engine
This is Rietveld 408576698