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

Unified Diff: src/objects.h

Issue 1922443002: [turbofan] Introduce Oddball::to_number_raw and use it for change lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/compiler/change-lowering.cc ('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
diff --git a/src/objects.h b/src/objects.h
index 326bb24b76935abee9c0a4d8b36ec1db766bbf7c..065980a64af35a6c095922a0ad0ae977436aa86a 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -9433,6 +9433,10 @@ class VectorIterator {
// The Oddball describes objects null, undefined, true, and false.
class Oddball: public HeapObject {
public:
+ // [to_number_raw]: Cached raw to_number computed at startup.
+ inline double to_number_raw() const;
+ inline void set_to_number_raw(double value);
+
// [to_string]: Cached to_string computed at startup.
DECL_ACCESSORS(to_string, String)
@@ -9462,7 +9466,8 @@ class Oddball: public HeapObject {
bool to_boolean, const char* type_of, byte kind);
// Layout description.
- static const int kToStringOffset = HeapObject::kHeaderSize;
+ static const int kToNumberRawOffset = HeapObject::kHeaderSize;
+ static const int kToStringOffset = kToNumberRawOffset + kDoubleSize;
static const int kToNumberOffset = kToStringOffset + kPointerSize;
static const int kToBooleanOffset = kToNumberOffset + kPointerSize;
static const int kTypeOfOffset = kToBooleanOffset + kPointerSize;
@@ -9484,6 +9489,7 @@ class Oddball: public HeapObject {
typedef FixedBodyDescriptor<kToStringOffset, kTypeOfOffset + kPointerSize,
kSize> BodyDescriptor;
+ STATIC_ASSERT(kToNumberRawOffset == HeapNumber::kValueOffset);
STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset);
STATIC_ASSERT(kNull == Internals::kNullOddballKind);
STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind);
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698