next.js
554bd1e7 - turbo-tasks: address PR #93835 review comments

Commit
66 days ago
turbo-tasks: address PR #93835 review comments - Introduce `Tag(NonZeroU8)` newtype in `lazy_tail.rs` to carry the "1..=LAZY_N" invariant at the type level and centralize the bit/mask helpers (`bit`, `mask_below`, `mask_above`, `table_index`). Macro emits `LAZY_TAG_<NAME>: Tag` constants and dispatch fns take `Tag`. `Option<Tag>` is 1 byte via the niche. - Add a Lemire reference to `sum_padded_sizes`'s loop and note the stdlib has no built-in set-bit iterator. - Add unit tests for `sum_padded_sizes`, `offset_of`, the mask- partition invariant, and the `Option<Tag>` niche. - Rename `LazyTail::install_unchecked` -> `insert_unchecked` and `TaskStorage::lazy_install` -> `lazy_insert`. Cross-reference `replace_in_place` from `insert_unchecked`'s safety doc. - Add a `const _` assert pinning `size_of::<Option<TaskStorage>>() == size_of::<TaskStorage>()`. - Inline imports for `TaskStorage` in `backend::mod` and `backend::operation` (drop the fully-qualified spellings). - Fix a stale doc reference (`TaskStorageInner::evictability` -> `TaskStorage::evictability`) and drop a stale `CachedDataItem` mention from the schema module docs. - Rename `TurboMalloc::good_size` -> `get_bucket_size`. All `backend::lazy_tail::tests` (8) and `backend::storage_schema::tests` (16) pass under cargo test and Miri's default Stacked Borrows mode.
Author
Committer
Parents
Loading