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

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

Issue 10950042: PNaCl: Build a PPAPI shims library for all architectures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | ppapi/native_client/src/untrusted/pnacl_irt_shim/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Base class for generating wrapper functions for PPAPI methods. 5 """Base class for generating wrapper functions for PPAPI methods.
6 """ 6 """
7 7
8 from datetime import datetime 8 from datetime import datetime
9 import os 9 import os
10 import sys 10 import sys
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 InfoOut.Log("Generating %s for %s" % (out_filename, self.wrapper_prefix)) 423 InfoOut.Log("Generating %s for %s" % (out_filename, self.wrapper_prefix))
424 424
425 out = IDLOutFile(out_filename) 425 out = IDLOutFile(out_filename)
426 426
427 # Get a list of all the interfaces along with metadata. 427 # Get a list of all the interfaces along with metadata.
428 iface_releases = self.DetermineInterfaces(ast, releases) 428 iface_releases = self.DetermineInterfaces(ast, releases)
429 429
430 # Generate the includes. 430 # Generate the includes.
431 self.GenerateIncludes(iface_releases, out) 431 self.GenerateIncludes(iface_releases, out)
432 432
433 out.Write('\n/* The PNaCl PPAPI shims are only needed on x86-64. */\n')
jvoung (off chromium) 2012/09/20 01:06:36 Hmm idl_gen_wrapper was actually meant to be for a
Mark Seaborn 2012/09/20 03:56:24 OK, I've split it into two parts.
jvoung (off chromium) 2012/09/20 15:13:48 Well there was an email thread about using somethi
434 out.Write('#if defined(__x86_64__)\n\n')
435
433 # Write out static helper functions (mystrcmp). 436 # Write out static helper functions (mystrcmp).
434 self.GenerateHelperFunctions(out) 437 self.GenerateHelperFunctions(out)
435 438
436 # Declare list of WrapperInfo before actual wrapper methods, since 439 # Declare list of WrapperInfo before actual wrapper methods, since
437 # they reference each other. 440 # they reference each other.
438 self.DeclareWrapperInfos(iface_releases, out) 441 self.DeclareWrapperInfos(iface_releases, out)
439 442
440 # Generate wrapper functions for each wrapped method in the interfaces. 443 # Generate wrapper functions for each wrapped method in the interfaces.
441 result = self.GenerateWrapperForMethods(iface_releases) 444 result = self.GenerateWrapperForMethods(iface_releases)
442 out.Write(result) 445 out.Write(result)
443 446
444 # Collect all the wrapper functions into interface structs. 447 # Collect all the wrapper functions into interface structs.
445 self.GenerateWrapperInterfaces(iface_releases, out) 448 self.GenerateWrapperInterfaces(iface_releases, out)
446 449
447 # Generate a table of the wrapped interface structs that can be looked up. 450 # Generate a table of the wrapped interface structs that can be looked up.
448 self.GenerateWrapperInfoAndCollection(iface_releases, out) 451 self.GenerateWrapperInfoAndCollection(iface_releases, out)
449 452
450 # Write out the IDL-invariant functions. 453 # Write out the IDL-invariant functions.
451 self.GenerateFixedFunctions(out) 454 self.GenerateFixedFunctions(out)
455
456 out.Write('\n#endif\n')
452 out.Close() 457 out.Close()
453 return 0 458 return 0
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/untrusted/pnacl_irt_shim/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698