-
Notifications
You must be signed in to change notification settings - Fork 53
feat(ecmascript): Array and TypedArray prototype toLocaleString #745
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): Array and TypedArray prototype toLocaleString #745
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.
Couple of GC related nitpicks but LGTM, nice! <3
.../ecmascript/builtins/indexed_collections/typed_array_objects/typed_array_intrinsic_object.rs
Outdated
Show resolved
Hide resolved
.../ecmascript/builtins/indexed_collections/typed_array_objects/typed_array_intrinsic_object.rs
Outdated
Show resolved
Hide resolved
.../ecmascript/builtins/indexed_collections/typed_array_objects/typed_array_intrinsic_object.rs
Outdated
Show resolved
Hide resolved
.../ecmascript/builtins/indexed_collections/typed_array_objects/typed_array_intrinsic_object.rs
Outdated
Show resolved
Hide resolved
.../ecmascript/builtins/indexed_collections/typed_array_objects/typed_array_intrinsic_object.rs
Outdated
Show resolved
Hide resolved
00404f0
to
1fa0de5
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, though a few nitpicks related to binding still. They don't matter really, the code is fine from GC point of view, but it's again from a "leave a good example" kind of view better to fix them.
nova_vm/src/ecmascript/builtins/indexed_collections/array_objects/array_prototype.rs
Outdated
Show resolved
Hide resolved
nova_vm/src/ecmascript/builtins/indexed_collections/array_objects/array_prototype.rs
Outdated
Show resolved
Hide resolved
cf7a758
to
aaf5823
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 and great work! <3
The toLocaleString method should ideally conform to ECMA-402, but according to the specification, if ECMA-402 is not supported, it’s acceptable to implement it as specified in ECMA-262:
In this PR, the priority was to pass test262, so I implemented toLocaleString for Array and TypedArray.
doc
ref