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

Side by Side Diff: tools/js2c.py

Issue 1409013006: Revert of Implement flag and source getters on RegExp.prototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rproto
Patch Set: Created 5 years, 1 month 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 | « test/webkit/fast/regex/toString-expected.txt ('k') | 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 Args: 341 Args:
342 macro_filename: Name of the macro file, if any. 342 macro_filename: Name of the macro file, if any.
343 343
344 Returns: 344 Returns:
345 A function (string -> string) that processes a source file. 345 A function (string -> string) that processes a source file.
346 """ 346 """
347 filter_chain = [] 347 filter_chain = []
348 348
349 if macro_filename: 349 if macro_filename:
350 (consts, macros) = ReadMacros(ReadFile(macro_filename)) 350 (consts, macros) = ReadMacros(ReadFile(macro_filename))
351 filter_chain.append(lambda l: ExpandConstants(l, consts))
351 filter_chain.append(lambda l: ExpandMacros(l, macros)) 352 filter_chain.append(lambda l: ExpandMacros(l, macros))
352 filter_chain.append(lambda l: ExpandConstants(l, consts))
353 353
354 if message_template_file: 354 if message_template_file:
355 message_templates = ReadMessageTemplates(ReadFile(message_template_file)) 355 message_templates = ReadMessageTemplates(ReadFile(message_template_file))
356 filter_chain.append(lambda l: ExpandConstants(l, message_templates)) 356 filter_chain.append(lambda l: ExpandConstants(l, message_templates))
357 357
358 filter_chain.extend([ 358 filter_chain.extend([
359 RemoveCommentsAndTrailingWhitespace, 359 RemoveCommentsAndTrailingWhitespace,
360 ExpandInlineMacros, 360 ExpandInlineMacros,
361 ExpandInlineConstants, 361 ExpandInlineConstants,
362 Validate, 362 Validate,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()
OLDNEW
« no previous file with comments | « test/webkit/fast/regex/toString-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698