Access 'this' in inline assembly

Brad Roberts braddr at slice-2.puremagic.com
Mon Mar 7 17:26:07 PST 2011


On Mon, 7 Mar 2011, bearophile wrote:

> Emil Madsen:
> 
> > > Is this just a fact of the current state of dmd, or is it by design? - and
> > if thats the case, why?
> 
> It's by design, but it's a bad/wrong design. The LDC compiler has two different ways to inline asm. It's a necessary feature in a system language that want to be more than just a toy.
> 
> Bye,
> bearophile

It's not by design.  It's a quality of implementation issue that's 
solvable given some time to work on it.  I intend to, eventually, unless 
someone has gotten to it ahead of me.

The inliner in dmd is conservative and only lines stuff it knows how to.  
Anything doesn't, isn't.  Nothing says it can't be taught how to inline 
quite a bit more than it currently does, given time to work on it.

Later,
Brad


More information about the Digitalmars-d-learn mailing list