This branch overhauls how tracked structs are implemented to make them more efficient -- it also adds tests for some edge cases along the way. In the new design, instead of treating tracked structs like a bunch of functions with specified values (omg the hashing) it creates a single shared hashmap to map the tracked struct id to its fields.
The plan is to eventually transition to a "Salsa 3.0" design in which tracked structs can be literal pointers into this shared value, but that will require more extensive changes that I have to write-up and think through (there are some edge cases in the unsafe code that are a bit subtle). This seemed like a useful stopping point regardless.
This branch overhauls how tracked structs are implemented to make them more efficient -- it also adds tests for some edge cases along the way. In the new design, instead of treating tracked structs like a bunch of functions with specified values (omg the hashing) it creates a single shared hashmap to map the tracked struct id to its fields.
The plan is to eventually transition to a "Salsa 3.0" design in which tracked structs can be literal pointers into this shared value, but that will require more extensive changes that I have to write-up and think through (there are some edge cases in the unsafe code that are a bit subtle). This seemed like a useful stopping point regardless.