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

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

Issue 1152153004: Treat weak references in context weakly in write barrier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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/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
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
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
OLDNEW
« src/contexts.cc ('K') | « src/contexts.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698