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
3 // found in the LICENSE file.
8 #include "heap/stubs.h"
12 class X
: public GarbageCollected
<X
> {
14 virtual void trace(Visitor
*) {}
17 class TraceImplInlined
: public GarbageCollected
<TraceImplInlined
> {
19 void trace(Visitor
* visitor
) { traceImpl(visitor
); }
21 template <typename VisitorDispatcher
>
22 void traceImpl(VisitorDispatcher visitor
) {
30 class TraceImplExtern
: public GarbageCollected
<TraceImplExtern
> {
32 void trace(Visitor
* visitor
);
33 template <typename VisitorDispatcher
>
34 inline void traceImpl(VisitorDispatcher
);
40 class Base
: public GarbageCollected
<Base
> {
42 virtual void trace(Visitor
* visitor
) {}
45 class TraceImplBaseInlined
: public Base
{
47 void trace(Visitor
* visitor
) override
{ traceImpl(visitor
); }
49 template <typename VisitorDispatcher
>
50 void traceImpl(VisitorDispatcher visitor
) {
55 class TraceImplBaseExtern
: public Base
{
57 void trace(Visitor
* visitor
) override
;
59 template <typename VisitorDispatcher
>
60 void traceImpl(VisitorDispatcher
);