-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pointer][transmute] Support generic TransmuteFrom #1910
Open
joshlf
wants to merge
3
commits into
I1ac2ae177a235083e33b09fc848423220d3da042
Choose a base branch
from
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
base: I1ac2ae177a235083e33b09fc848423220d3da042
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[pointer][transmute] Support generic TransmuteFrom #1910
joshlf
wants to merge
3
commits into
I1ac2ae177a235083e33b09fc848423220d3da042
from
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 15, 2024
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 15, 2024 14:01
99a8250
to
19f7378
Compare
joshlf
force-pushed
the
Ifc49755af0d90eeefe7822d755d508403c266bda
branch
from
October 15, 2024 14:15
3b9ac7b
to
c88e77f
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 15, 2024 14:15
19f7378
to
140f430
Compare
joshlf
force-pushed
the
Ifc49755af0d90eeefe7822d755d508403c266bda
branch
from
October 16, 2024 19:04
c88e77f
to
c3a2206
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 16, 2024 19:04
140f430
to
ac39cec
Compare
joshlf
force-pushed
the
Ifc49755af0d90eeefe7822d755d508403c266bda
branch
from
October 17, 2024 01:31
c3a2206
to
7643459
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 17, 2024 01:31
ac39cec
to
41cd8a9
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 17, 2024 03:22
41cd8a9
to
90c2f64
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 17, 2024 18:46
90c2f64
to
65c71f6
Compare
joshlf
force-pushed
the
Ifc49755af0d90eeefe7822d755d508403c266bda
branch
from
October 17, 2024 18:46
7643459
to
b36cb1c
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 18, 2024 16:00
65c71f6
to
a1fc228
Compare
joshlf
force-pushed
the
Ifc49755af0d90eeefe7822d755d508403c266bda
branch
from
October 18, 2024 16:00
b36cb1c
to
4bd33fb
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
3 times, most recently
from
October 18, 2024 16:56
a6e7783
to
af10d3d
Compare
joshlf
changed the base branch from
Ifc49755af0d90eeefe7822d755d508403c266bda
to
I1ac2ae177a235083e33b09fc848423220d3da042
October 18, 2024 16:56
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 18, 2024 17:30
af10d3d
to
235702a
Compare
joshlf
force-pushed
the
I1ac2ae177a235083e33b09fc848423220d3da042
branch
from
October 18, 2024 17:30
ac629d9
to
53deb0a
Compare
joshlf
changed the title
[WIP][pointer] Support generic TransmuteFrom
[pointer][transmute] Support generic TransmuteFrom
Oct 18, 2024
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 18, 2024 17:33
235702a
to
f0fc37e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## I1ac2ae177a235083e33b09fc848423220d3da042 #1910 +/- ##
============================================================================
Coverage ? 89.76%
============================================================================
Files ? 17
Lines ? 5806
Branches ? 0
============================================================================
Hits ? 5212
Misses ? 594
Partials ? 0 ☔ View full report in Codecov by Sentry. |
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 18, 2024 17:43
f0fc37e
to
9b71dc8
Compare
joshlf
force-pushed
the
I1ac2ae177a235083e33b09fc848423220d3da042
branch
from
October 18, 2024 17:43
53deb0a
to
4795dcd
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 19, 2024 01:45
9b71dc8
to
1bee133
Compare
This prepares us to rename `TransparentWrapper` to `TransmuteFrom`, which we'll do in a follow-up commit to preserve nice git diffs. Makes progress on #1122 gherrit-pr-id: Ifc49755af0d90eeefe7822d755d508403c266bda
We previously used `AliasingMapping`s and `Inaccessible` to model `UnsafeCell` agreement. This abuses the notion of a mapping since one doesn't ever actually want to change the aliasing of a pointer (and certainly not to `Inaccessible`) - really this was meant to model pointer casts which should never be performed. In addition to being an awkward fit, the presence of `Inaccessible` meant that code could not assume that any `Aliasing` invariant permitted reading, and so we had to add extra machinery to work around this. Future commits will use a different, simpler model for denoting `UnsafeCell` agreement or disagreement. While we're here, make `Read` slightly more permissive, implemented for `A: Aliasing, T: Immutable` rather than just `A: Reference, T: Immutable`. Makes progress on #1122, #1866 gherrit-pr-id: I1ac2ae177a235083e33b09fc848423220d3da042
This commit replaces the `TransparentWrapper` trait with a more generic, bidirectional `TransmuteFrom<T>` trait. `U: TransmuteFrom<T>` indicates that `T` and `U` have the same sizes and that `T` can be transmuted into `U` given certain alignment and validity invariant mappings. Makes progress on #1122 gherrit-pr-id: I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
joshlf
force-pushed
the
I1ac2ae177a235083e33b09fc848423220d3da042
branch
from
October 21, 2024 19:24
4795dcd
to
94165e5
Compare
joshlf
force-pushed
the
I7af68cdaa5ea47ab245a942d1cbd8bc5e6407223
branch
from
October 21, 2024 19:24
1bee133
to
4ea2f82
Compare
joshlf
force-pushed
the
I1ac2ae177a235083e33b09fc848423220d3da042
branch
3 times, most recently
from
October 24, 2024 20:51
33fc89f
to
48f1450
Compare
joshlf
force-pushed
the
I1ac2ae177a235083e33b09fc848423220d3da042
branch
from
November 11, 2024 22:40
48f1450
to
355531d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit replaces the
TransparentWrapper
trait with a more generic,bidirectional
TransmuteFrom<T>
trait.U: TransmuteFrom<T>
indicatesthat
T
andU
have the same sizes and thatT
can be transmuted intoU
given certain alignment and validity invariant mappings.Makes progress on #1122
This PR is on branch ptr-overhaul.