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

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 f01c3d120af1fe6bd00647712ab0e4622b4bb761..2edcb373fe0d04b1a972d7e1d73e91150d7b6f34 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1864,15 +1864,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);
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/json-parser.h » ('j') | src/json-parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698