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

Side by Side Diff: src/heap/heap.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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 } 1103 }
1104 1104
1105 1105
1106 void Heap::MoveElements(FixedArray* array, int dst_index, int src_index, 1106 void Heap::MoveElements(FixedArray* array, int dst_index, int src_index,
1107 int len) { 1107 int len) {
1108 if (len == 0) return; 1108 if (len == 0) return;
1109 1109
1110 DCHECK(array->map() != fixed_cow_array_map()); 1110 DCHECK(array->map() != fixed_cow_array_map());
1111 Object** dst_objects = array->data_start() + dst_index; 1111 Object** dst_objects = array->data_start() + dst_index;
1112 MemMove(dst_objects, array->data_start() + src_index, len * kPointerSize); 1112 MemMove(dst_objects, array->data_start() + src_index, len * kPointerSize);
1113 FIXED_ARRAY_ELEMENTS_WRITE_BARRIER(this, array, dst_index, src_index); 1113 if (!InNewSpace(array)) {
1114 for (int i = 0; i < len; i++) {
1115 RecordWrite(array, array->OffsetOfElementAt(dst_index + i),
1116 dst_objects[i]);
1117 }
1118 }
1119 incremental_marking()->IterateBlackObject(array);
1114 } 1120 }
1115 1121
1116 1122
1117 #ifdef VERIFY_HEAP 1123 #ifdef VERIFY_HEAP
1118 // Helper class for verifying the string table. 1124 // Helper class for verifying the string table.
1119 class StringTableVerifier : public ObjectVisitor { 1125 class StringTableVerifier : public ObjectVisitor {
1120 public: 1126 public:
1121 void VisitPointers(Object** start, Object** end) override { 1127 void VisitPointers(Object** start, Object** end) override {
1122 // Visit all HeapObject pointers in [start, end). 1128 // Visit all HeapObject pointers in [start, end).
1123 for (Object** p = start; p < end; p++) { 1129 for (Object** p = start; p < end; p++) {
(...skipping 5343 matching lines...) Expand 10 before | Expand all | Expand 10 after
6467 } 6473 }
6468 6474
6469 6475
6470 // static 6476 // static
6471 int Heap::GetStaticVisitorIdForMap(Map* map) { 6477 int Heap::GetStaticVisitorIdForMap(Map* map) {
6472 return StaticVisitorBase::GetVisitorId(map); 6478 return StaticVisitorBase::GetVisitorId(map);
6473 } 6479 }
6474 6480
6475 } // namespace internal 6481 } // namespace internal
6476 } // namespace v8 6482 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698