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

Method execute_call

crates/vm/src/frame.rs:6673–6689  ·  view source on GitHub ↗
(&mut self, args: FuncArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

6671
6672 #[inline]
6673 fn execute_call(&mut self, args: FuncArgs, vm: &VirtualMachine) -> FrameResult {
6674 // Stack: [callable, self_or_null, ...]
6675 let self_or_null = self.pop_value_opt(); // Option<PyObjectRef>
6676 let callable = self.pop_value();
6677
6678 let final_args = if let Some(self_val) = self_or_null {
6679 let mut args = args;
6680 args.prepend_arg(self_val);
6681 args
6682 } else {
6683 args
6684 };
6685
6686 let value = callable.call(final_args, vm)?;
6687 self.push_value(value);
6688 Ok(None)
6689 }
6690
6691 /// Instrumented version of execute_call: fires CALL, C_RETURN, and C_RAISE events.
6692 fn execute_call_instrumented(&mut self, args: FuncArgs, vm: &VirtualMachine) -> FrameResult {

Callers 1

execute_instructionMethod · 0.80

Calls 5

pop_value_optMethod · 0.80
pop_valueMethod · 0.80
prepend_argMethod · 0.80
push_valueMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected