* Enable the already-passing `bulk-memoryoperations/imports.wast` test * Implement support for the `memory.init` instruction and passive data This adds support for passive data segments and the `memory.init` instruction from the bulk memory operations proposal. Passive data segments are stored on the Wasm module and then `memory.init` instructions copy their contents into memory. * Implement the `data.drop` instruction This allows wasm modules to deallocate passive data segments that it doesn't need anymore. We keep track of which segments have not been dropped on an `Instance` and when dropping them, remove the entry from the instance's hash map. The module always needs all of the segments for new instantiations. * Enable final bulk memory operations spec test This requires special casing an expected error message for an `assert_trap`, since the expected error message contains the index of an uninitialized table element, but our trap implementation doesn't save that diagnostic information and shepherd it out.
30 lines
880 B
Rust
Executable File
30 lines
880 B
Rust
Executable File
#![doc(hidden)]
|
|
|
|
pub mod ir {
|
|
pub use cranelift_codegen::ir::{
|
|
types, AbiParam, ArgumentPurpose, Signature, SourceLoc, StackSlots, TrapCode, Type,
|
|
ValueLabel, ValueLoc,
|
|
};
|
|
pub use cranelift_codegen::ValueLabelsRanges;
|
|
}
|
|
|
|
pub mod settings {
|
|
pub use cranelift_codegen::settings::{builder, Builder, Configurable, Flags};
|
|
}
|
|
|
|
pub mod isa {
|
|
pub use cranelift_codegen::isa::{CallConv, RegUnit, TargetFrontendConfig, TargetIsa};
|
|
}
|
|
|
|
pub mod entity {
|
|
pub use cranelift_entity::{packed_option, BoxedSlice, EntityRef, PrimaryMap};
|
|
}
|
|
|
|
pub mod wasm {
|
|
pub use cranelift_wasm::{
|
|
get_vmctx_value_label, DataIndex, DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex,
|
|
DefinedTableIndex, ElemIndex, FuncIndex, Global, GlobalIndex, GlobalInit, Memory,
|
|
MemoryIndex, SignatureIndex, Table, TableElementType, TableIndex,
|
|
};
|
|
}
|