Remove unused sourceloc

This commit is contained in:
Syrus
2020-10-28 13:01:18 -07:00
parent eec90e7940
commit 73e502ecc5
3 changed files with 1 additions and 5 deletions

View File

@@ -108,12 +108,11 @@ impl binemit::TrapSink for TrapSink {
fn trap( fn trap(
&mut self, &mut self,
code_offset: binemit::CodeOffset, code_offset: binemit::CodeOffset,
source_loc: ir::SourceLoc, _source_loc: ir::SourceLoc,
trap_code: ir::TrapCode, trap_code: ir::TrapCode,
) { ) {
self.traps.push(TrapInformation { self.traps.push(TrapInformation {
code_offset, code_offset,
source_loc: SourceLoc::new(source_loc.bits()),
// TODO: Translate properly environment Trapcode into cranelift IR // TODO: Translate properly environment Trapcode into cranelift IR
trap_code: translate_ir_trapcode(trap_code), trap_code: translate_ir_trapcode(trap_code),
}); });

View File

@@ -8179,7 +8179,6 @@ impl<'a> FuncGen<'a> {
.into_iter() .into_iter()
.map(|(offset, code)| TrapInformation { .map(|(offset, code)| TrapInformation {
code_offset: offset as u32, code_offset: offset as u32,
source_loc: Default::default(),
trap_code: code, trap_code: code,
}) })
.collect(), .collect(),

View File

@@ -10,8 +10,6 @@ use wasmer_vm::TrapCode;
pub struct TrapInformation { pub struct TrapInformation {
/// The offset of the trapping instruction in native code. It is relative to the beginning of the function. /// The offset of the trapping instruction in native code. It is relative to the beginning of the function.
pub code_offset: CodeOffset, pub code_offset: CodeOffset,
/// Location of trapping instruction in WebAssembly binary module.
pub source_loc: SourceLoc,
/// Code of the trap. /// Code of the trap.
pub trap_code: TrapCode, pub trap_code: TrapCode,
} }