Camille GILLOT
f446bbce72
Fix parallel compiler.
2022-06-22 08:04:24 +02:00
Camille GILLOT
34e4d72929
Separate source_span
and expn_that_defined
from Definitions
.
2022-06-14 22:45:51 +02:00
Camille GILLOT
47799de35a
Separate Definitions and CrateStore from ResolverOutputs.
2022-06-14 22:44:27 +02:00
Camille GILLOT
df59705301
Call def_span inside span_if_local.
2022-06-10 20:15:17 +02:00
Camille GILLOT
16f9f7c7b1
Implement def_ident_span in rustc_middle.
2022-06-10 20:15:14 +02:00
Camille GILLOT
9900ea352b
Cache more queries on disk.
2022-05-13 08:06:48 +02:00
Miguel Guarniz
f983d2658b
use copied() and avoid creating a vector in items and par_items
2022-04-09 13:56:56 -04:00
Miguel Guarniz
0baf85e8b6
remove some uses of visit_all_item_likes in incremental, metadata and interface crates
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-08 11:59:59 -04:00
Miguel Guarniz
b73b4de982
Refactor HIR item-like traversal (part 1)
...
- Create hir_crate_items query which traverses tcx.hir_crate(()).owners to return a hir::ModuleItems
- use tcx.hir_crate_items in tcx.hir().items() to return an iterator of hir::ItemId
- add par_items(impl Fn(hir::ItemId)) to traverse all items in parallel
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-04-08 11:59:59 -04:00
Santiago Pastorino
64df2ee1eb
impl_header -> impl_subject
2022-03-22 10:35:17 -03:00
Santiago Pastorino
0cd03c917c
Extract ImplSubject information
2022-03-20 00:12:18 -03:00
Santiago Pastorino
bf1ca2e4b0
Make local_def_id_to_hir_id query directly returh HirId
2022-01-29 08:40:23 -03:00
Santiago Pastorino
5a299a9903
Make local_def_id_to_hir_id return MaybeOwner<()>
2022-01-28 15:13:01 -03:00
Santiago Pastorino
d17eb78cf8
Separate hir_owner query into two queries to avoid using extensive data on incr comp most of the time
2022-01-28 14:58:27 -03:00
Camille GILLOT
a0bcce4884
Store def_id_to_hir_id as variant in hir_owner.
...
If hir_owner is Owner(_), the LocalDefId is pointing to an owner, so the ItemLocalId is 0.
If the HIR node does not exist, we store Phantom.
Otherwise, we store the HirId associated to the LocalDefId.
2022-01-27 10:46:40 -03:00
Cameron Steffen
45db716902
Replace NestedVisitorMap with NestedFilter
2022-01-16 16:02:36 -06:00
Camille GILLOT
d9c6e70c57
Do not ICE when accesing large LocalDefId.
2022-01-15 21:26:25 +01:00
Camille GILLOT
60064726ae
Return a LocalDefId in get_parent_item.
2022-01-15 21:26:20 +01:00
Vadim Petrochenkov
4b03fd910c
rustc_middle: Rename Export
to ModChild
and add some comments
...
Also rename `module_exports`/`export_map` to `module_reexports`/`reexport_map` for clarity.
2022-01-09 09:22:07 +08:00
Camille GILLOT
7a209bb7a5
Justify untracked access.
2021-10-12 20:53:29 +02:00
Camille GILLOT
12b39e5912
Make naming more explicit.
2021-10-11 22:36:37 +02:00
Camille GILLOT
41e80b85cf
Directly use AttributeMap inside OwnerInfo.
2021-10-10 00:05:35 +02:00
Camille GILLOT
1c7f85f17c
Perform indexing during lowering.
...
Do not access DefId<->HirId maps before they are initialized.
2021-10-09 23:47:59 +02:00
Camille GILLOT
c09eaea484
Make index_hir incremental.
2021-10-09 23:14:59 +02:00
Camille GILLOT
457de08487
Forbid hashing HIR outside of indexing.
2021-10-09 18:38:28 +02:00
Camille GILLOT
cd1ace488f
Use an IndexVec for bodies.
2021-10-09 14:01:09 +02:00
Camille GILLOT
48a339ddbb
Store lowering outputs per owner.
2021-10-09 11:56:29 +02:00
Camille GILLOT
54c3299b3a
Remove eval_always for HIR queries.
...
They depend on `hir_crate` and `index_hir`.
2021-10-07 23:12:28 +02:00
Camille GILLOT
02025d86ac
Remove re-export.
2021-10-03 16:08:54 +02:00
Camille GILLOT
6bbb0792ea
Use boxed slice instead of BTreeSet.
2021-09-12 16:33:17 +02:00
Camille GILLOT
fa6f5adf73
Gather module items after lowering.
2021-09-12 16:33:16 +02:00
Camille GILLOT
b19ae20aad
Track span dependency using a callback.
2021-09-10 20:18:18 +02:00
Camille GILLOT
635978041d
Compute all_traits_impls during resolution.
2021-09-01 20:13:16 +02:00
Camille GILLOT
b88083a58c
Use OwnerNode in indexing.
2021-07-25 12:23:36 +02:00
Camille GILLOT
071a047dc7
Make resolutions a query.
2021-07-06 19:22:27 +02:00
Camille GILLOT
507a1fdf13
Always go through the expn_that_defined query.
2021-06-04 21:37:34 +02:00
Camille GILLOT
4f8e34cbf8
Merge fields and comment.
2021-05-28 21:14:11 +02:00
Camille GILLOT
601453a2ac
Use () for HIR queries.
2021-05-12 13:58:42 +02:00
Camille GILLOT
d794cb0d4f
Introduce a hir_owner_parent query.
2021-04-29 21:36:56 +02:00
Camille GILLOT
18bffdb10e
Move parenting info to index_hir.
2021-04-29 21:36:55 +02:00
Camille GILLOT
99d3798b6c
Do not compute entry parent when not required.
2021-04-29 21:36:55 +02:00
Camille GILLOT
323f5b2ac9
Split crate_hash from index_hir.
2021-04-29 21:36:48 +02:00
Camille GILLOT
38d9d09a58
Use BTreeMap to store attributes.
2021-03-09 19:28:01 +01:00
Camille GILLOT
1fb257b3b4
Collect attributes during HIR lowering.
2021-03-09 18:51:37 +01:00
Camille GILLOT
ff14cac621
Index Modules using their LocalDefId.
2021-02-15 19:32:30 +01:00
bors
a8f7075532
Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank
...
Enforce that query results implement Debug
Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk.
This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.
2021-01-26 05:47:23 +00:00
Camille GILLOT
a185cdbc59
Iterate to encode def_kind.
2021-01-23 13:51:00 +01:00
Camille GILLOT
064a351953
Infallible version of def_span.
2021-01-23 13:35:22 +01:00
Aaron Hill
7afb32557d
Enforce that query results implement Debug
2021-01-16 17:53:02 -05:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00