feat(compiler) Refactor the new ARM Reloc and Trampoline to avoid a &mut

This commit is contained in:
ptitSeb
2021-10-12 10:11:36 +02:00
parent 541ee00fcb
commit b54780cdab
6 changed files with 75 additions and 53 deletions

View File

@ -14,7 +14,8 @@ use std::sync::Arc;
use wasmer_compiler::{
Architecture, Compilation, CompileError, CompileModuleInfo, Compiler, CustomSection,
CustomSectionProtection, Dwarf, FunctionBodyData, ModuleMiddleware, ModuleTranslationState,
RelocationTarget, SectionBody, SectionIndex, Symbol, SymbolRegistry, Target, Trampolines,
RelocationTarget, SectionBody, SectionIndex, Symbol, SymbolRegistry, Target,
TrampolinesSection,
};
use wasmer_types::entity::{EntityRef, PrimaryMap};
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
@ -306,7 +307,7 @@ impl Compiler for LLVMCompiler {
let trampolines = match target.triple().architecture {
Architecture::Aarch64(_) => {
let nj = 16;
let trampolines = Some(Trampolines::new(
let trampolines = Some(TrampolinesSection::new(
SectionIndex::from_u32(module_custom_sections.len() as u32),
nj,
16,