Fix anyref closure transformations

* Catch all closures by walking all `Descriptor` values and looking for
  either `Function` or `Closure`.
* Update the correct arguments for wasm by ensuring that the closure
  modifications skip the first two arguments.
This commit is contained in:
Alex Crichton
2019-06-03 11:36:18 -07:00
parent b51df39bc9
commit 3b5e3edd18
4 changed files with 72 additions and 19 deletions

View File

@ -109,7 +109,7 @@ impl Slab {
None => internal_error("slot out of bounds"),
};
}
self.data.len() as u32 - free_count - super::JSIDX_RESERVED
self.data.len() as u32 - free_count
}
}