mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-17 01:28:44 +00:00
Add a compiler-llvm CompilerFunctionKind for the whole module which can occur with the experimental API for engine-native.
Since it's no longer per-function, rename CompilerFunctionKind to CompilerKind.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::config::{CompiledFunctionKind, LLVM};
|
||||
use crate::config::{CompiledKind, LLVM};
|
||||
use crate::object_file::{load_object_file, CompiledFunction};
|
||||
use crate::translator::abi::{
|
||||
func_type_to_llvm, get_vmctx_ptr_param, is_sret, pack_values_for_register_return,
|
||||
@@ -42,7 +42,7 @@ impl FuncTrampoline {
|
||||
name: &str,
|
||||
) -> Result<Module, CompileError> {
|
||||
// The function type, used for the callbacks.
|
||||
let function = CompiledFunctionKind::FunctionCallTrampoline(ty.clone());
|
||||
let function = CompiledKind::FunctionCallTrampoline(ty.clone());
|
||||
let module = self.ctx.create_module("");
|
||||
let target_machine = &self.target_machine;
|
||||
let target_triple = target_machine.get_triple();
|
||||
@@ -102,7 +102,7 @@ impl FuncTrampoline {
|
||||
name: &str,
|
||||
) -> Result<FunctionBody, CompileError> {
|
||||
let module = self.trampoline_to_module(ty, config, name)?;
|
||||
let function = CompiledFunctionKind::FunctionCallTrampoline(ty.clone());
|
||||
let function = CompiledKind::FunctionCallTrampoline(ty.clone());
|
||||
let target_machine = &self.target_machine;
|
||||
|
||||
let memory_buffer = target_machine
|
||||
@@ -172,7 +172,7 @@ impl FuncTrampoline {
|
||||
name: &str,
|
||||
) -> Result<Module, CompileError> {
|
||||
// The function type, used for the callbacks
|
||||
let function = CompiledFunctionKind::DynamicFunctionTrampoline(ty.clone());
|
||||
let function = CompiledKind::DynamicFunctionTrampoline(ty.clone());
|
||||
let module = self.ctx.create_module("");
|
||||
let target_machine = &self.target_machine;
|
||||
let target_triple = target_machine.get_triple();
|
||||
@@ -222,7 +222,7 @@ impl FuncTrampoline {
|
||||
config: &LLVM,
|
||||
name: &str,
|
||||
) -> Result<FunctionBody, CompileError> {
|
||||
let function = CompiledFunctionKind::DynamicFunctionTrampoline(ty.clone());
|
||||
let function = CompiledKind::DynamicFunctionTrampoline(ty.clone());
|
||||
let target_machine = &self.target_machine;
|
||||
|
||||
let module = self.dynamic_trampoline_to_module(ty, config, name)?;
|
||||
|
||||
Reference in New Issue
Block a user