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

Unified Diff: src/objects-inl.h

Issue 335553004: Keep maps when resetting elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: simplified as suggested Created 6 years, 6 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
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 2bca797d18a8bc5d33c839e842a0474a33530dbc..2764b371473716c69ed75f39711d85d55b32464e 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2738,6 +2738,9 @@ FixedArrayBase* Map::GetInitialElements() {
GetHeap()->EmptyFixedTypedArrayForMap(this);
ASSERT(!GetHeap()->InNewSpace(empty_array));
return empty_array;
+ } else if (has_dictionary_elements()) {
+ ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_slow_element_dictionary()));
+ return GetHeap()->empty_slow_element_dictionary();
} else {
UNREACHABLE();
}
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698