Re: Inlining a "pure" ASM function

2013-03-01 Thread Johannes Pfau
Am Thu, 28 Feb 2013 14:33:15 -0800 (PST) schrieb Brad Roberts : > On Thu, 28 Feb 2013, Simen Kj?r?s wrote: > > > On Thu, 28 Feb 2013 16:22:49 +0100, D-ratiseur > > wrote: > > > > > Hello, Is it possible for an ASM function to be inlined in D? > > > > Nope. > > To be a little more accurate: i

Re: Inlining a "pure" ASM function

2013-02-28 Thread Brad Roberts
On Thu, 28 Feb 2013, Simen Kj?r?s wrote: > On Thu, 28 Feb 2013 16:22:49 +0100, D-ratiseur > wrote: > > > Hello, Is it possible for an ASM function to be inlined in D? > > Nope. To be a little more accurate: it's possible in the technical sense. No D compiler today does it automatically. Th

Re: Inlining a "pure" ASM function

2013-02-28 Thread bearophile
D-ratiseur: Maybe the manual could contain a remark about this. I think it's written somewhere in the site. But LDC is able (with a compiler-specific pragma) to inline functions that contain asm. Bye, bearophile

Re: Inlining a "pure" ASM function

2013-02-28 Thread D-ratiseur
On Thursday, 28 February 2013 at 15:35:07 UTC, Simen Kjærås wrote: Nope. Ok, thx, so it's like in Delphi/Fpc. Maybe the manual could contain a remark about this.

Re: Inlining a "pure" ASM function

2013-02-28 Thread Simen Kjærås
On Thu, 28 Feb 2013 16:22:49 +0100, D-ratiseur wrote: Hello, Is it possible for an ASM function to be inlined in D? Nope. -- Simen

Re: inlining final functions

2013-02-26 Thread Jonathan M Davis
On Tuesday, February 26, 2013 10:20:21 n00b wrote: > Is the following correct : > > class X > { > void foo() { ... } > } > class Y : X > { > final override void foo() { ... } > } > > > Y y = new Y; > y.foo; //inlined > X x = y; > x.foo; //not inlined Y.foo can be made non-virtual by

Re: inlining

2010-12-07 Thread spir
On Tue, 07 Dec 2010 16:20:45 +0100 Lutger Blijdestijn wrote: > Lutger Blijdestijn wrote: > > > spir wrote: > > > >> On Tue, 07 Dec 2010 13:44:18 +0100 > >> Lutger Blijdestijn wrote: > >> > >>> There are some other conditions that prevent inlining, it's best to > >>> check for it. iirc also fu

Re: inlining

2010-12-07 Thread Lutger Blijdestijn
Lutger Blijdestijn wrote: > spir wrote: > >> On Tue, 07 Dec 2010 13:44:18 +0100 >> Lutger Blijdestijn wrote: >> >>> There are some other conditions that prevent inlining, it's best to >>> check for it. iirc also functions with loops, delegate and ref >>> parameters cannot be inlined for example

Re: inlining

2010-12-07 Thread Lutger Blijdestijn
spir wrote: > On Tue, 07 Dec 2010 13:44:18 +0100 > Lutger Blijdestijn wrote: > >> There are some other conditions that prevent inlining, it's best to check >> for it. iirc also functions with loops, delegate and ref parameters >> cannot be inlined for example. I'm not so sure about ref, that may

Re: inlining

2010-12-07 Thread spir
On Tue, 07 Dec 2010 13:44:18 +0100 Lutger Blijdestijn wrote: > There are some other conditions that prevent inlining, it's best to check > for it. iirc also functions with loops, delegate and ref parameters cannot > be inlined for example. I'm not so sure about ref, that may have been > improv

Re: inlining

2010-12-07 Thread Lutger Blijdestijn
Jonathan M Davis wrote: > On Tuesday 07 December 2010 03:05:28 spir wrote: >> Hello, >> >> Does dmd inline when appropriate (eg single-line func)? or is there a >> hint keyword? or what else? Eg how to have this inlined: >> >> private bool isPrecomposedHangulSylable (Code code) { >> /** whet

Re: inlining

2010-12-07 Thread Jonathan M Davis
On Tuesday 07 December 2010 03:05:28 spir wrote: > Hello, > > Does dmd inline when appropriate (eg single-line func)? or is there a hint > keyword? or what else? Eg how to have this inlined: > > private bool isPrecomposedHangulSylable (Code code) { > /** whether code is a precomposed Hangul s

Re: inlining

2010-12-07 Thread Christopher Nicholson-Sauls
On 12/07/10 05:05, spir wrote: > Hello, > > Does dmd inline when appropriate (eg single-line func)? or is there a hint > keyword? or what else? > Eg how to have this inlined: > > private bool isPrecomposedHangulSylable (Code code) { > /** whether code is a precomposed Hangul syllable ;-) */