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

Side by Side Diff: Source/bindings/derived_sources.gyp

Issue 15801003: IDL parser rewrite in Python (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ready for review! (cleaner) Created 7 years, 5 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 # 1 #
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ], 44 ],
45 'python_idl_files': [ 45 'python_idl_files': [
46 '<@(python_core_idl_files)', 46 '<@(python_core_idl_files)',
47 '<@(python_modules_idl_files)', 47 '<@(python_modules_idl_files)',
48 '<@(python_svg_idl_files)', 48 '<@(python_svg_idl_files)',
49 ], 49 ],
50 'perl_and_python_idl_files': [ 50 'perl_and_python_idl_files': [
51 '<@(deprecated_perl_idl_files)', 51 '<@(deprecated_perl_idl_files)',
52 '<@(python_idl_files)', 52 '<@(python_idl_files)',
53 ], 53 ],
54 'webcore_test_support_idl_files': [
55 '<@(deprecated_perl_webcore_test_support_idl_files)',
56 '<@(python_webcore_test_support_idl_files)',
57 ],
54 58
55 'bindings_output_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings', 59 'bindings_output_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
56 'generated_global_constructors_idl_files': [ 60 'generated_global_constructors_idl_files': [
57 '<(SHARED_INTERMEDIATE_DIR)/WindowConstructors.idl', 61 '<(SHARED_INTERMEDIATE_DIR)/WindowConstructors.idl',
58 '<(SHARED_INTERMEDIATE_DIR)/WorkerGlobalScopeConstructors.idl', 62 '<(SHARED_INTERMEDIATE_DIR)/WorkerGlobalScopeConstructors.idl',
59 '<(SHARED_INTERMEDIATE_DIR)/SharedWorkerGlobalScopeConstructors.idl', 63 '<(SHARED_INTERMEDIATE_DIR)/SharedWorkerGlobalScopeConstructors.idl',
60 '<(SHARED_INTERMEDIATE_DIR)/DedicatedWorkerGlobalScopeConstructors.idl' , 64 '<(SHARED_INTERMEDIATE_DIR)/DedicatedWorkerGlobalScopeConstructors.idl' ,
61 ], 65 ],
62 66
63 'conditions': [ 67 'conditions': [
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 '<(SHARED_INTERMEDIATE_DIR)/SharedWorkerGlobalScopeConstructors.idl', 149 '<(SHARED_INTERMEDIATE_DIR)/SharedWorkerGlobalScopeConstructors.idl',
146 '--dedicatedworkerglobalscope-constructors-file', 150 '--dedicatedworkerglobalscope-constructors-file',
147 '<(SHARED_INTERMEDIATE_DIR)/DedicatedWorkerGlobalScopeConstructors.idl' , 151 '<(SHARED_INTERMEDIATE_DIR)/DedicatedWorkerGlobalScopeConstructors.idl' ,
148 '--event-names-file', 152 '--event-names-file',
149 '<(SHARED_INTERMEDIATE_DIR)/EventNames.in', 153 '<(SHARED_INTERMEDIATE_DIR)/EventNames.in',
150 '<@(write_file_only_if_changed)', 154 '<@(write_file_only_if_changed)',
151 ], 155 ],
152 'message': 'Resolving partial interfaces dependencies in all IDL files', 156 'message': 'Resolving partial interfaces dependencies in all IDL files',
153 }] 157 }]
154 }, 158 },
155 { 159 #{
156 'target_name': 'deprecated_perl_bindings_sources', 160 # 'target_name': 'deprecated_perl_bindings_sources',
157 'type': 'none', 161 # 'type': 'none',
158 # The 'binding' rule generates .h files, so mark as hard_dependency, per: 162 # # The 'binding' rule generates .h files, so mark as hard_dependency, per:
159 # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependen cies 163 # # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Depende ncies
160 'hard_dependency': 1, 164 # 'hard_dependency': 1,
161 'dependencies': [ 165 # 'dependencies': [
162 'interface_dependencies', 166 # 'interface_dependencies',
163 '../core/core_derived_sources.gyp:generate_test_support_idls', 167 # '../core/core_derived_sources.gyp:generate_test_support_idls',
164 ], 168 # ],
165 'sources': [ 169 # 'sources': [
166 '<@(deprecated_perl_idl_files)', 170 # '<@(deprecated_perl_idl_files)',
167 '<@(deprecated_perl_webcore_test_support_idl_files)', 171 # '<@(deprecated_perl_webcore_test_support_idl_files)',
168 ], 172 # ],
169 'rules': [{ 173 # 'rules': [{
170 'rule_name': 'deprecated_perl_binding', 174 # 'rule_name': 'deprecated_perl_binding',
171 'extension': 'idl', 175 # 'extension': 'idl',
172 'msvs_external_rule': 1, 176 # 'msvs_external_rule': 1,
173 'inputs': [ 177 # 'inputs': [
174 'scripts/deprecated_generate_bindings.pl', 178 # 'scripts/deprecated_generate_bindings.pl',
175 'scripts/deprecated_code_generator_v8.pm', 179 # 'scripts/deprecated_code_generator_v8.pm',
176 'scripts/deprecated_idl_parser.pm', 180 # 'scripts/deprecated_idl_parser.pm',
177 'scripts/deprecated_idl_serializer.pm', 181 # 'scripts/deprecated_idl_serializer.pm',
178 '../core/scripts/preprocessor.pm', 182 # '../core/scripts/preprocessor.pm',
179 'scripts/IDLAttributes.txt', 183 # 'scripts/IDLAttributes.txt',
180 # FIXME: If the dependency structure changes, we rebuild all files, 184 # # FIXME: If the dependency structure changes, we rebuild all files,
181 # since we're not computing dependencies file-by-file in the build. 185 # # since we're not computing dependencies file-by-file in the build.
182 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt', 186 # '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
183 # FIXME: Similarly, if any partial interface changes, rebuild 187 # # FIXME: Similarly, if any partial interface changes, rebuild
184 # everything, since every IDL potentially depends on them, because 188 # # everything, since every IDL potentially depends on them, because
185 # we're not computing dependencies file-by-file. 189 # # we're not computing dependencies file-by-file.
186 # 190 # #
187 # If a new partial interface is added, need to regyp to update these 191 # # If a new partial interface is added, need to regyp to update these
188 # dependencies, as these are computed statically at gyp runtime. 192 # # dependencies, as these are computed statically at gyp runtime.
189 '<!@pymod_do_main(list_idl_files_with_partial_interface <@(perl_and_py thon_idl_files))', 193 # '<!@pymod_do_main(list_idl_files_with_partial_interface <@(perl_and_p ython_idl_files))',
190 # Generated IDLs are all partial interfaces, hence everything 194 # # Generated IDLs are all partial interfaces, hence everything
191 # potentially depends on them. 195 # # potentially depends on them.
192 '<@(generated_global_constructors_idl_files)', 196 # '<@(generated_global_constructors_idl_files)',
193 ], 197 # ],
194 'outputs': [ 198 # 'outputs': [
195 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp', 199 # '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp',
196 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h', 200 # '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h',
197 ], 201 # ],
198 'variables': { 202 # 'variables': {
199 # IDL include paths. The generator will search recursively for IDL 203 # # IDL include paths. The generator will search recursively for IDL
200 # files under these locations. 204 # # files under these locations.
201 'generator_include_dirs': [ 205 # 'generator_include_dirs': [
202 '--include', '../core', 206 # '--include', '../core',
203 '--include', '../modules', 207 # '--include', '../modules',
204 '--include', '<(SHARED_INTERMEDIATE_DIR)/webkit', 208 # '--include', '<(SHARED_INTERMEDIATE_DIR)/webkit',
205 ], 209 # ],
206 # Hook for embedders to specify extra directories to find IDL files. 210 # # Hook for embedders to specify extra directories to find IDL files.
207 'extra_blink_generator_include_dirs%': [], 211 # 'extra_blink_generator_include_dirs%': [],
208 }, 212 # },
209 'msvs_cygwin_shell': 0, 213 # 'msvs_cygwin_shell': 0,
210 # sanitize-win-build-log.sed uses a regex which matches this command 214 # # sanitize-win-build-log.sed uses a regex which matches this command
211 # line (Perl script + .idl file being processed). 215 # # line (Perl script + .idl file being processed).
212 # Update that regex if command line changes (other than changing flags) 216 # # Update that regex if command line changes (other than changing flags)
213 'action': [ 217 # 'action': [
214 '<(perl_exe)', 218 # '<(perl_exe)',
215 '-w', 219 # '-w',
216 '-Iscripts', 220 # '-Iscripts',
217 '-I../core/scripts', 221 # '-I../core/scripts',
218 '-I../../../JSON/out/lib/perl5', 222 # '-I../../../JSON/out/lib/perl5',
219 'scripts/deprecated_generate_bindings.pl', 223 # 'scripts/deprecated_generate_bindings.pl',
220 '--outputDir', 224 # '--outputDir',
221 '<(bindings_output_dir)', 225 # '<(bindings_output_dir)',
222 '--idlAttributesFile', 226 # '--idlAttributesFile',
223 'scripts/IDLAttributes.txt', 227 # 'scripts/IDLAttributes.txt',
224 '<@(generator_include_dirs)', 228 # '<@(generator_include_dirs)',
225 '<@(extra_blink_generator_include_dirs)', 229 # '<@(extra_blink_generator_include_dirs)',
226 '--interfaceDependenciesFile', 230 # '--interfaceDependenciesFile',
227 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt', 231 # '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
228 '--additionalIdlFiles', 232 # '--additionalIdlFiles',
229 '<(deprecated_perl_webcore_test_support_idl_files)', 233 # '<(deprecated_perl_webcore_test_support_idl_files)',
230 '<@(preprocessor)', 234 # '<@(preprocessor)',
231 '<@(write_file_only_if_changed)', 235 # '<@(write_file_only_if_changed)',
232 '<(RULE_INPUT_PATH)', 236 # '<(RULE_INPUT_PATH)',
233 ], 237 # ],
234 'message': 'Generating binding from <(RULE_INPUT_PATH)', 238 # 'message': 'Generating binding from <(RULE_INPUT_PATH)',
235 }], 239 # }],
236 }, 240 #},
haraken 2013/07/16 14:17:51 Remove all changes for testing before landing.
Nils Barth (inactive) 2013/07/17 12:05:09 Will do! I’ve added FIXMEs, and it’ll be caught by
237 { 241 {
238 'target_name': 'python_bindings_sources', 242 'target_name': 'python_bindings_sources',
239 'type': 'none', 243 'type': 'none',
240 # The 'binding' rule generates .h files, so mark as hard_dependency, per: 244 # The 'binding' rule generates .h files, so mark as hard_dependency, per:
241 # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependen cies 245 # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependen cies
242 'hard_dependency': 1, 246 'hard_dependency': 1,
243 'dependencies': [ 247 'dependencies': [
244 'interface_dependencies', 248 'interface_dependencies',
245 '../core/core_derived_sources.gyp:generate_test_support_idls', 249 '../core/core_derived_sources.gyp:generate_test_support_idls',
246 ], 250 ],
247 'sources': [ 251 'sources': [
248 '<@(python_idl_files)', 252 '<@(python_idl_files)',
249 '<@(python_webcore_test_support_idl_files)', 253 '<@(python_webcore_test_support_idl_files)',
254 # FIXME: testing so dump JSON
255 '<@(deprecated_perl_idl_files)',
256 '<@(deprecated_perl_webcore_test_support_idl_files)',
250 ], 257 ],
251 'rules': [{ 258 'rules': [{
252 'rule_name': 'python_binding', 259 'rule_name': 'python_binding',
253 'extension': 'idl', 260 'extension': 'idl',
254 'msvs_external_rule': 1, 261 'msvs_external_rule': 1,
255 'inputs': [ 262 'inputs': [
256 'scripts/idl_compiler.py', 263 'scripts/idl_compiler.py',
264 '../../../ply/lex.py',
265 '../../../ply/yacc.py',
266 '../../../../tools/idl_parser/idl_lexer.py',
267 '../../../../tools/idl_parser/idl_node.py',
268 '../../../../tools/idl_parser/idl_parser.py',
269 'scripts/blink_idl_lexer.py',
270 'scripts/blink_idl_parser.py',
271 'scripts/code_generator_v8.py',
272 'scripts/idl_definitions.py',
273 'scripts/idl_definitions_builder.py',
257 'scripts/idl_reader.py', 274 'scripts/idl_reader.py',
275 'scripts/idl_validator.py',
258 'scripts/interface_dependency_resolver.py', 276 'scripts/interface_dependency_resolver.py',
259 'scripts/code_generator_v8.py',
260 'scripts/IDLAttributes.txt', 277 'scripts/IDLAttributes.txt',
261 # FIXME: If the dependency structure changes, we rebuild all files, 278 # FIXME: If the dependency structure changes, we rebuild all files,
262 # since we're not computing dependencies file-by-file in the build. 279 # since we're not computing dependencies file-by-file in the build.
263 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt', 280 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
264 # FIXME: Similarly, if any partial interface changes, rebuild 281 # FIXME: Similarly, if any partial interface changes, rebuild
265 # everything, since every IDL potentially depends on them, because 282 # everything, since every IDL potentially depends on them, because
266 # we're not computing dependencies file-by-file. 283 # we're not computing dependencies file-by-file.
267 '<!@pymod_do_main(list_idl_files_with_partial_interface <@(perl_and_py thon_idl_files))', 284 '<!@pymod_do_main(list_idl_files_with_partial_interface <@(perl_and_py thon_idl_files))',
268 # Generated IDLs are all partial interfaces, hence everything 285 # Generated IDLs are all partial interfaces, hence everything
269 # potentially depends on them. 286 # potentially depends on them.
(...skipping 23 matching lines...) Expand all
293 'scripts/idl_compiler.py', 310 'scripts/idl_compiler.py',
294 '--output-dir', 311 '--output-dir',
295 '<(bindings_output_dir)', 312 '<(bindings_output_dir)',
296 '--idl-attributes-file', 313 '--idl-attributes-file',
297 'scripts/IDLAttributes.txt', 314 'scripts/IDLAttributes.txt',
298 '<@(generator_include_dirs)', 315 '<@(generator_include_dirs)',
299 '<@(extra_blink_generator_include_dirs)', 316 '<@(extra_blink_generator_include_dirs)',
300 '--interface-dependencies-file', 317 '--interface-dependencies-file',
301 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt', 318 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
302 '--additional-idl-files', 319 '--additional-idl-files',
303 '<(python_webcore_test_support_idl_files)', 320 '<(webcore_test_support_idl_files)',
304 '<@(write_file_only_if_changed)', 321 '<@(write_file_only_if_changed)',
322 # FIXME: testing, so dump JSON
haraken 2013/07/16 14:17:51 I'm OK with leaving this option for debugging purp
Nils Barth (inactive) 2013/07/17 12:05:09 Ok, this makes it easier. (Put comment in idl_comp
323 '--dump-json-and-pickle',
305 '<(RULE_INPUT_PATH)', 324 '<(RULE_INPUT_PATH)',
306 ], 325 ],
307 'message': 'Generating binding from <(RULE_INPUT_PATH)', 326 'message': 'Generating binding from <(RULE_INPUT_PATH)',
308 }], 327 }],
309 }, 328 },
310 { 329 {
311 'target_name': 'bindings_derived_sources', 330 'target_name': 'bindings_derived_sources',
312 'type': 'none', 331 'type': 'none',
313 'dependencies': [ 332 'dependencies': [
314 'interface_dependencies', 333 'interface_dependencies',
315 'deprecated_perl_bindings_sources', 334 # 'deprecated_perl_bindings_sources',
316 'python_bindings_sources', 335 'python_bindings_sources',
317 ], 336 ],
318 'actions': [{ 337 'actions': [{
319 'action_name': 'derived_sources_all_in_one', 338 'action_name': 'derived_sources_all_in_one',
320 'inputs': [ 339 'inputs': [
321 '../core/scripts/action_derivedsourcesallinone.py', 340 '../core/scripts/action_derivedsourcesallinone.py',
322 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt', 341 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
323 ], 342 ],
324 'outputs': [ 343 'outputs': [
325 '<@(derived_sources_aggregate_files)', 344 '<@(derived_sources_aggregate_files)',
326 ], 345 ],
327 'action': [ 346 'action': [
328 'python', 347 'python',
329 '../core/scripts/action_derivedsourcesallinone.py', 348 '../core/scripts/action_derivedsourcesallinone.py',
330 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt', 349 '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
331 '--', 350 '--',
332 '<@(derived_sources_aggregate_files)', 351 '<@(derived_sources_aggregate_files)',
333 ], 352 ],
334 'message': 'Generating bindings derived sources', 353 'message': 'Generating bindings derived sources',
335 }], 354 }],
336 }, 355 },
337 ], 356 ],
338 } 357 }
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/blink_idl_lexer.py » ('j') | Source/bindings/scripts/blink_idl_lexer.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698