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

Method vectorcall

crates/vm/src/protocol/callable.rs:40–53  ·  view source on GitHub ↗
(
        &self,
        args: Vec<PyObjectRef>,
        nargs: usize,
        kwnames: Option<&[PyObjectRef]>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

38 /// Falls back to FuncArgs-based call if no vectorcall slot.
39 #[inline]
40 pub fn vectorcall(
41 &self,
42 args: Vec<PyObjectRef>,
43 nargs: usize,
44 kwnames: Option<&[PyObjectRef]>,
45 vm: &VirtualMachine,
46 ) -> PyResult {
47 let Some(callable) = self.to_callable() else {
48 return Err(
49 vm.new_type_error(format!("'{}' object is not callable", self.class().name()))
50 );
51 };
52 callable.invoke_vectorcall(args, nargs, kwnames, vm)
53 }
54}
55
56#[derive(Debug)]

Callers 4

execute_instructionMethod · 0.45
vectorcall_bound_methodFunction · 0.45

Calls 3

to_callableMethod · 0.80
invoke_vectorcallMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected