71 examine_idls=False):
72 """This code reconstructs the FremontCut IDL database from W3C,
73 WebKit and Dart IDL files."""
74 current_dir = os.path.dirname(__file__)
75 logging.config.fileConfig(os.path.join(current_dir, "logging.conf"))
76
77 _logger.setLevel(logging_level)
78
79 db = database.Database(database_dir)
80
81
82 db.Delete()
83
84 builder = databasebuilder.DatabaseBuilder(db)
86
87
88
89 webkit_revision = '63'
90
91
92
93 webkit_defines = ['LANGUAGE_DART', 'LANGUAGE_JAVASCRIPT']
94
95 if feature_defines is None:
96 feature_defines = FEATURE_DEFINES
97
98 webkit_options = databasebuilder.DatabaseBuilderOptions(
99
100 idl_defines=webkit_defines + feature_defines,
101 source='WebKit',
102 source_attributes={'revision': webkit_revision},
103 logging_level=logging_level)
104
105
106 builder.import_idl_files(idl_files, webkit_options, False)
107
108
109 dart_options = databasebuilder.DatabaseBuilderOptions(
110 source='Dart',
111 rename_operation_arguments_on_merge=True,
112 logging_level=logging_level)
113
114 utilities.KNOWN_COMPONENTS = frozenset(['core', 'modules', 'dart'])
115
116 builder.import_idl_files(
117 [os.path.join(current_dir, '..', 'idl', 'dart', 'dart.idl')],
118 dart_options, True)
119
120 start_time = time.time()
121
122
124
125
126 builder.merge_imported_interfaces()
127
128 builder.fetch_constructor_data(webkit_options)
129 builder.fix_displacements('WebKit')
130
131
132 builder.normalize_annotations(['WebKit', 'Dart'])
133
134
135 builder.map_dictionaries()
136
137
138
139 if examine_idls:
140 builder.examine_database()
141
142 conditionals_met =
set(
143 'ENABLE_' + conditional for conditional in builder.conditionals_met)
144 known_conditionals =
set(FEATURE_DEFINES + FEATURE_DISABLED)
145
146 unused_conditionals = known_conditionals - conditionals_met
147 if unused_conditionals:
148 _logger.warning('There are some unused conditionals %s' %
149 sorted(unused_conditionals))
150 _logger.warning('Please update fremontcutbuilder.py')
151
152 unknown_conditionals = conditionals_met - known_conditionals
153 if unknown_conditionals:
154 _logger.warning('There are some unknown conditionals %s' %
155 sorted(unknown_conditionals))
156 _logger.warning('Please update fremontcutbuilder.py')
157
158 print(
'Merging interfaces %s seconds' %
round(time.time() - start_time, 2))
159
160 return db
161
162
static void round(SkPoint *p)
def set_builder(created_builder)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
def print(*args, **kwargs)
def ResolveAllTypedefs(all_interfaces)