Most traits are not properly documented, see here https://github.com/perl6/doc/issues/2718 for instance. Even if it's not user-friendly, it's always better to make some reference even if only to avoid confusion just like this email. So I guess we'll get to it eventually...
El sáb., 13 jul. 2019 a las 12:58, Marcel Timmerman (<mt1...@gmail.com>) escribió: > Thanks very much, I'll look into it > > First off, a correction: liz found that the trait_mod:<is> candidate for > "inlinable" is actually used internally. > > Here's a link to the source to get you started, it's got a good comment at > the start about how rakudo's own inliner works: > https://github.com/rakudo/rakudo/blob/master/src/Perl6/Actions.nqp#L4193 > > On top of that, there's MoarVM's spesh, which also does inlining. The > profiler can tell you what was inlined and what wasn't, and IIRC the spesh > log can give you more specific info on why an inline was not performed in a > given case. > > HTH > - Timo > On 13/07/2019 12:51, Marcel Timmerman wrote: > > On 7/13/19 12:37 PM, Timo Paulssen wrote: > > I wouldn't put "is inlinable" in the docs; it requires the user to put a > QAST tree in the value, which isn't a thing an end-user would touch, > IMO. In fact I'm not sure why we have a trait for that at all, since > it's not used anywhere in rakudo's source. > > On 13/07/2019 12:33, Marcel Timmerman wrote: > > Hi, > > I found out about a trait 'is inlinable' when I made a typo in using a > trait on subs. There is no documentation for it so I thought maybe it > is not implemented, experimental or some other reason it is kept out > of the docs. Otherwise it should be documented too. > > Great work on the documentation, still learning a lot from it. > Regards, > Marcel > > Thanks @Timo > > I have used it here and there without any arguments. Can not see if it > helps. > Btw, is rakudo finding out itself if routines are inlinable and what > algorithm is it using? I have this question to see if one can influence > this process and nudge the routine into inlining. > > > -- JJ