mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 21:38:39 +00:00
feat(deprecated) Remove debugging statements.
This commit is contained in:
@@ -21,19 +21,20 @@ impl PreInstance {
|
||||
|
||||
// #[derive(Clone)]
|
||||
pub struct Instance {
|
||||
pub exports: Exports,
|
||||
pre_instance: Box<PreInstance>,
|
||||
pub exports: Exports,
|
||||
pub(crate) new_instance: new::wasmer::Instance,
|
||||
// vmctx: vm::Ctx,
|
||||
}
|
||||
|
||||
impl Instance {
|
||||
pub(crate) fn new(mut pre_instance: Box<PreInstance>, new_instance: new::wasmer::Instance) -> Self {
|
||||
pre_instance.vmctx.x = 42;
|
||||
pub(crate) fn new(
|
||||
mut pre_instance: Box<PreInstance>,
|
||||
new_instance: new::wasmer::Instance,
|
||||
) -> Self {
|
||||
Self {
|
||||
pre_instance,
|
||||
exports: new_instance.exports.clone(),
|
||||
new_instance,
|
||||
pre_instance,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ impl Module {
|
||||
import_object: &crate::import::ImportObject,
|
||||
) -> Result<Instance, InstantiationError> {
|
||||
let pre_instance = Box::new(PreInstance::new());
|
||||
dbg!(pre_instance.vmctx_ptr());
|
||||
|
||||
let import_object = {
|
||||
// Replace the fake `vm::Ctx` of host functions.
|
||||
@@ -51,9 +50,9 @@ impl Module {
|
||||
.map(|((namespace, name), export)| match export {
|
||||
Export::Function(mut function) => {
|
||||
if function.vmctx.is_null() {
|
||||
// That's an ugly hack. Go your way :-].
|
||||
function.vmctx = pre_instance.vmctx_ptr() as _;
|
||||
}
|
||||
dbg!(function.vmctx);
|
||||
|
||||
(
|
||||
(namespace, name),
|
||||
@@ -82,7 +81,6 @@ impl Module {
|
||||
|
||||
new_import_object
|
||||
};
|
||||
dbg!(pre_instance.vmctx_ptr());
|
||||
|
||||
Ok(Instance::new(
|
||||
pre_instance,
|
||||
|
||||
Reference in New Issue
Block a user