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

Method evaluate

crates/fuzzing/src/oracles/diff_spec.rs:66–77  ·  view source on GitHub ↗
(
        &mut self,
        function_name: &str,
        arguments: &[DiffValue],
        _results: &[DiffValueType],
    )

Source from the content-addressed store, hash-verified

64 }
65
66 fn evaluate(
67 &mut self,
68 function_name: &str,
69 arguments: &[DiffValue],
70 _results: &[DiffValueType],
71 ) -> Result<Option<Vec<DiffValue>>> {
72 let arguments = arguments.iter().map(SpecValue::from).collect();
73 match wasm_spec_interpreter::interpret(&self.instance, function_name, Some(arguments)) {
74 Ok(results) => Ok(Some(results.into_iter().map(SpecValue::into).collect())),
75 Err(err) => Err(format_err!(err)),
76 }
77 }
78
79 fn get_global(&mut self, name: &str, _ty: DiffValueType) -> Option<DiffValue> {
80 use wasm_spec_interpreter::{SpecExport::Global, export};

Callers

nothing calls this directly

Calls 6

OkFunction · 0.85
collectMethod · 0.80
interpretFunction · 0.50
mapMethod · 0.45
iterMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected