-
Added initial matrix/linear algebra handler support from base R, using the same BLAS/LAPACK as R:
%*%,t(),crossprod(),tcrossprod(),outer()(withFUN="*"),%o%,forwardsolve(),backsolve(),diag(),t(),chol(),chol2inv(),solve(), andqr.solve().The plan is to add more functions in the future (#77, #79 @mns-nordicals)
-
Added support for
cbind()andrbind()for rank-0/1/2 inputs, with scalar recycling only and strict length checks for non-scalar inputs. -
On macOS, quickr will use LLVM flang (
flang-new) for compilation when available (e.g.brew install flang). This is optional and can be disabled withoptions(quickr.prefer_flang = FALSE). -
Added OpenMP parallelization via
declare(parallel())/declare(omp())forforloops andsapply()calls. -
Added support for throwing errors with
stop(). (#86) -
Added support for
abs()in size expressions used bydeclare(type(...))(e.g.declare(type(x = integer(abs(end - start) + 1L)))). -
Improved
for (... in <iterable>)lowering, including value iteration (for (v in x)) and support forrev()wrappers on supported iterables. -
Added nested compilation scopes with local declaration emission, enabling block-scoped temporaries (Fortran 2008
block ... end block) and local closures (lowered to internal procedures undercontains), includingsapply()lowering with host association for captures and support forsimplify = "array"for higher-rank outputs. Examples:-
Block-scoped temporary for expression subscripting:
out[1] <- ifelse((x > 0.0)[2, 3], 1.0, 0.0)
-
Local closure +
sapply()lowering:f <- function(i) x[i] + 1.0 out <- sapply(seq_along(out), f)
This lowering matches R’s “copy-on-modify" semantics: modifications to the variables from the parent scope trigger a copy in the local closure scope.
-
-
Added support for superassignment (
<<-) inside local closures (lowered to internal procedures) to explicitly mutate variables in the enclosing quick function scope, includingx[i] <<- ...subset targets. Example:apply_boundary_conditions <- function() { temp[1, ] <<- 0 temp[nx, ] <<- 0 temp[, 1] <<- 0 temp[, ny] <<- 0 NULL } apply_boundary_conditions()
-
Added support for
array(data=..., dim=...)for shape construction in user code and tests. -
Added extensive tests + snapshots for local closures,
sapply(), block-scoped temporaries, and package compilation behavior (internal procedure name collisions). -
Lowered the minimum supported R version to 4.3.0 and added a backport of
declare()for R < 4.4.0 (#67). -
Fixed
[subsetting scalars with bothdrop=TRUEanddrop=FALSE, simplifying to Fortran scalars so subsetted scalars in reductions (e.g.,min(m[1, 1], m[2, 1])) no longer emitminvalon scalars (#64). -
Fixed an issue where subsetting logical arrays could fail when compiling quick functions, e.g.
(x > 0)[2, 3](#68). -
Fixed a crash when compiling chained / fall-through assignments like
a <- b <- 1(#60).
-
Added support for
!and unary-and+(#49, @mns-nordicals) -
Functions can now return multiple arrays in a
list(), optionally named (#49, @mns-nordicals). -
Updates for changes in the R-devel C API (#61)
-
Internal utility
r2f()print method now shows the generatedc_bridgefor translated subroutines. -
Added support for
nrow(),ncol()anddim()(#21, @mikmart). -
Added support for
runif()with integration to R's RNG (#22, #45). -
Added support for
while,repeat,break,next. -
Added support for
%%and%/%. -
Added support for expression return values.
-
Fix passing a scalar (rank-0) arg to reduction intrinsics (min, max, prod, sum).
-
Fixed an issue where
/might perform integer division if one of the operands is an integer type (#33, #41). -
Fixed an issue with dll symbol registration when
quick()is used in a package (#19). -
Fixed segfault encountered on Windows with variable sized arrays.
-
Added workaround for cases where the compiler error message might not display correctly in RStudio.
-
Improved error message when using case-sensitive variable names (#18, #36, #39)
-
Added
AGENTS.mdandscripts/setup_codex.shto enable the ChatGPT/Codex agent to run tests in a docker container configured without internet access.
- Initial CRAN submission.