rust/compiler/rustc_interface/src
bors f5adff6bd8 Auto merge of #109611 - Zoxc:query-engine-rem, r=cjgillot
Remove `QueryEngine` trait

This removes the `QueryEngine` trait and `Queries` from `rustc_query_impl` and replaced them with function pointers and fields in `QuerySystem`. As a side effect `OnDiskCache` is moved back into `rustc_middle` and the `OnDiskCache` trait is also removed.

This has a couple of benefits.
- `TyCtxt` is used in the query system instead of the removed `QueryCtxt` which is larger.
- Function pointers are more flexible to work with. A variant of https://github.com/rust-lang/rust/pull/107802 is included which avoids the double indirection. For https://github.com/rust-lang/rust/pull/108938 we can name entry point `__rust_end_short_backtrace` to avoid some overhead. For https://github.com/rust-lang/rust/pull/108062 it avoids the duplicate `QueryEngine` structs.
- `QueryContext` now implements `DepContext` which avoids many `dep_context()` calls in `rustc_query_system`.
- The `rustc_driver` size is reduced by 0.33%, hopefully that means some bootstrap improvements.
- This avoids the unsafe code around the `QueryEngine` trait.

r? `@cjgillot`
2023-04-29 21:58:13 +00:00
..
callbacks.rs Simplify tls::enter_context. 2023-02-09 15:25:45 +11:00
errors.rs Remove a back compat warning 2023-02-22 19:39:03 +00:00
interface.rs Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
lib.rs Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
passes.rs Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
proc_macro_decls.rs rustc: Remove unused Session argument from some attribute functions 2023-03-22 13:55:55 +04:00
queries.rs Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
tests.rs Revert "Rename -Zoom=panic to -Zoom=unwind" 2023-04-25 00:08:33 +02:00
util.rs Auto merge of #109611 - Zoxc:query-engine-rem, r=cjgillot 2023-04-29 21:58:13 +00:00