[Development] QProperty and library coding guide

Thiago Macieira thiago.macieira at intel.com
Mon Jul 20 20:19:39 CEST 2020


On Monday, 20 July 2020 11:06:36 PDT Giuseppe D'Angelo via Development wrote:
> Il 20/07/20 07:21, Thiago Macieira ha scritto:
> > ASM is not a solution. There's at least one major compiler (MSVC) that
> > doesn't allow any assembler.
> 
> What do you mean, MSVC doesn't allow inline ASM?

Correct. To be clear: MSVC 64-bit doesn't allow inline assembler. The 32-bit 
versiondoes.

> I'm not proposing that the ASM itself needs to be emitted by moc, moc
> could just call a function implemented (in ASM) somewhere in
> qobjectdefs.h or so...

With MSVC, it needs to be defined in an .asm file. So it's going to be out-of-
line every time.

> > But see Ville's email. I think the pointer arithmetic is actually fine.
> > Would be fine too with uchar*.
> 
> I'm really not sure what part of that paper would make it fine?

If you have a valid object, the paper does allow pointer arithmetic to access 
the object's representation. This is the direction the committee wants to go 
and it something compilers already do, so we can probably rely on the current 
behaviour remaining.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list