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

Unified Diff: tools/clang/blink_gc_plugin/tests/trace_after_dispatch_impl_error.cpp

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 years, 2 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/trace_after_dispatch_impl_error.cpp
diff --git a/tools/clang/blink_gc_plugin/tests/trace_after_dispatch_impl_error.cpp b/tools/clang/blink_gc_plugin/tests/trace_after_dispatch_impl_error.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..23798f70275c3f4e6911146b80ed33be4ccfc5d9
--- /dev/null
+++ b/tools/clang/blink_gc_plugin/tests/trace_after_dispatch_impl_error.cpp
@@ -0,0 +1,75 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "trace_after_dispatch_impl_error.h"
+
+namespace blink {
+
+template <typename VisitorDispatcher>
+inline void TraceAfterDispatchInlinedBase::traceImpl(
+ VisitorDispatcher visitor) {
+ // Implement a simple form of manual dispatching, because BlinkGCPlugin
+ // checks if the tracing is dispatched to all derived classes.
+ //
+ // This function has to be implemented out-of-line, since we need to know the
+ // definition of derived classes here.
+ if (tag_ == DERIVED) {
+ // Missing dispatch call:
+ // static_cast<TraceAfterDispatchInlinedDerived*>(this)->traceAfterDispatch(
+ // visitor);
+ } else {
+ traceAfterDispatch(visitor);
+ }
+}
+
+void TraceAfterDispatchExternBase::trace(Visitor* visitor) {
+ traceImpl(visitor);
+}
+
+void TraceAfterDispatchExternBase::trace(InlinedGlobalMarkingVisitor visitor) {
+ traceImpl(visitor);
+}
+
+template <typename VisitorDispatcher>
+inline void TraceAfterDispatchExternBase::traceImpl(VisitorDispatcher visitor) {
+ if (tag_ == DERIVED) {
+ // Missing dispatch call:
+ // static_cast<TraceAfterDispatchExternDerived*>(this)->traceAfterDispatch(
+ // visitor);
+ } else {
+ traceAfterDispatch(visitor);
+ }
+}
+
+void TraceAfterDispatchExternBase::traceAfterDispatch(Visitor* visitor) {
+ traceAfterDispatchImpl(visitor);
+}
+
+void TraceAfterDispatchExternBase::traceAfterDispatch(
+ InlinedGlobalMarkingVisitor visitor) {
+ traceAfterDispatchImpl(visitor);
+}
+
+template <typename VisitorDispatcher>
+inline void TraceAfterDispatchExternBase::traceAfterDispatchImpl(
+ VisitorDispatcher visitor) {
+ // No trace call.
+}
+
+void TraceAfterDispatchExternDerived::traceAfterDispatch(Visitor* visitor) {
+ traceAfterDispatchImpl(visitor);
+}
+
+void TraceAfterDispatchExternDerived::traceAfterDispatch(
+ InlinedGlobalMarkingVisitor visitor) {
+ traceAfterDispatchImpl(visitor);
+}
+
+template <typename VisitorDispatcher>
+inline void TraceAfterDispatchExternDerived::traceAfterDispatchImpl(
+ VisitorDispatcher visitor) {
+ // Ditto.
+}
+
+}

Powered by Google App Engine
This is Rietveld 408576698