Refactor address_transform.rs to use less memory (#1260)
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation. * Reduce amount of memory allocated in translate_ranges_raw * refactor translate_ranges * Don't transform non-unit .debug_line * type annotation for TransformRangeXXXIter's * Fix empty generated wasm positions
This commit is contained in:
@@ -358,8 +358,7 @@ pub fn generate_simulated_dwarf(
|
||||
write::AttributeValue::StringRef(name_id),
|
||||
);
|
||||
|
||||
let f = addr_tr.map().get(i).unwrap();
|
||||
let f_start = f.addresses[0].wasm;
|
||||
let f_start = map.addresses[0].wasm;
|
||||
let wasm_offset = di.wasm_file.code_section_offset + f_start as u64;
|
||||
die.set(
|
||||
gimli::DW_AT_decl_file,
|
||||
|
||||
Reference in New Issue
Block a user