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

Unified Diff: src/elements.cc

Issue 2173653003: [elements] Omit fast path in PrependElementIndices (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding missing convert condition Created 4 years, 5 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 | « no previous file | test/mjsunit/regress/regress-crbug-630561.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index dd0b542c36299bba8992f9c7708fa4ab18e4122c..7db641649f5ba204b17806f94144fb9e6dc59eaf 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1041,25 +1041,15 @@ class ElementsAccessorBase : public ElementsAccessor {
combined_keys, &nof_indices);
if (needs_sorting) {
- SortIndices(combined_keys, nof_indices, SKIP_WRITE_BARRIER);
- uint32_t array_length = 0;
+ SortIndices(combined_keys, nof_indices);
// Indices from dictionary elements should only be converted after
// sorting.
if (convert == GetKeysConversion::kConvertToString) {
for (uint32_t i = 0; i < nof_indices; i++) {
Handle<Object> index_string = isolate->factory()->Uint32ToString(
- combined_keys->get(i)->Number());
+ combined_keys->get(i)->Number());
combined_keys->set(i, *index_string);
}
- } else if (!(object->IsJSArray() &&
- JSArray::cast(*object)->length()->ToArrayLength(
- &array_length) &&
- array_length <= Smi::kMaxValue)) {
- // Since we use std::sort above, the GC will no longer know where the
- // HeapNumbers are. For Arrays with valid Smi length, we are sure to
- // have no HeapNumber indices and thus we can skip this step.
- FIXED_ARRAY_ELEMENTS_WRITE_BARRIER(isolate->heap(), *combined_keys, 0,
- nof_indices);
}
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-630561.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698