Jonas Schievink
abdba92334
Don't allocate empty generics
2020-06-24 16:54:21 +02:00
Jonas Schievink
ffa0435050
Make generics and attr queries use ItemTree
...
Now it's fast
2020-06-24 16:53:16 +02:00
Jonas Schievink
c12f7b610b
Lower generics
2020-06-24 16:53:16 +02:00
Edwin Cheng
bdcf6f5658
Introduce LowerCtx for path lowering
2020-05-01 20:01:17 +08:00
Aleksey Kladov
2bfb65db93
Be consistent about token accesors
2020-04-09 18:48:13 +02:00
Aleksey Kladov
f840fcb2f5
Simplify Arena to use a generic index
2020-03-19 18:46:30 +01:00
Aleksey Kladov
9faea2364d
Use dyn Trait
for working with databse
...
It improves compile time in `--release` mode quite a bit, it doesn't
really slow things down and, conceptually, it seems closer to what we
want the physical architecture to look like (we don't want to
monomorphise EVERYTHING in a single leaf crate).
2020-03-16 17:42:30 +01:00
Aleksey Kladov
b96da48809
Add profiling calls
2020-03-05 14:22:31 +01:00
Kirill Bulatov
b8ddcb0652
Run cargo +nightly fix --clippy -Z unstable-options
2020-02-18 16:03:08 +02:00
Florian Diebold
dded90a748
Formatting
2020-02-07 18:28:10 +01:00
Florian Diebold
dbc14f9d57
First stab at desugaring bounds for APIT
2020-02-07 18:28:10 +01:00
Florian Diebold
93aa166748
wip lower impl trait to type args
2020-02-07 18:28:10 +01:00
Florian Diebold
6911bc89a7
Rename N! to name!
2019-12-13 22:33:38 +01:00
Florian Diebold
259c42f00e
Add macros for known names and paths
2019-12-13 22:33:37 +01:00
Aleksey Kladov
56710f119b
Move enum&union to new loc
2019-12-12 15:11:57 +01:00
Aleksey Kladov
f135a8ea55
Move structs to new loc
2019-12-12 14:58:04 +01:00
Aleksey Kladov
82e9b24558
Move traits to the new loc
2019-12-12 14:36:14 +01:00
Aleksey Kladov
7b0644d81e
Switch to the new location for impls
2019-12-12 14:25:34 +01:00
Aleksey Kladov
88c5b1282a
Rename GenericParam -> TypeParam
...
We don't have LifetimeParam yet, but they are planned!
2019-12-07 20:25:48 +01:00
Aleksey Kladov
7d2080a031
Classify name works for TypeParams
2019-12-07 19:52:09 +01:00
Aleksey Kladov
dda9587e75
Track source of type parameters
2019-12-07 19:44:43 +01:00
Aleksey Kladov
d75f768c13
Minor
2019-12-07 19:44:43 +01:00
Aleksey Kladov
8e9837df21
Remove idx and parent generics from generics
...
This makes `hir_def::GenericParams` flatter. The logic for
re-numbering the params is moved to hir instead.
2019-12-07 13:05:56 +01:00
Aleksey Kladov
30fefcc08c
Store GenericParams in arena
2019-12-07 13:05:56 +01:00
Aleksey Kladov
8f1f5a783a
Move source-related traits to a separate module
2019-11-28 19:05:21 +03:00
Aleksey Kladov
5fd68b5929
Fix hir for ast::UnionDef
2019-11-25 17:50:49 +03:00
Aleksey Kladov
fc1e543f7a
Get rid of DefDatabase2
2019-11-23 14:49:45 +03:00
Aleksey Kladov
12ec946216
Simplify generic params
2019-11-20 20:50:34 +03:00
Aleksey Kladov
cb642fc578
Move generic_params query to HIR
2019-11-20 20:38:37 +03:00
Aleksey Kladov
64c21ed195
Switch type aliases to new sources
2019-11-20 17:43:03 +03:00
Aleksey Kladov
cebeedc66f
Next gen IDs for functions
...
The current system with AstIds has two primaraly drawbacks:
* It is possible to manufacture IDs out of thin air.
For example, it's possible to create IDs for items which are not
considered in CrateDefMap due to cfg. Or it is possible to mixup
structs and unions, because they share ID space.
* Getting the ID of a parent requires a secondary index.
Instead, the plan is to pursue the more traditional approach, where
each items stores the id of the parent declaration. This makes
`FromSource` more awkward, but also more correct: now, to get from an
AST to HIR, we first do this recursively for the parent item, and the
just search the children of the parent for the matching def
2019-11-20 16:22:58 +03:00
Aleksey Kladov
e1a6e38767
Move Generics to hir_def
2019-11-20 12:34:48 +03:00