diff --git a/.Rbuildignore b/.Rbuildignore index 5882bdb..f7889bb 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -19,3 +19,4 @@ notcran \.Rout.fail$ ^\.github$ ^revdep +^tmp$ diff --git a/R/code-ifelse.R b/R/code-ifelse.R index 0c0641d..bc425ea 100644 --- a/R/code-ifelse.R +++ b/R/code-ifelse.R @@ -111,7 +111,7 @@ code_gen_if <- function(...) { #' are used, [subassign] (another internal representation function). #' @export #' @keywords internal -#' @rdname intermediate-representation +#' @name intermediate-representation #' @aliases r2c_if if_true if_false if_test r2c_for for_init for_iter for_n #' for_0 vcopy rec lset lcopy @@ -133,5 +133,5 @@ if_false <- function(expr) expr #' @keywords internal #' @rdname intermediate-representation -if_test <- function(cond) expr +if_test <- function(cond) cond diff --git a/R/code-unary.R b/R/code-unary.R index a113be3..bd05cf4 100644 --- a/R/code-unary.R +++ b/R/code-unary.R @@ -21,13 +21,13 @@ NULL #' @rdname intermediate-representation #' @export -uplus <- function(e1) x +uplus <- function(e1) e1 #' @param e1 a logical or numeric vector #' @rdname intermediate-representation #' @export -uminus <- function(e1) -x +uminus <- function(e1) -e1 UOP.MAP <- c("-"="uminus", "+"="uplus") diff --git a/R/code.R b/R/code.R index 279d72d..47850eb 100644 --- a/R/code.R +++ b/R/code.R @@ -247,7 +247,7 @@ cgen <- function( # Check-reorder constant formal params if(length(icnst)) { - formals <- if(typeof(defn) == 'closure') formals(defn) else formals(closure) + formals <- if(typeof(defn) == 'closure') formals(defn) else formals(fun) if( (!all(names(icnst) %in% names(formals)) || "..." %in% names(icnst)) ) diff --git a/R/compile.R b/R/compile.R index 6ffbc11..6d08513 100644 --- a/R/compile.R +++ b/R/compile.R @@ -116,9 +116,9 @@ rand_string <- function(len, pool=c(letters, 0:9)) #' loss as double precision floating point. Platforms that support R and fail #' this requirement are likely rare. #' -#' Interrupts are supported at the [runner] level, e.g. _between_ groups or -#' windows, each time a preset number of elements has been processed since the -#' last interrupt check. There is infrastructure to support within +#' Interrupts are supported at the [runner][runners] level, e.g. _between_ +#' groups or windows, each time a preset number of elements has been processed +#' since the last interrupt check. There is infrastructure to support within #' iteration-interrupts, but it adds overhead when dealing with many iterations #' with few elements each and thus is disabled at the moment. #' @@ -700,7 +700,7 @@ unload_r2c_dynlibs <- function(except=character()) { unloaded <- try(dyn.unload(path), silent=TRUE) if(inherits(unloaded, "try-error")) { msg <- conditionMessage(attr(unloaded, 'condition')) - paste0("Failed to unload ", name, ": ", msg) + paste0("Failed to unload ", x, ": ", msg) } else "" }, "" diff --git a/R/preprocess.R b/R/preprocess.R index 7a8cbde..5f8547d 100644 --- a/R/preprocess.R +++ b/R/preprocess.R @@ -698,7 +698,7 @@ transform_control <- function(x, i=0L) { ) ) } else if (call.sym %in% c('repeat', 'while')) { # BE SURE TO UPDATE `collect_loop_call_symbols` IF WE ADD THESE - stop("`", call.sym., "` unimplemented.") + stop("`", call.sym, "` unimplemented.") } } x diff --git a/man/intermediate-representation.Rd b/man/intermediate-representation.Rd index 478afdd..00690fe 100644 --- a/man/intermediate-representation.Rd +++ b/man/intermediate-representation.Rd @@ -11,6 +11,7 @@ \alias{for_0} \alias{lset} \alias{lcopy} +\alias{intermediate-representation} \alias{r2c_if} \alias{if_true} \alias{if_false} diff --git a/man/r2c-compile.Rd b/man/r2c-compile.Rd index 2b427bb..33fded4 100644 --- a/man/r2c-compile.Rd +++ b/man/r2c-compile.Rd @@ -162,9 +162,9 @@ infinity defined and the \code{R_xlen_t} range representable without precision loss as double precision floating point. Platforms that support R and fail this requirement are likely rare. -Interrupts are supported at the \link{runner} level, e.g. \emph{between} groups or -windows, each time a preset number of elements has been processed since the -last interrupt check. There is infrastructure to support within +Interrupts are supported at the \link[=runners]{runner} level, e.g. \emph{between} +groups or windows, each time a preset number of elements has been processed +since the last interrupt check. There is infrastructure to support within iteration-interrupts, but it adds overhead when dealing with many iterations with few elements each and thus is disabled at the moment. diff --git a/man/rolli_exec.Rd b/man/rolli_exec.Rd index 8a6aa36..dbf541b 100644 --- a/man/rolli_exec.Rd +++ b/man/rolli_exec.Rd @@ -137,9 +137,9 @@ with( mtcars, rolli_exec(r2c_mean, hp, n=5) ) -r2c_len <- r2cq(length(x)) ## Effect of align and partial +r2c_len <- r2cq(length(x)) dat <- runif(5) rolli_exec(r2c_len, dat, n=5, align='left', partial=TRUE) rolli_exec(r2c_len, dat, n=5, align='center', partial=TRUE)