OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "platform/heap/GarbageCollected.h" | 35 #include "platform/heap/GarbageCollected.h" |
36 #include "platform/heap/StackFrameDepth.h" | 36 #include "platform/heap/StackFrameDepth.h" |
37 #include "platform/heap/ThreadState.h" | 37 #include "platform/heap/ThreadState.h" |
38 #include "wtf/Assertions.h" | 38 #include "wtf/Assertions.h" |
39 #include "wtf/Atomics.h" | 39 #include "wtf/Atomics.h" |
40 #include "wtf/Deque.h" | 40 #include "wtf/Deque.h" |
41 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
42 #include "wtf/HashMap.h" | 42 #include "wtf/HashMap.h" |
43 #include "wtf/HashTraits.h" | 43 #include "wtf/HashTraits.h" |
44 #include "wtf/InstanceCounter.h" | 44 #include "wtf/InstanceCounter.h" |
45 #include "wtf/Threading.h" | |
46 #include "wtf/TypeTraits.h" | 45 #include "wtf/TypeTraits.h" |
47 #include "wtf/text/WTFString.h" | 46 #include "wtf/text/WTFString.h" |
48 | 47 |
49 namespace blink { | 48 namespace blink { |
50 | 49 |
51 template<typename T> class GarbageCollected; | 50 template<typename T> class GarbageCollected; |
52 class HeapObjectHeader; | 51 class HeapObjectHeader; |
53 class InlinedGlobalMarkingVisitor; | 52 class InlinedGlobalMarkingVisitor; |
54 template<typename T> class TraceTrait; | 53 template<typename T> class TraceTrait; |
55 template<typename T> class TraceEagerlyTrait; | 54 template<typename T> class TraceEagerlyTrait; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 379 |
381 private: | 380 private: |
382 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_c
ast<Visitor*>(helper); } | 381 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_c
ast<Visitor*>(helper); } |
383 | 382 |
384 const MarkingMode m_markingMode; | 383 const MarkingMode m_markingMode; |
385 bool m_isGlobalMarkingVisitor; | 384 bool m_isGlobalMarkingVisitor; |
386 }; | 385 }; |
387 | 386 |
388 template<typename T> | 387 template<typename T> |
389 struct TypenameStringTrait { | 388 struct TypenameStringTrait { |
390 // This method is not thread safe. | 389 static const String get() |
391 static const String& get() | |
392 { | 390 { |
393 AtomicallyInitializedStaticReference(AtomicString, typenameString, new A
tomicString(WTF::extractTypeNameFromFunctionName(WTF::extractNameFunction<T>()))
); | 391 return WTF::extractTypeNameFromFunctionName(WTF::extractNameFunction<T>(
)); |
394 return typenameString; | |
395 } | 392 } |
396 }; | 393 }; |
397 | 394 |
398 } // namespace blink | 395 } // namespace blink |
399 | 396 |
400 #endif // Visitor_h | 397 #endif // Visitor_h |
OLD | NEW |