Skip to content

Commit 88dd489

Browse files
committed
Restore try_read_cached_descriptor doc comment to its function
The doc block and #[inline] were left attached to store_attr_dict_hinted when it was inserted above try_read_cached_descriptor. Assisted-by: Claude
1 parent 4f04de4 commit 88dd489

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎crates/vm/src/frame.rs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8062,15 +8062,6 @@ impl ExecutingFrame<'_> {
80628062
Ok(None)
80638063
}
80648064

8065-
/// Read a cached descriptor pointer and validate it against the expected
8066-
/// type version, using a lock-free double-check pattern:
8067-
/// 1. read pointer → incref (try_to_owned)
8068-
/// 2. re-read version + pointer and confirm they still match
8069-
///
8070-
/// This matches the read-side pattern used in LOAD_ATTR_METHOD_WITH_VALUES
8071-
/// and friends: no read-side lock, relying on the write side to invalidate
8072-
/// the version tag before swapping the pointer.
8073-
#[inline]
80748065
/// Store an instance attribute through the cached entry index at
80758066
/// `cache_base + 3`, refreshing the cache when the hint missed.
80768067
fn store_attr_dict_hinted(
@@ -8126,6 +8117,15 @@ impl ExecutingFrame<'_> {
81268117
Ok(None)
81278118
}
81288119

8120+
/// Read a cached descriptor pointer and validate it against the expected
8121+
/// type version, using a lock-free double-check pattern:
8122+
/// 1. read pointer → incref (try_to_owned)
8123+
/// 2. re-read version + pointer and confirm they still match
8124+
///
8125+
/// This matches the read-side pattern used in LOAD_ATTR_METHOD_WITH_VALUES
8126+
/// and friends: no read-side lock, relying on the write side to invalidate
8127+
/// the version tag before swapping the pointer.
8128+
#[inline]
81298129
fn try_read_cached_descriptor(
81308130
&self,
81318131
cache_base: usize,

0 commit comments

Comments
 (0)