feat(vm) Rename the instance_allocator fields to instance_ref.

This commit is contained in:
Ivan Enderlin
2020-12-14 10:28:38 +01:00
parent 7835e78ae6
commit facd41412a
8 changed files with 21 additions and 21 deletions

View File

@@ -110,7 +110,7 @@ impl Function {
vmctx,
signature: ty.clone(),
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
},
},
}
@@ -173,7 +173,7 @@ impl Function {
vmctx,
signature: ty.clone(),
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
},
},
}
@@ -227,7 +227,7 @@ impl Function {
signature,
kind: VMFunctionKind::Static,
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
},
},
}
@@ -297,7 +297,7 @@ impl Function {
vmctx,
signature,
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
},
},
}
@@ -350,7 +350,7 @@ impl Function {
vmctx,
signature,
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
},
},
}

View File

@@ -220,7 +220,7 @@ impl<'a> Exportable<'a> for Global {
ExportGlobal {
vm_global: VMExportGlobal {
from: self.global.clone(),
instance_allocator: None,
instance_ref: None,
},
}
.into()

View File

@@ -250,7 +250,7 @@ impl<'a> Exportable<'a> for Memory {
ExportMemory {
vm_memory: VMExportMemory {
from: self.memory.clone(),
instance_allocator: None,
instance_ref: None,
},
}
.into()

View File

@@ -158,7 +158,7 @@ impl<'a> Exportable<'a> for Table {
ExportTable {
vm_table: VMExportTable {
from: self.table.clone(),
instance_allocator: None,
instance_ref: None,
},
}
.into()

View File

@@ -75,7 +75,7 @@ where
signature,
kind: other.arg_kind,
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
}
}
}*/

View File

@@ -85,7 +85,7 @@ impl ValFuncRef for Val {
kind: wasmer_vm::VMFunctionKind::Static,
vmctx: item.vmctx,
call_trampoline: None,
instance_allocator: None,
instance_ref: None,
},
};
let f = Function::from_vm_export(store, export);

View File

@@ -50,7 +50,7 @@ pub struct VMExportFunction {
/// A “reference” to the instance through the
/// `InstanceRef`. `None` if it is a host function.
pub instance_allocator: Option<InstanceRef>,
pub instance_ref: Option<InstanceRef>,
}
/// # Safety
@@ -74,8 +74,8 @@ pub struct VMExportTable {
pub from: Arc<dyn Table>,
/// A “reference” to the instance through the
/// `InstanceRef`. `None` if it is a host function.
pub instance_allocator: Option<InstanceRef>,
/// `InstanceRef`. `None` if it is a host table.
pub instance_ref: Option<InstanceRef>,
}
/// # Safety
@@ -120,8 +120,8 @@ pub struct VMExportMemory {
pub from: Arc<dyn Memory>,
/// A “reference” to the instance through the
/// `InstanceRef`. `None` if it is a host function.
pub instance_allocator: Option<InstanceRef>,
/// `InstanceRef`. `None` if it is a host memory.
pub instance_ref: Option<InstanceRef>,
}
/// # Safety
@@ -166,8 +166,8 @@ pub struct VMExportGlobal {
pub from: Arc<Global>,
/// A “reference” to the instance through the
/// `InstanceRef`. `None` if it is a host function.
pub instance_allocator: Option<InstanceRef>,
/// `InstanceRef`. `None` if it is a host global.
pub instance_ref: Option<InstanceRef>,
}
/// # Safety

View File

@@ -1119,7 +1119,7 @@ impl InstanceHandle {
signature,
vmctx,
call_trampoline,
instance_allocator: Some(instance),
instance_ref: Some(instance),
}
.into()
}
@@ -1132,7 +1132,7 @@ impl InstanceHandle {
};
VMExportTable {
from,
instance_allocator: Some(instance),
instance_ref: Some(instance),
}
.into()
}
@@ -1145,7 +1145,7 @@ impl InstanceHandle {
};
VMExportMemory {
from,
instance_allocator: Some(instance),
instance_ref: Some(instance),
}
.into()
}
@@ -1160,7 +1160,7 @@ impl InstanceHandle {
};
VMExportGlobal {
from,
instance_allocator: Some(instance),
instance_ref: Some(instance),
}
.into()
}