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

Method instr_size

crates/compiler-core/src/bytecode/oparg.rs:57–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 /// Returns how many CodeUnits a instruction with this op_arg will be encoded as
56 #[inline]
57 pub const fn instr_size(self) -> usize {
58 (self.0 > 0xff) as usize + (self.0 > 0xff_ff) as usize + (self.0 > 0xff_ff_ff) as usize + 1
59 }
60
61 /// returns the arg split into any necessary ExtendedArg components (in big-endian order) and
62 /// the arg for the real opcode itself

Callers 3

finalize_codeMethod · 0.80
generate_exception_tableFunction · 0.80
splitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected