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

Move DisposeResources to Evaluation of FunctionStatementList #178

Merged
merged 1 commit into from Mar 20, 2024

Conversation

rbuckton
Copy link
Collaborator

This moves the DisposeResources calls from the abstract closures in EvaluateFunctionBody, GeneratorStart, AsyncGeneratorStart, and AsyncBlockStart to the Evaluation of FunctionStatementList. This centralizes the disposal logic for all function types and avoids the complexity of handling functions created from Abstract Closures that do not currently establish a proper declarative environment.

This change is based on findings discovered while writing Test262 tests and implementing this proposal in Engine262.

Fixes #176
Fixes #177

cc: @tc39/ecma262-editors

@rbuckton rbuckton added the needs-consensus A pull request that needs consensus at TC39 plenary label Jun 30, 2023
@github-actions
Copy link

A preview of this PR can be found at https://tc39.es/proposal-explicit-resource-management/pr/178.

@rbuckton
Copy link
Collaborator Author

This was approved by consensus at the July, 2023 TC39 Plenary, but still needs reviews from the editors and reviewers before I can merge.

@waldemarhorwat, @syg, @michaelficarra, @bakkot: can you please review?

@rbuckton rbuckton added the has-consensus Indicates a pull request reached consensus at TC39 plenary. label Jul 13, 2023
@rbuckton rbuckton added this to the Stage 4 milestone Jul 19, 2023
@rbuckton
Copy link
Collaborator Author

rbuckton commented Nov 7, 2023

@waldemarhorwat, @syg: Could one of you review?

rbuckton added a commit to rbuckton/ecma262 that referenced this pull request Mar 20, 2024
@rbuckton rbuckton merged commit 263aa4c into main Mar 20, 2024
1 check passed
@rbuckton rbuckton deleted the dispose-in-FunctionBody-evaluation branch March 20, 2024 19:34
@rbuckton
Copy link
Collaborator Author

This has also been merged in to rbuckton/ecma262#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-consensus Indicates a pull request reached consensus at TC39 plenary. needs-consensus A pull request that needs consensus at TC39 plenary
Projects
None yet
2 participants