Skip to content

Commit 0a837ee

Browse files
PSS1998gionut
authored andcommitted
Clean documents
1 parent 89174d2 commit 0a837ee

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

crates/environ/src/component/translate/inline.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,14 @@ struct Inliner<'a> {
177177
/// inliner.
178178
result: dfg::ComponentDfg,
179179

180-
// Maps used to "intern" various runtime items to only save them once at
181-
// runtime instead of multiple times.
180+
/// Maps used to "intern" various runtime items to only save them once at
181+
/// runtime instead of multiple times.
182182
import_path_interner: HashMap<ImportPath<'a>, RuntimeImportIndex>,
183183

184184
/// Origin information about where each runtime instance came from
185185
runtime_instances: PrimaryMap<dfg::InstanceId, InstanceModule>,
186186

187+
/// Origin informatino about where each core definition came from.
187188
core_def_to_sources: HashMap<dfg::CoreDef, Source>,
188189
}
189190

@@ -490,7 +491,11 @@ impl<'a> Inliner<'a> {
490491
}
491492
}
492493

493-
//TODO: Add some docs here
494+
/// Records the runtime sources for each component export,
495+
/// so the instantiation graph later knows which
496+
/// core definitions they depend on.
497+
/// Here internal component exports are recorded in addition to the
498+
/// exports recoreded for the top level component.
494499
fn add_component_exports(
495500
&mut self,
496501
types: &mut ComponentTypesBuilder,
@@ -1332,7 +1337,7 @@ impl<'a> Inliner<'a> {
13321337
_ => module.to_string(),
13331338
};
13341339

1335-
//TODO: Docs here
1340+
// CoreDef which is hashable is used as key to retrieve the source
13361341
core_imports.insert(count, name.clone());
13371342
sources.insert(
13381343
count,

crates/wasmtime/src/runtime/component/component.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,9 +881,8 @@ impl Component {
881881
}
882882
}
883883

884-
//TODO: rename?
885-
/// Returns the Component Structure needed for Remote Attestation.
886-
pub fn component_structure(&self) -> &dfg::RootComponentInstanceStructure {
884+
/// Returns the Instantiation Graph.
885+
pub fn instantiation_graph(&self) -> &dfg::RootComponentInstanceStructure {
887886
&self.inner.info.component.instantiation_graph
888887
}
889888
}

0 commit comments

Comments
 (0)