aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
Commit message (Collapse)AuthorAgeFilesLines
* Move ToChalk -> mappingFlorian Diebold2021-04-091-1/+1
|
* Reorganize hir_ty modulesFlorian Diebold2021-04-091-1/+2
| | | | | Chalk isn't really a 'traits' thing anymore, so it doesn't make sense to have all the Chalk-related stuff in submodules of `traits`.
* CleanupFlorian Diebold2021-04-081-1/+5
|
* Intern SubstitutionsFlorian Diebold2021-04-083-4/+4
| | | | (Costs a bit of performance, reduces memory usage on RA by ~10%.)
* Remove unusedFlorian Diebold2021-04-083-4/+3
|
* Fix `Canonicalized::apply_solution`Florian Diebold2021-04-081-13/+16
| | | | | | Now that we're using Chalk's `substitute` which actually knows about lifetimes, the hack doesn't work anymore, but we can put in a proper lifetime.
* Fix missing match armsFlorian Diebold2021-04-081-0/+1
|
* Fix remaining `interned_mut` callFlorian Diebold2021-04-081-4/+6
|
* Replace remaining `fold` callsFlorian Diebold2021-04-081-49/+62
|
* Replace some `fold` callsFlorian Diebold2021-04-081-15/+4
|
* Fix shifted_{in,out} callsFlorian Diebold2021-04-081-1/+1
|
* Add HasInterner boundsFlorian Diebold2021-04-081-4/+12
|
* Merge #8409bors[bot]2021-04-073-3/+4
|\ | | | | | | | | | | | | | | 8409: Various remaining fixes for Chalk IR move r=flodiebold a=flodiebold CC #8313 Co-authored-by: Florian Diebold <[email protected]>
| * Fix return type of Substitution::internedFlorian Diebold2021-04-071-1/+1
| |
| * InEnvironment::new takes a referenceFlorian Diebold2021-04-071-1/+1
| |
| * Move hir_trait_id to extension traitFlorian Diebold2021-04-071-1/+2
| |
* | Move `equals_ctor` to `TyExt`Florian Diebold2021-04-071-1/+2
|/ | | | | | I'd prefer getting rid of it, but it's used in the impl search and not super easy to replace there (I think ideally the impl search would do proper unification, but that's a bit more complicated).
* Remove Ty::substs{_mut}Florian Diebold2021-04-072-3/+8
| | | | | | Almost all uses actually only care about ADT substs, so it's better to be explicit. The methods were a bad abstraction anyway since they already didn't include the inner types of e.g. `TyKind::Ref` anymore.
* Remove `SolutionVariables`, add ConstrainedSubst analogous to ChalkFlorian Diebold2021-04-061-2/+9
| | | | ... just missing the constraints.
* Align `InferenceVar` to ChalkFlorian Diebold2021-04-061-12/+24
|
* infer: remove `record_pat_field_resolutions` fieldJonas Schievink2021-04-061-6/+0
| | | | | Same as https://github.com/rust-analyzer/rust-analyzer/pull/8376, this can be computed from other data
* infer: remove `record_field_resolutions` fieldJonas Schievink2021-04-062-9/+6
| | | | | It stores no useful data, since we can derive all fields from `variant_resolutions`
* Merge #8364bors[bot]2021-04-062-4/+10
|\ | | | | | | | | | | | | | | | | | | 8364: Memory usage improvements r=jonas-schievink a=alexmaco These are mostly focused on splitting up enum variants with large size differences between variants by `Box`-ing things up. In my testing this reduces the memory usage somewhere in the low percentages, even though the measurements are quite noisy. Co-authored-by: Alexandru Macovei <[email protected]>
| * Use Box'es to reduce the size of hir_def::expr::Pat from 112 to 64 bytes on ↵Alexandru Macovei2021-04-061-2/+2
| | | | | | | | 64bit
| * Use Box'es to reduce size of hir_def::expr::Expr from 128 to 72 bytes (on ↵Alexandru Macovei2021-04-061-2/+8
| | | | | | | | | | | | | | | | | | | | 64bit systems) Rationale: only a minority of variants used almost half the size. By keeping large members (especially in Option) behind a box the memory cost is only payed when the large variants are needed. This reduces the size Vec<Expr> needs to allocate.
* | Move Ty accessors to TyExtLukas Wirth2021-04-064-4/+7
| |
* | Add chalk_ir::Const to TyKind::ArrayLukas Wirth2021-04-063-10/+16
| |
* | Use a constructor function for Static lifetimesLukas Wirth2021-04-062-22/+14
| |
* | Add Lifetime to TyKind::RefLukas Wirth2021-04-064-18/+32
|/
* Fix shifting of binders in FnPointerFlorian Diebold2021-04-051-2/+4
| | | | | | | | | - don't shift in/out for Chalk mapping (we want to have the same binders now) - do shift in when creating the signature for a closure (though it shouldn't matter much) - do shift in when lowering a `fn()` type - correctly deal with the implied binder in TypeWalk
* Align FnPointer with ChalkFlorian Diebold2021-04-052-7/+7
|
* Substitution::prefix -> subst_prefixFlorian Diebold2021-04-051-2/+4
| | | | I probably want to get rid of this function completely later.
* Substitution::single -> from1Florian Diebold2021-04-051-2/+4
|
* Move ProjectionTy methods to extension traitFlorian Diebold2021-04-051-2/+2
|
* Get rid of subst_bound_vars usesFlorian Diebold2021-04-051-3/+3
|
* Get rid of some walk_mut usesFlorian Diebold2021-04-051-6/+9
|
* Add Interner parameter to Binders::substituteFlorian Diebold2021-04-053-12/+18
|
* Binders::subst -> substituteFlorian Diebold2021-04-053-10/+10
|
* Use VariableKinds in BindersFlorian Diebold2021-04-051-2/+2
|
* Rename TyKind::Unknown to ErrorLaurențiu Nicola2021-04-052-4/+4
|
* Move things from `traits` module to `types` as wellFlorian Diebold2021-04-042-4/+4
|
* Move things in hir_ty into submodulesFlorian Diebold2021-04-044-9/+5
| | | | | - all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk`
* Replace Substitution::bound_vars and ::type_params_for_genericsFlorian Diebold2021-04-041-1/+1
|
* Replace last uses of SubstsBuilder by TyBuilderFlorian Diebold2021-04-043-14/+7
|
* Some more TyBuilder useFlorian Diebold2021-04-041-29/+25
|
* Replace remaining uses of Substitution::build_for_defFlorian Diebold2021-04-042-5/+2
|
* More TyBuilder useFlorian Diebold2021-04-041-12/+9
|
* Add and start using TraitRef and ProjectionTy buildersFlorian Diebold2021-04-041-12/+4
|
* Add TyBuilder::adtFlorian Diebold2021-04-042-36/+17
|
* Move Ty::fn_ptr to TyBuilderFlorian Diebold2021-04-041-4/+5
|