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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/heap/objects-visiting.h" | 7 #include "src/heap/objects-visiting.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 280 |
281 static void VisitLiveObject(Heap*, Code*, WeakObjectRetainer*) {} | 281 static void VisitLiveObject(Heap*, Code*, WeakObjectRetainer*) {} |
282 | 282 |
283 static void VisitPhantomObject(Heap*, Code*) {} | 283 static void VisitPhantomObject(Heap*, Code*) {} |
284 }; | 284 }; |
285 | 285 |
286 | 286 |
287 template <> | 287 template <> |
288 struct WeakListVisitor<Context> { | 288 struct WeakListVisitor<Context> { |
289 static void SetWeakNext(Context* context, Object* next) { | 289 static void SetWeakNext(Context* context, Object* next) { |
290 context->set(Context::NEXT_CONTEXT_LINK, next, UPDATE_WRITE_BARRIER); | 290 context->set(Context::NEXT_CONTEXT_LINK, next, UPDATE_WEAK_WRITE_BARRIER); |
291 } | 291 } |
292 | 292 |
293 static Object* WeakNext(Context* context) { | 293 static Object* WeakNext(Context* context) { |
294 return context->get(Context::NEXT_CONTEXT_LINK); | 294 return context->get(Context::NEXT_CONTEXT_LINK); |
295 } | 295 } |
296 | 296 |
297 static int WeakNextOffset() { | 297 static int WeakNextOffset() { |
298 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); | 298 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); |
299 } | 299 } |
300 | 300 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 }; | 355 }; |
356 | 356 |
357 | 357 |
358 template Object* VisitWeakList<Context>(Heap* heap, Object* list, | 358 template Object* VisitWeakList<Context>(Heap* heap, Object* list, |
359 WeakObjectRetainer* retainer); | 359 WeakObjectRetainer* retainer); |
360 | 360 |
361 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, | 361 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, |
362 WeakObjectRetainer* retainer); | 362 WeakObjectRetainer* retainer); |
363 } | 363 } |
364 } // namespace v8::internal | 364 } // namespace v8::internal |
OLD | NEW |