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

Unified Diff: src/objects.h

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 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 | « src/isolate.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 5190)
+++ src/objects.h (working copy)
@@ -4756,6 +4756,9 @@
// [to_number]: Cached to_number computed at startup.
DECL_ACCESSORS(to_number, Object)
+ inline byte kind();
+ inline void set_kind(byte kind);
+
// Casting.
static inline Oddball* cast(Object* obj);
@@ -4766,13 +4769,22 @@
#endif
// Initialize the fields.
- Object* Initialize(const char* to_string, Object* to_number);
+ Object* Initialize(const char* to_string, Object* to_number, byte kind);
// Layout description.
static const int kToStringOffset = HeapObject::kHeaderSize;
static const int kToNumberOffset = kToStringOffset + kPointerSize;
- static const int kSize = kToNumberOffset + kPointerSize;
+ static const int kKindOffset = kToNumberOffset + kPointerSize;
+ static const int kSize = kKindOffset + kPointerSize;
+ static const byte kFalse = 0;
+ static const byte kTrue = 1;
+ static const byte kNotBooleanMask = ~1;
+ static const byte kTheHole = 2;
+ static const byte kNull = 3;
+ static const byte kUndefined = 4;
+ static const byte kOther = 5;
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball);
};
« no previous file with comments | « src/isolate.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698