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

Normative: Restore params/body ToString order in new Function #3288

Merged

Conversation

nicolo-ribaudo
Copy link
Member

#3222 (cc @ptomato) accidentally changed the new Function implementation to stringify the body before the parameters, rather than after. This change was introduced in this force-push to that PR, as part of the response to #3222 (comment), but it was unnecessary (and unrelated) for Kevin's request.

Being accidental, this change was never discussed in plenary (slides, notes 1, notes 2). If anything, the slide that got consensus (slide 25) mentions that we "stringify the parameters and the body", and not the other way around.

The behavior restored by this PR is also tested by test262:

This bug was cought by @jedel1043, that already implemented it in Boa (boa-dev/boa#3690).

I marked this as normative, but I don't think it needs to go through plenary because it simply reverses a normative change that was never presented for consensus.

@nicolo-ribaudo nicolo-ribaudo requested a review from a team February 27, 2024 12:13
@ljharb ljharb added normative change Affects behavior required to correctly evaluate some ECMAScript source text es2024 to be landed before es2024 editor call to be discussed in the next editor call labels Feb 27, 2024
Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

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

Oops, good catch. Agreed this can be landed without revisiting plenary.

@syg syg added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Feb 28, 2024
@ljharb ljharb force-pushed the new-function-stringify-body-after-params branch from 5c41895 to ae080b8 Compare February 28, 2024 22:43
@ljharb ljharb merged commit ae080b8 into tc39:main Feb 28, 2024
7 checks passed
@ljharb ljharb removed the editor call to be discussed in the next editor call label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
es2024 to be landed before es2024 normative change Affects behavior required to correctly evaluate some ECMAScript source text ready to merge Editors believe this PR needs no further reviews, and is ready to land. spec bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants