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

Unified Diff: src/runtime.cc

Issue 260803002: Map::TransitionElementsTo() extracted from JSObject::GetElementsTransitionMap(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 7eddc41977d0d335b4495072e17c365a57639651..0de2db26765f282cb62c779080b2add43f90339c 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -10040,12 +10040,9 @@ class ArrayConcatVisitor {
Handle<JSArray> array = isolate_->factory()->NewJSArray(0);
Handle<Object> length =
isolate_->factory()->NewNumber(static_cast<double>(index_offset_));
- Handle<Map> map;
- if (fast_elements_) {
- map = JSObject::GetElementsTransitionMap(array, FAST_HOLEY_ELEMENTS);
- } else {
- map = JSObject::GetElementsTransitionMap(array, DICTIONARY_ELEMENTS);
- }
+ Handle<Map> map = JSObject::GetElementsTransitionMap(
+ array,
+ fast_elements_ ? FAST_HOLEY_ELEMENTS : DICTIONARY_ELEMENTS);
array->set_map(*map);
array->set_length(*length);
array->set_elements(*storage_);
« 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