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

Side by Side Diff: ppapi/generators/idl_gen_pnacl.py

Issue 164373010: Split the PNaCl IRT shim into 3 pieces, and include one piece into IRT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix headers Created 6 years, 10 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
OLDNEW
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
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698