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

Side by Side Diff: tools/js2c.py

Issue 1125103003: Fix V8 extras js2c pipeline (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 macro_file = macro_files[0] 408 macro_file = macro_files[0]
409 409
410 message_template_file = None 410 message_template_file = None
411 message_template_files = filter(IsMessageTemplateFile, source_files) 411 message_template_files = filter(IsMessageTemplateFile, source_files)
412 assert len(message_template_files) in [0, 1] 412 assert len(message_template_files) in [0, 1]
413 if message_template_files: 413 if message_template_files:
414 source_files.remove(message_template_files[0]) 414 source_files.remove(message_template_files[0])
415 message_template_file = message_template_files[0] 415 message_template_file = message_template_files[0]
416 416
417 filters = None 417 filters = None
418 if native_type == "EXTRA": 418 if native_type == "EXTRAS":
419 filters = BuildExtraFilterChain() 419 filters = BuildExtraFilterChain()
420 else: 420 else:
421 filters = BuildFilterChain(macro_file, message_template_file) 421 filters = BuildFilterChain(macro_file, message_template_file)
422 422
423 # Sort 'debugger' sources first. 423 # Sort 'debugger' sources first.
424 source_files = sorted(source_files, 424 source_files = sorted(source_files,
425 lambda l,r: IsDebuggerFile(r) - IsDebuggerFile(l)) 425 lambda l,r: IsDebuggerFile(r) - IsDebuggerFile(l))
426 426
427 source_files_and_contents = [(f, ReadFile(f)) for f in source_files] 427 source_files_and_contents = [(f, ReadFile(f)) for f in source_files]
428 428
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 parser.add_argument("--js", 592 parser.add_argument("--js",
593 help="writes a JS file output instead of a C file", 593 help="writes a JS file output instead of a C file",
594 action="store_true") 594 action="store_true")
595 595
596 args = vars(parser.parse_args()) 596 args = vars(parser.parse_args())
597 JS2C(args["sources.js"], args["out.cc"], args["type"], args["raw"], args["star tup_blob"], args["js"]) 597 JS2C(args["sources.js"], args["out.cc"], args["type"], args["raw"], args["star tup_blob"], args["js"])
598 598
599 599
600 if __name__ == "__main__": 600 if __name__ == "__main__":
601 main() 601 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698