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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/MakeNames.h.tmpl

Issue 1363653006: Reserve capacity for static strings HashMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 {% from "macros.tmpl" import license %} 1 {% from "macros.tmpl" import license %}
2 {{ license() }} 2 {{ license() }}
3 3
4 #ifndef {{namespace}}{{suffix}}Names_h 4 #ifndef {{namespace}}{{suffix}}Names_h
5 #define {{namespace}}{{suffix}}Names_h 5 #define {{namespace}}{{suffix}}Names_h
6 6
7 {% set symbol_export = '%s ' % export if export else '' %} 7 {% set symbol_export = '%s ' % export if export else '' %}
8 {% if suffix %} 8 {% if suffix %}
9 #include "core/{{namespace}}Names.h" 9 #include "core/{{namespace}}Names.h"
10 {% else %} 10 {% else %}
(...skipping 14 matching lines...) Expand all
25 25
26 namespace blink { 26 namespace blink {
27 namespace {{namespace}}Names { 27 namespace {{namespace}}Names {
28 28
29 {% for entry in entries|sort %} 29 {% for entry in entries|sort %}
30 {% filter enable_conditional(entry.Conditional) %} 30 {% filter enable_conditional(entry.Conditional) %}
31 {{symbol_export}}extern const WTF::AtomicString& {{entry|symbol}}; 31 {{symbol_export}}extern const WTF::AtomicString& {{entry|symbol}};
32 {% endfilter %} 32 {% endfilter %}
33 {% endfor %} 33 {% endfor %}
34 34
35 const unsigned {{namespace}}{{suffix}}NamesCount = {{entries|length}};
36
35 {{symbol_export}}void init{{suffix}}(); 37 {{symbol_export}}void init{{suffix}}();
36 38
37 } // {{namespace}}Names 39 } // {{namespace}}Names
38 } // namespace blink 40 } // namespace blink
39 41
40 #endif 42 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698