From luke at stat.uiowa.edu  Sat Oct  2 19:11:51 2004
From: luke at stat.uiowa.edu (Luke Tierney)
Date: Sat Oct  2 19:11:57 2004
Subject: [Rd] RCC compatibility patch
In-Reply-To: <Pine.LNX.4.44.0410012003580.14043-100000@hpc3.cs.rice.edu>
References: <Pine.LNX.4.44.0410012003580.14043-100000@hpc3.cs.rice.edu>
Message-ID: <Pine.LNX.4.58.0410021210220.15858@itasca2.stat.uiowa.edu>

I think we'd need more infomation to decidide how best to proceed.
Let's discuss this offline.

luke

On Fri, 1 Oct 2004, John Garvin wrote:

> Would you consider the following patch to eval.c to allow compatibility 
> with RCC? (It's in the applyClosure function.)
> 
> @@ -432,6 +432,14 @@
>       SEXP f, a, tmp;
>       RCNTXT cntxt;
> 
> +#ifdef RCC
> +    SEXP comp;
> +    PROTECT(comp = getAttrib(op, install("RCC_CompiledSymbol")));
> +    if (comp != R_NilValue)  /* compiled version exists */
> +      op = comp;
> +    UNPROTECT(1);
> +#endif /* RCC */
> +
>       /* formals = list of formal parameters */
>       /* actuals = values to be bound to formals */
>       /* arglist = the tagged list of arguments */
> 
> RCC (http://hipersoft.cs.rice.edu/rcc/) is a static compiler for R we're
> working on at Rice. It compiles R scripts into dynamic libraries that can
> be loaded from within R using the dyn.load function.
> 
> This change enables compiled R code to be executed while retaining full
> correctness; i.e., inspection and modification of closures generated by
> RCC will work exactly as in interpreted R. This patch does not change
> the existing implementation in the default build; when enabled, it should
> not affect the evaluation of any R code except code compiled with RCC.
> 
> John
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Luke Tierney
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
   Actuarial Science
241 Schaeffer Hall                  email:      luke@stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu


[Rd] RCC compatibility patch
Luke Tierney