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

Fixed ScriptRuntime.toPrimitive() and use it for toXXX() (taken from #1611 done by @tonygermano) #1674

Merged
merged 10 commits into from
Oct 7, 2024

Conversation

rbri
Copy link
Collaborator

@rbri rbri commented Oct 3, 2024

This is another carve out from #1661.

It contains

  • some major fixes for the toPrimitive() implementation itself and
  • the usage of toPrimitive() in ScriptRuntime#toString(), ScriptRuntime#toNumeric(), ScriptRuntime#toBigInt(), and ScriptRuntime#toNumber().

This fixes again a bunch of Test262 cases and should be still backward compatible.

I left the single steps as single commits to (hopefully) make the review simpler. But I think we should squash this on merge.

@gbrail @tonygermano @rPraml @p-bakker please have a look, it was a bit hard to do the backward compatibility in toPrimitive() - i'm only 99% sure that all this is correct...

@rbri
Copy link
Collaborator Author

rbri commented Oct 3, 2024

@gbrail will rebase my P&R branch after this is merged because i have to sort out some conflicts regarding to symbol handling

@rPraml
Copy link
Contributor

rPraml commented Oct 4, 2024

I did a quick review and this looks good to me

@rbri rbri force-pushed the more_toPrimitive_usage branch from 8d3f07d to 40d0ce5 Compare October 4, 2024 14:28
@rbri rbri force-pushed the more_toPrimitive_usage branch from 40d0ce5 to 3ed7160 Compare October 5, 2024 07:54
@p-bakker
Copy link
Collaborator

p-bakker commented Oct 5, 2024

Will this one resolve #1608?

@rbri
Copy link
Collaborator Author

rbri commented Oct 5, 2024

Will this one resolve #1608?

Its already solved on head - see my comment in the issue and the related pr.

@gbrail
Copy link
Collaborator

gbrail commented Oct 5, 2024

The code looks good to me and it moves us closer enough to our goal so that I think we should merge it -- LMK if you all have any objections.

@gbrail gbrail merged commit 53e49ac into mozilla:master Oct 7, 2024
1 check passed
@rbri
Copy link
Collaborator Author

rbri commented Oct 7, 2024

Thanks, new one will arrive soon.

@rbri rbri deleted the more_toPrimitive_usage branch October 7, 2024 06:24
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.

4 participants