bevy/crates/bevy_ecs/src/query
Giacomo Stevanato e320fa0738
Fix query transmute from table to archetype iteration unsoundness (#14615)
# Objective

- Fixes #14348 
- Fixes #14528
- Less complex (but also likely less performant) alternative to #14611

## Solution

- Add a `is_dense` field flag to `QueryIter` indicating whether it is
dense or not, that is whether it can perform dense iteration or not;
- Check this flag any time iteration over a query is performed.

---

It would be nice if someone could try benching this change to see if it
actually matters.

~Note that this not 100% ready for mergin, since there are a bunch of
safety comments on the use of the various `IS_DENSE` for checks that
still need to be updated.~ This is ready modulo benchmarks

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-08-27 00:58:40 +00:00
..
access.rs Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
builder.rs Fix query transmute from table to archetype iteration unsoundness (#14615) 2024-08-27 00:58:40 +00:00
error.rs Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
fetch.rs Add query reborrowing (#14690) 2024-08-15 17:38:56 +00:00
filter.rs Add query reborrowing (#14690) 2024-08-15 17:38:56 +00:00
iter.rs Fix query transmute from table to archetype iteration unsoundness (#14615) 2024-08-27 00:58:40 +00:00
mod.rs inline iter_combinations (#14680) 2024-08-09 17:44:37 +00:00
par_iter.rs Fix query transmute from table to archetype iteration unsoundness (#14615) 2024-08-27 00:58:40 +00:00
state.rs Fix query transmute from table to archetype iteration unsoundness (#14615) 2024-08-27 00:58:40 +00:00
world_query.rs Add query reborrowing (#14690) 2024-08-15 17:38:56 +00:00