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

Function adaptive_counter_bits

crates/compiler-core/src/bytecode.rs:485–487  ·  view source on GitHub ↗

Encode an adaptive counter as `(value << 4) | backoff`.

(value: u16, backoff: u16)

Source from the content-addressed store, hash-verified

483
484/// Encode an adaptive counter as `(value << 4) | backoff`.
485pub const fn adaptive_counter_bits(value: u16, backoff: u16) -> u16 {
486 (value << BACKOFF_BITS) | backoff
487}
488
489/// True when the adaptive counter should trigger specialization.
490#[inline]

Callers 2

bytecode.rsFile · 0.85
adaptive_counter_backoffFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected