OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium 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 """Generator for Pnacl Shim functions that bridges the calling conventions | 6 """Generator for Pnacl Shim functions that bridges the calling conventions |
7 between GCC and PNaCl. """ | 7 between GCC and PNaCl. """ |
8 | 8 |
9 from datetime import datetime | 9 from datetime import datetime |
10 import difflib | 10 import difflib |
(...skipping 30 matching lines...) Expand all Loading... |
41 'pnacl', | 41 'pnacl', |
42 'Generate the PNaCl shim.') | 42 'Generate the PNaCl shim.') |
43 self.cgen = CGen() | 43 self.cgen = CGen() |
44 self._skip_opt = False | 44 self._skip_opt = False |
45 | 45 |
46 ############################################################ | 46 ############################################################ |
47 | 47 |
48 def OwnHeaderFile(self): | 48 def OwnHeaderFile(self): |
49 """Return the header file that specifies the API of this wrapper. | 49 """Return the header file that specifies the API of this wrapper. |
50 We do not generate the header files. """ | 50 We do not generate the header files. """ |
51 return 'ppapi/generators/pnacl_shim.h' | 51 return 'ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.h' |
52 | 52 |
53 | 53 |
54 def InterfaceVersionNeedsWrapping(self, iface, version): | 54 def InterfaceVersionNeedsWrapping(self, iface, version): |
55 """Return true if the interface+version has ANY methods that | 55 """Return true if the interface+version has ANY methods that |
56 need wrapping. | 56 need wrapping. |
57 """ | 57 """ |
58 if self._skip_opt: | 58 if self._skip_opt: |
59 return True | 59 return True |
60 if iface.GetName().endswith('Trusted'): | 60 if iface.GetName().endswith('Trusted'): |
61 return False | 61 return False |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 return TestFiles(filenames, test_releases) | 269 return TestFiles(filenames, test_releases) |
270 | 270 |
271 # Otherwise, generate the output file (for potential use as golden file). | 271 # Otherwise, generate the output file (for potential use as golden file). |
272 ast = ParseFiles(filenames) | 272 ast = ParseFiles(filenames) |
273 return pnaclgen.GenerateRange(ast, test_releases, filenames) | 273 return pnaclgen.GenerateRange(ast, test_releases, filenames) |
274 | 274 |
275 | 275 |
276 if __name__ == '__main__': | 276 if __name__ == '__main__': |
277 retval = Main(sys.argv[1:]) | 277 retval = Main(sys.argv[1:]) |
278 sys.exit(retval) | 278 sys.exit(retval) |
OLD | NEW |