@@ -14,18 +14,16 @@ use crate::traps::{translate_trapcode, trap_sym_for_func};
1414use byteorder:: { LittleEndian , WriteBytesExt } ;
1515use cranelift_codegen:: {
1616 binemit, ir,
17- isa:: unwind:: UnwindInfo ,
1817 isa:: TargetIsa ,
1918 settings:: { self , Configurable } ,
2019 Context as ClifContext ,
2120} ;
2221use cranelift_module:: {
2322 Backend as ClifBackend , DataContext as ClifDataContext , DataId , FuncId , FuncOrDataId ,
24- Linkage as ClifLinkage , Module as ClifModule , ModuleError as ClifModuleError ,
23+ Linkage as ClifLinkage , Module as ClifModule ,
2524} ;
2625use cranelift_object:: { ObjectBackend , ObjectBuilder } ;
2726use cranelift_wasm:: { translate_module, FuncTranslator , ModuleTranslationState , WasmError } ;
28- use gimli:: write:: { Address , EhFrame , Writer } ;
2927use lucet_module:: bindings:: Bindings ;
3028use lucet_module:: {
3129 ModuleData , ModuleFeatures , SerializedModule , VersionInfo , LUCET_MODULE_SYM , MODULE_DATA_SYM ,
@@ -273,23 +271,9 @@ impl<'a> Compiler<'a> {
273271 let mut func_translator = FuncTranslator :: new ( ) ;
274272 let mut function_manifest_ctx = ClifDataContext :: new ( ) ;
275273 let mut function_manifest_bytes = Cursor :: new ( Vec :: new ( ) ) ;
276- // let mut eh_frame_table_bytes: Cursor<Vec<u8>> = Cursor::new(Vec::new());
277274 let mut function_map: HashMap < FuncId , ( u32 , DataId , usize ) > = HashMap :: new ( ) ;
278275
279- let mut frame_table = gimli:: write:: FrameTable :: default ( ) ;
280-
281- let isa = Self :: target_isa (
282- self . target . clone ( ) ,
283- self . opt_level ,
284- & self . cpu_features ,
285- self . canonicalize_nans ,
286- ) ?;
287- let cie_id = frame_table. add_cie ( match isa. create_systemv_cie ( ) {
288- Some ( cie) => cie,
289- None => panic ! ( "uh oh" ) ,
290- } ) ;
291-
292- for ( idx, ( ref func, ( code, code_offset) ) ) in self . decls . function_bodies ( ) . enumerate ( ) {
276+ for ( ref func, ( code, code_offset) ) in self . decls . function_bodies ( ) {
293277 let mut func_info = FuncInfo :: new ( & self . decls , self . count_instructions ) ;
294278 let mut clif_context = ClifContext :: new ( ) ;
295279 clif_context. func . name = func. name . as_externalname ( ) ;
0 commit comments