On Wed, May 20, 2009 at 3:30 PM, Erik Corry <[email protected]> wrote: > > 2009/5/20 William Hesse <[email protected]>: >> I notice that some functions in the V8 source use the >> INLINE() macro in their declaration, declared for GCC >=4 as >> >> #define INLINE(header) inline header __attribute__((always_inline)) >> >> and plenty more functions just are declared inline as in >> inline foo(); >> >> Should they be all one way or all the other? Shall we make this a bug? > > One is a recommendation to the compiler, the other is a strong > recommendation to the compiler.
I am sure everyone knows this, but I just wanted to point out that inline is more than a optimization recommendation to the compiler. The important and non-performance aspect of the 'inline' keyword tells that compiler that it is ok to see multiple definitions of this function. I think slowly as compilers are getting better, 'inline' is becoming the new 'register', and compilers are welcome to ignore your request when they think they know better. > >> >> >> -- >> William Hesse >> Software Engineer >> [email protected] >> >> Google Denmark ApS >> Frederiksborggade 20B, 1 sal >> 1360 København K >> Denmark >> CVR nr. 28 86 69 84 >> >> If you received this communication by mistake, please don't forward it to >> anyone else (it may contain confidential or privileged information), please >> erase all copies of it, including all attachments, and please let the sender >> know it went to the wrong person. Thanks. >> >> >> > >> > > > > -- > Erik Corry, Software Engineer > Google Denmark ApS. CVR nr. 28 86 69 84 > c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018 > Copenhagen K, Denmark. > > > > --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
