-
Notifications
You must be signed in to change notification settings - Fork 3
dwarf init #62
base: main
Are you sure you want to change the base?
dwarf init #62
Conversation
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification Your title should look like this. The scope field is optional.
If the PR includes a breaking change, mark it with an exclamation mark:
and include a "BREAKING CHANGE:" footer in the body of the pull request. Details:
|
src/emit/func.rs
Outdated
di_builder.create_file("fn", "dir"); | ||
let di_subroutine_type = di_builder.create_subroutine_type(di_file, None, &[], 0); | ||
let di_subprogram = di_builder.create_function( | ||
scope, |
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.
This is the per-function information to provide. See https://thedan64.github.io/inkwell/inkwell/debug_info/struct.DebugInfoBuilder.html#method.create_function
src/emit.rs
Outdated
@@ -314,11 +318,29 @@ impl<'c, H: HugrView> EmitHugr<'c, H> { | |||
/// emission of ops with static edges from them. So [FuncDefn] are the only | |||
/// interesting children. | |||
pub fn emit_module(mut self, node: FatNode<'c, hugr::ops::Module, H>) -> Result<Self> { | |||
let (di_builder, di_compile_unit) = self.module().create_debug_info_builder( |
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.
This is the per-module information to provide. See https://thedan64.github.io/inkwell/inkwell/module/struct.Module.html#method.create_debug_info_builder
src/emit/ops.rs
Outdated
@@ -130,6 +130,9 @@ where | |||
let inputs_rmb = self.context.node_ins_rmb(node)?; | |||
let inputs = inputs_rmb.read(self.builder(), [])?; | |||
let outputs = self.context.node_outs_rmb(node)?.promise(); | |||
|
|||
self.context.set_debug_location(0,0,None); |
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.
This is the per-dataflow-op information to provide: line, column, "scope" (defaults to function)
very preliminary.