For use in rlang_new_ctxt_pronoun() where we don't poke into the pronoun environment at all, which makes it slightly faster and allocate less memory. new_data_mask() now shows up as allocating 0 memory by profmem.
I was tempted to make this what happens if you supply 0 in r_alloc_environment(), but that felt wrong because it creates a non-hashed environment and is different from what R_NewEnv() does (by using the "default" size of 29)
For use in
rlang_new_ctxt_pronoun()
where we don't poke into thepronoun
environment at all, which makes it slightly faster and allocate less memory.new_data_mask()
now shows up as allocating 0 memory by profmem.r_new_environment()
in vctrs, so we could switch that out for this https://github.com/r-lib/vctrs/blob/793d028250824ce907970135105c461c66b7dd25/src/utils.h#L2600
inr_alloc_environment()
, but that felt wrong because it creates a non-hashed environment and is different from whatR_NewEnv()
does (by using the "default" size of 29)