summary refs log tree commit diff
path: root/src/librustc_mir/build/expr
AgeCommit message (Collapse)AuthorLines
2018-05-03When using NLL, implicitly borrow match bindings for any guard,Felix S. Klock II-2/+13
deref'ing such borrows within that guard. Review feedback: Add comment noting a point where we may or may not need to add a cast when we finish the work on rust-lang/rust#27282. Review feedback: Pass a newtype'd `ArmHasGuard` rather than a raw boolean. Review feedback: toggle "ref binding in guards" semantics via specific method. (This should ease a follow-up PR that just unconditionally adopts the new semantics.)
2018-04-30Unify MIR assert messages and const eval errorsOliver Schneider-6/+6
2018-04-30Merge ConstMathError into EvalErrorKindOliver Schneider-16/+7
2018-04-30Remove the `rustc_const_math` crateOliver Schneider-2/+1
2018-04-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-1/+1
InternedString
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-03-14remove defaulting to unitAndrew Cann-1/+1
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
2018-03-08Use clearer name for integer bit width helper functionOliver Schneider-2/+2
2018-03-08Don't use the undefined bytes of PrimVal::BytesOliver Schneider-27/+11
2018-03-08Nuke ConstInt and Const*sizeOliver Schneider-47/+16
2018-03-08Nuke the entire ctfe from orbit, it's the only way to be sureOliver Schneider-17/+5
2018-03-08Produce instead of pointersOliver Schneider-3/+18
2018-02-07[ci skip] Generate false edges from loop_blockbobtwinkles-24/+22
As opposed to using weirdness involving pretending the body block is the loop block. This does not pass tests This commit is [ci skip] because I know it doesn't pass tests yet. Somehow this commit introduces nondeterminism into the handling of loops.
2018-02-05mir: Add false edge cleanup out of infinite loopsbobtwinkles-5/+17
Fixes #46036
2018-02-05Fix comment in ExprKind::LogicalOpbobtwinkles-2/+2
The comment previously implied that the true branch would result in the false block. Fortunately the implementation is correct.
2018-01-25Fix never-type rvalue ICEvarkor-1/+1
2018-01-04rustc: use {U,I}size instead of {U,I}s shorthands.Eduard-Mihai Burtescu-2/+2
2017-12-21fix debuginfo scoping of let-statementsAriel Ben-Yehuda-1/+1
2017-12-05rustc_mir: don't move temporaries that are still used later.Eduard-Mihai Burtescu-4/+4
2017-12-03funnel all unwind paths through a single Resume blockAriel Ben-Yehuda-1/+1
This simplifies analysis and borrow-checking because liveness at the resume point can always be simply propagated. Later on, the "dead" Resumes are removed.
2017-12-03initialize the destination in unit statementsAriel Ben-Yehuda-1/+3
Fixes #46159.
2017-12-01MIR: s/lv(al(ue)?)?/place in function/variable/module names.Eduard-Mihai Burtescu-37/+37
2017-12-01MIR: s/Lvalue/Place in type names.Eduard-Mihai Burtescu-25/+25
2017-11-28MIR: split Operand::Consume into Copy and Move.Eduard-Mihai Burtescu-17/+17
2017-11-17MIR: hide .rodata constants vs by-ref ABI clash in trans.Eduard-Mihai Burtescu-7/+1
2017-10-26Add comments to clarify function argument ownershipBjörn Steinbrink-0/+2
2017-10-26Avoid unnecessary copies of arguments that are simple bindingsBjörn Steinbrink-1/+5
Initially MIR differentiated between arguments and locals, which introduced a need to add extra copies assigning the argument to a local, even for simple bindings. This differentiation no longer exists, but we're still creating those copies, bloating the MIR and LLVM IR we emit. Additionally, the current approach means that we create debug info for both the incoming argument (marking it as an argument), and then immediately shadow it a local that goes by the same name. This can be confusing when using e.g. "info args" in gdb, or when e.g. a debugger with a GUI displays the function arguments separately from the local variables, especially when the binding is mutable, because the argument doesn't change, while the local variable does.
2017-09-24move unsafety checking to MIRAriel Ben-Yehuda-3/+16
No functional changes intended.
2017-09-24add lint levels to VisibilityScopeAriel Ben-Yehuda-13/+15
2017-09-20address review commentsAriel Ben-Yehuda-1/+5
2017-09-14bring Ty into scopeDouglas Campos-4/+4
2017-09-11rustc: replace usize with u64 and ConstUsize.Eduard-Mihai Burtescu-2/+2
2017-09-11rustc: introduce ty::Const { ConstVal, Ty }.Eduard-Mihai Burtescu-3/+12
2017-09-11rustc: intern ConstVal's in TyCtxt.Eduard-Mihai Burtescu-3/+7
2017-09-05rustc: Store InternedString in `DefPathData`Alex Crichton-1/+1
Previously a `Symbol` was stored there, but this ended up causing hash collisions in situations that otherwise shouldn't have a hash collision. Only the symbol's string value was hashed, but it was possible for distinct symbols to have the same string value, fooling various calcuations into thinking that these paths *didn't* need disambiguating data when in fact they did! By storing `InternedString` instead we're hopefully triggering all the exising logic to disambiguate paths with same-name `Symbol` but actually distinct locations.
2017-09-04rustc_mir: use Local instead of Lvalue in Storage{Live,Dead}.Eduard-Mihai Burtescu-7/+7
2017-09-03rustc_mir: use Local in ProjectionElem::Index.Eduard-Mihai Burtescu-14/+15
2017-09-03Auto merge of #44253 - eddyb:nice-scope, r=nikomatsakisbors-34/+38
rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree. r? @nikomatsakis
2017-09-02rustc_mir: always emit StorageLive even without a matching StorageDead.Eduard-Mihai Burtescu-5/+5
2017-09-01rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.Eduard-Mihai Burtescu-34/+38
2017-08-25Add some comments and fix a typoJohn Kåre Alsaker-1/+2
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-9/+15
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-7/+7
Like #43008 (f668999), but _much more aggressive_.
2017-08-14emit StorageLive for box temporariesAriel Ben-Yehuda-3/+9
We started emitting StorageDead, so we better emit the corrseponding StorageLive to avoid problems.
2017-08-12Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-7/+7
# Conflicts: # src/librustc_mir/build/scope.rs
2017-08-11Store generator interior in MIR literalsJohn Kåre Alsaker-3/+3
2017-08-10For box expressions, use NZ drop instead of a free blockAriel Ben-Yehuda-7/+7
This falls naturally out of making drop elaboration work with `box` expressions, which is probably required for sane MIR borrow-checking. This is a pure refactoring with no intentional functional effects.
2017-08-09Merge remote-tracking branch 'origin/master' into genAlex Crichton-2/+2
2017-08-01remove the span field from `diverge_cleanup`Ariel Ben-Yehuda-1/+1
2017-07-28Remove support for `gen arg`Alex Crichton-12/+1