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

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

Issue 270623009: Blink GC plugin: remove temporary exceptions for the TreeShared/Node hierarchy. (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
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.h » ('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 defines the names used by GC infrastructure. 5 // This file defines the names used by GC infrastructure.
6 6
7 #ifndef TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ 7 #ifndef TOOLS_BLINK_GC_PLUGIN_CONFIG_H_
8 #define TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ 8 #define TOOLS_BLINK_GC_PLUGIN_CONFIG_H_
9 9
10 #include "clang/AST/AST.h" 10 #include "clang/AST/AST.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return name == "GarbageCollectedFinalized" || 104 return name == "GarbageCollectedFinalized" ||
105 name == "RefCountedGarbageCollected"; 105 name == "RefCountedGarbageCollected";
106 } 106 }
107 107
108 static bool IsGCBase(const std::string& name) { 108 static bool IsGCBase(const std::string& name) {
109 return name == "GarbageCollected" || 109 return name == "GarbageCollected" ||
110 IsGCFinalizedBase(name) || 110 IsGCFinalizedBase(name) ||
111 IsGCMixinBase(name); 111 IsGCMixinBase(name);
112 } 112 }
113 113
114 static bool IsTreeSharedBase(const std::string& name) {
115 return name == "TreeShared";
116 }
117
118 static bool IsAnnotated(clang::Decl* decl, const std::string& anno) { 114 static bool IsAnnotated(clang::Decl* decl, const std::string& anno) {
119 clang::AnnotateAttr* attr = decl->getAttr<clang::AnnotateAttr>(); 115 clang::AnnotateAttr* attr = decl->getAttr<clang::AnnotateAttr>();
120 return attr && (attr->getAnnotation() == anno); 116 return attr && (attr->getAnnotation() == anno);
121 } 117 }
122 118
123 static bool IsStackAnnotated(clang::Decl* decl) { 119 static bool IsStackAnnotated(clang::Decl* decl) {
124 return IsAnnotated(decl, "blink_stack_allocated"); 120 return IsAnnotated(decl, "blink_stack_allocated");
125 } 121 }
126 122
127 static bool IsIgnoreAnnotated(clang::Decl* decl) { 123 static bool IsIgnoreAnnotated(clang::Decl* decl) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 164 }
169 165
170 static bool EndsWith(const std::string& str, const std::string& suffix) { 166 static bool EndsWith(const std::string& str, const std::string& suffix) {
171 if (suffix.size() > str.size()) 167 if (suffix.size() > str.size())
172 return false; 168 return false;
173 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; 169 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
174 } 170 }
175 }; 171 };
176 172
177 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ 173 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698