Commit Graph

122 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu 961fe5479f rustc: use indexmap instead of a plain vector for upvars. 2019-06-01 19:17:22 +03:00
Wesley Wiser 3b7223deaf Doc comment fixes for `rustc::mir::interpret::InterpretCx` 2019-05-31 05:01:35 -04:00
Mazdak Farrokhzad 16ef483b79
Rollup merge of #61164 - RalfJung:scalar, r=oli-obk
rename Scalar::Bits to Scalar::Raw and bits field to data

Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor).

r? @oli-obk
2019-05-28 18:15:39 +02:00
bors 1a56ec4dae Auto merge of #59627 - LooMaclin:issue_57128_improve_miri_error_reporting_in_check_in_alloc, r=RalfJung
Improve miri error reporting in check_in_alloc

Fixes https://github.com/rust-lang/rust/issues/57128

r? @RalfJung @oli-obk
2019-05-27 12:46:12 +00:00
Nicholas Nethercote 9c7d28d4fd Pre-intern "0", "1", ..., "9", and use where appropriate. 2019-05-27 13:58:38 +10:00
Ralf Jung aad13a176a centralize Scalar size sanity checks and also do them in release builds 2019-05-26 14:13:12 +02:00
Ralf Jung 082da0c698 rename Scalar::Bits to Scalar::Raw and bits field to data 2019-05-26 11:08:03 +02:00
bors eda0699443 Auto merge of #60569 - RalfJung:miri-visitor-generators, r=Centril
fix typo in enum variant name
2019-05-06 03:11:14 +00:00
Ralf Jung dc54cd0c60 fix typo in enum variant name 2019-05-05 22:53:56 +02:00
Manish Goregaokar 2c7712b3f1
Rollup merge of #60530 - eddyb:unfreevars, r=oli-obk
rustc: rename all occurences of "freevar" to "upvar".

Most of the more recent code talks about "(closure) upvars", so I believe that's the name we want to use.
There's also the possibility of using "capture" which is more user-facing, but I'd rather not change *both* "freevar" and "upvar" to something else in this one PR.

cc @nikomatsakis @petrochenkov
2019-05-05 12:37:30 -07:00
Eduard-Mihai Burtescu 8d9f4a128c rustc: rename all occurences of "freevar" to "upvar". 2019-05-05 18:49:32 +03:00
Ralf Jung c5c161e394 match on type directlty 2019-05-04 13:49:04 +02:00
Ralf Jung 64967b693c fix Miri visiting generators 2019-05-04 13:14:56 +02:00
Eduard-Mihai Burtescu 2384e980ad rustc_mir: don't use upvar_decls in the miri validity checks. 2019-04-23 23:35:21 +03:00
LooMaclin 15d50deeb4 Improve miri's error reporting in check_in_alloc 2019-04-19 02:10:59 +03:00
Ralf Jung d2e183fd99 fix tests 2019-04-14 10:01:32 +02:00
LooMaclin 2a738bb8ed Improve miri's error reporting in check_in_alloc 2019-04-08 23:34:28 +03:00
Loo Maclin 3449fa90f8
Merge branch 'master' into issue_57128_improve_miri_error_reporting_in_check_in_alloc 2019-04-02 22:06:08 +03:00
LooMaclin 725199ce65 Improve miri's error reporting in check_in_alloc 2019-04-02 05:58:25 +03:00
kenta7777 3c8caaca7d renames EvalErrorKind to InterpError 2019-04-02 01:02:18 +09:00
kenta7777 630d5a4895 renames EvalContext to InterpretCx. 2019-03-26 13:06:15 +09:00
Mazdak Farrokhzad 1082a292ea
Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJung
Const to op simplification

r? @RalfJung

alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-24 05:56:01 +01:00
Patrick McCarter 8ee1c0708a Change byte align message wording #58617 2019-02-22 16:36:39 -05:00
Patrick McCarter 5f27a25cf4 Invalid byte alignment expected/provided in message #58617 2019-02-22 15:49:07 -05:00
Oliver Scherer 525983a2a4 Make validity checking use `MPlaceTy` instead of `OpTy` 2019-02-16 14:54:48 +01:00
Alexander Regueiro c3e182cf43 rustc: doc comments 2019-02-10 23:42:32 +00:00
Ralf Jung 400e28d27a fix validation range printing when encountering undef 2019-01-21 19:08:47 +01:00
Alexander Regueiro 1b150c4043 Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`. 2018-12-26 21:26:37 +00:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
bors 7489ee9c6f Auto merge of #56461 - oli-obk:alloc_ids, r=RalfJung
Some cleanups around `AllocId` management

r? @eddyb
cc @RalfJung
2018-12-13 12:36:13 +00:00
Alexander Regueiro ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
Oliver Scherer 2e00d648c0 s/AllocType/AllocKind/ 2018-12-03 16:31:20 +01:00
Ralf Jung fb8b1e3989 accept undef in raw pointers, for consistency with integers 2018-11-25 10:49:43 +01:00
Oliver Scherer b853252bcd Rebase fallout 2018-11-24 11:36:32 +01:00
Oliver Scherer 1c08ced995 Explain early abort legality 2018-11-24 11:36:32 +01:00
Oliver Scherer b820cc79a9 Clean up array/slice of primitive validation 2018-11-24 11:36:32 +01:00
Oliver Scherer 07e7804110 Adjust rustc_mir::interpret to changes in `Allocation`/`Memory` methods 2018-11-24 11:36:31 +01:00
Eduard-Mihai Burtescu 5b4747ded7 rustc_target: avoid using AbiAndPrefAlign where possible. 2018-11-22 05:01:49 +02:00
Eduard-Mihai Burtescu 3ce8d444af rustc_target: separate out an individual Align from AbiAndPrefAlign. 2018-11-22 04:38:00 +02:00
Eduard-Mihai Burtescu d56e892085 rustc_target: rename abi::Align to AbiAndPrefAlign. 2018-11-22 04:12:59 +02:00
Pietro Albini c87c31b111
Rollup merge of #55916 - RalfJung:mut-visitor, r=oli-obk
Make miri value visitor usfeful for mutation

~~This is based on top of https://github.com/rust-lang/rust/pull/55716, [click here](https://github.com/RalfJung/rust/compare/escape-to-raw...RalfJung:mut-visitor) for just the new commits.~~

r? @oli-obk
2018-11-18 23:24:41 +01:00
Pietro Albini 131a7553e1
Rollup merge of #55894 - RalfJung:validation-enums, r=oli-obk
miri enum discriminant handling: Fix treatment of pointers, better error when it is undef

r? @oli-obk
2018-11-18 23:24:39 +01:00
Pietro Albini 66fcb3ceb2
Rollup merge of #55901 - euclio:speling, r=petrochenkov
fix various typos in doc comments
2018-11-15 11:04:42 +01:00
Ralf Jung a3770c2547 do not accept out-of-bounds pointers in enum discriminants, they might be NULL 2018-11-15 10:59:39 +01:00
Ralf Jung ffb6ba0828 validation: better error when the enum discriminant is Undef 2018-11-15 09:58:09 +01:00
Ralf Jung e4d03f82b5 miri value visitor: provide place when visiting a primitive 2018-11-15 08:51:32 +01:00
bors 4ec0ba9545 Auto merge of #55716 - RalfJung:escape-to-raw, r=oli-obk
Add escape-to-raw MIR statement

Add a new MIR "ghost state statement": Escaping a ptr to permit raw accesses.

~~This includes #55549, [click here](https://github.com/RalfJung/rust/compare/miri-visitor...RalfJung:escape-to-raw) for just the new commits.~~
2018-11-15 01:12:01 +00:00
Andy Russell 4e35cbb22e
fix various typos in doc comments 2018-11-13 14:45:31 -05:00
Oliver Scherer d46a2078b4 Deduplicate field and variant visitor methods 2018-11-12 14:24:45 +01:00
Oliver Scherer b174b0b955 miri-engine value visitor update to VariantIdx 2018-11-12 14:24:45 +01:00