next.js
f9d85dcc - turbo-tasks: encapsulate TaskStorage lazy access for upcoming layout change

Commit
91 days ago
turbo-tasks: encapsulate TaskStorage lazy access for upcoming layout change Prefactor for replacing the TinyVec<LazyField> lazy area with a packed byte-tail layout. Two structural changes that are pure refactors today: 1. New TaskStorageBox (thin Box<TaskStorage> newtype) plumbed through the dashmap value types and StorageWriteGuard so callers no longer bind to Box<TaskStorage> directly. 2. Every direct read/write of TaskStorage.lazy in the macro-generated code and the hand-written helpers now funnels through new methods: lazy_push, lazy_iter[_mut], lazy_len, lazy_swap_remove, lazy_replace_at, lazy_slot_mut, lazy_retain_mut, lazy_cleanup, lazy_shrink_to_fit, take_lazy_contents/lazy_extend_owned (opaque LazyContents type), all_lazy_{data,meta}_empty_or_absent, and all_transient_lazy_empty. build_lazy_index moved from a static fn over &[LazyField] to a &self method. No behavior change. All 58 backend tests pass.
Author
Committer
Parents
Loading