| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index da8afca789af9a974913c7192dfcd75f47e99b0d..d87c1301cc38fa8830ed1dd4087d2441d51faea6 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -1863,15 +1863,12 @@ RUNTIME_FUNCTION(MaybeObject*, SharedStoreIC_ExtendStorage) {
|
|
|
| FixedArray* new_storage = FixedArray::cast(result);
|
|
|
| - Object* to_store = value;
|
| -
|
| DescriptorArray* descriptors = transition->instance_descriptors();
|
| PropertyDetails details = descriptors->GetDetails(transition->LastAdded());
|
| - if (details.representation().IsDouble()) {
|
| - MaybeObject* maybe_storage =
|
| - isolate->heap()->AllocateHeapNumber(value->Number());
|
| - if (!maybe_storage->To(&to_store)) return maybe_storage;
|
| - }
|
| + Object* to_store;
|
| + MaybeObject* maybe_storage = value->AllocateNewStorageFor(
|
| + isolate->heap(), details.representation());
|
| + if (!maybe_storage->To(&to_store)) return maybe_storage;
|
|
|
| new_storage->set(old_storage->length(), to_store);
|
|
|
|
|