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

Side by Side Diff: tools/check-name-clashes.py

Issue 1070593002: Unbreak check-name-clashes.py after recent macro renamings. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import js2c 6 import js2c
7 import os 7 import os
8 import re 8 import re
9 import sys 9 import sys
10 10
11 FILENAME = "src/runtime/runtime.h" 11 FILENAME = "src/runtime/runtime.h"
12 LISTHEAD = re.compile(r"#define\s+(\w+LIST\w*)\((\w+)\)") 12 LISTHEAD = re.compile(r"#define\s+(FOR_EACH_\w+)\((\w+)\)")
13 LISTBODY = re.compile(r".*\\$") 13 LISTBODY = re.compile(r".*\\$")
14 14
15 15
16 class Function(object): 16 class Function(object):
17 def __init__(self, match): 17 def __init__(self, match):
18 self.name = match.group(1).strip() 18 self.name = match.group(1).strip()
19 19
20 def ListMacroRe(list): 20 def ListMacroRe(list):
21 macro = LISTHEAD.match(list[0]).group(2) 21 macro = LISTHEAD.match(list[0]).group(2)
22 re_string = "\s*%s\((\w+)" % macro 22 re_string = "\s*%s\((\w+)" % macro
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 if errors > 0: 110 if errors > 0:
111 return 1 111 return 1
112 print("Runtime/Natives name clashes: checked %d/%d functions, all good." % 112 print("Runtime/Natives name clashes: checked %d/%d functions, all good." %
113 (len(functions), len(natives))) 113 (len(functions), len(natives)))
114 return 0 114 return 0
115 115
116 116
117 if __name__ == "__main__": 117 if __name__ == "__main__":
118 sys.exit(Main()) 118 sys.exit(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