Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-19 Thread Paolo Bonzini
> > >> In general, if struct X is QIDL_DECLAREd and only has > > >> q_immutable > > >> fields, it can be taken as q_immutable. Hence for example the > > >> base > > >> class should not need any decoration; ISADevice will be seen as > > >> q_immutable, but PCIDevice will be seen as serialized. Bu

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-18 Thread Michael Roth
On Tue, Oct 16, 2012 at 09:20:09AM +0200, Paolo Bonzini wrote: > Il 15/10/2012 18:35, Michael Roth ha scritto: > >> - immutable/derived/broken/elsewhere (and the default, let's call it > >> serialized) are really five cases of the same QIDL property. Perhaps > >> this could be enforced in the exte

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-16 Thread Paolo Bonzini
Il 15/10/2012 18:35, Michael Roth ha scritto: >> - immutable/derived/broken/elsewhere (and the default, let's call it >> serialized) are really five cases of the same QIDL property. Perhaps >> this could be enforced in the extended syntax like this: >> >> #define q_immutable QIDL(serialize(imm

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 11:35:46AM -0500, Michael Roth wrote: > On Mon, Oct 15, 2012 at 03:08:51PM +0200, Paolo Bonzini wrote: > > Il 15/10/2012 10:12, Paolo Bonzini ha scritto: > > > Il 12/10/2012 23:11, Michael Roth ha scritto: > > >> +elif field['type'].startswith('enum '): > > >> +

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-15 Thread Michael Roth
On Mon, Oct 15, 2012 at 03:08:51PM +0200, Paolo Bonzini wrote: > Il 15/10/2012 10:12, Paolo Bonzini ha scritto: > > Il 12/10/2012 23:11, Michael Roth ha scritto: > >> +elif field['type'].startswith('enum '): > >> +typename = 'int' > > > > Note that there is support for enum pro

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-15 Thread Paolo Bonzini
Il 15/10/2012 10:12, Paolo Bonzini ha scritto: > Il 12/10/2012 23:11, Michael Roth ha scritto: >> +elif field['type'].startswith('enum '): >> +typename = 'int' > > Note that there is support for enum properties in qdev. Please consider > adding it, though it can be done as a f

Re: [Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-15 Thread Paolo Bonzini
Il 12/10/2012 23:11, Michael Roth ha scritto: > +elif field['type'].startswith('enum '): > +typename = 'int' Note that there is support for enum properties in qdev. Please consider adding it, though it can be done as a follow-up. I'm going to play a bit with the series and co

[Qemu-devel] [PATCH v4 24/26] qidl: add QAPI-based code generator

2012-10-12 Thread Michael Roth
This takes the declarations generated by the QIDL parser and converts them to QAPI schemas to generate the visitor routines and other supporting code for QIDL. Reviewed-by: Paolo Bonzini Signed-off-by: Michael Roth --- scripts/qidl.py | 290 +