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

Side by Side Diff: Source/build/scripts/templates/MakeNames.cpp.tmpl

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more FIXME Created 6 years, 8 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 {% from "macros.tmpl" import license -%} 1 {% from "macros.tmpl" import license %}
2 {{ license() }} 2 {{ license() }}
3 3
4 #include "config.h" 4 #include "config.h"
5 5
6 #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC 6 #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC
7 #define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1 7 #define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1
8 #endif 8 #endif
9 9
10 #include "{{namespace}}Names.h" 10 #include "{{namespace}}Names.h"
11 11
12 #include "wtf/StaticConstructors.h" 12 #include "wtf/StaticConstructors.h"
13 13
14 namespace WebCore { 14 namespace WebCore {
15 namespace {{namespace}}Names { 15 namespace {{namespace}}Names {
16 16
17 using namespace WTF; 17 using namespace WTF;
18 18 {# FIXME: add blank line #}
19 {%- for entry in entries|sort %} 19 {% for entry in entries|sort %}
20 {%- if export %} 20 {% if export %}
21 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}Storage) 21 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}Storage)
22 {{export}} const AtomicString& {{entry|symbol}} = *reinterpret_cast<const Atomic String*>(&{{entry|symbol}}Storage); 22 {{export}} const AtomicString& {{entry|symbol}} = *reinterpret_cast<const Atomic String*>(&{{entry|symbol}}Storage);
23 {%- else %} 23 {% else %}
24 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}) 24 DEFINE_GLOBAL(AtomicString, {{entry|symbol}})
25 {%- endif %} 25 {% endif %}
26 {%- endfor %} 26 {% endfor %}
27 27
28 void init() 28 void init()
29 { 29 {
30 {%- for entry in entries|sort %} 30 {% for entry in entries|sort %}
31 StringImpl* {{entry|symbol}}Impl = StringImpl::createStatic("{{entry|cpp_nam e}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}}); 31 StringImpl* {{entry|symbol}}Impl = StringImpl::createStatic("{{entry|cpp_nam e}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}});
32 {%- endfor %} 32 {% endfor %}
33 33 {# FIXME: add blank line #}
34 34 {% for entry in entries|sort %}
35 {%- for entry in entries|sort %}
36 new ((void*)&{{entry|symbol}}) AtomicString({{entry|symbol}}Impl); 35 new ((void*)&{{entry|symbol}}) AtomicString({{entry|symbol}}Impl);
37 {%- endfor %} 36 {% endfor %}
38 } 37 }
39 38
40 } // {{namespace}} 39 } // {{namespace}}
41 } // WebCore 40 } // WebCore
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/InternalSettingsGenerated.idl.tmpl ('k') | Source/build/scripts/templates/MakeNames.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698