Skip to content

Commit 30d8b9f

Browse files
greenhatbitwalker
authored andcommitted
chore: clean up todos, add comments
1 parent f41a568 commit 30d8b9f

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
@@ -131,6 +131,7 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
131131
}
132132
self.module_instances_source.push(*static_module_idx);
133133
// TODO: create and init module instance tables
134+
// see https://github.com/0xPolygonMiden/compiler/issues/133
134135
let module = &self.parsed_modules[*static_module_idx].module;
135136
let mut module_args: Vec<ModuleArgument> = Vec::new();
136137
for (idx, arg) in args.iter().enumerate() {
@@ -222,6 +223,7 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
222223
}
223224
EntityIndex::Table(_idx) => {
224225
// TODO: init the exported table with this module's table initialization values
226+
// see https://github.com/0xPolygonMiden/compiler/issues/133
225227
Ok(ModuleArgument::Table)
226228
}
227229
EntityIndex::Memory(_) => {
@@ -301,7 +303,8 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
301303
"Exporting of an imported module is not supported".to_string(),
302304
)),
303305
Export::Type(_) => {
304-
// TODO: implement type exports
306+
// Besides the function exports the individual type are also exported from the component
307+
// We can ignore them for now
305308
Ok(())
306309
}
307310
}

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
@@ -54,7 +54,9 @@ pub fn build_ir_module(
5454
build_globals(&parsed_module.module, &mut module_builder, diagnostics)?;
5555
build_data_segments(parsed_module, &mut module_builder, diagnostics)?;
5656
let mut func_translator = FuncTranslator::new();
57-
// TODO: Ugly! Find a better way to consume the function body inputs
57+
// Although this renders this parsed module invalid(without functiong
58+
// bodies), we don't support multiple module instances. Thus, this
59+
// ParseModule will not be used again to make another module instance.
5860
let func_body_inputs = mem::take(&mut parsed_module.function_body_inputs);
5961
for (defined_func_idx, body_data) in func_body_inputs {
6062
let func_index = &parsed_module.module.func_index(defined_func_idx);

0 commit comments

Comments
 (0)