Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix missing match arms | Florian Diebold | 2021-04-08 | 1 | -0/+1 |
| | |||||
* | Fix remaining `interned_mut` call | Florian Diebold | 2021-04-08 | 1 | -4/+6 |
| | |||||
* | Replace remaining `fold` calls | Florian Diebold | 2021-04-08 | 1 | -49/+62 |
| | |||||
* | Replace some `fold` calls | Florian Diebold | 2021-04-08 | 1 | -15/+4 |
| | |||||
* | Fix shifted_{in,out} calls | Florian Diebold | 2021-04-08 | 1 | -1/+1 |
| | |||||
* | Add HasInterner bounds | Florian Diebold | 2021-04-08 | 1 | -4/+12 |
| | |||||
* | Merge #8409 | bors[bot] | 2021-04-07 | 3 | -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::interned | Florian Diebold | 2021-04-07 | 1 | -1/+1 |
| | | |||||
| * | InEnvironment::new takes a reference | Florian Diebold | 2021-04-07 | 1 | -1/+1 |
| | | |||||
| * | Move hir_trait_id to extension trait | Florian Diebold | 2021-04-07 | 1 | -1/+2 |
| | | |||||
* | | Move `equals_ctor` to `TyExt` | Florian Diebold | 2021-04-07 | 1 | -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 Diebold | 2021-04-07 | 2 | -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 Chalk | Florian Diebold | 2021-04-06 | 1 | -2/+9 |
| | | | | ... just missing the constraints. | ||||
* | Align `InferenceVar` to Chalk | Florian Diebold | 2021-04-06 | 1 | -12/+24 |
| | |||||
* | infer: remove `record_pat_field_resolutions` field | Jonas Schievink | 2021-04-06 | 1 | -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` field | Jonas Schievink | 2021-04-06 | 2 | -9/+6 |
| | | | | | It stores no useful data, since we can derive all fields from `variant_resolutions` | ||||
* | Merge #8364 | bors[bot] | 2021-04-06 | 2 | -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 Macovei | 2021-04-06 | 1 | -2/+2 |
| | | | | | | | | 64bit | ||||
| * | Use Box'es to reduce size of hir_def::expr::Expr from 128 to 72 bytes (on ↵ | Alexandru Macovei | 2021-04-06 | 1 | -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 TyExt | Lukas Wirth | 2021-04-06 | 4 | -4/+7 |
| | | |||||
* | | Add chalk_ir::Const to TyKind::Array | Lukas Wirth | 2021-04-06 | 3 | -10/+16 |
| | | |||||
* | | Use a constructor function for Static lifetimes | Lukas Wirth | 2021-04-06 | 2 | -22/+14 |
| | | |||||
* | | Add Lifetime to TyKind::Ref | Lukas Wirth | 2021-04-06 | 4 | -18/+32 |
|/ | |||||
* | Fix shifting of binders in FnPointer | Florian Diebold | 2021-04-05 | 1 | -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 Chalk | Florian Diebold | 2021-04-05 | 2 | -7/+7 |
| | |||||
* | Substitution::prefix -> subst_prefix | Florian Diebold | 2021-04-05 | 1 | -2/+4 |
| | | | | I probably want to get rid of this function completely later. | ||||
* | Substitution::single -> from1 | Florian Diebold | 2021-04-05 | 1 | -2/+4 |
| | |||||
* | Move ProjectionTy methods to extension trait | Florian Diebold | 2021-04-05 | 1 | -2/+2 |
| | |||||
* | Get rid of subst_bound_vars uses | Florian Diebold | 2021-04-05 | 1 | -3/+3 |
| | |||||
* | Get rid of some walk_mut uses | Florian Diebold | 2021-04-05 | 1 | -6/+9 |
| | |||||
* | Add Interner parameter to Binders::substitute | Florian Diebold | 2021-04-05 | 3 | -12/+18 |
| | |||||
* | Binders::subst -> substitute | Florian Diebold | 2021-04-05 | 3 | -10/+10 |
| | |||||
* | Use VariableKinds in Binders | Florian Diebold | 2021-04-05 | 1 | -2/+2 |
| | |||||
* | Rename TyKind::Unknown to Error | Laurențiu Nicola | 2021-04-05 | 2 | -4/+4 |
| | |||||
* | Move things from `traits` module to `types` as well | Florian Diebold | 2021-04-04 | 2 | -4/+4 |
| | |||||
* | Move things in hir_ty into submodules | Florian Diebold | 2021-04-04 | 4 | -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_generics | Florian Diebold | 2021-04-04 | 1 | -1/+1 |
| | |||||
* | Replace last uses of SubstsBuilder by TyBuilder | Florian Diebold | 2021-04-04 | 3 | -14/+7 |
| | |||||
* | Some more TyBuilder use | Florian Diebold | 2021-04-04 | 1 | -29/+25 |
| | |||||
* | Replace remaining uses of Substitution::build_for_def | Florian Diebold | 2021-04-04 | 2 | -5/+2 |
| | |||||
* | More TyBuilder use | Florian Diebold | 2021-04-04 | 1 | -12/+9 |
| | |||||
* | Add and start using TraitRef and ProjectionTy builders | Florian Diebold | 2021-04-04 | 1 | -12/+4 |
| | |||||
* | Add TyBuilder::adt | Florian Diebold | 2021-04-04 | 2 | -36/+17 |
| | |||||
* | Move Ty::fn_ptr to TyBuilder | Florian Diebold | 2021-04-04 | 1 | -4/+5 |
| | |||||
* | Add TyBuilder::unit() and TyExt::is_unit() | Florian Diebold | 2021-04-04 | 1 | -11/+11 |
| | |||||
* | Rename Ty::interned to Ty::kind | Florian Diebold | 2021-04-03 | 5 | -19/+19 |
| | | | | ... since that's the actual method on Chalk side that matches the signature. | ||||
* | Introduce `GenericArg` like in Chalk | Florian Diebold | 2021-04-03 | 5 | -46/+58 |
| | | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters. | ||||
* | Don't recheck obligations if we have learned nothing new | Florian Diebold | 2021-04-01 | 3 | -5/+11 |
| | | | | | | | | | | This is just the most trivial check: If no inference variables have been updated, and there are no new obligations, we can just skip trying to solve them again. We could be smarter about it, but this already helps quite a bit, and I don't want to touch this too much before we replace the inference table by Chalk's. Fixes #8263 (well, improves it quite a bit). | ||||
* | internal: ensure that runaway type-inference doesn't block the main loop | Aleksey Kladov | 2021-03-29 | 1 | -0/+2 |
| | | | | | | We have a bug where type-checking `per_query_memory_usage` takes a couple of seconds. It also reveals another bug: our type inference is not cancellable. | ||||
* | Merge #8201 | bors[bot] | 2021-03-27 | 1 | -0/+1 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8201: Fix recursive macro statements expansion r=edwin0cheng a=edwin0cheng This PR attempts to properly handle macro statement expansion by implementing the following: 1. Merge macro expanded statements to parent scope statements. 2. Add a new hir `Expr::MacroStmts` for handle tail expression infer. PS : The scope of macro expanded statements are so strange that it took more time than I thought to understand and implement it :( Fixes #8171 Co-authored-by: Edwin Cheng <[email protected]> |