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

chore(ecmascript): used try and Assert Determination #565

Merged
merged 5 commits into from
Feb 13, 2025

Conversation

yossydev
Copy link
Contributor

It was the same with TypedArray, but using assert_eq!(from_index.is_undefined(), n.into_i64() == 0); causes some test262 cases to fail.

Even if I use assert_eq only when fromIndex is undefined, I believe it’s essentially doing the same thing.

I also tried using try_to_integer_or_infinity. However, based on my measurements using the time command on Unix, it didn’t seem to make things any faster.

So, it might be pointless… but I gave it a shot anyway.

aapoalas
aapoalas previously approved these changes Feb 12, 2025
Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, though the try-methods are kind of unnecessary right now. You could either revert them back to the original, or alternatively make scoping of o be a conditional thing done in the else-branches.

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks<3

@aapoalas aapoalas merged commit 61ab8f8 into trynova:main Feb 13, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants