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 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 push(@andExpression, "${value}->IsNull() || ${value}->IsArray()"
); | 2201 push(@andExpression, "${value}->IsNull() || ${value}->IsArray()"
); |
2202 } else { | 2202 } else { |
2203 push(@andExpression, "${value}->IsArray()"); | 2203 push(@andExpression, "${value}->IsArray()"); |
2204 } | 2204 } |
2205 } elsif (IsWrapperType($type)) { | 2205 } elsif (IsWrapperType($type)) { |
2206 if ($parameter->isNullable) { | 2206 if ($parameter->isNullable) { |
2207 push(@andExpression, "${value}->IsNull() || V8${type}::hasInstan
ce($value, info.GetIsolate(), worldType(info.GetIsolate()))"); | 2207 push(@andExpression, "${value}->IsNull() || V8${type}::hasInstan
ce($value, info.GetIsolate(), worldType(info.GetIsolate()))"); |
2208 } else { | 2208 } else { |
2209 push(@andExpression, "V8${type}::hasInstance($value, info.GetIso
late(), worldType(info.GetIsolate()))"); | 2209 push(@andExpression, "V8${type}::hasInstance($value, info.GetIso
late(), worldType(info.GetIsolate()))"); |
2210 } | 2210 } |
| 2211 } elsif ($nonWrapperTypes{$type}) { |
| 2212 # Non-wrapper types are just objects: we don't distinguish type |
| 2213 # FIXME: If distinguishing non-wrapper type from primitive type, |
| 2214 # the non-wrapper type must appear *first* in the IDL file, |
| 2215 # since we're not adding a !IsObject check to primitive types. |
| 2216 # This can be avoided if compute overloads more sensibly. |
| 2217 if ($parameter->isNullable) { |
| 2218 push(@andExpression, "${value}->IsNull() || ${value}->IsObject()
"); |
| 2219 } else { |
| 2220 push(@andExpression, "${value}->IsObject()"); |
| 2221 } |
2211 } | 2222 } |
2212 | 2223 |
2213 $parameterIndex++; | 2224 $parameterIndex++; |
2214 } | 2225 } |
2215 @andExpression = map { "($_)" } @andExpression; | 2226 @andExpression = map { "($_)" } @andExpression; |
2216 my $res = "(" . join(" && ", @andExpression) . ")"; | 2227 my $res = "(" . join(" && ", @andExpression) . ")"; |
2217 return $res; | 2228 return $res; |
2218 } | 2229 } |
2219 | 2230 |
2220 # As per Web IDL specification, the length of a function Object is | 2231 # As per Web IDL specification, the length of a function Object is |
(...skipping 4172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6393 if ($parameter->type eq "SerializedScriptValue") { | 6404 if ($parameter->type eq "SerializedScriptValue") { |
6394 return 1; | 6405 return 1; |
6395 } elsif (IsIntegerType($parameter->type)) { | 6406 } elsif (IsIntegerType($parameter->type)) { |
6396 return 1; | 6407 return 1; |
6397 } | 6408 } |
6398 } | 6409 } |
6399 return 0; | 6410 return 0; |
6400 } | 6411 } |
6401 | 6412 |
6402 1; | 6413 1; |
OLD | NEW |