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

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

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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
« no previous file with comments | « tools/clang/blink_gc_plugin/JsonWriter.h ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 bool IsHeapAllocatedCollection(); 88 bool IsHeapAllocatedCollection();
89 bool IsGCDerived(); 89 bool IsGCDerived();
90 bool IsGCAllocated(); 90 bool IsGCAllocated();
91 bool IsGCFinalized(); 91 bool IsGCFinalized();
92 bool IsGCMixin(); 92 bool IsGCMixin();
93 bool IsStackAllocated(); 93 bool IsStackAllocated();
94 bool IsNonNewable(); 94 bool IsNonNewable();
95 bool IsOnlyPlacementNewable(); 95 bool IsOnlyPlacementNewable();
96 bool IsGCMixinInstance(); 96 bool IsGCMixinInstance();
97 bool IsEagerlyFinalized();
98
99 bool HasDefinition();
100
97 clang::CXXMethodDecl* DeclaresNewOperator(); 101 clang::CXXMethodDecl* DeclaresNewOperator();
98 102
99 bool RequiresTraceMethod(); 103 bool RequiresTraceMethod();
100 bool NeedsFinalization(); 104 bool NeedsFinalization();
101 bool DeclaresGCMixinMethods(); 105 bool DeclaresGCMixinMethods();
102 bool DeclaresLocalTraceMethod(); 106 bool DeclaresLocalTraceMethod();
103 TracingStatus NeedsTracing(Edge::NeedsTracingOption); 107 TracingStatus NeedsTracing(Edge::NeedsTracingOption);
104 clang::CXXMethodDecl* InheritsNonVirtualTrace(); 108 clang::CXXMethodDecl* InheritsNonVirtualTrace();
105 bool IsConsideredAbstract(); 109 bool IsConsideredAbstract();
106 110
(...skipping 18 matching lines...) Expand all
125 Bases* bases_; 129 Bases* bases_;
126 Fields* fields_; 130 Fields* fields_;
127 131
128 enum CachedBool { kFalse = 0, kTrue = 1, kNotComputed = 2 }; 132 enum CachedBool { kFalse = 0, kTrue = 1, kNotComputed = 2 };
129 CachedBool is_stack_allocated_; 133 CachedBool is_stack_allocated_;
130 CachedBool is_non_newable_; 134 CachedBool is_non_newable_;
131 CachedBool is_only_placement_newable_; 135 CachedBool is_only_placement_newable_;
132 CachedBool does_need_finalization_; 136 CachedBool does_need_finalization_;
133 CachedBool has_gc_mixin_methods_; 137 CachedBool has_gc_mixin_methods_;
134 CachedBool is_declaring_local_trace_; 138 CachedBool is_declaring_local_trace_;
139 CachedBool is_eagerly_finalized_;
135 140
136 bool determined_trace_methods_; 141 bool determined_trace_methods_;
137 clang::CXXMethodDecl* trace_method_; 142 clang::CXXMethodDecl* trace_method_;
138 clang::CXXMethodDecl* trace_dispatch_method_; 143 clang::CXXMethodDecl* trace_dispatch_method_;
139 clang::CXXMethodDecl* finalize_dispatch_method_; 144 clang::CXXMethodDecl* finalize_dispatch_method_;
140 145
141 bool is_gc_derived_; 146 bool is_gc_derived_;
142 147
143 std::vector<std::string> gc_base_names_; 148 std::vector<std::string> gc_base_names_;
144 149
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 181 }
177 } 182 }
178 } 183 }
179 184
180 private: 185 private:
181 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; 186 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache;
182 Cache cache_; 187 Cache cache_;
183 }; 188 };
184 189
185 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ 190 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/JsonWriter.h ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698