Skip to content

Implement Upsert (Stage 2.7) #290

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

Merged
merged 7 commits into from
May 16, 2025

Conversation

dminor
Copy link
Contributor

@dminor dminor commented May 3, 2025

This implementation passes the tests at tc39/test262#4454.

@dminor dminor mentioned this pull request May 6, 2025
74 tasks
Comment on lines 134 to 135
// a. If p.[[Key]] is not empty and SameValue(p.[[Key]], key) is true, return p.[[Value]].
if (p.Key !== undefined && SameValueZero(p.Key, key) === Value.true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it SV or SVZ? Comment and the code are conflict

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's SV, thanks for catching that.

Comment on lines 157 to 159
if (key instanceof NumberValue && Object.is(R(key), -0)) {
key = F(+0);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

and you should call CanonicalizeKeyedCollectionKey you just added 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, thanks for catching that

@Jack-Works Jack-Works merged commit 7dd57e7 into engine262:main May 16, 2025
2 checks 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