-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat(ecmascript): String fromCodePoints #543
Conversation
a2e42a6
to
20b990a
Compare
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Show resolved
Hide resolved
20b990a
to
2cbd76a
Compare
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.
Found some differences compared to what the spec expects.
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
b30cda7
to
bc46921
Compare
@aapoalas I have two things I’d like to confirm. First, in the fast path, I’m using into_i64, but in the non-fast path, I’m using to_uint32_number. Second, in the fast path, if I remove to_number, I can’t use into_i64, so I left it as is. |
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.
Still a few problems, sorry :( But after these I think this should be good and very solid <3
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
bc46921
to
8e63517
Compare
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Show resolved
Hide resolved
@aapoalas |
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.
The generic path shouldn't assume Value::Integer
.
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
c399d6a
to
147cb9b
Compare
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, thank you! Had one minor nitpick which has no effect in the end :)
nova_vm/src/ecmascript/builtins/text_processing/string_objects/string_constructor.rs
Outdated
Show resolved
Hide resolved
BTW you seem to have updated the test262 submodule at some point. Or maybe I did that? Anyway, it's not the best thing to do it in this PR but it's fine, let's keep it :) |
This reverts commit f2b0567.
Thank you for merging! And sorry, I didn’t mean to update it, but it looks like it got included in the changes! 🙇♂️ |
ref: #140
doc: https://tc39.es/ecma262/multipage/text-processing.html#sec-string.fromcodepoint