This trait is used to provide the environment necessary to translate a
single WebAssembly function without having other global data structures
for the WebAssembly module.
The WasmRuntime trait extends the FuncEnvironment trait for those uses
that want to parse a whole WebAssembly module.
- Change the handling of WebAssembly globals to use the FuncEnvironment
trait as well as the new GlobalVar infrastructure in Cretonne. The
runtime is not consulted on the translation of each
get_global/get_global instruction. Instead it gets to create the
GlobalVar declaration in the function preamble the first time the
global is used.
- Change the handling of heap load/store instructions to use the new
Heap infrastructure in Cretonne. The runtime is called to create the
Heap declaration in the preamble. It is not involved in individual
load/store instructions.