about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
AgeCommit message (Collapse)AuthorLines
2023-04-18Rollup merge of #110409 - ↵Matthias Krüger-8/+52
Nilstrieb:some-manual-javascript-object-notationing, r=fee1-dead Don't use `serde_json` to serialize a simple JSON object This avoids `rustc_data_structures` depending on `serde_json` which allows it to be compiled much earlier, unlocking most of rustc. This used to not matter, but after #110407 we're not blocked on fluent anymore, which means that it's now a blocking edge. ![image](https://user-images.githubusercontent.com/48135649/232313178-e0150420-3020-4eb6-98d3-fe5294a8f947.png) This saves a few more seconds. cc ````@Zoxc```` who added it recently
2023-04-17Auto merge of #110243 - WaffleLapkin:bless_tagged_pointers🙏, r=Nilstriebbors-215/+640
Tagged pointers, now with strict provenance! This is a big refactor of tagged pointers in rustc, with three main goals: 1. Porting the code to the strict provenance 2. Cleanup the code 3. Document the code (and safety invariants) better This PR has grown quite a bit (almost a complete rewrite at this point...), so I'm not sure what's the best way to review this, but reviewing commit-by-commit should be fine. r? `@Nilstrieb`
2023-04-17Auto merge of #110367 - saethlin:no-truncations, r=oli-obkbors-28/+6
Remove some suspicious cast truncations These truncations were added a long time ago, and as best I can tell without a perf justification. And with rust-lang/rust#110410 it has become perf-neutral to not truncate anymore. We worked hard for all these bits, let's use them.
2023-04-16Remove some unnecessary hash truncationsBen Kimock-28/+6
2023-04-16Don't use `serde_json` to serialize a simple JSON objectNilstrieb-8/+52
This avoids `rustc_data_structures` depending on `serde_json` which allows it to be compiled much earlier, unlocking most of rustc.
2023-04-16fix clippy::toplevel_ref_arg and ::manual_mapMatthias Krüger-5/+2
2023-04-14fix broken intradoclinksMaybe Waffle-1/+3
2023-04-14Use `ptr::Alignment` for extra coolness pointsMaybe Waffle-25/+20
2023-04-14Test `CopyTaggedPtr`'s `HashStable` implMaybe Waffle-0/+26
2023-04-14Share `Tag2` impl between `CopyTaggedPtr` and `TaggedPtr` testsMaybe Waffle-62/+31
2023-04-14Doc fixes from reviewMaybe Waffle-7/+26
2023-04-13Implement `Send`/`Sync` for `CopyTaggedPtr`Maybe Waffle-0/+20
2023-04-12doc fixesMaybe Waffle-3/+4
2023-04-12Document tagged pointers betterMaybe Waffle-31/+130
2023-04-12Add tests for tagged pointersMaybe Waffle-0/+222
2023-04-12Add `TaggedPtr::set_tag`Maybe Waffle-0/+4
2023-04-12Move code aroundMaybe Waffle-56/+57
2023-04-12Shorten `COMPARE_PACKED` => `CP` where it is not importantMaybe Waffle-14/+14
why can't I _ it :'(
2023-04-12Remove `pointer_{ref,mut}` from tagged pointersMaybe Waffle-20/+11
Just use `deref{,_mut}`!
2023-04-12Make tagged pointers debug impls print the pointerMaybe Waffle-12/+8
Does not really matter, but may be nicer in case the pointer has some specific debug impl.
2023-04-12Remove `Pointer::with_ref` in favour implementing it on tagged pointers directlyMaybe Waffle-40/+25
2023-04-12Lift `Pointer`'s requirement for the pointer to be thinMaybe Waffle-16/+44
fat pointers rule!
2023-04-12Remove useless parameter from ghostMaybe Waffle-2/+2
2023-04-11Fix doc testMaybe Waffle-2/+6
2023-04-11Refactor tagged ptr packing into a functionMaybe Waffle-23/+22
2023-04-11Bless tagged pointers (comply to strict provenance)Maybe Waffle-58/+78
2023-04-11Sprinkle some whitespace & usesMaybe Waffle-6/+25
2023-04-11Add `bits_for` helper for tagged pointers & fixup docsMaybe Waffle-15/+40
2023-04-11Use `SSO_ARRAY_SIZE` instead of `8` in `SsoHashMap` implMaybe Waffle-17/+17
2023-04-11Use `itertools::Either` instead of own `EitherIter` implMaybe Waffle-92/+18
2023-04-09Inline format_argsNilstrieb-1/+1
Co-authored-by: Michael Goulet <michael@errs.io>
2023-04-09Fix some clippy::complexityNilstrieb-15/+9
2023-04-09Allow `modulo_one` on function using cfg constsNilstrieb-0/+1
2023-04-09Some simple `clippy::perf` fixesNilstrieb-1/+1
2023-04-08Auto merge of #109971 - WaffleLapkin:yeet_ownership, r=Nilstriebbors-1980/+204
Yeet `owning_ref` Based on the discussions from https://github.com/rust-lang/rust/pull/109948 This replaces `owning_ref` with a far simpler & safer abstraction. Fixes #109974
2023-04-07Mark `OwnedSlice::{deref, borrow}` as `#[inline]`Maybe Waffle-0/+2
2023-04-06Support multithreaded mode in `OwnedSlice` testsMaybe Waffle-8/+14
2023-04-06Add basic tests for `OwnedSlice`Maybe Waffle-0/+71
2023-04-06Use `FnOnce` for `slice_owned` instead of `Fn`Maybe Waffle-2/+2
2023-04-05Add context to phantom commentNilstrieb-2/+2
2023-04-05Fix a couple missed hash constantsThom Chiovoloni-3/+3
2023-04-05Use SipHash-1-3 instead of SipHash-2-4 for StableHasherThom Chiovoloni-270/+75
2023-04-05Fix typoMaybe Waffle-1/+1
2023-04-05Yeet `owning_ref`Maybe Waffle-1971/+1
Turns out - `owning_ref` is unsound due to `Box` aliasing stuff - `rustc` doesn't need 99% of the `owning_ref` API - `rustc` can use a far simpler abstraction that is `OwnedSlice`
2023-04-05Use `OwnedSlice` instead of `owning_ref`Maybe Waffle-3/+3
2023-04-05Implement `OwnedSlice`Maybe Waffle-5/+120
2023-04-04Use a simpler atomic operation than the `compare_exchange` hammerOli Scherer-0/+8
2023-04-04Another AppendOnlyVecOli Scherer-10/+21
2023-04-04Replace another lock with an append-only vecOli Scherer-0/+16
2023-04-04Remove a lock in favor of an AppendOnlyVecOli Scherer-2/+7