[Strings] Add experimental StringNew variants#5459
Merged
Conversation
tlively
approved these changes
Jan 26, 2023
| if (code == BinaryConsts::StringNewUTF8Try) { | ||
| try_ = true; | ||
| } | ||
| if (getInt8() != 0) { |
Member
There was a problem hiding this comment.
This is existing code, but surely the memory index should be a ULEB32 rather than a byte?
Member
Author
There was a problem hiding this comment.
Hmm, I think you're right, I'll add a TODO here. When we implement multimemory support for these we should fix that.
Comment on lines
1
to
2
| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||
| ;; NOTE: This test was ported using port_passes_tests_to_lit.py and could be cleaned up. |
Member
Author
There was a problem hiding this comment.
No, it's intentional - this test now has a manual CHECK-NOT so it can't be auto-updated (the update removes that line!). I missed this when landing and it's annoying in local work. I can open a separate PR, but it is trivial?
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.
string.from_code_pointmakes a string from an int code point.string.new_utf8*_trymakes a utf8 string and returns null on a UTF8 encodingerror rather than trap.