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

Unified Diff: src/objects.h

Issue 211333002: Replace HeapNumber as doublebox with an explicit MutableHeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index edb7903cc24582fe4b631bb530a6bdaf232376eb..c1c664043b6ad081924eddd21c8505a1fcfa5008 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -373,6 +373,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) \
@@ -721,6 +722,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,
@@ -992,6 +994,7 @@ class MaybeObject BASE_EMBEDDED {
#define HEAP_OBJECT_TYPE_LIST(V) \
V(HeapNumber) \
+ V(MutableHeapNumber) \
V(Name) \
V(UniqueName) \
V(String) \
@@ -1510,7 +1513,7 @@ class Object : public MaybeObject {
} 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();
}
@@ -1519,6 +1522,7 @@ class Object : public MaybeObject {
inline MaybeObject* AllocateNewStorageFor(Heap* heap,
Representation representation);
+ inline MaybeObject* WrapForRead(Heap* heap, Representation representation);
// Returns true if the object is of the correct type to be used as a
// implementation of a JSObject's elements.

Powered by Google App Engine
This is Rietveld 408576698