[webkit-dev] Rewriting binding code generator, maybe?

wkcensorshipbypass00010 at mailinator.com wkcensorshipbypass00010 at mailinator.com
Tue Jun 11 13:32:27 PDT 2013


Niwa, hi,

CodeGenerator has already been rewritten in python, combining the following:

* Mozilla's xpcom xpidl.py generator
* gobject's codegen.py

The following work was done:

- The xpidl generator was modified to understand Webkit's IDL file format
- gobject's codegen.py was modified to understand xpidl.py's AST object format
- gobject codegen.py's output formatter was modified to understand both
  webkit datatypes and to output python

It should be a trivial job to work out how to modify the code to output
other generators.  The only thing to watch out for is that it was a very
fast hack put together quite quickly and there are unused parts (which
will never be used) that still have gobject codegen output.

Functionally however it works perfectly.  By contrast, attempting to
modify CodeGeneratorJS.pm to comprehend gobject took over eight weeks.
The python-based code-generator was completed in under six.



More information about the webkit-dev mailing list