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: make Function.prototype.toString forward-compatible and fully defined #697

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

michaelficarra
Copy link
Member

@michaelficarra michaelficarra commented Sep 27, 2016

Implements the currently stage 3 proposal at https://github.com/tc39/Function-prototype-toString-revision. This PR is part of the new stage 4 entrance criteria.

Fixes #664.

@littledan
Copy link
Member

In the January 2018 TC39 meeting, the committee decided to wait to advance Function.prototype.toString to Stage 4 (and land this patch) until we add a corresponding mechanism for allowing implementations to not return all of the source code. One such mechanism would be @domenic 's Function.prototype.toString() censorship proposal.

@michaelficarra
Copy link
Member Author

michaelficarra commented Mar 5, 2018

@littledan see tc39/Function-prototype-toString-revision#26 for the PR that addressed that concern and tc39/Function-prototype-toString-revision#30 for a PR addressing @anba's comments.

@ljharb ljharb added the proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4. label Mar 21, 2018
@michaelficarra michaelficarra force-pushed the F.p.toString branch 6 times, most recently from 8d55499 to ba5e401 Compare April 25, 2018 01:36
@annevk
Copy link
Member

annevk commented May 17, 2018

Does HostHasSourceTextAvailable require that a host basically has a set of all its built-in functions? How does that work if the set of functions differs across agent/realm-boundaries?

@littledan
Copy link
Member

@annevk I thought that hook wouldn't be called on native functions, as their [[SourceText]] internal slot would be undefined.

@annevk
Copy link
Member

annevk commented May 17, 2018

I see, this would only be for "userland" functions... I'm a little curious what tc39/Function-prototype-toString-revision#25 (comment) is about as without that it's somewhat tough to evaluate whether this works.

@michaelficarra
Copy link
Member Author

@annevk Considering the PR (tc39/Function-prototype-toString-revision#26) was approved by @domenic, I'm sure it satisfies his needs.

@annevk
Copy link
Member

annevk commented May 17, 2018

Well, he also said it'd require hand-waving, so I'm curious to see what that means in practice.

@michaelficarra
Copy link
Member Author

@annevk I'll bring it up during the stage 4 presentation.

@michaelficarra michaelficarra removed the pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. label Nov 29, 2018
@michaelficarra
Copy link
Member Author

@tc39/ecma262-editors I've removed the pending stage 4 label.

@mathiasbynens
Copy link
Member

This proposal reached stage 4 at the November 2018 meeting. Please prioritize it over other PRs. Thanks!

@ljharb
Copy link
Member

ljharb commented Jan 29, 2019

We’ll look at it first thing in next week’s editor meeting.

@ljharb ljharb added the has stage 4 This PR represents a proposal that has achieved stage 4, and is ready to merge. label Jan 29, 2019
@ljharb ljharb added the es2019 label Feb 10, 2019
@ljharb ljharb changed the title make Function.prototype.toString forward-compatible and fully defined Normative: make Function.prototype.toString forward-compatible and fully defined Feb 20, 2019
@ljharb ljharb assigned ljharb and unassigned bterlson Feb 20, 2019
@ljharb ljharb force-pushed the F.p.toString branch 2 times, most recently from cf647d7 to 8406c18 Compare February 21, 2019 00:25
@ljharb
Copy link
Member

ljharb commented Feb 21, 2019

@michaelficarra i've rebased this PR on latest master; can you confirm that my conflict resolution worked out?

@michaelficarra
Copy link
Member Author

LGTM otherwise.

@ljharb ljharb merged commit fe9b81a into tc39:master Feb 22, 2019
@targos targos mentioned this pull request Feb 22, 2019
14 tasks
This was referenced Feb 24, 2019
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request May 25, 2019
These lines didn't appear in tc39#697.
@ljharb says that was likely an oversight:
tc39#1458 (comment)
ljharb pushed a commit to jmdyck/ecma262 that referenced this pull request Jun 2, 2019
These lines didn't appear in tc39#697.
`@ljharb` says that was likely an oversight:
tc39#1458 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has stage 4 This PR represents a proposal that has achieved stage 4, and is ready to merge. normative change Affects behavior required to correctly evaluate some ECMAScript source text proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants