| {% from "macros.tmpl" import license %} |
| {{ license() }} |
| |
| #include "config.h" |
| |
| #include "{{namespace}}{{suffix}}Names.h" |
| |
| #include "wtf/StaticConstructors.h" |
| |
| namespace blink { |
| namespace {{namespace}}Names { |
| |
| using namespace WTF; |
| |
| {% for entry in entries|sort %} |
| {% filter enable_conditional(entry.Conditional) %} |
| DEFINE_GLOBAL(AtomicString, {{entry|symbol}}) |
| {% endfilter %} |
| {% endfor %} |
| |
| void init{{suffix}}() |
| { |
| {% for entry in entries|sort %} |
| {% filter enable_conditional(entry.Conditional) %} |
| StringImpl* {{entry|symbol}}Impl = StringImpl::createStatic("{{entry|cpp_name}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}}); |
| {% endfilter %} |
| {% endfor %} |
| |
| {% for entry in entries|sort %} |
| {% filter enable_conditional(entry.Conditional) %} |
| new ((void*)&{{entry|symbol}}) AtomicString({{entry|symbol}}Impl); |
| {% endfilter %} |
| {% endfor %} |
| } |
| |
| } // {{namespace}}Names |
| } // namespace blink |