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

jule: new closures #111

Merged
merged 22 commits into from
Aug 30, 2024
Merged

jule: new closures #111

merged 22 commits into from
Aug 30, 2024

Conversation

mertcandav
Copy link
Member

This PR implements new closures with more manually methods and high manipulation opportunities.

Featured Changes

  • sema: add the Captured field to the AnonFnExprModel
  • sema: analysis and collects captured variables of anonymous functions
  • api: jule::Fn reimplemented

Potential Improvements / Risks

It may be possible to make further improvements regarding memory allocations for closures. Further studies on this subject may provide the necessary information for a more efficient implementation. Currently, it is guaranteed that the closure ctx allocated for each closure will be traced and released by the GC. Allocation improvements for memory mapping may be possible.

It also looks like this app doesn't have to be available for the API. In the future it may be implemented with Jule in the std::runtime package and removed from the API.

@mertcandav mertcandav added compiler/runtime Related with runtime compiler Related with compiler/compile-time api About API labels Aug 30, 2024
@mertcandav mertcandav merged commit 2f32a98 into master Aug 30, 2024
0 of 42 checks passed
@mertcandav mertcandav deleted the closure branch August 31, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api About API compiler/runtime Related with runtime compiler Related with compiler/compile-time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant