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

Unified Diff: src/ic.cc

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/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);

Powered by Google App Engine
This is Rietveld 408576698