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

Method has_jump

crates/stdlib/src/_opcode.rs:101–111  ·  view source on GitHub ↗
(opcode: i32)

Source from the content-addressed store, hash-verified

99 /// Check if instruction is a jump
100 #[must_use]
101 pub fn has_jump(opcode: i32) -> bool {
102 matches!(
103 Self::try_from(opcode).map(|op| op.inner()),
104 Ok(AnyInstruction::Real(
105 Instruction::ForIter { .. }
106 | Instruction::PopJumpIfFalse { .. }
107 | Instruction::PopJumpIfTrue { .. }
108 | Instruction::Send { .. }
109 ) | AnyInstruction::Pseudo(PseudoInstruction::Jump { .. }))
110 )
111 }
112
113 /// Check if instruction uses co_freevars/co_cellvars
114 #[must_use]

Callers 1

opcode.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected