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

Method write_cached_descriptor

crates/vm/src/frame.rs:7333–7351  ·  view source on GitHub ↗
(
        &self,
        cache_base: usize,
        type_version: u32,
        descr_ptr: usize,
    )

Source from the content-addressed store, hash-verified

7331
7332 #[inline]
7333 unsafe fn write_cached_descriptor(
7334 &self,
7335 cache_base: usize,
7336 type_version: u32,
7337 descr_ptr: usize,
7338 ) {
7339 // Publish descriptor cache with version-invalidation protocol:
7340 // invalidate version first, then write payload, then publish version.
7341 // Reader double-checks version+ptr after incref, so no writer lock needed.
7342 unsafe {
7343 self.code.instructions.write_cache_u32(cache_base + 1, 0);
7344 self.code
7345 .instructions
7346 .write_cache_ptr(cache_base + 5, descr_ptr);
7347 self.code
7348 .instructions
7349 .write_cache_u32(cache_base + 1, type_version);
7350 }
7351 }
7352
7353 #[inline]
7354 unsafe fn write_cached_descriptor_with_metaclass(

Callers 2

specialize_load_attrMethod · 0.80

Calls 2

write_cache_u32Method · 0.80
write_cache_ptrMethod · 0.80

Tested by

no test coverage detected