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

Unified Diff: src/builtins.cc

Issue 1310002: Omit write barrier when setting trimmed elements. (Closed)
Patch Set: Better explanation Created 10 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 122fbba2c4aac4464c2a5bc1d37cf66d283b30bb..feb912f4147754a7ebc2f09c60dc65f18b22ef0a 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -495,7 +495,9 @@ BUILTIN(ArrayShift) {
}
if (Heap::new_space()->Contains(elms)) {
- array->set_elements(LeftTrimFixedArray(elms));
+ // As elms still in the same space they used to be (new space),
+ // there is no need to update remembered set.
+ array->set_elements(LeftTrimFixedArray(elms), SKIP_WRITE_BARRIER);
} else {
// Shift the elements.
AssertNoAllocation no_gc;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698