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

Side by Side Diff: Source/platform/heap/InlinedGlobalMarkingVisitor.h

Issue 1120893003: Oilpan: Put all TraceTraits into TraceTraits.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/TraceTraits.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium 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 #ifndef InlinedGlobalMarkingVisitor_h 5 #ifndef InlinedGlobalMarkingVisitor_h
6 #define InlinedGlobalMarkingVisitor_h 6 #define InlinedGlobalMarkingVisitor_h
7 7
8 #include "platform/heap/MarkingVisitorImpl.h" 8 #include "platform/heap/MarkingVisitorImpl.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); 72 return *static_cast<InlinedGlobalMarkingVisitor*>(helper);
73 } 73 }
74 74
75 #if ENABLE(ASSERT) 75 #if ENABLE(ASSERT)
76 inline void checkMarkingAllowed() { m_visitor->checkMarkingAllowed(); } 76 inline void checkMarkingAllowed() { m_visitor->checkMarkingAllowed(); }
77 #endif 77 #endif
78 78
79 Visitor* m_visitor; 79 Visitor* m_visitor;
80 }; 80 };
81 81
82 template<typename T>
83 void TraceTrait<T>::trace(Visitor* visitor, void* self)
84 {
85 if (visitor->isGlobalMarkingVisitor()) {
86 // Switch to inlined global marking dispatch.
87 static_cast<T*>(self)->trace(InlinedGlobalMarkingVisitor(visitor));
88 } else {
89 static_cast<T*>(self)->trace(visitor);
90 }
91 }
92
93 template<typename T>
94 void TraceTrait<T>::trace(InlinedGlobalMarkingVisitor visitor, void* self)
95 {
96 static_cast<T*>(self)->trace(visitor);
97 }
98
99 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) 82 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor)
100 { 83 {
101 } 84 }
102 85
103 } // namespace blink 86 } // namespace blink
104 87
105 #endif 88 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/TraceTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698