-
Notifications
You must be signed in to change notification settings - Fork 786
[Strings] Add experimental StringNew variants #5459
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % comments
code == BinaryConsts::StringNewUTF8Try) { | ||
if (code == BinaryConsts::StringNewUTF8Try) { | ||
try_ = true; | ||
} | ||
if (getInt8() != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is existing code, but surely the memory index should be a ULEB32 rather than a byte?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think you're right, I'll add a TODO here. When we implement multimemory support for these we should fix that.
test/lit/passes/O1_skip.wast
Outdated
;; 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved out.
string.from_code_point
makes a string from an int code point.string.new_utf8*_try
makes a utf8 string and returns null on a UTF8 encodingerror rather than trap.