11use miden_diagnostics:: DiagnosticsHandler ;
22use 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 ,
55} ;
66use miden_hir_type:: LiftedFunctionType ;
77use rustc_hash:: FxHashMap ;
@@ -269,7 +269,6 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
269269 let component_import = miden_hir:: ComponentImport {
270270 function_ty : lifted_func_ty,
271271 interface_function,
272- invoke_method : import_metadata. invoke_method ,
273272 digest : import_metadata. digest . clone ( ) ,
274273 } ;
275274 Ok ( component_import)
@@ -285,7 +284,7 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
285284 match export {
286285 Export :: LiftedFunction { ty, func, options } => {
287286 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) ?;
289288 component_builder. add_export ( export_name, export) ;
290289 Ok ( ( ) )
291290 }
@@ -303,8 +302,8 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
303302 "Exporting of an imported module is not supported" . to_string ( ) ,
304303 ) ) ,
305304 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
308307 Ok ( ( ) )
309308 }
310309 }
@@ -313,7 +312,6 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
313312 /// Build an IR Component export from the given lifted Wasm core module function export
314313 fn build_export_lifted_function (
315314 & self ,
316- function_export_name : & FunctionExportName ,
317315 func : & CoreDef ,
318316 ty : & TypeFuncIndex ,
319317 options : & CanonicalOptions ,
@@ -358,16 +356,9 @@ impl<'a, 'data> ComponentTranslator<'a, 'data> {
358356 }
359357 } ;
360358 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- } ;
367359 let export = miden_hir:: ComponentExport {
368360 function : func_ident,
369361 function_ty : lifted_func_ty,
370- invoke_method : export_metadata. invoke_method ,
371362 } ;
372363 Ok ( export)
373364 }
0 commit comments