OLD | NEW |
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" |
11 | 11 |
12 const char kNewOperatorName[] = "operator new"; | 12 const char kNewOperatorName[] = "operator new"; |
| 13 const char kCreateName[] = "create"; |
13 const char kTraceName[] = "trace"; | 14 const char kTraceName[] = "trace"; |
| 15 const char kFinalizeName[] = "finalize"; |
14 const char kTraceAfterDispatchName[] = "traceAfterDispatch"; | 16 const char kTraceAfterDispatchName[] = "traceAfterDispatch"; |
15 const char kRegisterWeakMembersName[] = "registerWeakMembers"; | 17 const char kRegisterWeakMembersName[] = "registerWeakMembers"; |
16 const char kHeapAllocatorName[] = "HeapAllocator"; | 18 const char kHeapAllocatorName[] = "HeapAllocator"; |
17 | 19 |
18 class Config { | 20 class Config { |
19 public: | 21 public: |
20 static bool IsMember(const std::string& name) { | 22 static bool IsMember(const std::string& name) { |
21 return name == "Member"; | 23 return name == "Member"; |
22 } | 24 } |
23 | 25 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 136 } |
135 | 137 |
136 static bool EndsWith(const std::string& str, const std::string& suffix) { | 138 static bool EndsWith(const std::string& str, const std::string& suffix) { |
137 if (suffix.size() > str.size()) | 139 if (suffix.size() > str.size()) |
138 return false; | 140 return false; |
139 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; | 141 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; |
140 } | 142 } |
141 }; | 143 }; |
142 | 144 |
143 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ | 145 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ |
OLD | NEW |