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

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

Issue 401613002: clang/blink_gc_plugin: Replace 'WebCore' with 'blink' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 name == "PersistentHeapHashMap"; 85 name == "PersistentHeapHashMap";
86 } 86 }
87 87
88 static bool IsHashMap(const std::string& name) { 88 static bool IsHashMap(const std::string& name) {
89 return name == "HashMap" || 89 return name == "HashMap" ||
90 name == "HeapHashMap" || 90 name == "HeapHashMap" ||
91 name == "PersistentHeapHashMap"; 91 name == "PersistentHeapHashMap";
92 } 92 }
93 93
94 // Following http://crrev.com/369633033 (Blink r177436), 94 // Following http://crrev.com/369633033 (Blink r177436),
95 // ignore WebCore::ScriptWrappable's destructor. 95 // ignore blink::ScriptWrappable's destructor.
96 // FIXME: remove when its non-Oilpan destructor is removed. 96 // FIXME: remove when its non-Oilpan destructor is removed.
97 static bool HasIgnorableDestructor(const std::string& ns, 97 static bool HasIgnorableDestructor(const std::string& ns,
98 const std::string& name) { 98 const std::string& name) {
99 return ns == "WebCore" && name == "ScriptWrappable"; 99 return ns == "blink" && name == "ScriptWrappable";
100 } 100 }
101 101
102 // Assumes name is a valid collection name. 102 // Assumes name is a valid collection name.
103 static size_t CollectionDimension(const std::string& name) { 103 static size_t CollectionDimension(const std::string& name) {
104 return (IsHashMap(name) || name == "pair") ? 2 : 1; 104 return (IsHashMap(name) || name == "pair") ? 2 : 1;
105 } 105 }
106 106
107 static bool IsGCMixinBase(const std::string& name) { 107 static bool IsGCMixinBase(const std::string& name) {
108 return name == "GarbageCollectedMixin"; 108 return name == "GarbageCollectedMixin";
109 } 109 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 static bool EndsWith(const std::string& str, const std::string& suffix) { 174 static bool EndsWith(const std::string& str, const std::string& suffix) {
175 if (suffix.size() > str.size()) 175 if (suffix.size() > str.size())
176 return false; 176 return false;
177 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; 177 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
178 } 178 }
179 }; 179 };
180 180
181 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ 181 #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.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698