| OLD | NEW |
| 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 // This file provides a wrapper for CXXRecordDecl that accumulates GC related | 5 // This file provides a wrapper for CXXRecordDecl that accumulates GC related |
| 6 // information about a class. Accumulated information is memoized and the info | 6 // information about a class. Accumulated information is memoized and the info |
| 7 // objects are stored in a RecordCache. | 7 // objects are stored in a RecordCache. |
| 8 | 8 |
| 9 #ifndef TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ | 9 #ifndef TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ |
| 10 #define TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ | 10 #define TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 bool RequiresTraceMethod(); | 111 bool RequiresTraceMethod(); |
| 112 bool NeedsFinalization(); | 112 bool NeedsFinalization(); |
| 113 bool DeclaresGCMixinMethods(); | 113 bool DeclaresGCMixinMethods(); |
| 114 bool DeclaresLocalTraceMethod(); | 114 bool DeclaresLocalTraceMethod(); |
| 115 TracingStatus NeedsTracing(Edge::NeedsTracingOption); | 115 TracingStatus NeedsTracing(Edge::NeedsTracingOption); |
| 116 clang::CXXMethodDecl* InheritsNonVirtualTrace(); | 116 clang::CXXMethodDecl* InheritsNonVirtualTrace(); |
| 117 bool IsConsideredAbstract(); | 117 bool IsConsideredAbstract(); |
| 118 | 118 |
| 119 static clang::CXXRecordDecl* GetDependentTemplatedDecl(const clang::Type&); | 119 static clang::CXXRecordDecl* GetDependentTemplatedDecl(const clang::Type&); |
| 120 | 120 |
| 121 // If |RecordInfo| represents blink::(CrossThread)Persistent<T>, return |
| 122 // its type. |has_persistent_name| is set to |true| if the base type name |
| 123 // is |Persistent| or |CrossThreadPersistent|. |
| 124 const clang::Type* GetPersistentArgumentType(bool& has_persistent_name); |
| 125 |
| 126 RecordCache* cache() const { return cache_; } |
| 127 |
| 128 // Returns |true| if type is declared in "blink::" |
| 129 bool IsInBlinkNamespace(); |
| 130 |
| 121 private: | 131 private: |
| 122 RecordInfo(clang::CXXRecordDecl* record, RecordCache* cache); | 132 RecordInfo(clang::CXXRecordDecl* record, RecordCache* cache); |
| 123 | 133 |
| 124 void walkBases(); | 134 void walkBases(); |
| 125 | 135 |
| 126 Fields* CollectFields(); | 136 Fields* CollectFields(); |
| 127 Bases* CollectBases(); | 137 Bases* CollectBases(); |
| 128 void DetermineTracingMethods(); | 138 void DetermineTracingMethods(); |
| 129 bool InheritsTrace(); | 139 bool InheritsTrace(); |
| 130 | 140 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 clang::CompilerInstance& instance() const { return instance_; } | 209 clang::CompilerInstance& instance() const { return instance_; } |
| 200 | 210 |
| 201 private: | 211 private: |
| 202 clang::CompilerInstance& instance_; | 212 clang::CompilerInstance& instance_; |
| 203 | 213 |
| 204 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; | 214 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; |
| 205 Cache cache_; | 215 Cache cache_; |
| 206 }; | 216 }; |
| 207 | 217 |
| 208 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ | 218 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ |
| OLD | NEW |