Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index d600b4ec25103c250d527f6914fc91895f380543..16d0acd6e3caf045cb3bc470b71f7b3b841b18fa 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -165,7 +165,6 @@ bool Object::IsHeapObject() const { |
TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE) |
-TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE) |
TYPE_CHECKER(Symbol, SYMBOL_TYPE) |
@@ -278,27 +277,10 @@ Handle<Object> Object::NewStorageFor(Isolate* isolate, |
return handle(Smi::FromInt(0), isolate); |
} |
if (!representation.IsDouble()) return object; |
- double value; |
if (object->IsUninitialized()) { |
- value = 0; |
- } else if (object->IsMutableHeapNumber()) { |
- value = HeapNumber::cast(*object)->value(); |
- } else { |
- value = object->Number(); |
- } |
- return isolate->factory()->NewHeapNumber(value, MUTABLE); |
-} |
- |
- |
-Handle<Object> Object::WrapForRead(Isolate* isolate, |
- Handle<Object> object, |
- Representation representation) { |
- ASSERT(!object->IsUninitialized()); |
- if (!representation.IsDouble()) { |
- ASSERT(object->FitsRepresentation(representation)); |
- return object; |
+ return isolate->factory()->NewHeapNumber(0); |
} |
- return isolate->factory()->NewHeapNumber(HeapNumber::cast(*object)->value()); |
+ return isolate->factory()->NewHeapNumber(object->Number()); |
} |
@@ -3097,6 +3079,7 @@ CAST_ACCESSOR(FixedTypedArrayBase) |
CAST_ACCESSOR(Foreign) |
CAST_ACCESSOR(FreeSpace) |
CAST_ACCESSOR(GlobalObject) |
+CAST_ACCESSOR(HeapNumber) |
CAST_ACCESSOR(HeapObject) |
CAST_ACCESSOR(JSArray) |
CAST_ACCESSOR(JSArrayBuffer) |
@@ -5961,18 +5944,6 @@ ACCESSORS(JSModule, scope_info, ScopeInfo, kScopeInfoOffset) |
ACCESSORS(JSValue, value, Object, kValueOffset) |
-HeapNumber* HeapNumber::cast(Object* object) { |
- SLOW_ASSERT(object->IsHeapNumber() || object->IsMutableHeapNumber()); |
- return reinterpret_cast<HeapNumber*>(object); |
-} |
- |
- |
-const HeapNumber* HeapNumber::cast(const Object* object) { |
- SLOW_ASSERT(object->IsHeapNumber() || object->IsMutableHeapNumber()); |
- return reinterpret_cast<const HeapNumber*>(object); |
-} |
- |
- |
ACCESSORS(JSDate, value, Object, kValueOffset) |
ACCESSORS(JSDate, cache_stamp, Object, kCacheStampOffset) |
ACCESSORS(JSDate, year, Object, kYearOffset) |