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

Side by Side Diff: src/heap/concurrent-marking.cc

Issue 2885883004: [heap] Fix verification of unsafe object layout changes. (Closed)
Patch Set: remove redundant check Created 3 years, 7 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 | « no previous file | src/heap/heap.cc » ('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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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/concurrent-marking.h" 5 #include "src/heap/concurrent-marking.h"
6 6
7 #include <stack> 7 #include <stack>
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "src/heap/concurrent-marking-deque.h" 10 #include "src/heap/concurrent-marking-deque.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 base::NoBarrier_Load(reinterpret_cast<const base::AtomicWord*>(p))); 186 base::NoBarrier_Load(reinterpret_cast<const base::AtomicWord*>(p)));
187 slot_snapshot_->add(p, object); 187 slot_snapshot_->add(p, object);
188 } 188 }
189 } 189 }
190 190
191 private: 191 private:
192 SlotSnapshot* slot_snapshot_; 192 SlotSnapshot* slot_snapshot_;
193 }; 193 };
194 194
195 const SlotSnapshot& MakeSlotSnapshot(Map* map, HeapObject* object, int size) { 195 const SlotSnapshot& MakeSlotSnapshot(Map* map, HeapObject* object, int size) {
196 // TODO(ulan): Iterate only the existing fields and skip slack at the end
197 // of the object.
196 SlotSnapshottingVisitor visitor(&slot_snapshot_); 198 SlotSnapshottingVisitor visitor(&slot_snapshot_);
197 visitor.VisitPointer(object, 199 visitor.VisitPointer(object,
198 reinterpret_cast<Object**>(object->map_slot())); 200 reinterpret_cast<Object**>(object->map_slot()));
199 JSObject::BodyDescriptor::IterateBody(object, size, &visitor); 201 JSObject::BodyDescriptor::IterateBody(object, size, &visitor);
200 return slot_snapshot_; 202 return slot_snapshot_;
201 } 203 }
202 204
203 MarkingState marking_state(HeapObject* object) const { 205 MarkingState marking_state(HeapObject* object) const {
204 return MarkingState::Internal(object); 206 return MarkingState::Internal(object);
205 } 207 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 280 }
279 281
280 void ConcurrentMarking::EnsureTaskCompleted() { 282 void ConcurrentMarking::EnsureTaskCompleted() {
281 if (IsTaskPending()) { 283 if (IsTaskPending()) {
282 WaitForTaskToComplete(); 284 WaitForTaskToComplete();
283 } 285 }
284 } 286 }
285 287
286 } // namespace internal 288 } // namespace internal
287 } // namespace v8 289 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698