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

Unified Diff: bindings/scripts/compute_interfaces_info_overall.py

Issue 959933002: Move IDLs to 39 roll (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bindings/scripts/compute_interfaces_info_individual.py ('k') | bindings/scripts/idl_compiler.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bindings/scripts/compute_interfaces_info_overall.py
diff --git a/bindings/scripts/compute_interfaces_info_overall.py b/bindings/scripts/compute_interfaces_info_overall.py
index 658ccfade6f0124a7e48856872002d486e0ff5b6..6e311211ae92b78a02160b5ce58392bcc0f48f64 100755
--- a/bindings/scripts/compute_interfaces_info_overall.py
+++ b/bindings/scripts/compute_interfaces_info_overall.py
@@ -81,12 +81,13 @@ import cPickle as pickle
import optparse
import sys
-from utilities import read_pickle_files, write_pickle_file
+from utilities import idl_filename_to_component, read_pickle_files, write_pickle_file
INHERITED_EXTENDED_ATTRIBUTES = set([
'ActiveDOMObject',
'DependentLifetime',
'GarbageCollected',
+ 'NotScriptWrappable',
'WillBeGarbageCollected',
])
@@ -159,6 +160,42 @@ def compute_inheritance_info(interface_name):
})
+def compute_global_type_info():
+ ancestors = {}
+ dictionaries = {}
+ component_dirs = {}
+ implemented_as_interfaces = {}
+ will_be_garbage_collected_interfaces = set()
+ garbage_collected_interfaces = set()
+ callback_interfaces = set()
+
+ for interface_name, interface_info in interfaces_info.iteritems():
+ component_dirs[interface_name] = idl_filename_to_component(interface_info['full_path'])
+
+ if interface_info['ancestors']:
+ ancestors[interface_name] = interface_info['ancestors']
+ if interface_info['is_callback_interface']:
+ callback_interfaces.add(interface_name)
+ if interface_info['is_dictionary']:
+ dictionaries[interface_name] = interface_info['is_dictionary']
+ if interface_info['implemented_as']:
+ implemented_as_interfaces[interface_name] = interface_info['implemented_as']
+
+ inherited_extended_attributes = interface_info['inherited_extended_attributes']
+ if 'WillBeGarbageCollected' in inherited_extended_attributes:
+ will_be_garbage_collected_interfaces.add(interface_name)
+ if 'GarbageCollected' in inherited_extended_attributes:
+ garbage_collected_interfaces.add(interface_name)
+
+ interfaces_info['ancestors'] = ancestors
+ interfaces_info['callback_interfaces'] = callback_interfaces
+ interfaces_info['dictionaries'] = dictionaries
+ interfaces_info['implemented_as_interfaces'] = implemented_as_interfaces
+ interfaces_info['garbage_collected_interfaces'] = garbage_collected_interfaces
+ interfaces_info['will_be_garbage_collected_interfaces'] = will_be_garbage_collected_interfaces
+ interfaces_info['component_dirs'] = component_dirs
+
+
def compute_interfaces_info_overall(info_individuals):
"""Compute information about IDL files.
@@ -227,10 +264,11 @@ def compute_interfaces_info_overall(info_individuals):
# However, they are needed for legacy implemented interfaces that
# are being treated as partial interfaces, until we remove these.
# http://crbug.com/360435
- implemented_interfaces_include_paths = [
- implemented_interface_info['include_path']
- for implemented_interface_info in implemented_interfaces_info
- if implemented_interface_info['is_legacy_treat_as_partial_interface']]
+ implemented_interfaces_include_paths = []
+ for implemented_interface_info in implemented_interfaces_info:
+ if (implemented_interface_info['is_legacy_treat_as_partial_interface'] and
+ implemented_interface_info['include_path']):
+ implemented_interfaces_include_paths.append(implemented_interface_info['include_path'])
interface_info.update({
'dependencies_full_paths': (partial_interfaces_full_paths +
@@ -245,6 +283,10 @@ def compute_interfaces_info_overall(info_individuals):
del interface_info['is_legacy_treat_as_partial_interface']
del interface_info['parent']
+ # Compute global_type_info to interfaces_info so that idl_compiler does
+ # not need to always calculate the info in __init__.
+ compute_global_type_info()
+
################################################################################
« no previous file with comments | « bindings/scripts/compute_interfaces_info_individual.py ('k') | bindings/scripts/idl_compiler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698