-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
high-priorityNeeds to get done right awayNeeds to get done right away
Milestone
Description
To start off with, we could have the compiler call some entry point after the MIR for the main
function gets generated, like so:
mir :: import("std.dusk").mir
@mir.read_main
fn read_main(func: mir.Func) {
print("Printing the name of main (you'll never guess what it is!): ")
print(func.name)
print("\n")
for instr in func.entry_block.instructions {
print(instr.kind)
print("\n")
}
}
The point of this is to allow for the x64 backend to be self-hosted via the interpreter. More support will be required to actually make this user-friendly. That work is out of scope for this issue. It will be sufficient for now to simply be able to access the code for the program after generating it, at compile-time.
Metadata
Metadata
Assignees
Labels
high-priorityNeeds to get done right awayNeeds to get done right away