summaryrefslogtreecommitdiffstats
path: root/ppapi/generators/idl_generator.py
Commit message (Collapse)AuthorAgeFilesLines
* Trivial individual generation fixnoelallen@chromium.org2012-12-071-1/+1
| | | | | | | | | | TBR=binji@chromium.org BUG=164305 Review URL: https://chromiumcodereview.appspot.com/11446046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171704 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for generating thunk source from IDL.teravest@chromium.org2012-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | This introduces a few new IDL attributes: generate_thunk - Enables thunk generation for an IDL file. create_func - Overrides the guessed create function name. on_failure - Overrides the default return value on failure. report_errors - Allows error reporting to be disabled. By using these attributes, we can generate _thunk.cc files for many IDL files. I'll send CLs for moving the thunks separately, as I found it tiring to review them all in a big lump. I have PPB_Widget_Dev here as an example. BUG= Review URL: https://chromiumcodereview.appspot.com/11417010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168450 0039d316-1c4b-4281-b951-d872f2087c98
* Update comments for the GeneratorByFile interface.teravest@chromium.org2012-11-071-29/+27
| | | | | | | | | | | | It would appear that the comments here are stale; I've updated them to reflect the method that derived classes must implement. BUG= Review URL: https://chromiumcodereview.appspot.com/11359071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166314 0039d316-1c4b-4281-b951-d872f2087c98
* Fix generation of Single version IDL for SDKnoelallen@chromium.org2012-11-021-0/+10
| | | | | | | | | | | | | | When branching, if a new Interface has not been created with the new branch number, the IDL will report a failure to generate. We should instead produce the previous set of headers, but update the version macro in pp_macros.h BUG=158980 TBR=sehr@chromium.org Review URL: https://chromiumcodereview.appspot.com/11275112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165572 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrectly resolved conflict, and add error message for missing sources.noelallen@google.com2012-01-131-2/+1
| | | | | | | | | | | | | When running the generator with default arguments from a CWD other than the script's directory, the default arguments will be incorrect. This adds a check which will print an error message and fail. If any argument, including the default arguments are provided on the command-line, then this check is bypassed. BUG= 109177 Review URL: http://codereview.chromium.org/9168014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117547 0039d316-1c4b-4281-b951-d872f2087c98
* Fix single release generationnoelallen@google.com2012-01-101-2/+8
| | | | | | | | | | | Fix several cases where generating a single release will fail because the object was defined at a previous release, and the UniqueRelease check was returning an empty set. BUG= 109679 Review URL: http://codereview.chromium.org/9151022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117048 0039d316-1c4b-4281-b951-d872f2087c98
* Fix python scripts in src/ppapi/maruel@chromium.org2012-01-101-3/+2
| | | | | | | | | | | | | | | | | | | | | Make sure that: - shebang is only present for executable files - shebang is #!/usr/bin/env python - __main__ is only present for executable files - file's executable bit is coherent Also fix EOF LF to be only one. Minor python style fixes. TBR=noelallen BUG=105108 TEST= Review URL: http://codereview.chromium.org/8653004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117045 0039d316-1c4b-4281-b951-d872f2087c98
* Pnacl ppapi shim generator (from IDL), based on Noel's first cut.jvoung@google.com2011-11-301-1/+0
| | | | | | | | | | | | | | BUG= http://code.google.com/p/nativeclient/issues/detail?id=2413 TEST= python idl_gen_pnacl.py --test --wnone Also ** ./generator.py doesn't change ** ./generator.py --wnone --pnacl --pnaclshim=pnacl_shim.c generates a shim that compiles and works in the NaCl repo. Review URL: http://codereview.chromium.org/8568025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112244 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup IDL Generatornoelallen@google.com2011-11-141-19/+27
| | | | | | | | | | | | Clean up pychecker warnings. Move common code from idl_c_header (header generator) to idl_c_proto, the 'C' code style prototyping helper. BUG= http://code.google.com/p/chromium/issues/detail?id=91607 TEST= cd src/ppapi/generators && ./generator.py Review URL: http://codereview.chromium.org/8538029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109958 0039d316-1c4b-4281-b951-d872f2087c98
* Allow defaults for generator which will check all available versions.noelallen@google.com2011-11-041-1/+10
| | | | | | | | | | | Change the default 'range' for the presubmit and generator to be start,end which represent the first and last Label found in the IDL. BUG= http://code.google.com/p/chromium/issues/detail?id=103037\ TRY= ./generate.py Review URL: http://codereview.chromium.org/8478005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108697 0039d316-1c4b-4281-b951-d872f2087c98
* Update the IDL Generator to use Release instead of Versionnoelallen@google.com2011-09-261-1/+1
| | | | | | | | | | | | | | | | | | This CL adds the blob_t type for referencing memory pointers. This is a trivial change to idl_c_proto. The man change for this CL is to fix the version mismatch between types in different files. Since each source file can have it's own Label mapping, using the version of one object to index into a version of another can fail between sources. This CL removes the use of version and the LABEL property, and instead converts the Node's version information immediately as it's added into the versioned namespace. Now namespace objects reference via Release (str M14) instead of Version (float 1.0). This allows the Nodes to compare against each other with a global value. 1- Remove lint warning for missing "LABEL" property 2- Convert Version references to Release references such as vmin to rmin, etc... 3- Remove Version interfaces which are no longer needed 4- Move VersionList and VersionMap in namespace to ReleaseList and ReleaseMap in idl_release.py 5- Added tests to idl_release BUG= http://code.google.com/p/chromium/issues/detail?id=97708 TEST= python idl_release && ./generate Review URL: http://codereview.chromium.org/8045001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102793 0039d316-1c4b-4281-b951-d872f2087c98
* Add presubmit check to verify PPAPI C headers match IDL files.noelallen@google.com2011-09-141-1/+1
| | | | | | | | | | | | Update outfile to print a better filename on diff. Update fix missing 'name' in idl_generator.py BUG= http://code.google.com/p/chromium/issues/detail?id=93534 TEST= gcl upload | presubmit (after modifying a .h or .idl file) R= brettw@chromium.org Review URL: http://codereview.chromium.org/7700001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101092 0039d316-1c4b-4281-b951-d872f2087c98
* Update generator for Chrome generation as the default casenoelallen@google.com2011-08-261-4/+9
| | | | | | | | | | | | | | | | Update defaults so that we pull IDL files from api/dev Update the interface string gereration to replace interfaces ending with '_Dev' with (Dev) instead. Allow for overfide of interface string using 'iname' Property By default assume range=M13,M14 for multi-version chrome. (NOTE: A new CL will clean this up and sport =min,max) BUG= http://code.google.com/p/chromium/issues/detail?id=89969 TEST= ./generator.py R= brettw@chromium.org Review URL: http://codereview.chromium.org/7753042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98488 0039d316-1c4b-4281-b951-d872f2087c98
* More multi-version supportnoelallen@google.com2011-08-241-8/+64
| | | | | | | | | | | | | | | | | | | | | | Minor fix to idl_output: switch from None to '' to alow split to work Add 'InReleases' member to verify node is valid within a list of releases. Add 'releases' member to IDLVersionMap class for easier search. Remove stale code and build ordered list of requested releases in AST Remove release member from CGen object, and pass into functions Move release tracking from C prototype to C header generator Update generator tests. Added golden files to verify the C generator is correct NOTE: This is work in progress. The header emitted using --release=X should be correct and has been tested to generate exactly what we have today, however --range=X,Y does not yet generate what we need. BUG= http://code.google.com/p/chromium/issues/detail?id=89969 TEST= python generator.py Review URL: http://codereview.chromium.org/7715036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98133 0039d316-1c4b-4281-b951-d872f2087c98
* Add base class for generatorsnoelallen@google.com2011-08-221-0/+187
This CL is the first step towards alowing multiple generators with a single driver to simplify the use of the generator. It removes old built-in in idl_c_header.py, and replaces it with several golden files to verify output is unchanged. It renames the old 'version' option to 'release' to disambiguate between a RELEASE name such as M14, and an interface VERSION such as 1.0. Removes the 'M14' hack which as added to the source code to force release M14 to be generated. TEST= ./generator.py BUG= http://code.google.com/p/chromium/issues/detail?id=91607 R=sehr@google.com Review URL: http://codereview.chromium.org/7477056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97752 0039d316-1c4b-4281-b951-d872f2087c98