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

Method write_adaptive_counter

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

Write adaptive counter bits for instruction at `index`. Uses Relaxed atomic store. # Safety - `index` must be in bounds.

(&self, index: usize, value: u16)

Source from the content-addressed store, hash-verified

779 /// # Safety
780 /// - `index` must be in bounds.
781 pub unsafe fn write_adaptive_counter(&self, index: usize, value: u16) {
782 self.adaptive_counters[index].store(value, Ordering::Relaxed);
783 }
784
785 /// Produce a clean copy of the bytecode suitable for serialization
786 /// (marshal) and `co_code`. Specialized opcodes are mapped back to their

Callers 14

specialize_load_attrMethod · 0.80
adaptiveMethod · 0.80
specialize_atMethod · 0.80
cooldown_adaptive_atMethod · 0.80
commit_specializationMethod · 0.80
specialize_callMethod · 0.80
specialize_call_kwMethod · 0.80
specialize_sendMethod · 0.80
specialize_to_boolMethod · 0.80

Calls 1

storeMethod · 0.45

Tested by

no test coverage detected