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

Side by Side Diff: tools/js2c.py

Issue 2809069: Fix d8 build error on a fresh checkout. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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 | Annotate | Revision Log
« 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 2006-2008 the V8 project authors. All rights reserved. 3 # Copyright 2006-2008 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 GET_DEBUGGER_SCRIPT_NAME_CASE = """\ 269 GET_DEBUGGER_SCRIPT_NAME_CASE = """\
270 if (index == %(i)i) return Vector<const char>("%(name)s", %(length)i); 270 if (index == %(i)i) return Vector<const char>("%(name)s", %(length)i);
271 """ 271 """
272 272
273 def JS2C(source, target, env): 273 def JS2C(source, target, env):
274 ids = [] 274 ids = []
275 debugger_ids = [] 275 debugger_ids = []
276 modules = [] 276 modules = []
277 # Locate the macros file name. 277 # Locate the macros file name.
278 consts = {} 278 consts = []
279 macros = {} 279 macros = []
280 for s in source: 280 for s in source:
281 if 'macros.py' == (os.path.split(str(s))[1]): 281 if 'macros.py' == (os.path.split(str(s))[1]):
282 (consts, macros) = ReadMacros(ReadLines(str(s))) 282 (consts, macros) = ReadMacros(ReadLines(str(s)))
283 else: 283 else:
284 modules.append(s) 284 modules.append(s)
285 285
286 # Build source code lines 286 # Build source code lines
287 source_lines = [ ] 287 source_lines = [ ]
288 288
289 minifier = jsmin.JavaScriptMinifier() 289 minifier = jsmin.JavaScriptMinifier()
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 def main(): 372 def main():
373 natives = sys.argv[1] 373 natives = sys.argv[1]
374 natives_empty = sys.argv[2] 374 natives_empty = sys.argv[2]
375 type = sys.argv[3] 375 type = sys.argv[3]
376 source_files = sys.argv[4:] 376 source_files = sys.argv[4:]
377 JS2C(source_files, [natives, natives_empty], { 'TYPE': type }) 377 JS2C(source_files, [natives, natives_empty], { 'TYPE': type })
378 378
379 if __name__ == "__main__": 379 if __name__ == "__main__":
380 main() 380 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