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

Method pop_jump_if_relative

crates/vm/src/frame.rs:6901–6914  ·  view source on GitHub ↗
(
        &mut self,
        vm: &VirtualMachine,
        arg: bytecode::OpArg,
        caches: u32,
        flag: bool,
    )

Source from the content-addressed store, hash-verified

6899
6900 #[inline]
6901 fn pop_jump_if_relative(
6902 &mut self,
6903 vm: &VirtualMachine,
6904 arg: bytecode::OpArg,
6905 caches: u32,
6906 flag: bool,
6907 ) -> FrameResult {
6908 let obj = self.pop_value();
6909 let value = obj.try_to_bool(vm)?;
6910 if value == flag {
6911 self.jump_relative_forward(u32::from(arg), caches);
6912 }
6913 Ok(None)
6914 }
6915
6916 /// Advance the iterator on top of stack.
6917 /// Returns `true` if iteration continued (item pushed), `false` if exhausted (jumped).

Callers 1

execute_instructionMethod · 0.80

Calls 3

pop_valueMethod · 0.80
try_to_boolMethod · 0.80
jump_relative_forwardMethod · 0.80

Tested by

no test coverage detected