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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 }; | 278 }; |
279 | 279 |
280 | 280 |
281 template <> | 281 template <> |
282 struct WeakListVisitor<Context> { | 282 struct WeakListVisitor<Context> { |
283 static void SetWeakNext(Context* context, Object* next) { | 283 static void SetWeakNext(Context* context, Object* next) { |
284 context->set(Context::NEXT_CONTEXT_LINK, next, UPDATE_WEAK_WRITE_BARRIER); | 284 context->set(Context::NEXT_CONTEXT_LINK, next, UPDATE_WEAK_WRITE_BARRIER); |
285 } | 285 } |
286 | 286 |
287 static Object* WeakNext(Context* context) { | 287 static Object* WeakNext(Context* context) { |
288 return context->get(Context::NEXT_CONTEXT_LINK); | 288 return context->next_context_link(); |
289 } | 289 } |
290 | 290 |
291 static int WeakNextOffset() { | 291 static int WeakNextOffset() { |
292 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); | 292 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); |
293 } | 293 } |
294 | 294 |
295 static void VisitLiveObject(Heap* heap, Context* context, | 295 static void VisitLiveObject(Heap* heap, Context* context, |
296 WeakObjectRetainer* retainer) { | 296 WeakObjectRetainer* retainer) { |
297 // Process the three weak lists linked off the context. | 297 // Process the three weak lists linked off the context. |
298 DoWeakList<JSFunction>(heap, context, retainer, | 298 DoWeakList<JSFunction>(heap, context, retainer, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |