| OLD | NEW |
| 1 {% from "macros.tmpl" import license %} | 1 {% from "macros.tmpl" import license %} |
| 2 {{ license() }} | 2 {{ license() }} |
| 3 | 3 |
| 4 #include "{{namespace}}{{suffix}}Names.h" | 4 #include "{{namespace}}{{suffix}}Names.h" |
| 5 | 5 |
| 6 #include "wtf/StdLibExtras.h" | 6 #include "wtf/StdLibExtras.h" |
| 7 | 7 |
| 8 // Generated from: | 8 // Generated from: |
| 9 {% for entry in in_files|sort %} | 9 {% for entry in in_files|sort %} |
| 10 // - {{entry}} | 10 // - {{entry}} |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 unsigned char length; | 28 unsigned char length; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 static const NameEntry kNames[] = { | 31 static const NameEntry kNames[] = { |
| 32 {% for entry in entries|sort(attribute='name', case_sensitive=True) %} | 32 {% for entry in entries|sort(attribute='name', case_sensitive=True) %} |
| 33 { "{{entry|cpp_name}}", {{entry|cpp_name|hash}}, {{entry|cpp_name|length}} }
, | 33 { "{{entry|cpp_name}}", {{entry|cpp_name|hash}}, {{entry|cpp_name|length}} }
, |
| 34 {% endfor %} | 34 {% endfor %} |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNames); i++) { | 37 for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNames); i++) { |
| 38 StringImpl* stringImpl = StringImpl::createStatic(kNames[i].name, kNames[i].
length, kNames[i].hash); | 38 StringImpl* stringImpl = StringImpl::CreateStatic(kNames[i].name, kNames[i].
length, kNames[i].hash); |
| 39 void* address = reinterpret_cast<AtomicString*>(&{{suffix}}NamesStorage) + i
; | 39 void* address = reinterpret_cast<AtomicString*>(&{{suffix}}NamesStorage) + i
; |
| 40 new (address) AtomicString(stringImpl); | 40 new (address) AtomicString(stringImpl); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // {{namespace}}Names | 44 } // {{namespace}}Names |
| 45 } // namespace blink | 45 } // namespace blink |
| OLD | NEW |