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

New instruction string.from_code_point #59

Open
Liedtke opened this issue Jan 26, 2023 · 7 comments
Open

New instruction string.from_code_point #59

Liedtke opened this issue Jan 26, 2023 · 7 comments

Comments

@Liedtke
Copy link

Liedtke commented Jan 26, 2023

Following up on #5 (comment) we decided to implement string.from_code_point for performance evaluations in V8 (see also #58):

  • string.from_code_point(codepoint: i32) -> ref string, opcode 0xfba9
  • returns a string consisting of the provided codepoint
  • the instruction traps if the argument is not a valid unicode codepoint
@gkdn
Copy link

gkdn commented Feb 15, 2023

Shouldn't this be returning ref string instead?
@Liedtke @jakobkummerow

@gkdn
Copy link

gkdn commented Feb 15, 2023

BTW, I think also binaryen mismatches Chrome here and assumes the instruction returns ref string which results in code rejected by V8. Adding @kripken to verify.

@Liedtke
Copy link
Author

Liedtke commented Feb 15, 2023

@gkdn Yeah, the returned value is never null. I'll adapt the return type in v8 and in my comment above.

@MaxGraey
Copy link

What should happen for invalid code points? Like 0x110000 and above. In JavaScript this leads to an exception. At least for String.fromCodePoint

@Liedtke
Copy link
Author

Liedtke commented Feb 16, 2023

@MaxGraey The instruction traps for invalid codepoints.

@gkdn
Copy link

gkdn commented Feb 23, 2023

@Liedtke do you have link to the dashboard to track the release? or if you know dev-channel version to get the fix that would work as well.

@jakobkummerow
Copy link
Collaborator

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

No branches or pull requests

4 participants