From brodie.gaslam at yahoo.com  Fri Nov 11 20:13:23 2016
From: brodie.gaslam at yahoo.com (brodie gaslam)
Date: Fri, 11 Nov 2016 19:13:23 +0000 (UTC)
Subject: [Rd] Frames in compiled functions
References: <1209438475.1993878.1478891603236.ref@mail.yahoo.com>
Message-ID: <1209438475.1993878.1478891603236@mail.yahoo.com>

I noticed some problems that cropped in the latest versions of R-devel (2016-11-08 r71639 in my case) for one of my packages.  I _think_ I have narrowed it down to the changes to what gets byte-compiled by default.  The following example run illustrates the problem I'm having:

  compiler::enableJIT(0)
  fun <- function(x) local(as.list(parent.frame(2)))
  fun(1)
  ## $x
  ## [1] 1
  ## 

  

  compiler::cmpfun(fun)(1)
  ## <contents of .GlobalEnv>


Is this considered problematic at all?  If so, might it make sense to broaden the list of functions that disable JIT compilation beyond `browser`?  I'm pretty sure I can work around this issue in my specific use case, but figured it is worth mentioning here since it is a change in behavior.


Regards,

B.



[Rd] Frames in compiled functions
brodie gaslam