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

Unified Diff: src/objects.h

Issue 9307083: Implement caching scheme for Date fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased to HEAD. Created 8 years, 9 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/macros.py ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 73b0de4b0a9d76e5bb3cb6f53c1b2136851dcebb..f3709efe3fa5c4f35233249aafba05d766513b4c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -893,6 +893,7 @@ class Object : public MaybeObject {
// Extract the number.
inline double Number();
+ inline bool IsNaN();
// Returns true if the object is of the correct type to be used as a
// implementation of a JSObject's elements.
@@ -6033,6 +6034,8 @@ class JSDate: public JSObject {
// If one component is NaN, all of them are, indicating a NaN time value.
// [value]: the time value.
DECL_ACCESSORS(value, Object)
+ // [local]: the offset for the local time value.
+ DECL_ACCESSORS(local, Object)
// [year]: caches year. Either undefined, smi, or NaN.
DECL_ACCESSORS(year, Object)
// [month]: caches month. Either undefined, smi, or NaN.
@@ -6045,8 +6048,8 @@ class JSDate: public JSObject {
DECL_ACCESSORS(min, Object)
// [sec]: caches seconds. Either undefined, smi, or NaN.
DECL_ACCESSORS(sec, Object)
- // [ms]: caches milliseconds. Either undefined, smi, or NaN.
- DECL_ACCESSORS(ms, Object)
+ // [weekday]: caches day of week. Either undefined, smi, or NaN.
+ DECL_ACCESSORS(weekday, Object)
// Casting.
static inline JSDate* cast(Object* obj);
@@ -6064,17 +6067,18 @@ class JSDate: public JSObject {
// Layout description.
static const int kValueOffset = JSObject::kHeaderSize;
- static const int kYearOffset = kValueOffset + kPointerSize;
+ static const int kLocalOffset = kValueOffset + kPointerSize;
+ static const int kYearOffset = kLocalOffset + kPointerSize;
static const int kMonthOffset = kYearOffset + kPointerSize;
static const int kDayOffset = kMonthOffset + kPointerSize;
static const int kHourOffset = kDayOffset + kPointerSize;
static const int kMinOffset = kHourOffset + kPointerSize;
static const int kSecOffset = kMinOffset + kPointerSize;
- static const int kMsOffset = kSecOffset + kPointerSize;
- static const int kSize = kMsOffset + kPointerSize;
+ static const int kWeekdayOffset = kSecOffset + kPointerSize;
+ static const int kSize = kWeekdayOffset + kPointerSize;
// Index of first field not requiring a write barrier.
- static const int kFirstBarrierFree = 1; // year
+ static const int kFirstBarrierFree = 2; // year
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSDate);
« no previous file with comments | « src/macros.py ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698