|
|
|
|
|
by Rusky
687 days ago
|
|
You don't want to use `RefCell` for something like this- it is still too strict for Lox's semantics. Doing this properly means putting `GcData`'s fields (and/or `ObjFun`/`ObjClosure`/etc's fields) in plain `Cell`s, and using that for all mutation without ever forming any `&mut` references. |
|
If I remember correctly, there were some panics cause by RefCell borrows. But those got sorted out once I handled borrowing in the correct order.