OLD | NEW |
---|---|
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
767 # • an interface type that V implements | 767 # • an interface type that V implements |
768 # (Unlike most of these tests, this can return multiple methods, since we | 768 # (Unlike most of these tests, this can return multiple methods, since we |
769 # test if it implements an interface. Thus we need a for loop, not a next.) | 769 # test if it implements an interface. Thus we need a for loop, not a next.) |
770 # (We distinguish wrapper types from built-in interface types.) | 770 # (We distinguish wrapper types from built-in interface types.) |
771 for idl_type, method in ((idl_type, method) | 771 for idl_type, method in ((idl_type, method) |
772 for idl_type, method in idl_types_methods | 772 for idl_type, method in idl_types_methods |
773 if idl_type.is_wrapper_type): | 773 if idl_type.is_wrapper_type): |
774 test = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate())'.forma t(idl_type=idl_type.base_type, cpp_value=cpp_value) | 774 test = 'V8{idl_type}::hasInstance({cpp_value}, info.GetIsolate())'.forma t(idl_type=idl_type.base_type, cpp_value=cpp_value) |
775 yield test, method | 775 yield test, method |
776 | 776 |
777 for argument in arguments: | |
778 if argument['idl_type_object'].is_wrapper_type: | |
779 argument['type_checked_already'] = True | |
Jens Widell
2014/09/29 10:04:45
This is not correct. Only an argument that is dire
| |
780 | |
781 | |
777 # 8. Otherwise: if V is any kind of object except for a native Date object, | 782 # 8. Otherwise: if V is any kind of object except for a native Date object, |
778 # a native RegExp object, and there is an entry in S that has one of the | 783 # a native RegExp object, and there is an entry in S that has one of the |
779 # following types at position i of its type list, | 784 # following types at position i of its type list, |
780 # • an array type | 785 # • an array type |
781 # • a sequence type | 786 # • a sequence type |
782 # ... | 787 # ... |
783 # • a dictionary | 788 # • a dictionary |
784 # | 789 # |
785 # FIXME: | 790 # FIXME: |
786 # We don't strictly follow the algorithm here. The algorithm says "remove | 791 # We don't strictly follow the algorithm here. The algorithm says "remove |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1154 deleter = next( | 1159 deleter = next( |
1155 method | 1160 method |
1156 for method in interface.operations | 1161 for method in interface.operations |
1157 if ('deleter' in method.specials and | 1162 if ('deleter' in method.specials and |
1158 len(method.arguments) == 1 and | 1163 len(method.arguments) == 1 and |
1159 str(method.arguments[0].idl_type) == 'DOMString')) | 1164 str(method.arguments[0].idl_type) == 'DOMString')) |
1160 except StopIteration: | 1165 except StopIteration: |
1161 return None | 1166 return None |
1162 | 1167 |
1163 return property_deleter(deleter) | 1168 return property_deleter(deleter) |
OLD | NEW |