414 Commits

Author SHA1 Message Date
Ralf Jung
aa760a5225 finally remove all traces of signs from memory 2018-08-22 09:06:28 +02:00
Ralf Jung
7483ea8176 generalize truncate and sign_extend to take a Size 2018-08-22 09:06:28 +02:00
Ralf Jung
ad2de8b4ee miri/CTFE refactor
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the
  "dynamic" versions of mir::{Place, Operand}.
* Operand and Place share the data for their "stuff is in memory"-base in a new
  type, MemPlace.  This also makes it possible to give some more precise types
  in other areas.  Both Operand and MemPlace have methods available to project
  into fields (and other kinds of projections) without causing further
  allocations.
* The type for "a Scalar or a ScalarPair" is called Value, and again used to
  give some more precise types.
* All of these have versions with an attached layout, so that we can more often
  drag the layout along instead of recomputing it.  This lets us get rid of
  `PlaceExtra::Downcast`.  MPlaceTy and PlaceTy can only be constructed
  in place.rs, making sure the layout is handled properly.
  (The same should eventually be done for ValTy and OpTy.)
* All the high-level functions to write typed memory take a Place, and live in
  place.rs.  All the high-level typed functions to read typed memory take an
  Operand, and live in operands.rs.
2018-08-22 09:06:28 +02:00
varkor
6971c5d55d Add some extra edge case tests 2018-08-21 23:55:57 +01:00
varkor
dec55631d9 Use a boundary method instead of an endpoint method for split_grouped_constructors 2018-08-21 23:27:45 +01:00
varkor
6a957e172a Add a test case for u128::MAX - 1 2018-08-21 21:04:19 +01:00
varkor
61b6363cb1 Add more detail to the split_grouped_constructors comment 2018-08-21 00:17:18 +01:00
varkor
c421af995b Add assertion to constructor_intersects_pattern 2018-08-20 23:59:46 +01:00
varkor
6e8a625674 Remove pattern consideration from split_grouped_constructors 2018-08-20 23:32:01 +01:00
varkor
87463c3962 Improve some comments 2018-08-20 23:16:15 +01:00
varkor
798b9ff9d5 Tweak comments 2018-08-19 23:10:18 +01:00
varkor
0383539ded Fix handling of floating-point ranges 2018-08-16 20:10:01 +01:00
varkor
1dbc78112f Handle equivalence classes of length-1 ranges 2018-08-16 20:10:01 +01:00
varkor
e9c8361cc6 Add equivalence class splitting for range constructors 2018-08-16 20:10:01 +01:00
varkor
9e9e023354 More formatting improvements 2018-08-16 20:09:05 +01:00
varkor
400cb1411e Add a summary of the algorithm to the file 2018-08-16 20:09:05 +01:00
varkor
99754adbbb Some reformatting 2018-08-16 20:09:05 +01:00
varkor
5959a358e4 Move logic from push_wild_constructor to apply_constructor 2018-08-16 20:09:05 +01:00
varkor
4aa929cf8b Move witnesses inside push_wild_constructor 2018-08-16 20:09:05 +01:00
varkor
bfc0807b28 Add some comments 2018-08-16 20:09:05 +01:00
varkor
af366b0eb8 Refactor condition 2018-08-16 20:09:05 +01:00
varkor
07064de9a7 No longer return value_constructors for all_constructors 2018-08-16 20:09:05 +01:00
varkor
d27c21c016 Refactor for less allocation 2018-08-16 20:09:05 +01:00
varkor
6c21a0322c Refactor after miri api changes 2018-08-16 20:09:05 +01:00
varkor
732d638483 Replace ... with ..= in suggestions
As ... is "(silently) deprecated". Presumably this means we should be giving correct, up-to-date suggestions, though.
2018-08-16 20:09:05 +01:00
varkor
1aa749469b Introduce signed_bias method
The epitome of simplicity!
2018-08-16 20:09:05 +01:00
varkor
72cc4bd33b Inline encode and decode methods 2018-08-16 20:09:05 +01:00
varkor
be12b242ce Fix print_miri_value for signed integers 2018-08-16 20:09:05 +01:00
varkor
97a032ebb4 Simplify bitwise operations 2018-08-16 20:09:05 +01:00
varkor
c388c11a60 Special-case (RangeEnd::Included, Ordering::Equal) in lower_pattern_unadjusted 2018-08-16 20:09:05 +01:00
varkor
effb3d05a0 Improve the comments 2018-08-16 20:09:05 +01:00
varkor
a9f2c5a7b2 Fix sign conversion arithmetic errors 2018-08-16 20:09:05 +01:00
varkor
f4af3b015f Refactor to remove explicit integer type matching 2018-08-16 20:09:05 +01:00
varkor
a553fa7244 Fix integer overflow 2018-08-16 20:09:05 +01:00
varkor
7695bd0be9 Use bit operators for min_max_ty 2018-08-16 20:09:04 +01:00
varkor
c00fd8f58c Refactor interval conditions 2018-08-16 20:09:04 +01:00
varkor
7f72030421 Fix range splitting 2018-08-16 20:09:04 +01:00
varkor
a20cb1084a Require just the Unicode Scalar Values to be matched for a char 2018-08-16 20:09:04 +01:00
varkor
9778a81e92 Improve macros with reduced repetition 2018-08-16 20:09:04 +01:00
varkor
121fa8d499 Fix handling of signed integers 2018-08-16 20:09:04 +01:00
varkor
ed5a4d5e60 Add feature gate and refactor 2018-08-16 20:09:04 +01:00
varkor
384db4f0cf Add support for all integer types 2018-08-16 20:09:04 +01:00
varkor
b3d2baff94 Give correct suggestions 2018-08-16 20:09:04 +01:00
varkor
e3357d9984 Implement interval checking 2018-08-16 20:09:04 +01:00
Oliver Schneider
37e18e7a30 Second field of ScalarPair can be undef in some cases 2018-08-02 13:16:53 +02:00
Oliver Schneider
c6c06854c0 Reintroduce Undef and properly check constant value sizes 2018-08-01 15:29:35 +02:00
Shotaro Yamada
3525368a56 Use str::repeat 2018-07-27 23:26:36 +09:00
Oliver Schneider
de511438cd Promoteds are statics and statics have a place, not just a value 2018-07-23 09:51:30 +02:00
csmoe
19730cc996 Fix tidy 2018-07-16 15:09:17 +02:00
csmoe
6a16b38198 ExprKind 2018-07-16 15:09:16 +02:00