@@ -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,
0 commit comments