next.js
a3e3c6ef - turbo-tasks: unroll TaskStorage iteration patterns per variant

Commit
118 days ago
turbo-tasks: unroll TaskStorage iteration patterns per variant Replace every `for field in lazy_iter()` / `match field { LazyField::V(_) => ... }` pattern in the macro-generated code with an unrolled per-variant sequence that uses the typed accessors (`get_<name>`, `set_<name>`, `take_<name>`, `<name>_mut`, etc.). After this, codegen for: * `encode_meta` / `encode_data` * `clone_snapshot` * `restore_meta_from` / `restore_data_from` * `cleanup_after_execution` * `drop_partial` no longer iterates `&LazyField` references, so the underlying lazy storage container can be swapped (next: TinyVec<LazyField> → packed byte tail with a u32 presence bitmap) without touching any of those patterns again. The closures-over-&LazyField in `find_lazy` / `set_lazy` / `take_lazy` / etc. remain — they're still used by the per-variant accessor bodies and will be addressed in the layout swap. Drops the now-unused `LazyContents`, `take_lazy_contents`, `lazy_extend_owned`, `lazy_retain_mut`, `lazy_cleanup`, `build_lazy_index`, `restore_lazy_field`, and `gen_lazy_match_arms` / `gen_drop_lazy_match_arm` helpers in their place. All 50 backend tests pass; whole workspace builds.
Author
Committer
Parents
Loading