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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 Edge* CreateEdge(const clang::Type* type); | 106 Edge* CreateEdge(const clang::Type* type); |
107 | 107 |
108 RecordCache* cache_; | 108 RecordCache* cache_; |
109 clang::CXXRecordDecl* record_; | 109 clang::CXXRecordDecl* record_; |
110 const std::string name_; | 110 const std::string name_; |
111 TracingStatus fields_need_tracing_; | 111 TracingStatus fields_need_tracing_; |
112 Bases* bases_; | 112 Bases* bases_; |
113 Fields* fields_; | 113 Fields* fields_; |
114 | 114 |
| 115 enum BoolOption { kFalse = 0, kTrue = 1, kNone = 2 }; |
| 116 BoolOption is_stack_allocated_; |
| 117 |
115 bool determined_trace_methods_; | 118 bool determined_trace_methods_; |
116 clang::CXXMethodDecl* trace_method_; | 119 clang::CXXMethodDecl* trace_method_; |
117 clang::CXXMethodDecl* trace_dispatch_method_; | 120 clang::CXXMethodDecl* trace_dispatch_method_; |
118 | 121 |
119 bool is_gc_derived_; | 122 bool is_gc_derived_; |
120 clang::CXXBasePaths* base_paths_; | 123 clang::CXXBasePaths* base_paths_; |
121 | 124 |
122 friend class RecordCache; | 125 friend class RecordCache; |
123 }; | 126 }; |
124 | 127 |
(...skipping 28 matching lines...) Expand all Loading... |
153 } | 156 } |
154 } | 157 } |
155 } | 158 } |
156 | 159 |
157 private: | 160 private: |
158 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; | 161 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; |
159 Cache cache_; | 162 Cache cache_; |
160 }; | 163 }; |
161 | 164 |
162 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ | 165 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ |
OLD | NEW |