improve performance
This commit is contained in:
@@ -335,10 +335,11 @@ impl Linker {
|
||||
// This preserves exact ends emitted by the compiler while still filling lengths for functions
|
||||
// that lack enriched annotations.
|
||||
let total_len = combined_code.len();
|
||||
let layouts = layout::compute_function_layouts(&combined_functions, total_len);
|
||||
for i in 0..combined_functions.len() {
|
||||
if !has_precise_len.get(i).copied().unwrap_or(false) {
|
||||
let start = combined_functions[i].code_offset as usize;
|
||||
let end = layout::function_end_from_next(&combined_functions, i, total_len);
|
||||
let start = layouts[i].start;
|
||||
let end = layouts[i].end;
|
||||
combined_functions[i].code_len = end.saturating_sub(start) as u32;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user