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

Function generate

cranelift/codegen/meta/src/gen_isle.rs:1222–1249  ·  view source on GitHub ↗
(
    formats: &[Rc<InstructionFormat>],
    all_inst: &AllInstructions,
    isle_numerics_filename: &str,
    rust_numerics_filename: &str,
    isle_opt_filename: &str,
    isle_lower_filename: &str,

Source from the content-addressed store, hash-verified

1220}
1221
1222pub(crate) fn generate(
1223 formats: &[Rc<InstructionFormat>],
1224 all_inst: &AllInstructions,
1225 isle_numerics_filename: &str,
1226 rust_numerics_filename: &str,
1227 isle_opt_filename: &str,
1228 isle_lower_filename: &str,
1229 isle_dir: &std::path::Path,
1230) -> Result<(), error::Error> {
1231 // Numerics
1232 let mut isle_fmt = Formatter::new(Language::Isle);
1233 let mut rust_fmt = Formatter::new(Language::Rust);
1234 gen_numerics_isle(&mut isle_fmt, &mut rust_fmt);
1235 isle_fmt.write(isle_numerics_filename, isle_dir)?;
1236 rust_fmt.write(rust_numerics_filename, isle_dir)?;
1237
1238 // ISLE DSL: mid-end ("opt") generated bindings.
1239 let mut fmt = Formatter::new(Language::Isle);
1240 gen_opt_isle(&formats, all_inst, &mut fmt);
1241 fmt.write(isle_opt_filename, isle_dir)?;
1242
1243 // ISLE DSL: lowering generated bindings.
1244 let mut fmt = Formatter::new(Language::Isle);
1245 gen_lower_isle(&formats, all_inst, &mut fmt);
1246 fmt.write(isle_lower_filename, isle_dir)?;
1247
1248 Ok(())
1249}

Callers

nothing calls this directly

Calls 6

gen_numerics_isleFunction · 0.85
gen_opt_isleFunction · 0.85
gen_lower_isleFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected