Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 {# FIXME: remove all the conditional_string blocks once test removed #} | |
| 2 {# FIXME: should use reflected_name instead of name #} | |
| 3 {% macro class_constants() %} | |
|
haraken
2013/08/26 09:33:40
I think you can remove class_constants() and move
Nils Barth (inactive)
2013/08/27 02:59:27
Got it; it's just a variable used in the installCo
| |
| 4 static const V8DOMConfiguration::ConstantConfiguration {{v8_class_name}}Constant s[] = { | |
| 5 {% for constant in constants %} | |
| 6 {% if not constant.enabled_at_runtime %} | |
| 7 {% if constant.conditional_string %} | |
| 8 #if {{constant.conditional_string}} | |
| 9 {% endif %} | |
| 10 {"{{constant.name}}", {{constant.value}}}, | |
| 11 {% if constant.conditional_string %} | |
| 12 #endif // {{constant.conditional_string}} | |
| 13 {% endif %} | |
| 14 {% endif %}{# not constant.enabled_at_runtime #} | |
| 15 {% endfor %} | |
| 16 }; | |
| 17 {% if not do_not_check_constants %} | |
| 18 | |
| 19 {% for constant in constants %} | |
| 20 {% if constant.conditional_string %} | |
| 21 #if {{constant.conditional_string}} | |
| 22 {% endif %} | |
| 23 {# FIXME | |
| 24 {{cpp_class_name}}Enum{{constant.name_reflect}}IsWrongUseDoNotCheckConstants | |
| 25 => | |
| 26 TheValueOf{{cpp_class_name}}::{{constant.name_reflect}}Doesn'tMatchWithImplement ation | |
| 27 #} | |
| 28 COMPILE_ASSERT({{constant.value}} == {{cpp_class_name}}::{{constant.reflected_na me}}, {{cpp_class_name}}Enum{{constant.reflected_name}}IsWrongUseDoNotCheckConst ants); | |
| 29 {% if constant.conditional_string %} | |
| 30 #endif // {{constant.conditional_string}} | |
| 31 {% endif %} | |
| 32 {% endfor %} | |
| 33 {% endif %}{# not do_not_check_constants #} | |
| 34 {% endmacro %} | |
| 35 | |
| 36 | |
| 37 {##############################################################################} | |
| 38 {% macro constant_configuration(constant) %} | |
|
haraken
2013/08/26 09:33:40
constant_configuration => install_runtime_enabled_
Nils Barth (inactive)
2013/08/27 02:59:27
Actually merged into install_constants!
| |
| 39 {% if constant.enabled_at_runtime %} | |
| 40 {% if constant.conditional_string %} | |
| 41 #if {{constant.conditional_string}} | |
| 42 {% endif %} | |
| 43 if ({{constant.enable_function}}()) { | |
| 44 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"{{constant.name}}", static_cast<signed int>({{constant.value}})}; | |
| 45 V8DOMConfiguration::installConstants(desc, proto, &constantConfiguration , 1, isolate); | |
| 46 } | |
| 47 {% if constant.conditional_string %} | |
| 48 #endif // {{constant.conditional_string}} | |
| 49 {%- endif %} | |
| 50 {% endif %} | |
| 51 {% endmacro %} | |
| 52 | |
| 53 | |
| 54 {##############################################################################} | |
| 55 {% macro install_constants() %} | |
| 56 V8DOMConfiguration::installConstants(desc, proto, {{v8_class_name}}Constants, WT F_ARRAY_LENGTH({{v8_class_name}}Constants), isolate); | |
| 57 {%- endmacro %} | |
| OLD | NEW |