| OLD | NEW |
| 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}}{{suffix}}Names.h" | 10 #include "{{namespace}}{{suffix}}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 |
| 19 {% for entry in entries|sort %} | 19 {% for entry in entries|sort %} |
| 20 {% filter enable_conditional(entry.Conditional) %} |
| 20 {% if export %} | 21 {% if export %} |
| 21 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}Storage) | 22 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}Storage) |
| 22 {{export}} const AtomicString& {{entry|symbol}} = *reinterpret_cast<const Atomic
String*>(&{{entry|symbol}}Storage); | 23 {{export}} const AtomicString& {{entry|symbol}} = *reinterpret_cast<const Atomic
String*>(&{{entry|symbol}}Storage); |
| 23 {% else %} | 24 {% else %} |
| 24 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}) | 25 DEFINE_GLOBAL(AtomicString, {{entry|symbol}}) |
| 25 {% endif %} | 26 {% endif %} |
| 27 {% endfilter %} |
| 26 {% endfor %} | 28 {% endfor %} |
| 27 | 29 |
| 28 void init{{suffix}}() | 30 void init{{suffix}}() |
| 29 { | 31 { |
| 30 {% for entry in entries|sort %} | 32 {% for entry in entries|sort %} |
| 33 {% filter enable_conditional(entry.Conditional) %} |
| 31 StringImpl* {{entry|symbol}}Impl = StringImpl::createStatic("{{entry|cpp_nam
e}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}}); | 34 StringImpl* {{entry|symbol}}Impl = StringImpl::createStatic("{{entry|cpp_nam
e}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}}); |
| 35 {% endfilter %} |
| 32 {% endfor %} | 36 {% endfor %} |
| 33 | 37 |
| 34 {% for entry in entries|sort %} | 38 {% for entry in entries|sort %} |
| 39 {% filter enable_conditional(entry.Conditional) %} |
| 35 new ((void*)&{{entry|symbol}}) AtomicString({{entry|symbol}}Impl); | 40 new ((void*)&{{entry|symbol}}) AtomicString({{entry|symbol}}Impl); |
| 41 {% endfilter %} |
| 36 {% endfor %} | 42 {% endfor %} |
| 37 } | 43 } |
| 38 | 44 |
| 39 } // {{namespace}}Names | 45 } // {{namespace}}Names |
| 40 } // WebCore | 46 } // WebCore |
| OLD | NEW |