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 23 matching lines...) Expand all Loading... |
34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
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" |
| 45 #include "wtf/Threading.h" |
44 #include "wtf/TypeTraits.h" | 46 #include "wtf/TypeTraits.h" |
45 #if ENABLE(GC_PROFILING) | |
46 #include "wtf/InstanceCounter.h" | |
47 #include "wtf/text/WTFString.h" | 47 #include "wtf/text/WTFString.h" |
48 #endif | |
49 | 48 |
50 namespace blink { | 49 namespace blink { |
51 | 50 |
52 template<typename T> class GarbageCollected; | 51 template<typename T> class GarbageCollected; |
53 class HeapObjectHeader; | 52 class HeapObjectHeader; |
54 class InlinedGlobalMarkingVisitor; | 53 class InlinedGlobalMarkingVisitor; |
55 template<typename T> class TraceTrait; | 54 template<typename T> class TraceTrait; |
56 template<typename T> class TraceEagerlyTrait; | 55 template<typename T> class TraceEagerlyTrait; |
57 class Visitor; | 56 class Visitor; |
58 | 57 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 383 |
385 const MarkingMode m_markingMode; | 384 const MarkingMode m_markingMode; |
386 bool m_isGlobalMarkingVisitor; | 385 bool m_isGlobalMarkingVisitor; |
387 }; | 386 }; |
388 | 387 |
389 template<typename T> | 388 template<typename T> |
390 struct TypenameStringTrait { | 389 struct TypenameStringTrait { |
391 // This method is not thread safe. | 390 // This method is not thread safe. |
392 static const String& get() | 391 static const String& get() |
393 { | 392 { |
394 DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
ctionName(WTF::extractNameFunction<T>()))); | 393 AtomicallyInitializedStaticReference(AtomicString, typenameString, new A
tomicString(WTF::extractTypeNameFromFunctionName(WTF::extractNameFunction<T>()))
); |
395 return typenameString; | 394 return typenameString; |
396 } | 395 } |
397 }; | 396 }; |
398 | 397 |
399 } // namespace blink | 398 } // namespace blink |
400 | 399 |
401 #endif // Visitor_h | 400 #endif // Visitor_h |
OLD | NEW |