1
1
use miden_diagnostics:: DiagnosticsHandler ;
2
2
use miden_hir:: {
3
- cranelift_entity:: PrimaryMap , ComponentBuilder , ComponentExport , FunctionExportName ,
4
- FunctionIdent , Ident , InterfaceFunctionIdent , InterfaceIdent , Symbol ,
3
+ cranelift_entity:: PrimaryMap , ComponentBuilder , ComponentExport , FunctionIdent , Ident ,
4
+ InterfaceFunctionIdent , InterfaceIdent , Symbol ,
5
5
} ;
6
6
use miden_hir_type:: LiftedFunctionType ;
7
7
use rustc_hash:: FxHashMap ;
@@ -269,7 +269,6 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
269
269
let component_import = miden_hir:: ComponentImport {
270
270
function_ty : lifted_func_ty,
271
271
interface_function,
272
- invoke_method : import_metadata. invoke_method ,
273
272
digest : import_metadata. digest . clone ( ) ,
274
273
} ;
275
274
Ok ( component_import)
@@ -285,7 +284,7 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
285
284
match export {
286
285
Export :: LiftedFunction { ty, func, options } => {
287
286
let export_name = Symbol :: intern ( name) . into ( ) ;
288
- let export = self . build_export_lifted_function ( & export_name , func, ty, options) ?;
287
+ let export = self . build_export_lifted_function ( func, ty, options) ?;
289
288
component_builder. add_export ( export_name, export) ;
290
289
Ok ( ( ) )
291
290
}
@@ -303,8 +302,8 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
303
302
"Exporting of an imported module is not supported" . to_string ( ) ,
304
303
) ) ,
305
304
Export :: Type ( _) => {
306
- // Besides the function exports the individual type are also exported from the component
307
- // We can ignore them for now
305
+ // Besides the function exports the individual type are also exported from the
306
+ // component We can ignore them for now
308
307
Ok ( ( ) )
309
308
}
310
309
}
@@ -313,7 +312,6 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
313
312
/// Build an IR Component export from the given lifted Wasm core module function export
314
313
fn build_export_lifted_function (
315
314
& self ,
316
- function_export_name : & FunctionExportName ,
317
315
func : & CoreDef ,
318
316
ty : & TypeFuncIndex ,
319
317
options : & CanonicalOptions ,
@@ -358,16 +356,9 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
358
356
}
359
357
} ;
360
358
let lifted_func_ty = convert_lifted_func_ty ( ty, & self . component_types ) ;
361
- let Some ( export_metadata) = self . config . export_metadata . get ( function_export_name) else {
362
- return Err ( WasmError :: MissingExportMetadata ( format ! (
363
- "Export metadata for interface function {:?} not found" ,
364
- function_export_name,
365
- ) ) ) ;
366
- } ;
367
359
let export = miden_hir:: ComponentExport {
368
360
function : func_ident,
369
361
function_ty : lifted_func_ty,
370
- invoke_method : export_metadata. invoke_method ,
371
362
} ;
372
363
Ok ( export)
373
364
}
0 commit comments