Open lionel- opened 2 months ago
SETLENGTH() / SET_TRUELENGTH(): Used in rlang C API for resizing.
@DavisVaughan proposed to use ALTREP views for resizing to length.
Found non-API calls to R:
ENVFLAGS
https://github.com/r-lib/rlang/issues/1705FRAME
https://github.com/r-lib/rlang/pull/1721HASHTAB
https://github.com/r-lib/rlang/pull/1721LEVELS
https://github.com/r-lib/rlang/issues/1726NAMED
https://github.com/r-lib/rlang/commit/5634e9665d056b0e89a3d1a3a52988d85251871aPRENV
PRVALUE
RDEBUG
https://github.com/r-lib/rlang/issues/1727R_PromiseExpr
,Rf_findVarInFrame3
SETLENGTH
SET_BODY
SET_CLOENV
,SET_ENCLOS
SET_ENVFLAGS
https://github.com/r-lib/rlang/issues/1705SET_FORMALS
SET_GROWABLE_BIT
,SET_RDEBUG
https://github.com/r-lib/rlang/issues/1727SET_TRUELENGTH
SET_TYPEOF
STRING_PTR
,XTRUELENGTH
Requests/contribs for R core (WIP):
LEVELS()
in (see rlang https://github.com/r-lib/rlang/issues/1726), a predicate to determine if a CHARSXP is encoded in UTF8. Added in https://github.com/wch/r-source/commit/0c753e41fc06bf5a8825657a5843104a93f28c12getVar()
that returns error codes? We either can't afford protecting ourselves from these jumpy R errors, or we'd like to throw our own errors with tailored messages https://github.com/r-devel/r-svn/commit/29a2fda1e9a88a531751cfb908053471533a79c4
Or better, a function that returns the binding type:
-> direct, promiseDelayed, promiseForced, active, missing, unbound.Speculative:
ATTRIB()
?
Or at least a way to get the attribute names?
https://rstudio.github.io/r-manuals/r-exts/The-R-API.html#moving-into-c-api-compliance
Non-problematic:
SET_ENVFLAGS()
: #1705R_ClosureExpr()
/BODY_EXPR()
: Used inr_fn_body()
, which is only used inzap_srcref()
. Should be fine to call R-levelbody()
instead.Potentially problematic:
SET_ENCLOS()
: Used to mutate parent environment in quosure evaluation inside data masks. It would be helpful if we could continue to use it to avoid a perf hit when evaluating with many groups. See also https://github.com/r-lib/rlang/issues/1707Problematic:
SETLENGTH()
/SET_TRUELENGTH()
: Used in rlang C API for resizing. Would be nice to get these added to the official API. Also used in vctrs and data.table.🔥🔥🔥 :
R_PromiseExpr()
/PREXPR()
: Essential for tidyeval to access promise expressions. See also https://github.com/r-lib/rlang/issues/1708