OLD | NEW |
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2447 | 2447 |
2448 my $parameterCheckString = ""; | 2448 my $parameterCheckString = ""; |
2449 my $paramIndex = 0; | 2449 my $paramIndex = 0; |
2450 my %replacements = (); | 2450 my %replacements = (); |
2451 | 2451 |
2452 foreach my $parameter (@{$function->parameters}) { | 2452 foreach my $parameter (@{$function->parameters}) { |
2453 my $humanFriendlyIndex = $paramIndex + 1; | 2453 my $humanFriendlyIndex = $paramIndex + 1; |
2454 my $nativeType = GetNativeType($parameter->type, $parameter->extendedAtt
ributes, "parameter"); | 2454 my $nativeType = GetNativeType($parameter->type, $parameter->extendedAtt
ributes, "parameter"); |
2455 | 2455 |
2456 # Optional arguments without [Default=...] should generate an early call
with fewer arguments. | 2456 # Optional arguments without [Default=...] should generate an early call
with fewer arguments. |
2457 # Optional arguments with [Optional=...] should not generate the early c
all. | |
2458 # Optional Dictionary arguments always considered to have default of emp
ty dictionary. | 2457 # Optional Dictionary arguments always considered to have default of emp
ty dictionary. |
2459 if ($parameter->isOptional && !$parameter->extendedAttributes->{"Default
"} && $nativeType ne "Dictionary" && !IsCallbackInterface($parameter->type)) { | 2458 if ($parameter->isOptional && !$parameter->extendedAttributes->{"Default
"} && $nativeType ne "Dictionary" && !IsCallbackInterface($parameter->type)) { |
2460 $parameterCheckString .= <<END; | 2459 $parameterCheckString .= <<END; |
2461 if (UNLIKELY(args.Length() <= $paramIndex)) { | 2460 if (UNLIKELY(args.Length() <= $paramIndex)) { |
2462 END | 2461 END |
2463 $parameterCheckString .= GenerateFunctionCallString($function, $para
mIndex, " " x 2, $interface, $forMainWorldSuffix, %replacements); | 2462 $parameterCheckString .= GenerateFunctionCallString($function, $para
mIndex, " " x 2, $interface, $forMainWorldSuffix, %replacements); |
2464 $parameterCheckString .= <<END; | 2463 $parameterCheckString .= <<END; |
2465 return; | 2464 return; |
2466 } | 2465 } |
2467 END | 2466 END |
(...skipping 3806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6274 | 6273 |
6275 return 1 if $interface->extendedAttributes->{"CustomToV8"}; | 6274 return 1 if $interface->extendedAttributes->{"CustomToV8"}; |
6276 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; | 6275 return 1 if $interface->extendedAttributes->{"SpecialWrapFor"}; |
6277 return 1 if InheritsInterface($interface, "Document"); | 6276 return 1 if InheritsInterface($interface, "Document"); |
6278 return 1 if SVGTypeNeedsToHoldContextElement($interface->name); | 6277 return 1 if SVGTypeNeedsToHoldContextElement($interface->name); |
6279 | 6278 |
6280 return 0; | 6279 return 0; |
6281 } | 6280 } |
6282 | 6281 |
6283 1; | 6282 1; |
OLD | NEW |