| OLD | NEW |
| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 }; | 275 }; |
| 276 | 276 |
| 277 | 277 |
| 278 template <> | 278 template <> |
| 279 struct WeakListVisitor<Context> { | 279 struct WeakListVisitor<Context> { |
| 280 static void SetWeakNext(Context* context, Object* next) { | 280 static void SetWeakNext(Context* context, Object* next) { |
| 281 context->set(Context::NEXT_CONTEXT_LINK, next, UPDATE_WEAK_WRITE_BARRIER); | 281 context->set(Context::NEXT_CONTEXT_LINK, next, UPDATE_WEAK_WRITE_BARRIER); |
| 282 } | 282 } |
| 283 | 283 |
| 284 static Object* WeakNext(Context* context) { | 284 static Object* WeakNext(Context* context) { |
| 285 return context->get(Context::NEXT_CONTEXT_LINK); | 285 return context->next_context_link(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 static int WeakNextOffset() { | 288 static int WeakNextOffset() { |
| 289 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); | 289 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); |
| 290 } | 290 } |
| 291 | 291 |
| 292 static void VisitLiveObject(Heap* heap, Context* context, | 292 static void VisitLiveObject(Heap* heap, Context* context, |
| 293 WeakObjectRetainer* retainer) { | 293 WeakObjectRetainer* retainer) { |
| 294 // Process the three weak lists linked off the context. | 294 // Process the three weak lists linked off the context. |
| 295 DoWeakList<JSFunction>(heap, context, retainer, | 295 DoWeakList<JSFunction>(heap, context, retainer, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 }; | 353 }; |
| 354 | 354 |
| 355 | 355 |
| 356 template Object* VisitWeakList<Context>(Heap* heap, Object* list, | 356 template Object* VisitWeakList<Context>(Heap* heap, Object* list, |
| 357 WeakObjectRetainer* retainer); | 357 WeakObjectRetainer* retainer); |
| 358 | 358 |
| 359 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, | 359 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, |
| 360 WeakObjectRetainer* retainer); | 360 WeakObjectRetainer* retainer); |
| 361 } // namespace internal | 361 } // namespace internal |
| 362 } // namespace v8 | 362 } // namespace v8 |
| OLD | NEW |