MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / generate

Function generate

cranelift/codegen/meta/src/lib.rs:127–141  ·  view source on GitHub ↗

Generates all the source files used in Cranelift from the meta-language.

(
    isas: &[isa::Isa],
    out_dir: &std::path::Path,
    isle_dir: &std::path::Path,
)

Source from the content-addressed store, hash-verified

125
126/// Generates all the source files used in Cranelift from the meta-language.
127pub fn generate(
128 isas: &[isa::Isa],
129 out_dir: &std::path::Path,
130 isle_dir: &std::path::Path,
131) -> Result<(), error::Error> {
132 let shared_defs = shared::define();
133 generate_rust_for_shared_defs(&shared_defs, isas, out_dir)?;
134 generate_isle_for_shared_defs(&shared_defs, isle_dir)?;
135
136 let insts = cranelift_assembler_x64_meta::instructions::list();
137 generate_isle_for_assembler(&insts, isle_dir)?;
138 generate_rust_macro_for_assembler(&insts, out_dir)?;
139
140 Ok(())
141}

Callers 3

mainFunction · 0.50

Calls 7

OkFunction · 0.85
defineFunction · 0.50
listFunction · 0.50

Tested by

no test coverage detected