Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: tools/clang/blink_gc_plugin/RecordInfo.h

Issue 2588943002: Disallow heap objects containing unsafe on-heap iterators. (Closed)
Patch Set: formatting Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698