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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/heap/stubs.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef HEAP_STUBS_H_ 5 #ifndef HEAP_STUBS_H_
6 #define HEAP_STUBS_H_ 6 #define HEAP_STUBS_H_
7 7
8 #include "stddef.h" 8 #include "stddef.h"
9 9
10 #define WTF_MAKE_FAST_ALLOCATED \ 10 #define WTF_MAKE_FAST_ALLOCATED \
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 template<typename T> 269 template<typename T>
270 class HeapHashCountedSet : public HashCountedSet<T, void, void, HeapAllocator> { 270 class HeapHashCountedSet : public HashCountedSet<T, void, void, HeapAllocator> {
271 }; 271 };
272 272
273 template<typename K, typename V> 273 template<typename K, typename V>
274 class HeapHashMap : public HashMap<K, V, void, void, void, HeapAllocator> { }; 274 class HeapHashMap : public HashMap<K, V, void, void, void, HeapAllocator> { };
275 275
276 template<typename T> 276 template<typename T>
277 class PersistentHeapVector : public Vector<T, 0, HeapAllocator> { }; 277 class PersistentHeapVector : public Vector<T, 0, HeapAllocator> { };
278 278
279 template <typename Derived> 279 class Visitor {
280 class VisitorHelper { 280 public:
281 public: 281 template <typename T, void (T::*method)(Visitor*)>
282 template<typename T> 282 void RegisterWeakMembers(const T* obj);
283 void Trace(const T&);
284 };
285 283
286 class Visitor : public VisitorHelper<Visitor> { 284 template <typename T>
287 public: 285 void Trace(const T&);
288 template<typename T, void (T::*method)(Visitor*)>
289 void RegisterWeakMembers(const T* obj);
290 };
291
292 class InlinedGlobalMarkingVisitor
293 : public VisitorHelper<InlinedGlobalMarkingVisitor> {
294 public:
295 InlinedGlobalMarkingVisitor* operator->() { return this; }
296
297 template<typename T, void (T::*method)(Visitor*)>
298 void RegisterWeakMembers(const T* obj);
299 }; 286 };
300 287
301 class GarbageCollectedMixin { 288 class GarbageCollectedMixin {
302 public: 289 public:
303 virtual void AdjustAndMark(Visitor*) const = 0; 290 virtual void AdjustAndMark(Visitor*) const = 0;
304 virtual bool IsHeapObjectAlive(Visitor*) const = 0; 291 virtual bool IsHeapObjectAlive(Visitor*) const = 0;
305 virtual void Trace(Visitor*) { } 292 virtual void Trace(Visitor*) { }
306 }; 293 };
307 294
308 template<typename T> 295 template<typename T>
309 struct TraceIfNeeded { 296 struct TraceIfNeeded {
310 static void Trace(Visitor*, T*); 297 static void Trace(Visitor*, T*);
311 }; 298 };
312 299
313 } 300 }
314 301
315 namespace WTF { 302 namespace WTF {
316 303
317 template<typename T> 304 template<typename T>
318 struct VectorTraits<blink::Member<T> > { 305 struct VectorTraits<blink::Member<T> > {
319 static const bool needsDestruction = false; 306 static const bool needsDestruction = false;
320 }; 307 };
321 308
322 } 309 }
323 310
324 #endif 311 #endif
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/legacy_naming/heap/stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698