The loop OSRing is implemented in interp.cpp using
static size_t loopCounter = 0;
as a consequence, it may OSR the wrong function:
g <- function() {
x <- 0
for (i in 1:5000) {
x <- x + i
}
print("G done 1")
}
f <- function() {
g()
x <- 0
for (i in 1:4) {
x <- x + i
}
print("F Done 1")
}
rir.compile(f)
rir.compile(g)
f()
The loop OSRing is implemented in interp.cpp using
as a consequence, it may OSR the wrong function: