| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 fun = eval("lambda " + ",".join(args) + ': ' + body) | 207 fun = eval("lambda " + ",".join(args) + ': ' + body) |
| 208 macros.append((re.compile("\\b%s\\(" % name), PythonMacro(args, fun))) | 208 macros.append((re.compile("\\b%s\\(" % name), PythonMacro(args, fun))) |
| 209 else: | 209 else: |
| 210 raise ("Illegal line: " + line) | 210 raise ("Illegal line: " + line) |
| 211 return (constants, macros) | 211 return (constants, macros) |
| 212 | 212 |
| 213 | 213 |
| 214 HEADER_TEMPLATE = """\ | 214 HEADER_TEMPLATE = """\ |
| 215 // Copyright 2011 Google Inc. All Rights Reserved. | 215 // Copyright 2011 Google Inc. All Rights Reserved. |
| 216 | 216 |
| 217 // This file was generated from .js source files by SCons. If you | 217 // This file was generated from .js source files by GYP. If you |
| 218 // want to make changes to this file you should either change the | 218 // want to make changes to this file you should either change the |
| 219 // javascript source files or the SConstruct script. | 219 // javascript source files or the GYP script. |
| 220 | 220 |
| 221 #include "v8.h" | 221 #include "v8.h" |
| 222 #include "natives.h" | 222 #include "natives.h" |
| 223 #include "utils.h" | 223 #include "utils.h" |
| 224 | 224 |
| 225 namespace v8 { | 225 namespace v8 { |
| 226 namespace internal { | 226 namespace internal { |
| 227 | 227 |
| 228 static const byte sources[] = { %(sources_data)s }; | 228 static const byte sources[] = { %(sources_data)s }; |
| 229 | 229 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 def main(): | 388 def main(): |
| 389 natives = sys.argv[1] | 389 natives = sys.argv[1] |
| 390 type = sys.argv[2] | 390 type = sys.argv[2] |
| 391 compression = sys.argv[3] | 391 compression = sys.argv[3] |
| 392 source_files = sys.argv[4:] | 392 source_files = sys.argv[4:] |
| 393 JS2C(source_files, [natives], { 'TYPE': type, 'COMPRESSION': compression }) | 393 JS2C(source_files, [natives], { 'TYPE': type, 'COMPRESSION': compression }) |
| 394 | 394 |
| 395 if __name__ == "__main__": | 395 if __name__ == "__main__": |
| 396 main() | 396 main() |
| OLD | NEW |