tc39 / proposal-explicit-resource-management

ECMAScript Explicit Resource Management
https://arai-a.github.io/ecma262-compare/?pr=3000
BSD 3-Clause "New" or "Revised" License
758 stars 30 forks source link

Move DisposeResources to Evaluation of FunctionStatementList #178

Closed rbuckton closed 6 months ago

rbuckton commented 1 year ago

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

github-actions[bot] commented 1 year ago

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

rbuckton commented 1 year ago

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 commented 11 months ago

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

rbuckton commented 6 months ago

This has also been merged in to https://github.com/rbuckton/ecma262/pull/3