-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
cleanup MemoryRef
#54647
Merged
oscardssmith
merged 4 commits into
JuliaLang:master
from
oscardssmith:os/cleanup-memoryref
Jun 4, 2024
Merged
cleanup MemoryRef
#54647
oscardssmith
merged 4 commits into
JuliaLang:master
from
oscardssmith:os/cleanup-memoryref
Jun 4, 2024
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
JeffBezanson
approved these changes
Jun 4, 2024
This broke CI and was failing all CI on this PR as well. Please don't merge things without waiting for CI unless you're 100% sure it's good. |
Keno
added a commit
that referenced
this pull request
Jun 5, 2024
oscardssmith
added a commit
to oscardssmith/julia
that referenced
this pull request
Jun 5, 2024
…)" This reverts commit c8ae7a0.
oscardssmith
added a commit
that referenced
this pull request
Jun 5, 2024
oscardssmith
removed
the
backport 1.11
Change should be backported to release-1.11
label
Jun 12, 2024
oscardssmith
added a commit
to oscardssmith/julia
that referenced
this pull request
Jun 12, 2024
oscardssmith
added a commit
to oscardssmith/julia
that referenced
this pull request
Jun 12, 2024
KristofferC
pushed a commit
that referenced
this pull request
Jun 13, 2024
While writing docs in #54642, I became dis-satisfied with how `MemoryRef` currently works and since we are approaching the deadline for changing things around here, made this. Previously, we had the builtin `memoryref` which constructed a `GenericMemoryRef` from a `GenericMemory` or from a `GenericMemoryRef` and an offset. and then we defined constructors `GenericMemoryRef`, `MemoryRef` etc that provided a nicish interface around the intrinsic. The problem with this is that people who want to make a `GenericMemoryRef` don't care what kind of `GenericMemoryRef` they are making. That choice is defined by the `GemericMemory`. As such, I have switched it around so that now the intrinsic is named `memoryrefnew` which frees up `memoryref` to be the function that constructs the appropriate type of `GenericMemoryRef`. This could have been done purely on the Base side, but renaming the intrinsic seems worth it to me since Base/Core use the (new) `memoryref` a lot and it seems like we should make the experience the same for internal and external users rather than making `Base` have to work around a bad name. (cherry picked from commit fa038d9)
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.
While writing docs in #54642, I became dis-satisfied with how
MemoryRef
currently works and since we are approaching the deadline for changing things around here, made this.Previously, we had the builtin
memoryref
which constructed aGenericMemoryRef
from aGenericMemory
or from aGenericMemoryRef
and an offset. and then we defined constructorsGenericMemoryRef
,MemoryRef
etc that provided a nicish interface around the intrinsic. The problem with this is that people who want to make aGenericMemoryRef
don't care what kind ofGenericMemoryRef
they are making. That choice is defined by theGemericMemory
. As such, I have switched it around so that now the intrinsic is namedmemoryrefnew
which frees upmemoryref
to be the function that constructs the appropriate type ofGenericMemoryRef
.This could have been done purely on the Base side, but renaming the intrinsic seems worth it to me since Base/Core use the (new)
memoryref
a lot and it seems like we should make the experience the same for internal and external users rather than makingBase
have to work around a bad name.