The current AST types uses CopyCell from toolshed, which is not really sound. Adding to that, interior mutability is inherently confusing.
I propose that we move back to normal heap allocated objects if the performance difference is small; otherwise, we should consider saving &mut in types.
Also, while toolshed requires Copy bound, it's not always necessary as rustc's DroplessArena shows. We could either use a reimplementation of that or simply typed-arena.
The current AST types uses
CopyCell
from toolshed, which is not really sound. Adding to that, interior mutability is inherently confusing.I propose that we move back to normal heap allocated objects if the performance difference is small; otherwise, we should consider saving
&mut
in types.Also, while toolshed requires
Copy
bound, it's not always necessary as rustc'sDroplessArena
shows. We could either use a reimplementation of that or simplytyped-arena
.