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

Unified Diff: tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h

Issue 2655933002: blink_gc_plugin: retire overloaded traceImpl detection and handling. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h
diff --git a/tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h b/tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h
index 63ba65aa6312bedce834993b5010b64d6e8cf35b..73ef3798094ceca93b49e6e8ed8d8f548eaddc98 100644
--- a/tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h
+++ b/tools/clang/blink_gc_plugin/tests/traceimpl_overloaded.h
@@ -12,33 +12,19 @@ namespace blink {
class X : public GarbageCollected<X> {
public:
void Trace(Visitor*) {}
- void Trace(InlinedGlobalMarkingVisitor) {}
};
class InlinedBase : public GarbageCollected<InlinedBase> {
public:
- virtual void Trace(Visitor* visitor) { TraceImpl(visitor); }
- virtual void Trace(InlinedGlobalMarkingVisitor visitor) {
- TraceImpl(visitor);
- }
+ virtual void Trace(Visitor* visitor) { visitor->Trace(x_base_); }
private:
- template <typename VisitorDispatcher>
- void TraceImpl(VisitorDispatcher visitor) { visitor->Trace(x_base_); }
-
Member<X> x_base_;
};
class InlinedDerived : public InlinedBase {
public:
- void Trace(Visitor* visitor) override { TraceImpl(visitor); }
- void Trace(InlinedGlobalMarkingVisitor visitor) override {
- TraceImpl(visitor);
- }
-
- private:
- template <typename VisitorDispatcher>
- void TraceImpl(VisitorDispatcher visitor) {
+ void Trace(Visitor* visitor) override {
visitor->Trace(x_derived_);
InlinedBase::Trace(visitor);
}
@@ -49,24 +35,16 @@ class InlinedDerived : public InlinedBase {
class ExternBase : public GarbageCollected<ExternBase> {
public:
virtual void Trace(Visitor*);
- virtual void Trace(InlinedGlobalMarkingVisitor);
private:
- template <typename VisitorDispatcher>
- void TraceImpl(VisitorDispatcher);
-
Member<X> x_base_;
};
class ExternDerived : public ExternBase {
public:
void Trace(Visitor*) override;
- void Trace(InlinedGlobalMarkingVisitor) override;
private:
- template <typename VisitorDispatcher>
- void TraceImpl(VisitorDispatcher);
-
Member<X> x_derived_;
};

Powered by Google App Engine
This is Rietveld 408576698