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

Unified Diff: src/elements.cc

Issue 1834373003: [heap] Add optimized RecordWrites (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comments 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 74d6ebbce7d53d0dbf72f349299c723594ecea8b..ee358f91b915078775047087c43dd814c3e4b8a6 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -999,13 +999,10 @@ class ElementsAccessorBase : public ElementsAccessor {
&array_length) &&
array_length <= Smi::kMaxValue)) {
// Since we use std::sort above, the GC will no longer know where the
- // 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);
- }
+ // 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 | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698