FastR: Inlining failing

Juan Fumero juan.fumero at
Fri Jul 1 09:39:00 UTC 2016

Hi all, 
 Within FastR,  I am working now Tuples (RList with fixed types) in R
for the GPU. I get a runtime error when I am trying to compile the
function through the Partial Evaluator. 

# Simple test case
Tuple2 <- function(x, y) {
    t <- list(name="tuple2", a=x, b=y)  
    attr(t, "class") <- "tuple2"

gpuFunction <- function(x) {
     return(Tuple2(x, x))

# R sapply for GPUs
result <- marawacc.sapply(1:1000, gpuFunction)   


When Graal tries to compile the gpuFunction through the
OptimzedCallTarget, I get the following error in FastR. Any idea? I do
not get why this is a recursive inlining, 

[truffle] opt
fail         gpuFunction                                               
  |Reason Too deep inlining, probably
caused by recursive inlining. Inlined methods ordered by inlining
java.util.ResourceBundle.getObject(String) [488]
java.text.DecimalFormatSymbols.getInstance(Locale) [1]
java.util.Formatter.<init>(Locale, Appendable) [1][]) [1]
java.lang.String.format(String, Object[]) [1]
java.text.DecimalFormatSymbols.<init>(Locale) [1]
java.util.Formatter.getZero(Locale) [1]
(VirtualFrame) [1]
java.text.DecimalFormatSymbols.initialize(Locale) [1]<init>(Throwable, String,
Object[]) [1]
java.util.Formatter.<init>() [1]
ualFrame) [1]
ocale) [1] 

It does work if, instead of returning as S3 object, I return an RList. 

gpuFunction <- function(x) {

As a work around I am working with RList directly, but I would like to return an S3 object. Any idea is welcome.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <>

More information about the graal-dev mailing list