Remove Box<T> from JsValue for JsString#4329
Merged
Conversation
Test262 conformance changes
|
Member
Author
BenchmarkmainPR |
86aa77d to
3c12a07
Compare
3c12a07 to
0480d7a
Compare
raskad
reviewed
Jul 10, 2025
Member
raskad
left a comment
There was a problem hiding this comment.
I have not looked into this in detail, but do we potentially run into issues here because JsString is a Tagged pointer?
Contributor
@raskad NaN-boxed pointers are not tagged on the LSB (which is what JsString uses). We moved away from this early in the development of NaN-boxing values. Storing a LSB-tagged pointer is "safe". We have enough tests around it that I'm confident if we ever break this assumption we'll assert quite quickly. |
Member
Author
|
Yes, as @hansl mentioned, it's not a issue, and we have more than enough space to store the tag. 😄 |
Co-authored-by: raskad <32105367+raskad@users.noreply.github.com>
raskad
approved these changes
Jul 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
Box<T>wrapper ofJsStringin nan-boxedJsValue, this requires us to return a clone of aJsString(reference bump) forJsValue::as_string().