Refactor store frame information.

This commit refactors the store frame information to eliminate the copying of
data out from `CompiledModule`.

It also moves the population of a `BTreeMap` out of the frame information and
into `CompiledModule` where it is only ever calculated once rather than at
every new module instantiation into a `Store`. The map is also lazy-initialized
so the cost of populating the map is incurred only when a trap occurs.

This should help improve instantiation time of modules with a large number of
functions and functions with lots of instructions.
This commit is contained in:
Peter Huene
2021-04-07 00:46:57 -07:00
parent 6b77786a6e
commit 875cb92cf0
6 changed files with 218 additions and 191 deletions

1
Cargo.lock generated
View File

@@ -3407,6 +3407,7 @@ dependencies = [
"log",
"more-asserts",
"object",
"once_cell",
"rayon",
"region",
"serde",