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

Unified Diff: src/objects.h

Issue 334323003: Reland r22082 "Replace HeapNumber as doublebox with an explicit MutableHeapNumber." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Migrations test fixed Created 6 years, 6 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/mips/stub-cache-mips.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 ef3cd34a9a78a28207a9936b8447bf65a9806533..78291a6c773bbd88b64969e04e0cef7deec0156d 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -168,6 +168,12 @@ enum ContextualMode {
};
+enum MutableMode {
+ MUTABLE,
+ IMMUTABLE
+};
+
+
static const int kGrowICDelta = STORE_AND_GROW_NO_TRANSITION -
STANDARD_STORE;
STATIC_ASSERT(STANDARD_STORE == 0);
@@ -352,6 +358,7 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;
V(PROPERTY_CELL_TYPE) \
\
V(HEAP_NUMBER_TYPE) \
+ V(MUTABLE_HEAP_NUMBER_TYPE) \
V(FOREIGN_TYPE) \
V(BYTE_ARRAY_TYPE) \
V(FREE_SPACE_TYPE) \
@@ -680,6 +687,7 @@ enum InstanceType {
// "Data", objects that cannot contain non-map-word pointers to heap
// objects.
HEAP_NUMBER_TYPE,
+ MUTABLE_HEAP_NUMBER_TYPE,
FOREIGN_TYPE,
BYTE_ARRAY_TYPE,
FREE_SPACE_TYPE,
@@ -900,6 +908,7 @@ template <class C> inline bool Is(Object* obj);
#define HEAP_OBJECT_TYPE_LIST(V) \
V(HeapNumber) \
+ V(MutableHeapNumber) \
V(Name) \
V(UniqueName) \
V(String) \
@@ -1427,7 +1436,7 @@ class Object {
} else if (FLAG_track_fields && representation.IsSmi()) {
return IsSmi();
} else if (FLAG_track_double_fields && representation.IsDouble()) {
- return IsNumber();
+ return IsMutableHeapNumber() || IsNumber();
} else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
return IsHeapObject();
}
@@ -1440,6 +1449,10 @@ class Object {
Handle<Object> object,
Representation representation);
+ inline static Handle<Object> WrapForRead(Isolate* isolate,
+ Handle<Object> object,
+ Representation representation);
+
// Returns true if the object is of the correct type to be used as a
// implementation of a JSObject's elements.
inline bool HasValidElements();
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698