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

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

Issue 206123004: Add checks for stack-allocated types and their uses in fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 months 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 | Annotate | Revision Log
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 Edge* CreateEdge(const clang::Type* type); 107 Edge* CreateEdge(const clang::Type* type);
108 108
109 RecordCache* cache_; 109 RecordCache* cache_;
110 clang::CXXRecordDecl* record_; 110 clang::CXXRecordDecl* record_;
111 const std::string name_; 111 const std::string name_;
112 TracingStatus fields_need_tracing_; 112 TracingStatus fields_need_tracing_;
113 Bases* bases_; 113 Bases* bases_;
114 Fields* fields_; 114 Fields* fields_;
115 115
116 enum CachedBool { kFalse = 0, kTrue = 1, kNotComputed = 2 };
117 CachedBool is_stack_allocated_;
118
116 bool determined_trace_methods_; 119 bool determined_trace_methods_;
117 clang::CXXMethodDecl* trace_method_; 120 clang::CXXMethodDecl* trace_method_;
118 clang::CXXMethodDecl* trace_dispatch_method_; 121 clang::CXXMethodDecl* trace_dispatch_method_;
119 clang::CXXMethodDecl* finalize_dispatch_method_; 122 clang::CXXMethodDecl* finalize_dispatch_method_;
120 123
121 bool is_gc_derived_; 124 bool is_gc_derived_;
122 clang::CXXBasePaths* base_paths_; 125 clang::CXXBasePaths* base_paths_;
123 126
124 friend class RecordCache; 127 friend class RecordCache;
125 }; 128 };
(...skipping 29 matching lines...) Expand all
155 } 158 }
156 } 159 }
157 } 160 }
158 161
159 private: 162 private:
160 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; 163 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache;
161 Cache cache_; 164 Cache cache_;
162 }; 165 };
163 166
164 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ 167 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698