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

Side by Side Diff: src/heap/scavenger.cc

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 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/objects-visiting-inl.h ('k') | src/inspector/injected-script-source.js » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/scavenger.h" 5 #include "src/heap/scavenger.h"
6 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/heap/heap-inl.h" 8 #include "src/heap/heap-inl.h"
9 #include "src/heap/incremental-marking.h" 9 #include "src/heap/incremental-marking.h"
10 #include "src/heap/objects-visiting-inl.h" 10 #include "src/heap/objects-visiting-inl.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Symbol::kSize>); 62 Symbol::kSize>);
63 63
64 table_.Register( 64 table_.Register(
65 kVisitSharedFunctionInfo, 65 kVisitSharedFunctionInfo,
66 &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< 66 &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized<
67 SharedFunctionInfo::kSize>); 67 SharedFunctionInfo::kSize>);
68 68
69 table_.Register(kVisitJSWeakCollection, 69 table_.Register(kVisitJSWeakCollection,
70 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); 70 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit);
71 71
72 table_.Register(kVisitJSWeakRef,
73 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit);
74
72 table_.Register(kVisitJSRegExp, 75 table_.Register(kVisitJSRegExp,
73 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); 76 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit);
74 77
75 table_.Register(kVisitJSFunction, &EvacuateJSFunction); 78 table_.Register(kVisitJSFunction, &EvacuateJSFunction);
76 79
77 table_.Register(kVisitDataObject, 80 table_.Register(kVisitDataObject,
78 &ObjectEvacuationStrategy<DATA_OBJECT>::Visit); 81 &ObjectEvacuationStrategy<DATA_OBJECT>::Visit);
79 82
80 table_.Register(kVisitJSObjectFast, 83 table_.Register(kVisitJSObjectFast,
81 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); 84 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit);
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 void ScavengeVisitor::ScavengePointer(Object** p) { 476 void ScavengeVisitor::ScavengePointer(Object** p) {
474 Object* object = *p; 477 Object* object = *p;
475 if (!heap_->InNewSpace(object)) return; 478 if (!heap_->InNewSpace(object)) return;
476 479
477 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 480 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
478 reinterpret_cast<HeapObject*>(object)); 481 reinterpret_cast<HeapObject*>(object));
479 } 482 }
480 483
481 } // namespace internal 484 } // namespace internal
482 } // namespace v8 485 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/inspector/injected-script-source.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698