| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro generate_method(method, world_suffix) %} | 2 {% macro generate_method(method, world_suffix) %} |
| 3 {% filter conditional(method.conditional_string) %} | 3 {% filter conditional(method.conditional_string) %} |
| 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 5 { | 5 { |
| 6 {# Local variables #} | 6 {# Local variables #} |
| 7 {% if method.has_exception_state %} | 7 {% if method.has_exception_state %} |
| 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
| 9 {% endif %} | 9 {% endif %} |
| 10 {# Overloaded methods have length checked during overload resolution #} | 10 {# Overloaded methods have length checked during overload resolution #} |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 { | 296 { |
| 297 v8::Isolate* isolate = info.GetIsolate(); | 297 v8::Isolate* isolate = info.GetIsolate(); |
| 298 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{overloads
.name}}", "{{interface_name}}", info.Holder(), isolate); | 298 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{overloads
.name}}", "{{interface_name}}", info.Holder(), isolate); |
| 299 {% if overloads.measure_all_as %} | 299 {% if overloads.measure_all_as %} |
| 300 UseCounter::count(callingExecutionContext(isolate), UseCounter::{{overloads.
measure_all_as}}); | 300 UseCounter::count(callingExecutionContext(isolate), UseCounter::{{overloads.
measure_all_as}}); |
| 301 {% endif %} | 301 {% endif %} |
| 302 {% if overloads.deprecate_all_as %} | 302 {% if overloads.deprecate_all_as %} |
| 303 UseCounter::countDeprecation(callingExecutionContext(isolate), UseCounter::{
{overloads.deprecate_all_as}}); | 303 UseCounter::countDeprecation(callingExecutionContext(isolate), UseCounter::{
{overloads.deprecate_all_as}}); |
| 304 {% endif %} | 304 {% endif %} |
| 305 {# First resolve by length #} | 305 {# First resolve by length #} |
| 306 {# FIXME: 2. Initialize argcount to be min(maxarg, n). #} | 306 {# 2. Initialize argcount to be min(maxarg, n). #} |
| 307 {# switch (std::min({{overloads.maxarg}}, info.Length())) { #} | 307 switch (std::min({{overloads.maxarg}}, info.Length())) { |
| 308 switch (info.Length()) { | |
| 309 {# 3. Remove from S all entries whose type list is not of length argcount. #
} | 308 {# 3. Remove from S all entries whose type list is not of length argcount. #
} |
| 310 {% for length, tests_methods in overloads.length_tests_methods %} | 309 {% for length, tests_methods in overloads.length_tests_methods %} |
| 311 case {{length}}: | 310 case {{length}}: |
| 312 {# Then resolve by testing argument #} | 311 {# Then resolve by testing argument #} |
| 313 {% for test, method in tests_methods %} | 312 {% for test, method in tests_methods %} |
| 314 {# 10. If i = d, then: #} | 313 {# 10. If i = d, then: #} |
| 315 if ({{test}}) { | 314 if ({{test}}) { |
| 316 {% if method.measure_as and not overloads.measure_all_as %} | 315 {% if method.measure_as and not overloads.measure_all_as %} |
| 317 UseCounter::count(callingExecutionContext(isolate), UseCounter::{{me
thod.measure_as}}); | 316 UseCounter::count(callingExecutionContext(isolate), UseCounter::{{me
thod.measure_as}}); |
| 318 {% endif %} | 317 {% endif %} |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 {% endfor %} | 513 {% endfor %} |
| 515 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); | 514 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); |
| 516 {% if is_constructor_raises_exception %} | 515 {% if is_constructor_raises_exception %} |
| 517 if (exceptionState.throwIfNeeded()) | 516 if (exceptionState.throwIfNeeded()) |
| 518 return; | 517 return; |
| 519 {% endif %} | 518 {% endif %} |
| 520 | 519 |
| 521 {{generate_constructor_wrapper(constructor) | indent}} | 520 {{generate_constructor_wrapper(constructor) | indent}} |
| 522 } | 521 } |
| 523 {% endmacro %} | 522 {% endmacro %} |
| OLD | NEW |