Skip to content

Revert removal of codeString from HostEnsureCanCompileStrings#17

Merged
koto merged 1 commit intotc39:masterfrom
lukewarlow:revert-removal-of-code-string
May 7, 2024
Merged

Revert removal of codeString from HostEnsureCanCompileStrings#17
koto merged 1 commit intotc39:masterfrom
lukewarlow:revert-removal-of-code-string

Conversation

@lukewarlow
Copy link
Copy Markdown
Contributor

The reason for removal was based on a misunderstanding of the status quo (See tc39/ecma262#3294 (comment)).

I think this is okay to add back to the proposal document before we officially tell Tc39 in June?

Comment thread spec.emu Outdated
@lukewarlow lukewarlow force-pushed the revert-removal-of-code-string branch from b291785 to 3bc677e Compare May 7, 2024 11:21
@lukewarlow lukewarlow requested a review from nicolo-ribaudo May 7, 2024 11:22
@lukewarlow lukewarlow force-pushed the revert-removal-of-code-string branch from 3bc677e to 488b6fd Compare May 7, 2024 11:22
@lukewarlow
Copy link
Copy Markdown
Contributor Author

@nicolo-ribaudo or @koto could you merge this please?

@koto koto merged commit af881cb into tc39:master May 7, 2024
@lukewarlow lukewarlow deleted the revert-removal-of-code-string branch May 7, 2024 20:29
@nicolo-ribaudo
Copy link
Copy Markdown
Member

Summary of the update

In the 2024-04 TC39 meeting we decided to not expose the built string to the host, under the assumption that that string was spec-internal only. Our recommendation was that instead the host should re-concatenate the string pieces to build its own representation of the string.

It turns out however that the concatenated string was already exposed to users, through new Function(...).toString() which (differently from most Function.prototype.toString behaviors, is not implementation-defined). This PR thus re-exposed the concatenated string to the host to be used as-is.

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.

3 participants