Skip to content

Commit 1883b7a

Browse files
committed
chore: clean up todos, add comments
1 parent e1503f1 commit 1883b7a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

frontend-wasm/src/component/translator.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
132132
}
133133
self.module_instances_source.push(*static_module_idx);
134134
// TODO: create and init module instance tables
135+
// see https://github.com/0xPolygonMiden/compiler/issues/133
135136
let module = &self.parsed_modules[*static_module_idx].module;
136137
let mut module_args: Vec<ModuleArgument> = Vec::new();
137138
for (idx, arg) in args.iter().enumerate() {
@@ -225,6 +226,7 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
225226
}
226227
EntityIndex::Table(_idx) => {
227228
// TODO: init the exported table with this module's table initialization values
229+
// see https://github.com/0xPolygonMiden/compiler/issues/133
228230
Ok(ModuleArgument::Table)
229231
}
230232
EntityIndex::Memory(_) => {
@@ -304,7 +306,8 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
304306
"Exporting of an imported module is not supported".to_string(),
305307
)),
306308
Export::Type(_) => {
307-
// TODO: implement type exports
309+
// Besides the function exports the individual type are also exported from the component
310+
// We can ignore them for now
308311
Ok(())
309312
}
310313
}

frontend-wasm/src/component/types/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
// Based on wasmtime v16.0 Wasm component translation
44

5-
// TODO: remove this once Wasm CM support is complete
65
#![allow(dead_code)]
76

87
pub mod resources;

frontend-wasm/src/module/build_ir.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ pub fn build_ir_module(
5959
build_globals(&parsed_module.module, &mut module_builder, diagnostics)?;
6060
build_data_segments(parsed_module, &mut module_builder, diagnostics)?;
6161
let mut func_translator = FuncTranslator::new();
62-
// TODO: Ugly! Find a better way to consume the function body inputs
62+
// Although this renders this parsed module invalid(without functiong
63+
// bodies), we don't support multiple module instances. Thus, this
64+
// ParseModule will not be used again to make another module instance.
6365
let func_body_inputs = mem::take(&mut parsed_module.function_body_inputs);
6466
for (defined_func_idx, body_data) in func_body_inputs {
6567
let func_index = &parsed_module.module.func_index(defined_func_idx);

0 commit comments

Comments
 (0)