about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/arena.rs
AgeCommit message (Collapse)AuthorLines
2023-11-20Remove unused arena kinds in `rustc_hir` and `rustc_middle`.Nicholas Nethercote-1/+0
2023-04-22Also arena-allocate `ast::MacroDef` to make `Item: Copy`Nilstrieb-1/+1
2023-04-22Impl `Copy` for almost all HIR typesNilstrieb-41/+1
This simplifies the invocation of the `arena_types` macro and probably makes working with HIR nicer in general.
2023-04-16Alloc `hir::Lit` in an arena to remove the destructor from `Expr`Nilstrieb-0/+1
This allows allocating `Expr`s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena. This is something I'm working on.
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-0/+1
2022-07-12Add an indirection for closures in `hir::ExprKind`Maybe Waffle-0/+1
This helps bring `hir::Expr` size down, `Closure` was the biggest variant, especially after `for<>` additions.
2022-07-06Make AST lowering a query.Camille GILLOT-1/+1
2022-04-30Box HIR Generics and Impl.Camille GILLOT-0/+2
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-1/+0
2021-12-13let-else: add hir::Let and type check it like a hir::LocalCormac Relf-0/+1
unify typeck of hir::Local and hir::Let remove extraneous pub(crate/super)
2021-11-19Add some comments.Nicholas Nethercote-1/+1
Also use `Default::default()` in one `TypedArena::default()`, for consistency with `DroplessArena::default()`.
2021-11-17Remove unnecessary lifetime argument from arena macros.Nicholas Nethercote-37/+37
Because it's always `'tcx`. In fact, some of them use a mixture of passed-in `$tcx` and hard-coded `'tcx`, so no other lifetime would even work. This makes the code easier to read.
2021-11-15Remove `DropArena`.Nicholas Nethercote-10/+5
Most arena-allocate types that impl `Drop` get their own `TypedArena`, but a few infrequently used ones share a `DropArena`. This sharing adds complexity but doesn't help performance or memory usage. Perhaps it was more effective in the past prior to some other improvements to arenas. This commit removes `DropArena` and the sharing of arenas via the `few` attribute of the `arena_types` macro. This change removes over 100 lines of code and nine uses of `unsafe` (one of which affects the parallel compiler) and makes the remaining code easier to read.
2021-10-09Perform indexing during lowering.Camille GILLOT-0/+1
Do not access DefId<->HirId maps before they are initialized.
2021-10-09Use an IndexVec for bodies.Camille GILLOT-0/+1
2021-09-20Do not store visibility in *ItemRef.Camille GILLOT-2/+2
2021-08-30Remove unused arena macro argsbjorn3-2/+2
2021-08-28Treat macros as HIR itemsinquisitivecrystal-1/+0
2021-07-25Introduce OwnerNode::Crate.Camille GILLOT-0/+1
2021-07-25Merge the BTreeMap in hir::Crate.Camille GILLOT-0/+3
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-1/+0
2021-05-30Remove StableVec.Camille GILLOT-0/+1
2021-05-13Add support for const operands and options to global_asm!Amanieu d'Antras-1/+0
On x86, the default syntax is also switched to Intel to match asm!
2021-03-16ast/hir: Rename field-related structuresVadim Petrochenkov-3/+3
StructField -> FieldDef ("field definition") Field -> ExprField ("expression field", not "field expression") FieldPat -> PatField ("pattern field", not "field pattern") Also rename visiting and other methods working on them.
2020-12-06Retain assembly operands span when lowering AST to HIRTomasz Miąsko-1/+1
2020-11-26Formatting.Camille GILLOT-1/+1
2020-11-26Store ForeignItem in a side table.Camille GILLOT-0/+1
2020-08-30mv compiler to compiler/mark-0/+52