about summary refs log tree commit diff
path: root/src/librustc_mir/build/expr
AgeCommit message (Collapse)AuthorLines
2020-01-12Split `rustc_mir::{build, hair, lints}` into their own crateMatthew Jasper-1871/+0
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-22/+14
2020-01-10Remove Static from PlaceBaseSantiago Pastorino-3/+3
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-3/+3
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-4/+4
2019-12-24x.py fmt after previous deignoreMark Rousskov-77/+25
2019-12-22Format the worldMark Rousskov-297/+130
2019-12-21simplify MIR building with cfg.goto(...)Mazdak Farrokhzad-22/+6
2019-12-20into: simplify AddressOf logic after rebaseMazdak Farrokhzad-9/+4
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-2/+2
2. mir::Mutability -> ast::Mutability.
2019-12-18Start generating AddressOf rvalues in MIRMatthew Jasper-0/+21
`hir::BorrowKind::Raw` borrows and casting a reference to a raw pointer no longer do a reborrow followed by a cast. Instead we dereference and take the address.
2019-12-15cleanup with push_fake_readMazdak Farrokhzad-11/+2
2019-12-09Ensure that unevaluated constants of type `!` are present in the MIRMatthew Jasper-1/+8
2019-11-27rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵Eduard-Mihai Burtescu-2/+0
VarDebugInfo.
2019-11-21Address review commentsMatthew Jasper-2/+1
2019-11-21Track pointers to statics in MIRMatthew Jasper-2/+19
2019-11-21Remove statics from HAIR by lowering them to a pointer constantOliver Scherer-10/+0
2019-11-11Evaluate borrow and struct expressions in `into`Matthew Jasper-90/+111
This fixes some ordering problems around assignment expressions.
2019-11-11Fix soundness issue with index bounds checksMatthew Jasper-51/+252
An expression like `x[1][{ x = y; 2}]` would perform the bounds check for the inner index operation before evaluating the outer index. This would allow out of bounds memory accesses.
2019-11-11Avoid a string comparison in MIR constructionMatthew Jasper-3/+2
2019-10-22Move Place::elem methods and friends to TyCtxtSantiago Pastorino-6/+7
2019-10-22Intern place projectionSantiago Pastorino-13/+18
2019-10-22Pattern match over PlaceRef rather than PlaceSantiago Pastorino-11/+11
This prepares the code base for when projection is interned. Place's projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be able to pattern match against it.
2019-10-09Revert "Make `into` schedule drop for the destination"Matthew Jasper-43/+21
This reverts commit 37026837a3f23486d3cf1009d9136927168ddb33.
2019-10-07Auto merge of #61430 - matthewjasper:drop-on-into-panic, r=oli-obkbors-25/+43
Make `into` schedule drop for the destination closes #47949
2019-10-04Make `into` schedule drop for the destinationMatthew Jasper-22/+43
2019-10-02Rollup merge of #64922 - spastorino:make-place-builder, r=nikomatsakisMazdak Farrokhzad-30/+114
Use PlaceBuilder to avoid a lot of slice -> vec -> slice convertions r? @oli-obk
2019-10-02Use PlaceBuilder to avoid a lot of slice -> vec -> slice convertionsSantiago Pastorino-30/+114
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-2/+2
2019-09-29Get the type of a local from `local_decls` in `schedule_drop`Matthew Jasper-3/+0
Passing around a separate type is unnecessary and error-prone.
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-1/+1
For both `ast::Expr` and `hir::Expr`.
2019-09-25Rename `sty` to `kind`varkor-1/+1
2019-09-19avoid generating drops for moved operands of callsNiko Matsakis-0/+3
Currently, after a CALL terminator is created in MIR, we insert DROP statements for all of its operands -- even though they were just moved shortly before! These spurious drops are later removed, but not before causing borrow check errors. This PR series modifies the drop code to track operands that were moved and avoid creating drops for them. Right now, I'm only using this mechanism for calls, but it seems likely it could be used in more places.
2019-09-13Make all projection base names be proj_baseSantiago Pastorino-3/+3
2019-09-13Avoid math and use patterns to grab projection baseSantiago Pastorino-10/+6
2019-09-11Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytesSantiago Pastorino-4/+8
2019-09-09Convert Place's projection to a boxed sliceSantiago Pastorino-18/+14
2019-08-22Move def_id out add substsrefWesley Wiser-1/+2
2019-08-16rustc_mir: add sanity asserts for the types of `ty::Const`s.Eduard-Mihai Burtescu-0/+1
2019-08-16Remove redundant `ty` fields from `mir::Constant` and ↵Eduard-Mihai Burtescu-5/+2
`hair::pattern::PatternRange`.
2019-08-10Revert "Simplify MIR generation for logical ops"Andreas Jonson-23/+30
This reverts commit e38e954a0d249f88d0a55504f70d6055e865a931. llvm were not able to optimize the code that well with the simplified mir. Closes: #62993
2019-07-29use PanicInfo and UnsupportedOpInfoSaleem Jaffer-7/+7
2019-07-24use PanicMessage type for MIR assertion errorsRalf Jung-9/+10
2019-07-23Rollup merge of #60951 - saleemjaffer:mir_better_error_enum, r=oli-obkMark Rousskov-8/+8
more specific errors in src/librustc/mir/interpret/error.rs Implements [this](https://github.com/rust-rfcs/const-eval/issues/4)
2019-07-23renames EvalErrorPanic to PanicMessageSaleem Jaffer-6/+6
2019-07-23moving some variants from InterpError to EvalErrorPanicSaleem Jaffer-8/+8
2019-07-20Avoid cloning Place in limit_capture_mutabilitySantiago Pastorino-3/+3
2019-07-20Migrate from Place enum to Place structSantiago Pastorino-20/+39
2019-07-14Auto merge of #62331 - wesleywiser:fix_early_return_leak, r=matthewjasperbors-1/+1
Fix leak when early returning out of `box` syntax Fixes #62289 r? @matthewjasper
2019-07-11Fix leak when early returning out of `box` syntaxWesley Wiser-1/+1
Fixes #62289