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

Method binary_op_inplace_unicode_target_local

crates/vm/src/frame.rs:8050–8068  ·  view source on GitHub ↗
(
        &self,
        cache_base: usize,
        left: &PyObject,
    )

Source from the content-addressed store, hash-verified

8048
8049 #[inline]
8050 fn binary_op_inplace_unicode_target_local(
8051 &self,
8052 cache_base: usize,
8053 left: &PyObject,
8054 ) -> Option<usize> {
8055 let next_idx = cache_base + Instruction::BinaryOp { op: Arg::marker() }.cache_entries();
8056 let unit = self.code.instructions.get(next_idx)?;
8057 let next_op = unit.op.to_base().unwrap_or(unit.op);
8058 if !matches!(next_op, Instruction::StoreFast { .. }) {
8059 return None;
8060 }
8061 let local_idx = usize::from(u8::from(unit.arg));
8062 self.localsplus
8063 .fastlocals()
8064 .get(local_idx)
8065 .and_then(|slot| slot.as_ref())
8066 .filter(|local| local.is(left))
8067 .map(|_| local_idx)
8068 }
8069
8070 /// Adaptive counter: trigger specialization at zero, otherwise advance countdown.
8071 #[inline]

Callers 2

execute_instructionMethod · 0.80
specialize_binary_opMethod · 0.80

Calls 8

cache_entriesMethod · 0.80
fastlocalsMethod · 0.80
isMethod · 0.80
getMethod · 0.45
to_baseMethod · 0.45
mapMethod · 0.45
filterMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected