Refactored FunctionBody into compiler

This commit is contained in:
Syrus
2020-05-01 16:51:47 -07:00
parent 1bc6fb1a0b
commit c1c06591a0
9 changed files with 52 additions and 45 deletions

View File

@ -19,8 +19,8 @@ use wasm_common::{
use wasmer_compiler::CompileError;
use wasmer_compiler::FunctionBodyData;
use wasmer_compiler::{
Compilation, CompiledFunction, CompiledFunctionFrameInfo, Compiler, JumpTable, SourceLoc,
TrapInformation,
Compilation, CompiledFunction, CompiledFunctionFrameInfo, Compiler, FunctionBody, JumpTable,
SourceLoc, TrapInformation,
};
use wasmer_compiler::{CompilerConfig, ModuleTranslationState, Target};
use wasmer_compiler::{Relocation, RelocationTarget};
@ -253,9 +253,11 @@ impl Compiler for CraneliftCompiler {
let func_jt_offsets = transform_jump_table(context.func.jt_offsets);
Ok(CompiledFunction {
body: code_buf,
body: FunctionBody {
body: code_buf,
unwind_info,
},
jt_offsets: func_jt_offsets,
unwind_info,
relocations: reloc_sink.func_relocs,
frame_info: CompiledFunctionFrameInfo {
address_map,