| OLD | NEW |
| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 macro_file = macro_files[0] | 410 macro_file = macro_files[0] |
| 411 | 411 |
| 412 message_template_file = None | 412 message_template_file = None |
| 413 message_template_files = filter(IsMessageTemplateFile, source_files) | 413 message_template_files = filter(IsMessageTemplateFile, source_files) |
| 414 assert len(message_template_files) in [0, 1] | 414 assert len(message_template_files) in [0, 1] |
| 415 if message_template_files: | 415 if message_template_files: |
| 416 source_files.remove(message_template_files[0]) | 416 source_files.remove(message_template_files[0]) |
| 417 message_template_file = message_template_files[0] | 417 message_template_file = message_template_files[0] |
| 418 | 418 |
| 419 filters = None | 419 filters = None |
| 420 if native_type == "EXTRAS": | 420 if native_type in ("EXTRAS", "EXPERIMENTAL_EXTRAS"): |
| 421 filters = BuildExtraFilterChain() | 421 filters = BuildExtraFilterChain() |
| 422 else: | 422 else: |
| 423 filters = BuildFilterChain(macro_file, message_template_file) | 423 filters = BuildFilterChain(macro_file, message_template_file) |
| 424 | 424 |
| 425 # Sort 'debugger' sources first. | 425 # Sort 'debugger' sources first. |
| 426 source_files = sorted(source_files, | 426 source_files = sorted(source_files, |
| 427 lambda l,r: IsDebuggerFile(r) - IsDebuggerFile(l)) | 427 lambda l,r: IsDebuggerFile(r) - IsDebuggerFile(l)) |
| 428 | 428 |
| 429 source_files_and_contents = [(f, ReadFile(f)) for f in source_files] | 429 source_files_and_contents = [(f, ReadFile(f)) for f in source_files] |
| 430 | 430 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 JS2C(args[2:], | 595 JS2C(args[2:], |
| 596 args[0], | 596 args[0], |
| 597 args[1], | 597 args[1], |
| 598 options.raw, | 598 options.raw, |
| 599 options.startup_blob, | 599 options.startup_blob, |
| 600 options.js) | 600 options.js) |
| 601 | 601 |
| 602 | 602 |
| 603 if __name__ == "__main__": | 603 if __name__ == "__main__": |
| 604 main() | 604 main() |
| OLD | NEW |