MCPcopy Index your code
hub / github.com/RustPython/RustPython / invoke

Method invoke

crates/jit/src/lib.rs:147–161  ·  view source on GitHub ↗
(&self, args: &[AbiValue])

Source from the content-addressed store, hash-verified

145 }
146
147 pub fn invoke(&self, args: &[AbiValue]) -> Result<Option<AbiValue>, JitArgumentError> {
148 if self.sig.args.len() != args.len() {
149 return Err(JitArgumentError::WrongNumberOfArguments);
150 }
151
152 let cif_args = self
153 .sig
154 .args
155 .iter()
156 .zip(args.iter())
157 .map(|(ty, val)| type_check(ty, val).map(|_| val))
158 .map(|v| v.map(AbiValue::to_libffi_arg))
159 .collect::<Result<Vec<_>, _>>()?;
160 Ok(unsafe { self.invoke_raw(&cif_args) })
161 }
162
163 unsafe fn invoke_raw(&self, cif_args: &[libffi::middle::Arg<'_>]) -> Option<AbiValue> {
164 unsafe {

Callers 5

thenMethod · 0.45
request_animation_frameFunction · 0.45
runMethod · 0.45
readlineMethod · 0.45
backupMethod · 0.45

Calls 7

invoke_rawMethod · 0.80
collectMethod · 0.80
type_checkFunction · 0.70
ErrClass · 0.50
lenMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected