Skip to content

Implement escape analysis for closures #1229

@heshanpadmasiri

Description

@heshanpadmasiri

With #1228 we are storing the closure structure (value holding all the captured values) as well as the trampoline used to call the anon function in the heap. But in cases where anon function doesn't escape the parent function (ie. doesn't get returned from the parent function) we can instead allocate both of these in the stack. In order to do this we need to implement escape analysis

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions