Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined behaviour in shrink_to_fit #47

Closed
wants to merge 3 commits into from

Conversation

jedel1043
Copy link

Fixes #46 and adds a test to avoid future regressions.

Since having a big memory footprint was a big no no, I had to do some pointer shenanigans to reassign the spans when a reallocation occurs. Miri doesn't report any UB, so this should be fine :)

bors bot pushed a commit to boa-dev/boa that referenced this pull request Jun 30, 2022
…rner` (#2147)

So, @raskad and myself had a short discussion about the state of #736, and we came to the conclusion that it would be a good time to implement our own string interner; partly because the `string-interner` crate is a bit unmaintained (as shown by Robbepop/string-interner#42 and Robbepop/string-interner#47), and partly because it would be hard to experiment with custom optimizations for UTF-16 strings. I still want to thank @Robbepop for the original implementation though, because some parts of this design have been shamelessly stolen from it 😅.

Having said that, this PR is a complete reimplementation of the interner, but with some modifications to (hopefully!) make it a bit easier to experiment with UTF-16 strings, apply optimizations, and whatnot :)
@Robbepop
Copy link
Owner

Robbepop commented May 1, 2024

Superseeded by #66 which is a lot simpler but does not shrink optimally as trade off.

@Robbepop Robbepop closed this May 1, 2024
@jedel1043 jedel1043 deleted the shrink-to-sound branch May 1, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

shrink_to_fit method for the bucket backend is unsound
2 participants