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

Unified Diff: third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h

Issue 2652923002: Devirtualize Visitor and remove inline visitor specialization. (Closed)
Patch Set: rebased 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: third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h
diff --git a/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h b/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h
deleted file mode 100644
index ec8d5dbc04999a4214d1546722ffcc5985e2357b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 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.
-
-#ifndef InlinedGlobalMarkingVisitor_h
-#define InlinedGlobalMarkingVisitor_h
-
-#include "platform/heap/MarkingVisitorImpl.h"
-
-namespace blink {
-
-class InlinedGlobalMarkingVisitor final
- : public VisitorHelper<InlinedGlobalMarkingVisitor>,
- public MarkingVisitorImpl<InlinedGlobalMarkingVisitor> {
- public:
- friend class VisitorHelper<InlinedGlobalMarkingVisitor>;
- using Helper = VisitorHelper<InlinedGlobalMarkingVisitor>;
- friend class MarkingVisitorImpl<InlinedGlobalMarkingVisitor>;
- using Impl = MarkingVisitorImpl<InlinedGlobalMarkingVisitor>;
-
- InlinedGlobalMarkingVisitor(ThreadState* state,
- VisitorMarkingMode markingMode)
- : VisitorHelper(state, markingMode) {}
-
- // Hack to unify interface to visitor->trace().
- // Without this hack, we need to use visitor.trace() for
- // trace(InlinedGlobalMarkingVisitor) and visitor->trace() for
- // trace(Visitor*).
- InlinedGlobalMarkingVisitor* operator->() { return this; }
-
- using Impl::mark;
- using Impl::ensureMarked;
- using Impl::registerDelayedMarkNoTracing;
- using Impl::registerWeakTable;
- using Impl::registerWeakMembers;
-#if DCHECK_IS_ON()
- using Impl::weakTableRegistered;
-#endif
-
- template <typename T>
- void mark(T* t) {
- Helper::mark(t);
- }
-
- template <typename T, void (T::*method)(Visitor*)>
- void registerWeakMembers(const T* obj) {
- Helper::template registerWeakMembers<T, method>(obj);
- }
-
- private:
- static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) {
- return *static_cast<InlinedGlobalMarkingVisitor*>(helper);
- }
-};
-
-inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) {}
-
-} // namespace blink
-
-#endif
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/heap/MarkingVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698