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

Side by Side Diff: src/heap/objects-visiting.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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/mark-compact-inl.h ('k') | src/heap/objects-visiting-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/objects-visiting.h" 5 #include "src/heap/objects-visiting.h"
6 6
7 #include "src/heap/mark-compact-inl.h" 7 #include "src/heap/mark-compact-inl.h"
8 #include "src/heap/objects-visiting-inl.h" 8 #include "src/heap/objects-visiting-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Subsequent elements in the list. 205 // Subsequent elements in the list.
206 DCHECK(tail != NULL); 206 DCHECK(tail != NULL);
207 WeakListVisitor<T>::SetWeakNext(tail, retained); 207 WeakListVisitor<T>::SetWeakNext(tail, retained);
208 if (record_slots) { 208 if (record_slots) {
209 Object** next_slot = 209 Object** next_slot =
210 HeapObject::RawField(tail, WeakListVisitor<T>::WeakNextOffset()); 210 HeapObject::RawField(tail, WeakListVisitor<T>::WeakNextOffset());
211 collector->RecordSlot(tail, next_slot, retained); 211 collector->RecordSlot(tail, next_slot, retained);
212 } 212 }
213 } 213 }
214 // Retained object is new tail. 214 // Retained object is new tail.
215 DCHECK(!retained->IsUndefined()); 215 DCHECK(!retained->IsUndefined(heap->isolate()));
216 candidate = reinterpret_cast<T*>(retained); 216 candidate = reinterpret_cast<T*>(retained);
217 tail = candidate; 217 tail = candidate;
218 218
219 // tail is a live object, visit it. 219 // tail is a live object, visit it.
220 WeakListVisitor<T>::VisitLiveObject(heap, tail, retainer); 220 WeakListVisitor<T>::VisitLiveObject(heap, tail, retainer);
221 221
222 } else { 222 } else {
223 WeakListVisitor<T>::VisitPhantomObject(heap, candidate); 223 WeakListVisitor<T>::VisitPhantomObject(heap, candidate);
224 } 224 }
225 225
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 }; 356 };
357 357
358 358
359 template Object* VisitWeakList<Context>(Heap* heap, Object* list, 359 template Object* VisitWeakList<Context>(Heap* heap, Object* list,
360 WeakObjectRetainer* retainer); 360 WeakObjectRetainer* retainer);
361 361
362 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, 362 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list,
363 WeakObjectRetainer* retainer); 363 WeakObjectRetainer* retainer);
364 } // namespace internal 364 } // namespace internal
365 } // namespace v8 365 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact-inl.h ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698