-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Design the handling of function pointers
As we do not have the ability to arbitrarily set the program counter when compiling via FlatLowered, we have had to come up with a clever way to emulate calling functions via pointers in Hieratika. This PR includes that design, which makes certain assumptions that seem to hold for generic Rust code, but may do not hold for all LLVM IR. This makes it sufficient for an initial implementation, and for getting Rust code working, but may later see evolution to better support more complex notions of function pointers.
- Loading branch information
1 parent
39e26e6
commit 4586c3f
Showing
2 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Hieratika Name Mangling | ||
|
||
We need to design a name mangling scheme for Hieratika to use. It should run on FLO's `Type` and | ||
account for: | ||
|
||
- Embedding type info (params and return type) for uniqueness. | ||
- Embedding the function name. | ||
- Embedding the module name. |