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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 RecordInfo(clang::CXXRecordDecl* record, RecordCache* cache); | 122 RecordInfo(clang::CXXRecordDecl* record, RecordCache* cache); |
123 | 123 |
124 void walkBases(); | 124 void walkBases(); |
125 | 125 |
126 Fields* CollectFields(); | 126 Fields* CollectFields(); |
127 Bases* CollectBases(); | 127 Bases* CollectBases(); |
128 void DetermineTracingMethods(); | 128 void DetermineTracingMethods(); |
129 bool InheritsTrace(); | 129 bool InheritsTrace(); |
130 | 130 |
131 Edge* CreateEdge(const clang::Type* type); | 131 Edge* CreateEdge(const clang::Type* type); |
| 132 Edge* CreateEdgeFromOriginalType(const clang::Type* type); |
132 | 133 |
133 RecordCache* cache_; | 134 RecordCache* cache_; |
134 clang::CXXRecordDecl* record_; | 135 clang::CXXRecordDecl* record_; |
135 const std::string name_; | 136 const std::string name_; |
136 TracingStatus fields_need_tracing_; | 137 TracingStatus fields_need_tracing_; |
137 Bases* bases_; | 138 Bases* bases_; |
138 Fields* fields_; | 139 Fields* fields_; |
139 | 140 |
140 enum CachedBool { kFalse = 0, kTrue = 1, kNotComputed = 2 }; | 141 enum CachedBool { kFalse = 0, kTrue = 1, kNotComputed = 2 }; |
141 CachedBool is_stack_allocated_; | 142 CachedBool is_stack_allocated_; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 clang::CompilerInstance& instance() const { return instance_; } | 199 clang::CompilerInstance& instance() const { return instance_; } |
199 | 200 |
200 private: | 201 private: |
201 clang::CompilerInstance& instance_; | 202 clang::CompilerInstance& instance_; |
202 | 203 |
203 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; | 204 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; |
204 Cache cache_; | 205 Cache cache_; |
205 }; | 206 }; |
206 | 207 |
207 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ | 208 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ |
OLD | NEW |