Re: [Rd] An argument promise containing bytecode?

2021-03-07 Thread Taras Zakharko
Thank you Simon! Such a trivial explanation… admittedly, I am a bit disappointed, I hoped there was more to the mystery :) Best, Taras > On 8 Mar 2021, at 03:51, Simon Urbanek wrote: > > Taras, > > I don't think this has anything to do with promises, rather it is called > Just-In-Time (JI

Re: [Rd] An argument promise containing bytecode?

2021-03-07 Thread Simon Urbanek
Taras, I don't think this has anything to do with promises, rather it is called Just-In-Time (JIT) compilation - see ?enablleJIT in R, it is enabled by default, so the function will be compiled on second use. Cheers, Simon > On Mar 7, 2021, at 11:12 PM, Taras Zakharko wrote: > > Dear all,

[Rd] An argument promise containing bytecode?

2021-03-07 Thread Taras Zakharko
Dear all, I was playing around with some C code that inspects argument promises and I noticed that forwarded arguments sometimes contain bytecode in the PRCODE component. E.g. if I have a nested call like this: f <- function(x) x g <- function(x) f(x) g(1+1) and inspect the value of “x”