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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/trace_after_dispatch_impl_error.cpp

Issue 2655933002: blink_gc_plugin: retire overloaded traceImpl detection and handling. (Closed)
Patch Set: Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "trace_after_dispatch_impl_error.h" 5 #include "trace_after_dispatch_impl_error.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 template <typename VisitorDispatcher> 9 inline void TraceAfterDispatchInlinedBase::Trace(Visitor* visitor) {
10 inline void TraceAfterDispatchInlinedBase::TraceImpl(
11 VisitorDispatcher visitor) {
12 // Implement a simple form of manual dispatching, because BlinkGCPlugin 10 // Implement a simple form of manual dispatching, because BlinkGCPlugin
13 // checks if the tracing is dispatched to all derived classes. 11 // checks if the tracing is dispatched to all derived classes.
14 // 12 //
15 // This function has to be implemented out-of-line, since we need to know the 13 // This function has to be implemented out-of-line, since we need to know the
16 // definition of derived classes here. 14 // definition of derived classes here.
17 if (tag_ == DERIVED) { 15 if (tag_ == DERIVED) {
18 // Missing dispatch call: 16 // Missing dispatch call:
19 // static_cast<TraceAfterDispatchInlinedDerived*>(this)->TraceAfterDispatch( 17 // static_cast<TraceAfterDispatchInlinedDerived*>(this)->TraceAfterDispatch(
20 // visitor); 18 // visitor);
21 } else { 19 } else {
22 TraceAfterDispatch(visitor); 20 TraceAfterDispatch(visitor);
23 } 21 }
24 } 22 }
25 23
26 void TraceAfterDispatchExternBase::Trace(Visitor* visitor) { 24 void TraceAfterDispatchExternBase::Trace(Visitor* visitor) {
27 TraceImpl(visitor);
28 }
29
30 void TraceAfterDispatchExternBase::Trace(InlinedGlobalMarkingVisitor visitor) {
31 TraceImpl(visitor);
32 }
33
34 template <typename VisitorDispatcher>
35 inline void TraceAfterDispatchExternBase::TraceImpl(VisitorDispatcher visitor) {
36 if (tag_ == DERIVED) { 25 if (tag_ == DERIVED) {
37 // Missing dispatch call: 26 // Missing dispatch call:
38 // static_cast<TraceAfterDispatchExternDerived*>(this)->TraceAfterDispatch( 27 // static_cast<TraceAfterDispatchExternDerived*>(this)->TraceAfterDispatch(
39 // visitor); 28 // visitor);
40 } else { 29 } else {
41 TraceAfterDispatch(visitor); 30 TraceAfterDispatch(visitor);
42 } 31 }
43 } 32 }
44 33
45 void TraceAfterDispatchExternBase::TraceAfterDispatch(Visitor* visitor) { 34 void TraceAfterDispatchExternBase::TraceAfterDispatch(Visitor* visitor) {
46 TraceAfterDispatchImpl(visitor);
47 }
48
49 void TraceAfterDispatchExternBase::TraceAfterDispatch(
50 InlinedGlobalMarkingVisitor visitor) {
51 TraceAfterDispatchImpl(visitor);
52 }
53
54 template <typename VisitorDispatcher>
55 inline void TraceAfterDispatchExternBase::TraceAfterDispatchImpl(
56 VisitorDispatcher visitor) {
57 // No Trace call. 35 // No Trace call.
58 } 36 }
59 37
60 void TraceAfterDispatchExternDerived::TraceAfterDispatch(Visitor* visitor) { 38 void TraceAfterDispatchExternDerived::TraceAfterDispatch(Visitor* visitor) {
61 TraceAfterDispatchImpl(visitor);
62 }
63
64 void TraceAfterDispatchExternDerived::TraceAfterDispatch(
65 InlinedGlobalMarkingVisitor visitor) {
66 TraceAfterDispatchImpl(visitor);
67 }
68
69 template <typename VisitorDispatcher>
70 inline void TraceAfterDispatchExternDerived::TraceAfterDispatchImpl(
71 VisitorDispatcher visitor) {
72 // Ditto. 39 // Ditto.
73 } 40 }
74 41
75 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698