Commit Graph

969 Commits

Author SHA1 Message Date
John Kåre Alsaker
b7aabaa3fc Update recursion limits 2018-06-01 14:56:01 +02:00
Michael Woerister
22f6163db4 Make metadata decoding use AllocDecodingState/Session. 2018-06-01 09:32:24 +02:00
Vadim Petrochenkov
189c0a1297 Use Idents for fields in HIR 2018-05-26 14:41:58 +03:00
bors
c3733a770e Auto merge of #50528 - whitfin:issue-50508, r=michaelwoerister
Remove attribute_cache from CrateMetadata

This PR will fix #50508 by removing the `attribute_cache` from the `CrateMetadata` struct. Seeing as performance was referenced in the original issue, I also cleaned up a `self.entry(node_id);` call which might have occasionally happened redundantly.

r? @michaelwoerister
2018-05-23 09:50:54 +00:00
Eduard-Mihai Burtescu
26aad25487 rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants". 2018-05-19 20:34:42 +03:00
Isaac Whitfield
d95ba305b4 Catch an issue missed in rebase 2018-05-18 10:21:42 -07:00
Isaac Whitfield
55a00a95cf Remove unnecessary impl methods for CrateMetadata 2018-05-18 09:38:08 -07:00
Isaac Whitfield
680f3b24ba Serialize attributes into the CrateRoot 2018-05-18 09:37:29 -07:00
Isaac Whitfield
ca60c404b6 Remove unnecessary clone call for panic_strategy 2018-05-18 09:37:29 -07:00
Isaac Whitfield
5f5ea79611 Avoid removing from cstore_impl for now 2018-05-18 09:37:29 -07:00
Isaac Whitfield
ece778e2a3 Attempt to pass CrateMetadata flags on creation 2018-05-18 09:37:29 -07:00
Isaac Whitfield
466fc6815d Avoid generating attributes more than once for CrateMetadata 2018-05-18 09:37:13 -07:00
Isaac Whitfield
f418f1dd78 Remove attribute_cache from CrateMetadata 2018-05-18 09:36:45 -07:00
Vadim Petrochenkov
f4cbc2388f Pass crate editions to macro expansions, update tests 2018-05-17 23:13:09 +03:00
Vadim Petrochenkov
76bf3454da Keep crate edition in metadata 2018-05-17 23:13:09 +03:00
Irina Popa
b63d7e2b1c Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
varkor
15d2759d90 Rename has_type_parameters to requires_monomorphization 2018-05-15 14:20:19 +01:00
varkor
de1c29c95e Reduce parent_params to parent_count 2018-05-15 14:20:19 +01:00
varkor
fe0c119e7d Consolidate ty::Generics 2018-05-15 14:20:19 +01:00
Alex Burka
e857c1b790 restore feature for stage0 2018-05-13 19:51:33 +00:00
Alex Burka
394945ee36 stabilize :lifetime 2018-05-13 19:51:32 +00:00
Alex Crichton
4199a6c1ee
Rollup merge of #50538 - michaelwoerister:atomic-cnums, r=Zoxc
Make CrateNum allocation more thread-safe.

This PR makes sure that we can't have race conditions when assigning CrateNums. It's a slight improvement but a larger refactoring of the CrateStore/CrateLoader infrastructure would be good, I think.

r? @Zoxc
2018-05-10 11:35:24 -05:00
Michael Woerister
4537025c71 Add comment about first element in CStore::metas. 2018-05-09 21:32:18 +02:00
Michael Woerister
b8b957d479 Make CrateNum allocation more thread-safe. 2018-05-09 16:05:32 +02:00
Michael Woerister
31d2012ef7 Adapt some method visibilities in librustc_metadata::cstore. 2018-05-09 10:33:45 +02:00
Michael Woerister
ea4942835d Don't use Lock for heavily accessed CrateMetadata::cnum_map. 2018-05-08 14:32:31 +02:00
bors
f76f6fbdea Auto merge of #50271 - sinkuu:fix_ice, r=eddyb
Fix ICE #48984

* ~~fbf6423  The tail type was not normalized.~~
* d0839d5680  The method had a wrong assumption that something whose parent is a trait is an associated item. Fixes #48984.
2018-04-29 03:01:09 +00:00
Shotaro Yamada
9fc2595802 Make trait_of_item return None for non associated items
It have returned `Some` for constants in a trait definition,
and `Instance::resolve` called `tcx.associated_item` for them,
causing ICE.
2018-04-28 10:49:45 +09: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
John Kåre Alsaker
4036d2be8a Create a job immediately when looking in the query map and start it later 2018-04-27 12:09:58 +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
Irina Popa
04fa0e7bb3 rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
Irina Popa
38e964077b Rename rustc_back::target to rustc_target::spec. 2018-04-26 16:39:44 +03:00
Irina Popa
6f03b80020 rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target. 2018-04-26 16:39:27 +03:00
Wesley Wiser
d81d081df3 Hash EntryKind::AssociatedConst const data
Related to #49991
2018-04-24 23:18:58 -04:00
Wesley Wiser
732cc736c9 Clean up IsolatedEncoder::encode_info_for_impl_item() a bit 2018-04-20 19:05:54 -04:00
Wesley Wiser
ee9a4720ee
Fix bad merge in #49991
When I rebased #49991 on `master`, I messed up the merge for this line. I'm reverting this back to the way it was in f15e5c1.
2018-04-20 09:12:59 -04:00
Wesley Wiser
4a77d35c1e Remove HIR inlining
Fixes #49690
2018-04-19 20:33:18 -04:00
bors
d6a2dd9912 Auto merge of #49433 - varkor:metadata-skip-mir-opt, r=michaelwoerister
Skip MIR encoding for cargo check

Resolves #48662.

r? @michaelwoerister
2018-04-16 10:30:57 +00:00
bors
748c549185 Auto merge of #49847 - sinkuu:save_analysis_implicit_extern, r=petrochenkov
Fix save-analysis generation with extern_in_paths/extern_absolute_paths

Fixes #48742.
2018-04-16 02:34:32 +00:00
Oliver Schneider
7f7d4c376a
Get rid of redundant HashSet 2018-04-14 12:22:10 +02:00
Oliver Schneider
748e71e8f4
Reduce the number of calls to cdata 2018-04-14 12:21:46 +02:00
Oliver Schneider
04b3ab67d9
Encode items before encoding the list of AllocIds 2018-04-14 12:21:46 +02:00
Oliver Schneider
6f251c2a03
Use LazySeq instead of Vec 2018-04-14 12:21:46 +02:00
Oliver Schneider
a67ded06a3
Don't recurse into allocations, use a global table instead 2018-04-14 12:21:46 +02:00
Shotaro Yamada
2c7e83f746 Move path_len to ExternCrate 2018-04-13 09:31:43 +09:00
bors
6c537493d0 Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoerister
Even more thread-safety changes

r? @michaelwoerister
2018-04-12 16:22:36 +00:00
kennytm
77777b4528
Rollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcm
Use sort_by_cached_key where appropriate

A follow-up to https://github.com/rust-lang/rust/pull/48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.
2018-04-11 19:56:41 +08:00
bors
43e994c8b8 Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichton
Move deny(warnings) into rustbuild

This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-11 03:30:04 +00:00
Shotaro Yamada
bbed61d3d2 Extend ExternCrate to cover externs inferred from use or paths 2018-04-11 01:17:59 +09:00