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

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

Issue 2696713003: blink_gc_plugin: detect singletons with embedded ScriptWrappables.
Patch Set: better error reporting + polishing Created 3 years, 10 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. |is_persistent| is set to |true| if the base type name is
dcheng 2017/02/16 04:35:51 Make this match the actual param name? =)
sof 2017/02/16 06:45:34 Updated to use version N naming, not (N-1). :)
123 // |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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698