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

Load functions array into config #441

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

gtrepta
Copy link
Contributor

@gtrepta gtrepta commented Jan 31, 2025

TODO: Lookup in the functions array when handling a call terminator

Stretch goal: Fuse the <functions> and <function-names> cells together.

@gtrepta gtrepta requested a review from jberthold January 31, 2025 02:13
@gtrepta gtrepta force-pushed the load-functions-into-config branch from d9d498d to 028ecce Compare January 31, 2025 02:14
@@ -91,6 +91,12 @@ module KMIR-CONFIGURATION
// FIXME where do we put the "GlobalAllocs"? in the heap, presumably?
// function store, Int -> Body
<functions> .Map </functions>
<function-names>
<function-name multiplicity="*" type="Map">
<ty> 0 </ty>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might need to be MIRInt and not just Int. I didn't run into an issue here when I was testing this though.

* Change `CALLER` to have sort `Ty`
* build composed function map
* adjust getBlocks helper to operate on MonoItemKind
* make target optional in stack frame
* use `Ty` sort for function lookup table (instead of `MIRInt`)
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.

2 participants