[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)
Date: Thu, 7 Apr 2016 17:01:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 07/04/2016 16:49, Peter Maydell wrote:
> > QOM to C++ classes
> I suspect if you looked at this you'd find that the QOM semantics
> for various things don't map onto C++ (ie that we have more runtime
> flexibility than C++ does).

True, but you don't have to use it. :)  If your code is static, one
could imagine bindings to C++ that eliminate some of the boilerplate.
Don't look at me, though.

On the other hand, minimal usage of templates instead of some of the
preprocessor gunk we have would be a very good thing IMNSHO.  I am
referring to the multiply included header files and to the macros with
type arguments (mostly QOM casts).

I don't think we need more C++ than that, but using templates as
basically a type-safe preprocessor would improve QEMU a little bit.
More rarely, lambdas could replace some preprocessor magic too, but
that's C11 and not many compilers support them.

But I won't weep if people say no because we have a lot other
low-hanging fruit to make QEMU better (especially the header file
cleanups that Markus started and I want to conclude very early in 2.7).


> This is just vaguely remembered from
> discussions back when we first added QOM though, I have no specific
> detail and might have misremembered.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]