summary refs log tree commit diff
path: root/src/librustc_mir/interpret
AgeCommit message (Collapse)AuthorLines
2018-05-25Fix 07c42af554c to work on stableMark Simulacrum-6/+19
2018-05-24Fix issue #50811 (`NaN > NaN` was true).kennytm-7/+6
Fix #50811 Make sure the float comparison output is consistent with the expected behavior when NaN is involved. ---- Note: This PR is a **BREAKING CHANGE**. If you have used `>` or `>=` to compare floats, and make the result as the length of a fixed array type, like: ```rust use std::f64::NAN; let x: [u8; (NAN > NAN) as usize] = [1]; ``` then the code will no longer compile. Previously, all float comparison involving NaN will just return "Greater", i.e. `NAN > NAN` would wrongly return `true` during const evaluation. If you need to retain the old behavior (why), you may replace `a > b` with `a != a || b != b || a > b`.
2018-04-25Only warn on erroneous promoted constantsOliver Schneider-3/+3
2018-04-17Add a tracking issue for making the warning a lintOliver Schneider-0/+1
2018-04-17Don't abort const eval due to long running evals, just warnOliver Schneider-10/+9
2018-04-17Sign extend constants in range patternsOliver Schneider-12/+26
2018-04-17Stop referring to statics' AllocIds directlyOliver Schneider-113/+37
2018-03-30Add an explanation for the `create_depgraph_edges`Oliver Schneider-1/+12
2018-03-30Introduce an edge from a const eval to the MIR of all statics it depends onOliver Schneider-1/+29
2018-03-25Rollup merge of #49274 - oli-obk:slow_miri, r=michaelwoerister,eddybkennytm-58/+44
Remove slow HashSet during miri stack frame creation fixes #49237 probably has a major impact on #48846 r? @michaelwoerister cc @eddyb I know you kept telling me to use vectors instead of hash containers... Now I know why.
2018-03-24Auto merge of #48482 - davidtwco:issue-47184, r=nikomatsakisbors-0/+2
NLL should identify and respect the lifetime annotations that the user wrote Part of #47184. r? @nikomatsakis
2018-03-23Rollup merge of #49030 - Zoxc:misc, r=michaelwoeristerAlex Crichton-3/+3
Misc changes from my parallel rustc branch r? @michaelwoerister
2018-03-23Simplify local accessorsOliver Schneider-10/+8
2018-03-23Don't allocate a local array at all if there are no localsOliver Schneider-16/+22
2018-03-23Replace uses of `Hash(Map|Set)` with `FxHash(Map|Set)` in miriOliver Schneider-8/+9
2018-03-23Vec<_> -> IndexVec<Local, _>Oliver Schneider-22/+14
2018-03-22Added UserAssertTy statement.David Wood-0/+2
2018-03-22Skip checking for Storage* statements in constants/staticsOliver Schneider-10/+17
2018-03-22Remove slow HashSet during miri stack frame creationOliver Schneider-29/+11
2018-03-21Fix test errorbjorn3-0/+8
2018-03-20Don't check interpret_interner when accessing a static to fix miri mutable ↵bjorn3-22/+10
statics
2018-03-17Replace Rc with LrcJohn Kåre Alsaker-3/+3
2018-03-14Auto merge of #47630 - canndrew:exhaustive-patterns, r=nikomatsakisbors-1/+1
Stabilise feature(never_type). Introduce feature(exhaustive_patterns) This stabilizes `!`, removing the feature gate as well as the old defaulting-to-`()` behavior. The pattern exhaustiveness checks which were covered by `feature(never_type)` have been moved behind a new `feature(exhaustive_patterns)` gate.
2018-03-14Auto merge of #48864 - oli-obk:miri_incremental_regression, r=eddybbors-2/+6
Cache const eval queries fixes #48846 (I think, still running more perf tests, but tuple-stress stops recomputing any constants) r? @michaelwoerister
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-13`trans_apply_param_substs` => `subst_and_normalize_erasing_regions`Niko Matsakis-3/+15
Consolidate `trans_apply_param_substs` and `trans_apply_param_substs_env`. Also remove `trans_impl_self_ty`
2018-03-13transition various normalization functions to the new methodsNiko Matsakis-7/+14
In particular: - `fully_normalize_monormophic_ty` => `normalize_erasing_regions` - `normalize_associated_type_in_env` => `normalize_erasing_regions` - `fully_normalize_associated_types_in` => `normalize_erasing_regions` - `erase_late_bound_regions_and_normalize` => `normalize_erasing_late_bound_regions`
2018-03-13Reuse the query caching infrastructure for const evalOliver Schneider-2/+6
2018-03-13refactor `ParamEnv::empty(Reveal)` into two distinct methodsNiko Matsakis-2/+1
- `ParamEnv::empty()` -- does not reveal all, good for typeck - `ParamEnv::reveal_all()` -- does, good for trans - `param_env.with_reveal_all()` -- converts an existing parameter environment
2018-03-08Correct the shift overflow check in miriOliver Schneider-1/+1
2018-03-08Address review commentsOliver Schneider-42/+24
2018-03-08Decide signdedness on the layout instead of the typeOliver Schneider-36/+49
2018-03-08Don't use the undefined bytes of PrimVal::BytesOliver Schneider-212/+178
2018-03-08Fix mozjs crater failureOliver Schneider-3/+11
2018-03-08Const eval will oom together with rustc nowOliver Schneider-17/+0
2018-03-08Step limit is now terminator limitOliver Schneider-2/+3
2018-03-08Report tcx errors with the span of the currently evaluating statementOliver Schneider-63/+39
2018-03-08Report a best guess span if no stack is available anymoreOliver Schneider-8/+19
2018-03-08Unregress error spans in constant errorsOliver Schneider-12/+20
2018-03-08Tidy fixOliver Schneider-1/+1
2018-03-08Const eval error refactoringOliver Schneider-84/+95
2018-03-08Compute the ParamEnv only once and use it to call tcx.const_evalOliver Schneider-8/+10
2018-03-08Move the resource limits to the session in preparation for attributes ↵Oliver Schneider-33/+12
configuring them
2018-03-08Report const eval errors at the correct spanOliver Schneider-3/+7
2018-03-08Reduce noise in error reportingOliver Schneider-1/+1
2018-03-08Use Mutability enum instead of boolOliver Schneider-2/+2
2018-03-08Nuke ConstInt and Const*sizeOliver Schneider-2/+2
2018-03-08Destructure Rc wrapped ErrorKind in miriOliver Schneider-11/+14
2018-03-08Don't read from zero sized fieldsOliver Schneider-0/+3
2018-03-08Hide the RefCell inside InterpretInternerOliver Schneider-22/+16
It was too easy to get this wrong