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

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_qualified_names.py

Issue 1405573003: Introduce StringImpl::createPreallocatedStatic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 'export': '', 52 'export': '',
53 'namespace': '', 53 'namespace': '',
54 'namespacePrefix': '', 54 'namespacePrefix': '',
55 'namespaceURI': '', 55 'namespaceURI': '',
56 } 56 }
57 filters = { 57 filters = {
58 'hash': hasher.hash, 58 'hash': hasher.hash,
59 'enable_conditional': name_utilities.enable_conditional_if_endif, 59 'enable_conditional': name_utilities.enable_conditional_if_endif,
60 'symbol': _symbol, 60 'symbol': _symbol,
61 'to_macro_style': name_utilities.to_macro_style, 61 'to_macro_style': name_utilities.to_macro_style,
62 'max': max,
62 } 63 }
63 64
64 def __init__(self, in_file_paths): 65 def __init__(self, in_file_paths):
65 super(MakeQualifiedNamesWriter, self).__init__(None) 66 super(MakeQualifiedNamesWriter, self).__init__(None)
66 assert len(in_file_paths) <= 2, 'MakeQualifiedNamesWriter requires at mo st 2 in files, got %d.' % len(in_file_paths) 67 assert len(in_file_paths) <= 2, 'MakeQualifiedNamesWriter requires at mo st 2 in files, got %d.' % len(in_file_paths)
67 68
68 if len(in_file_paths) == 2: 69 if len(in_file_paths) == 2:
69 self.tags_in_file = InFile.load_from_files([in_file_paths.pop(0)], s elf.defaults, self.valid_values, self.default_parameters) 70 self.tags_in_file = InFile.load_from_files([in_file_paths.pop(0)], s elf.defaults, self.valid_values, self.default_parameters)
70 else: 71 else:
71 self.tags_in_file = None 72 self.tags_in_file = None
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 def generate_header(self): 104 def generate_header(self):
104 return self._template_context 105 return self._template_context
105 106
106 @template_expander.use_jinja('MakeQualifiedNames.cpp.tmpl', filters=filters) 107 @template_expander.use_jinja('MakeQualifiedNames.cpp.tmpl', filters=filters)
107 def generate_implementation(self): 108 def generate_implementation(self):
108 return self._template_context 109 return self._template_context
109 110
110 111
111 if __name__ == "__main__": 112 if __name__ == "__main__":
112 in_generator.Maker(MakeQualifiedNamesWriter).main(sys.argv) 113 in_generator.Maker(MakeQualifiedNamesWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698