-
Notifications
You must be signed in to change notification settings - Fork 1
Add Function Globals Support #44
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
- Coverage 42.94% 42.69% -0.25%
==========================================
Files 108 114 +6
Lines 4075 4246 +171
==========================================
+ Hits 1750 1813 +63
- Misses 2248 2349 +101
- Partials 77 84 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for global function references by introducing an abstraction for globals and integrating it into the generation and translation pipelines for the aarch64 ISA.
- Introduces GlobalManager and GlobalInfo interfaces along with concrete implementations (GlobalMap and FunctionGlobalInfo).
- Updates various generators and the aarch64 instruction definitions to support globals.
- Integrates global argument and function global generators into the file and function generation workflows.
Reviewed Changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| gen/global_map.go | Implements GlobalMap but does not initialize its underlying map. |
| gen/global_manager.go | Defines GlobalManager interface for global handling. |
| gen/global_info.go | Introduces GlobalInfo interface for global entities. |
| gen/global_function_info.go | Provides a function-specific global info implementation. |
| gen/global_argument_generator.go | Adds global argument support to the argument generation workflow. |
| gen/global_argument.go | Implements GlobalArgumentInfo for global arguments. |
| gen/generator.go | Integrates GlobalManager into file generation contexts. |
| gen/function_info.go | Extends FunctionInfo with a Declaration field for consistency. |
| gen/function_global_generator.go | Adds generator for function global info objects. |
| gen/function_generator.go | Updates function generation to retrieve global info using getFunctionInfo. |
| gen/file_generator.go | Integrates global generation into the file generation process. |
| gen/argument_info.go | Removes deprecated GetType, streamlining ArgumentInfo. |
| gen/argument_generator.go | Expands argument generation to include global nodes. |
| aarch64/translation/arguments.go | Adapts immediate conversion functions to work with the updated globals. |
| aarch64/managers/instructions.go | Registers the new branch link (bl) instruction. |
| aarch64/managers/context.go | Updates ManagerCreators to include GlobalManager support. |
| aarch64/isa/bl.go | Implements the BL instruction using function global information. |
Files not reviewed (2)
- examples/aarch64/bl-chain.usm: Language not supported
- examples/aarch64/for-loop.usm: Language not supported
Co-authored-by: Copilot <[email protected]>
This PR adds support for
@globalarguments, and in particular, adds support for global function references that are defined in the same file, to theaarch64isa.