Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: Source/bindings/scripts/interface_dependency_resolver.py

Issue 938403007: Support [TypeChecking] on dependent/partial interfaces. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 30 matching lines...) Expand all
41 41
42 # The following extended attributes can be applied to a dependency interface, 42 # The following extended attributes can be applied to a dependency interface,
43 # and are then applied to the individual members when merging. 43 # and are then applied to the individual members when merging.
44 # Note that this moves the extended attribute from the interface to the member, 44 # Note that this moves the extended attribute from the interface to the member,
45 # which changes the semantics and yields different code than the same extended 45 # which changes the semantics and yields different code than the same extended
46 # attribute on the main interface. 46 # attribute on the main interface.
47 DEPENDENCY_EXTENDED_ATTRIBUTES = set([ 47 DEPENDENCY_EXTENDED_ATTRIBUTES = set([
48 'Conditional', 48 'Conditional',
49 'PerContextEnabled', 49 'PerContextEnabled',
50 'RuntimeEnabled', 50 'RuntimeEnabled',
51 'TypeChecking',
51 ]) 52 ])
52 53
53 54
54 class InterfaceDependencyResolver(object): 55 class InterfaceDependencyResolver(object):
55 def __init__(self, interfaces_info, reader): 56 def __init__(self, interfaces_info, reader):
56 """Initialize dependency resolver. 57 """Initialize dependency resolver.
57 58
58 Args: 59 Args:
59 interfaces_info: 60 interfaces_info:
60 dict of interfaces information, from compute_dependencies.py 61 dict of interfaces information, from compute_dependencies.py
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 merged_extended_attributes['PartialInterfaceImplementedAs'] = ( 274 merged_extended_attributes['PartialInterfaceImplementedAs'] = (
274 dependency_interface.extended_attributes.get( 275 dependency_interface.extended_attributes.get(
275 'ImplementedAs', dependency_interface_basename)) 276 'ImplementedAs', dependency_interface_basename))
276 277
277 for attribute in dependency_interface.attributes: 278 for attribute in dependency_interface.attributes:
278 attribute.extended_attributes.update(merged_extended_attributes) 279 attribute.extended_attributes.update(merged_extended_attributes)
279 for constant in dependency_interface.constants: 280 for constant in dependency_interface.constants:
280 constant.extended_attributes.update(merged_extended_attributes) 281 constant.extended_attributes.update(merged_extended_attributes)
281 for operation in dependency_interface.operations: 282 for operation in dependency_interface.operations:
282 operation.extended_attributes.update(merged_extended_attributes) 283 operation.extended_attributes.update(merged_extended_attributes)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698