bergercookie / asm-lsp

Language server for NASM/GAS/GO Assembly
https://crates.io/crates/asm-lsp
BSD 2-Clause "Simplified" License
272 stars 18 forks source link

fix: Revert switch to owned data in global maps #86

Closed WillLillis closed 4 months ago

WillLillis commented 4 months ago

This reverts some of the changes I made in #83. In particular, it makes it so that the global maps once again hold references to data in underlying vectors, rather than owning the data themselves for each entry. This won't be an issue for the upcoming serialization changes, as we can still use the vectors, and then populate the hashmaps after deserialization. This should improve our memory footprint, especially as we add new architectures.

In regards to the testing code, this change slows down the tests considerably, as the global stores have to be initialized on every test. On the upside, however, it improves the error output when a test fails (there's a lot less noise since there's no longer a mutex to poison).