Eduard-Mihai Burtescu
ca1ac6b6fb
rustc: rename mir::SourceScopeInfo to mir::SourceScopeLocalData.
2018-05-30 20:30:09 +03:00
Eduard-Mihai Burtescu
85d44c4276
rustc: rename mir::VisibilityScope to mir::SourceScope.
2018-05-30 20:30:09 +03:00
Felix S. Klock II
24abe6f363
rust-lang/rust#27282 : Add StatementKind::ReadForMatch to MIR.
...
(This is just the data structure changes and some boilerplate match
code that followed from it; the actual emission of these statements
comes in a follow-up commit.)
2018-05-29 23:01:36 +02:00
bors
990d8aa743
Auto merge of #50967 - oli-obk:miri_api_refactor, r=eddyb
...
Miri api refactor
r? @eddyb
cc @Zoxc
based on https://github.com/rust-lang/rust/pull/50916
2018-05-25 13:59:48 +00:00
Oliver Schneider
cc60a22b10
Get rid of scalar_size
2018-05-24 20:49:37 +02:00
Oliver Schneider
f82256e473
primval -> scalar rename
2018-05-24 20:49:37 +02:00
Oliver Schneider
64a75ecc80
change Value::Bytes to Value::Bits
2018-05-24 20:49:37 +02:00
Oliver Schneider
ef2177cffc
Rename ByVal(Pair) to Scalar(Pair)
2018-05-24 20:47:35 +02:00
Oliver Schneider
1606e137e7
Rename PrimVal to Scalar
2018-05-24 20:47:35 +02:00
Oliver Schneider
a11f7856f4
Always mark unstable const fn as not const
2018-05-24 17:22:31 +02:00
Oliver Schneider
383a5df58c
Enforce stability of const fn in promoteds
2018-05-24 17:22:31 +02:00
Oliver Schneider
2483c81217
Deduplicate match arms
2018-05-22 13:56:37 +02:00
Oliver Schneider
8a5eb68958
Report let bindings and statements as unstable
2018-05-22 10:54:05 +02:00
Oliver Schneider
d7bf358dbd
Be more explicit about what's skipped
2018-05-22 10:54:05 +02:00
Oliver Schneider
9872160836
Allow let bindings in const fn and constants
2018-05-22 10:54:05 +02:00
Eduard-Mihai Burtescu
7e4d8718cb
rustc: use intern_* instead of mk_* where possible.
2018-05-21 12:13:19 +03:00
bors
c6a1979e20
Auto merge of #50603 - eddyb:issue-49955, r=nikomatsakis
...
rustc_mir: allow promotion of promotable temps indexed at runtime.
Fixes #49955 .
r? @nikomatsakis
2018-05-19 00:27:45 +00:00
Irina Popa
b63d7e2b1c
Rename trans to codegen everywhere.
2018-05-17 15:08:30 +03:00
Eduard-Mihai Burtescu
d1f117df0f
rustc_mir: allow promotion of promotable temps indexed at runtime.
2018-05-16 15:40:54 +03:00
est31
11f5893610
label-break-value: Parsing and AST/HIR changes
2018-05-16 13:56:24 +02:00
Eduard-Mihai Burtescu
22275f46b2
rustc_mir: focus const-checking logic on whether mutation is forbidden.
2018-05-16 14:19:47 +03:00
Eduard-Mihai Burtescu
4fec5ef81a
rustc_mir: promote borrows' underlying temps, and project at runtime.
2018-05-16 14:11:02 +03:00
Eduard-Mihai Burtescu
d79dee0b62
rustc_mir: also promote interior borrows, not just whole temps.
2018-05-16 14:11:01 +03:00
Eduard-Mihai Burtescu
b9af400a46
rustc_mir: generate an extra temporary during borrowed rvalue promotion.
2018-05-16 14:11:01 +03:00
varkor
fd8e284a20
Rename param_counts to own_counts
2018-05-15 14:21:32 +01:00
varkor
7b45a892a4
Use GenericParamCount instead of FxHashMap
2018-05-15 14:21:31 +01:00
varkor
b75f421ee9
Generalise more cases of explicit iteration of specific kinds
2018-05-15 14:21:03 +01:00
varkor
15d2759d90
Rename has_type_parameters to requires_monomorphization
2018-05-15 14:20:19 +01:00
varkor
a9622dc5c6
Fix generics type parameter handling in miri
2018-05-15 14:20:19 +01:00
varkor
e5825c29c3
Prefer iterator to vec
2018-05-15 14:20:19 +01:00
varkor
fe0c119e7d
Consolidate ty::Generics
2018-05-15 14:20:19 +01:00
Mark Simulacrum
d7f5e1f5d1
Rollup merge of #50550 - llogiq:fmt-result, r=petrochenkov
...
use fmt::Result where applicable
This is a quite boring PR, but I think the type alias improves readability, so why not use it?
2018-05-12 07:32:27 -06:00
John Kåre Alsaker
fdd9787777
Introduce ConstValue and use it instead of miri's Value for constant values
2018-05-11 13:01:44 +02:00
Andre Bogus
e333725664
use fmt::Result where applicable
2018-05-09 02:01:37 +02:00
John Kåre Alsaker
c9d9c249ec
Insert fields from TypeAndMut into TyRef to allow layout optimization
2018-05-08 16:21:58 +02:00
John Kåre Alsaker
710b4ad2a5
Store the GeneratorInterior in the new GeneratorSubsts
2018-05-08 16:21:58 +02:00
John Kåre Alsaker
0edc8f4270
Store generator movability outside GeneratorInterior
2018-05-08 16:21:58 +02:00
Niko Matsakis
2b4675b1fc
add Location::START const
2018-05-05 05:03:56 -04:00
bors
c1168be536
Auto merge of #50282 - fitzgen:run-more-passes-on-constant-mir, r=nikomatsakis
...
Run more passes on constant mir
Not very familiar with this code, but everything seems to be working!
r? @eddyb
2018-05-02 05:22:29 +00:00
bors
a2726846f6
Auto merge of #50278 - eddyb:mir-succ-iter, r=nikomatsakis
...
rustc: return iterators from Terminator(Kind)::successors(_mut).
Minor cleanup (and potentially speedup) prompted by @nnethercote's `SmallVec` experiments.
This PR assumes `.count()` and `.nth(i)` on `iter::Chain<option::IntoIter, slice::Iter(Mut)>` are `O(1)`, but otherwise all of the uses appear to immediately iterate through the successors.
r? @nikomatsakis
2018-05-02 02:10:51 +00:00
Eduard-Mihai Burtescu
f0f26b875a
rustc: return impl Iterator from Terminator(Kind)::successors(_mut).
2018-05-01 13:12:23 +03:00
Oliver Schneider
01158eaec6
Unify MIR assert messages and const eval errors
2018-04-30 18:29:15 +02:00
Oliver Schneider
cefcf0548e
Merge ConstMathError into EvalErrorKind
2018-04-30 18:18:33 +02:00
bors
3c43aa5677
Auto merge of #50102 - Zoxc:query-nomacro, r=michaelwoerister
...
Move query code outside macros and store query jobs separately from query results
Based on https://github.com/rust-lang/rust/pull/50067
r? @michaelwoerister
2018-04-27 16:42:31 +00:00
Nick Fitzgerald
1129a711a6
mir: Deaggregate constant MIR
...
Appears to work now that miri has merged.
2018-04-27 07:03:13 -07:00
Nick Fitzgerald
eb2582e8e1
mir: Run drop elaboration on constant MIR
...
Seems to Just Work since miri merged.
2018-04-27 07:03:13 -07:00
Nick Fitzgerald
937f9bac5d
mir: Run copy propagation on constant mir
...
Now that miri is merged, this seems to Just Work!
2018-04-27 06:49:45 -07:00
bors
71d3dac4a8
Auto merge of #50097 - glandium:box_free, r=nikomatsakis
...
Partial future-proofing for Box<T, A>
In some ways, this is similar to @eddyb's PR #47043 that went stale, but doesn't cover everything. Notably, this still leaves Box internalized as a pointer in places, so practically speaking, only ZSTs can be practically added to the Box type with the changes here (the compiler ICEs otherwise).
The Box type is not changed here, that's left for the future because I want to test that further first, but this puts things in place in a way that hopefully will make things easier.
2018-04-27 12:24:17 +00:00
John Kåre Alsaker
987631d3ba
Move query functions out from the define_maps! macro
2018-04-27 12:09:59 +02:00
John Kåre Alsaker
4d52751d12
Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString
2018-04-27 03:35:32 +02:00