Files
wasmtime/lib/cretonne/src/lib.rs
Jakob Stoklund Olesen 26048c2ecc Move WasmRuntime::translate_call_indirect() into FuncEnvironment.
Add two new arguments:

- table_index is the WebAssembly table referenced in the indirect call.
- sig_index is the WebAssembly signature index. We still have the SigRef
  that was created by make_indirect_sig(), but the WebAssembly signature
  index may be needed for detecting type mismatches at runtime.

Change the insertion location to a plain FuncCursor rather than a
FunctionBuilder<Local>. The fact that cretonne-wasm uses FunctionBuilder
should be an implementation detail, and the callbacks don't need to
access WebAssembly locals, so they don't need the extended interface.

Add a FunctionBuilder::cursor() method which creates a FuncCursor for
inserting instructions in the current EBB.

Also add a FuncEnvironment::translate_call() method which allows the
environment to override direct calls the same way as indirect calls.
2017-09-06 15:18:55 -07:00

45 lines
782 B
Rust

//! Cretonne code generation library.
#![deny(missing_docs)]
pub use context::Context;
pub use legalizer::legalize_function;
pub use verifier::verify_function;
pub use write::write_function;
/// Version number of the cretonne crate.
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
#[macro_use]
pub mod dbg;
#[macro_use]
pub mod entity;
pub mod binemit;
pub mod bitset;
pub mod cursor;
pub mod dominator_tree;
pub mod flowgraph;
pub mod ir;
pub mod isa;
pub mod loop_analysis;
pub mod packed_option;
pub mod regalloc;
pub mod result;
pub mod settings;
pub mod verifier;
mod abi;
mod constant_hash;
mod context;
mod iterators;
mod legalizer;
mod licm;
mod partition_slice;
mod predicates;
mod ref_slice;
mod simple_gvn;
mod stack_layout;
mod topo_order;
mod write;