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

Side by Side Diff: sky/engine/bindings2/scripts/interface_dependency_resolver.py

Issue 914413004: Add a new bindings2/scripts directory for Dart bindings (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove idlrenderer.py it's not used 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
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 26 matching lines...) Expand all
37 """ 37 """
38 38
39 import os.path 39 import os.path
40 40
41 # The following extended attributes can be applied to a dependency interface, 41 # The following extended attributes can be applied to a dependency interface,
42 # and are then applied to the individual members when merging. 42 # and are then applied to the individual members when merging.
43 # Note that this moves the extended attribute from the interface to the member, 43 # Note that this moves the extended attribute from the interface to the member,
44 # which changes the semantics and yields different code than the same extended 44 # which changes the semantics and yields different code than the same extended
45 # attribute on the main interface. 45 # attribute on the main interface.
46 DEPENDENCY_EXTENDED_ATTRIBUTES = set([ 46 DEPENDENCY_EXTENDED_ATTRIBUTES = set([
47 'Conditional',
48 'RuntimeEnabled',
49 ]) 47 ])
50 48
51 49
52 class InterfaceDependencyResolver(object): 50 class InterfaceDependencyResolver(object):
53 def __init__(self, interfaces_info, reader): 51 def __init__(self, interfaces_info, reader):
54 """Initialize dependency resolver. 52 """Initialize dependency resolver.
55 53
56 Args: 54 Args:
57 interfaces_info: 55 interfaces_info:
58 dict of interfaces information, from compute_dependencies.py 56 dict of interfaces information, from compute_dependencies.py
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 merged_extended_attributes['PartialInterfaceImplementedAs'] = ( 170 merged_extended_attributes['PartialInterfaceImplementedAs'] = (
173 dependency_interface.extended_attributes.get( 171 dependency_interface.extended_attributes.get(
174 'ImplementedAs', dependency_interface_basename)) 172 'ImplementedAs', dependency_interface_basename))
175 173
176 for attribute in dependency_interface.attributes: 174 for attribute in dependency_interface.attributes:
177 attribute.extended_attributes.update(merged_extended_attributes) 175 attribute.extended_attributes.update(merged_extended_attributes)
178 for constant in dependency_interface.constants: 176 for constant in dependency_interface.constants:
179 constant.extended_attributes.update(merged_extended_attributes) 177 constant.extended_attributes.update(merged_extended_attributes)
180 for operation in dependency_interface.operations: 178 for operation in dependency_interface.operations:
181 operation.extended_attributes.update(merged_extended_attributes) 179 operation.extended_attributes.update(merged_extended_attributes)
OLDNEW
« no previous file with comments | « sky/engine/bindings2/scripts/idlnode.py ('k') | sky/engine/bindings2/scripts/templates/attributes_cpp.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698