Eduard-Mihai Burtescu
cdeb4b0d25
rustc: encode scalar pairs in layout ABI.
2017-11-19 02:43:32 +02:00
Eduard-Mihai Burtescu
ced5e04e8b
rustc: optimize out uninhabited types and variants.
2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
f62e43da28
rustc: track validity ranges for layout::Abi::Scalar values.
2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
5df25c4aed
rustc: remove redundant/unused fields from layout::Abi::Vector.
2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
b203a26efb
rustc: generalize layout::Variants::NicheFilling to niches other than 0.
2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
abbc1ddbd0
rustc: make TyLayout::field(NonZero<*T>, 0) return &T.
2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
de3e581e29
rustc: support u128 discriminant ranges.
2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
018323ffc2
rustc: collapse the remains of Layout into Variants (enums vs everything else).
2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
b28f668e26
rustc: move size, align & primitive_align from Abi::Aggregate to layout.
2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
b723af284a
rustc_trans: go through layouts uniformly for fat pointers and variants.
2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
026214c858
rustc: collapse Layout::FatPointer into Layout::Univariant.
2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
1477119344
rustc_trans: keep a layout instead of a type in {Lvalue,Operand}Ref.
2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
b2d52d2132
rustc: do not pub use Layout::* in layout.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
d0ab6e8644
rustc_trans: compute LLVM types from type layouts, not Rust types.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
fad99542c8
rustc: split layout::FieldPlacement::Linear back into Union and Array.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
18d54aa7d5
rustc: move layout::Struct into FieldPlacement/Abi.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
08f9f134fd
rustc: hide details in Layout in favor of Abi or FieldPlacement.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
ed788a62f6
rustc: store CachedLayout for each variant of enum Layout's instead of Struct.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
bd51a2bc19
rustc: move size/alignment from Layout into layout::Abi.
2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
bd86f3739e
rustc: make Layout::NullablePointer a lot more like Layout::General.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
33a205b56f
rustc: collapse Layout::CEnum into Layout::General.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
658ebfc788
rustc: give Layout::CEnum a discriminant field like Layout::General.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
d318b9c27b
rustc: move CEnum's signedness into Primitive::Int.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
61c2bd9ca4
rustc: use Primitive instead of Integer for CEnum and General discriminants.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
335bd8ea1b
rustc: do not track non_zero in Layout.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
02276e9f49
rustc: collapse Layout::{Raw,StructWrapped}NullablePointer into one variant.
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
caef91d7c6
rustc: introduce layout::Abi for reduced general ABI "passing style".
2017-11-19 02:14:30 +02:00
Eduard-Mihai Burtescu
1dc572b85e
rustc: represent the discriminant as a field for Layout::{Raw,StructWrapped}NullablePointer.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
9a0efea4c2
rustc: pre-compute field placements out of Layout.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
8c4d5af52b
rustc: remove Ty::layout and move everything to layout_of.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
8864668d53
rustc: re-complicate the TyLayout API and use better names.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
aa811d728a
rustc: remove source field path from Layout::StructWrappedNullablePointer.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
bc8e1f7efa
rustc: use an offset instead of a field path in Layout::StructWrappedNullablePointer.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
50a3fd0097
rustc: remove useless 0 prefix from Layout::StructWrappedNullablePointer's discrfield.
2017-11-19 02:14:29 +02:00
Eduard-Mihai Burtescu
44eef7c9ac
rustc: do not inject discriminant fields into Layout::General's variants.
2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
5b1fdaeb80
rustc_trans: use more of the trans::mir and ty::layout APIs throughout.
2017-11-19 02:14:28 +02:00
Eduard-Mihai Burtescu
f44b099187
rustc_trans: avoid working with sizes/offsets and alignments as integers.
2017-11-19 02:14:24 +02:00
Eduard-Mihai Burtescu
9deea47c96
rustc_mir: always downcast enums, even if univariant.
2017-11-18 20:52:38 +02:00
bors
02eed2e9a5
Auto merge of #46004 - michaelwoerister:cached-mir-wip-3, r=nikomatsakis
...
incr.comp.: Implement query result cache and use it to cache type checking tables.
This is a spike implementation of caching more than LLVM IR and object files when doing incremental compilation. At the moment, only the `typeck_tables_of` query is cached but MIR and borrow-check will follow shortly. The feature is activated by running with `-Zincremental-queries` in addition to `-Zincremental`, it is not yet active by default.
r? @nikomatsakis
2017-11-17 10:12:21 +00:00
Michael Woerister
4c4f7a3189
Fix some tidy errors in ty::codec.
2017-11-16 17:42:39 +01:00
Michael Woerister
cb1ff24425
incr.comp.: Remove default serialization implementations for things in rustc::hir::def_id so that we get an ICE instead of silently doing the wrong thing.
2017-11-16 17:13:39 +01:00
Michael Woerister
723028f308
incr.comp.: Remove some code duplication around TyDecoder by factoring things into a macro.
2017-11-16 15:26:00 +01:00
Michael Woerister
2f44ef282e
incr.comp.: Encode DefIds as DefPathHashes instead of recomputing those during deserialization.
2017-11-16 14:09:44 +01:00
Michael Woerister
24e54ddefa
Introduce LocalDefId which provides a type-level guarantee that the DefId is from the local crate.
2017-11-16 14:04:01 +01:00
Niko Matsakis
c7c2603e2c
factor out free_region_binding_scope helper
2017-11-16 05:57:51 -05:00
Niko Matsakis
9da54c1ac8
add FIXME for converting RegionVid to use newtype_index!
2017-11-16 05:57:50 -05:00
Niko Matsakis
524e23ae2e
make RegionVid implement Idx and use IndexVec
2017-11-16 05:57:44 -05:00
Niko Matsakis
3cc44a569d
do not invoke required_region_bounds in region_obligations
...
Instead, just search the param env predicates directly. This is
equivalent to what we were doing before but more efficient.
2017-11-15 16:49:22 -05:00
Niko Matsakis
e0630e8683
refactor how we extract outlives bounds from trait definitions
...
This new way is **slightly** less expressive (I would be shocked if it
affects any code, though) when it comes to higher-ranked bounds or a
few other weird tricks. But we don't handle those consistently
regardless, and the new way does not require normalization and is just
wildly simpler.
2017-11-15 16:49:22 -05:00
Michael Woerister
279b6df1f2
incr.comp.: Refactor query cache serialization to be more re-usable.
2017-11-15 14:18:00 +01:00