about summary refs log tree commit diff
path: root/src/librustc_mir/const_eval.rs
AgeCommit message (Collapse)AuthorLines
2019-04-28Fix lint findings in librustc_mirflip1995-2/+2
2019-04-21Change return type of `TyCtxt::is_static` to boolVadim Petrochenkov-6/+5
Add `TyCtxt::is_mutable_static`
2019-04-16Miri: refactor new allocation taggingRalf Jung-11/+11
2019-04-06Remove check_match from const_evalIsaac Whitfield-16/+3
2019-04-02renames EvalErrorKind to InterpErrorkenta7777-4/+4
2019-03-29Use ErrorReportedYuki OKUSHI-1/+2
2019-03-29Remove unused variableYuki OKUSHI-1/+1
2019-03-29Return correct valuesYuki OKUSHI-5/+7
2019-03-29WIP: remove report_as_errorYuki OKUSHI-7/+5
2019-03-29Set ok valueYuki OKUSHI-2/+2
2019-03-29Remove err_countYuki OKUSHI-4/+5
2019-03-29Use track_errorsYuki OKUSHI-3/+7
2019-03-27renames EvalContext to InterpretCx in docs and comments.kenta7777-1/+1
2019-03-26renames EvalContext to InterpretCx.kenta7777-14/+14
2019-03-24Auto merge of #59199 - estebank:untrack-errors, r=eddybbors-4/+2
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins` In the spirit of continuing through errors in type checking (#39275), remove `track_errors` from a couple of locations in the codebase.
2019-03-23Swap const evaluation lint spans to point at problem in primary spanEsteban Küber-0/+2
2019-03-22Add note to address check_match errorsEsteban Küber-0/+1
2019-03-22address review commentsEsteban Küber-4/+1
2019-03-16Revert the `LazyConst` PROliver Scherer-2/+2
2019-03-16Rollup merge of #59139 - oli-obk:unions_are_a_good_thing, r=RalfJungkennytm-13/+13
Unregress using scalar unions in constants. fixes https://github.com/rust-lang/rust/issues/59126 r? @RalfJung I also made a bunch of these invariants panic instead of report an error.
2019-03-15we can now print on entering/leaving the topmost frame, and make sure it ↵Ralf Jung-8/+9
stays that way
2019-03-15rustc: rename item_path to def_path (except the module in ty).Eduard-Mihai Burtescu-1/+1
2019-03-12Unregress using scalar unions in constants.Oliver Scherer-13/+13
2019-03-09Rollup merge of #58518 - oli-obk:unreachable_result_errors, r=RalfJungMazdak Farrokhzad-23/+20
Use early unwraps instead of bubbling up errors just to unwrap in the end r? @RalfJung
2019-03-07HirIdification: replace NodeId method callsljedrz-2/+2
2019-03-04Use early unwraps instead of bubbling up errors just to unwrap in the endOliver Scherer-23/+20
2019-02-26Auto merge of #58561 - ljedrz:HirIdify_some_nodes, r=Zoxcbors-3/+3
Remove NodeId from some HIR nodes The next iteration of https://github.com/rust-lang/rust/pull/57578. Removes `NodeId` from: - [x] `Lifetime` - [x] `Ty` - [x] `GenericParam` - [x] `WhereClause` - [x] `WhereEqPredicate` - [x] `MacroDef` - [x] `Block` - [x] `Expr` r? @Zoxc
2019-02-24hir: remove NodeId from Blockljedrz-3/+3
2019-02-16Make `may_normalize` explicit in the type systemOliver Scherer-34/+38
2019-02-16Make validity checking use `MPlaceTy` instead of `OpTy`Oliver Scherer-7/+5
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-1/+1
2019-02-16Burn some invariants we keep up into codeOliver Scherer-1/+1
2019-02-16Expose const -> op functions that don't allow violiting const eval invariantsOliver Scherer-2/+2
2019-02-13make bin_op and unary_op APIs consistently work on ImmTyRalf Jung-6/+5
2019-02-13make OpTy.op private, and ImmTy.imm public insteadRalf Jung-12/+3
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5
2019-02-08librustc_mir => 2018Taiki Endo-1/+1
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-6/+3
2019-01-25Rollup merge of #57734 - oli-obk:fixes_and_cleanups, r=pnkfelixMazdak Farrokhzad-13/+16
Fix evaluating trivial drop glue in constants ```rust struct A; impl Drop for A { fn drop(&mut self) {} } const FOO: Option<A> = None; const BAR: () = (FOO, ()).1; ``` was erroring with ``` error: any use of this value will cause an error --> src/lib.rs:9:1 | 9 | const BAR: () = (FOO, ()).1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^-^ | | | calling non-const function `std::ptr::real_drop_in_place::<(std::option::Option<A>, ())> - shim(Some((std::option::Option<A>, ())))` | = note: #[deny(const_err)] on by default error: aborting due to previous error ``` before this PR. According to godbolt this last compiled successfully in 1.27
2019-01-22Span fixupOliver Scherer-6/+8
2019-01-22Get rid of the fake stack frameOliver Scherer-68/+12
2019-01-20const_eval: Predetermine the layout of all locals when pushing a stack frameBjörn Steinbrink-0/+1
Usually the layout of any locals is required at least three times, once when it becomes live, once when it is written to, and once it is read from. By adding a cache for them, we can reduce the number of layout queries speeding up code that is heavy on const_eval.
2019-01-18Allow evaluating trivial drop glue in constantsOliver Scherer-13/+16
2019-01-13Rollup merge of #57351 - oli-obk:cheap_const_ops, r=RalfJungMazdak Farrokhzad-14/+36
Don't actually create a full MIR stack frame when not needed r? @dotdash This should significantly reduce overhead during const propagation and reduce overhead *after* copy propagation (cc https://github.com/rust-lang/rust/issues/36673)
2019-01-09Not seeing the forest because there are too many trees in the wayOliver Scherer-1/+1
2019-01-09Explain the arguments of the `mk_*_eval_cx` functionsOliver Scherer-0/+13
2019-01-09Document the `mk_*_eval_cx` functionsOliver Scherer-2/+10
2019-01-08Make `mk_eval_cx` private to const evalOliver Scherer-1/+1
2019-01-08Manually push a stack frame where no valid frame is neededOliver Scherer-35/+12
2019-01-05Don't actually create a full MIR stack frame when not neededOliver Scherer-3/+27