feat(deprecated) Remove debugging statements.

This commit is contained in:
Ivan Enderlin
2020-06-18 10:26:57 +02:00
parent 71629b9a2e
commit c485e0f610
2 changed files with 7 additions and 8 deletions

View File

@@ -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,
}
}

View File

@@ -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,