| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 def gc_type(idl_type): | 307 def gc_type(idl_type): |
| 308 if idl_type.is_garbage_collected: | 308 if idl_type.is_garbage_collected: |
| 309 return 'GarbageCollectedObject' | 309 return 'GarbageCollectedObject' |
| 310 if idl_type.is_will_be_garbage_collected: | 310 if idl_type.is_will_be_garbage_collected: |
| 311 return 'WillBeGarbageCollectedObject' | 311 return 'WillBeGarbageCollectedObject' |
| 312 return 'RefCountedObject' | 312 return 'RefCountedObject' |
| 313 | 313 |
| 314 IdlTypeBase.gc_type = property(gc_type) | 314 IdlTypeBase.gc_type = property(gc_type) |
| 315 | 315 |
| 316 | 316 |
| 317 def is_traceable(idl_type): |
| 318 return (idl_type.is_garbage_collected |
| 319 or idl_type.is_will_be_garbage_collected) |
| 320 |
| 321 IdlTypeBase.is_traceable = property(is_traceable) |
| 322 |
| 323 |
| 317 ################################################################################ | 324 ################################################################################ |
| 318 # Includes | 325 # Includes |
| 319 ################################################################################ | 326 ################################################################################ |
| 320 | 327 |
| 321 def includes_for_cpp_class(class_name, relative_dir_posix): | 328 def includes_for_cpp_class(class_name, relative_dir_posix): |
| 322 return set([posixpath.join('bindings', relative_dir_posix, class_name + '.h'
)]) | 329 return set([posixpath.join('bindings', relative_dir_posix, class_name + '.h'
)]) |
| 323 | 330 |
| 324 | 331 |
| 325 INCLUDES_FOR_TYPE = { | 332 INCLUDES_FOR_TYPE = { |
| 326 'object': set(), | 333 'object': set(), |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 | 864 |
| 858 | 865 |
| 859 def is_explicit_nullable(idl_type): | 866 def is_explicit_nullable(idl_type): |
| 860 # Nullable type that isn't implicit nullable (see above.) For such types, | 867 # Nullable type that isn't implicit nullable (see above.) For such types, |
| 861 # we use Nullable<T> or similar explicit ways to represent a null value. | 868 # we use Nullable<T> or similar explicit ways to represent a null value. |
| 862 return idl_type.is_nullable and not idl_type.is_implicit_nullable | 869 return idl_type.is_nullable and not idl_type.is_implicit_nullable |
| 863 | 870 |
| 864 IdlTypeBase.is_implicit_nullable = property(is_implicit_nullable) | 871 IdlTypeBase.is_implicit_nullable = property(is_implicit_nullable) |
| 865 IdlUnionType.is_implicit_nullable = False | 872 IdlUnionType.is_implicit_nullable = False |
| 866 IdlTypeBase.is_explicit_nullable = property(is_explicit_nullable) | 873 IdlTypeBase.is_explicit_nullable = property(is_explicit_nullable) |
| OLD | NEW |