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

Unified Diff: src/elements.cc

Issue 1860443003: Revert of [heap] Add optimized RecordWrites (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | src/heap/heap.h » ('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 a0f176aca79f00125eefdf67fae28f034d16d309..c8436b5cd684c84b01be76507a7a1bebc79fa1bf 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1011,10 +1011,13 @@
&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);
+ // HeapNumbers are, hence we have to write them again.
+ // For Arrays with valid Smi length, we are sure to have no HeapNumber
+ // indices and thus we can skip this step.
+ for (uint32_t i = 0; i < nof_indices; i++) {
+ Object* index = combined_keys->get(i);
+ combined_keys->set(i, index);
+ }
}
}
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698