Omit write barrier when setting trimmed elements.
authorantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 26 Mar 2010 18:47:14 +0000 (18:47 +0000)
committerantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 26 Mar 2010 18:47:14 +0000 (18:47 +0000)
Review URL: http://codereview.chromium.org/1310002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/builtins.cc

index 122fbba..feb912f 100644 (file)
@@ -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;