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 273873002: Blink GC plugin: require a trace method if a class derives multiple bases that need tracing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 20 matching lines...) Expand all
31 bool traced_; 31 bool traced_;
32 }; 32 };
33 33
34 class BasePoint : public GraphPoint { 34 class BasePoint : public GraphPoint {
35 public: 35 public:
36 BasePoint(const clang::CXXBaseSpecifier& spec, 36 BasePoint(const clang::CXXBaseSpecifier& spec,
37 RecordInfo* info, 37 RecordInfo* info,
38 const TracingStatus& status) 38 const TracingStatus& status)
39 : spec_(spec), info_(info), status_(status) {} 39 : spec_(spec), info_(info), status_(status) {}
40 const TracingStatus NeedsTracing() { return status_; } 40 const TracingStatus NeedsTracing() { return status_; }
41 // Needed to change the status of bases with a pure-virtual trace.
42 void MarkUnneeded() { status_ = TracingStatus::Unneeded(); }
43 const clang::CXXBaseSpecifier& spec() { return spec_; } 41 const clang::CXXBaseSpecifier& spec() { return spec_; }
44 RecordInfo* info() { return info_; } 42 RecordInfo* info() { return info_; }
45 43
46 private: 44 private:
47 const clang::CXXBaseSpecifier& spec_; 45 const clang::CXXBaseSpecifier& spec_;
48 RecordInfo* info_; 46 RecordInfo* info_;
49 TracingStatus status_; 47 TracingStatus status_;
50 }; 48 };
51 49
52 class FieldPoint : public GraphPoint { 50 class FieldPoint : public GraphPoint {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 165 }
168 } 166 }
169 } 167 }
170 168
171 private: 169 private:
172 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; 170 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache;
173 Cache cache_; 171 Cache cache_;
174 }; 172 };
175 173
176 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ 174 #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