blob: d008b79344f45040130574ed052a6d7b8e0983e3 [file] [log] [blame]
{% from "macros.tmpl" import license -%}
{{ license() }}
#include "config.h"
#ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC
#define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1
#endif
#include "{{namespace}}Names.h"
#include "wtf/StaticConstructors.h"
namespace WebCore {
namespace {{namespace}}Names {
using namespace WTF;
{%- for entry in entries|sort %}
DEFINE_GLOBAL(AtomicString, {{entry|cpp_name}})
{%- endfor %}
void init()
{
{%- for entry in entries|sort %}
StringImpl* {{entry|cpp_name}}Impl = StringImpl::createStatic("{{entry|cpp_name}}", {{entry|cpp_name|length}}, {{entry|cpp_name|hash}});
{%- endfor %}
{%- for entry in entries|sort %}
new ((void*)&{{entry|cpp_name}}) AtomicString({{entry|cpp_name}}Impl);
{%- endfor %}
}
} // {{namespace}}
} // WebCore