-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
@nospecialize
for string_index_err
#57604
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
Open
nsajko
wants to merge
6
commits into
JuliaLang:master
Choose a base branch
from
nsajko:Base_strings_StringIndexError_nospecialize
base: master
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
@nospecialize
for string_index_err
#57604
nsajko
wants to merge
6
commits into
JuliaLang:master
from
nsajko:Base_strings_StringIndexError_nospecialize
+1
−1
Conversation
This file contains hidden or 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
7e082a5
to
ae2ee2a
Compare
The change decreases the invalidation count on loading package TypeDomainNaturalNumbers v6.1.0 (without first loading the REPL) from Reproducer: ./julia -E 'using SnoopCompileCore; i=(@snoop_invalidations using TypeDomainNaturalNumbers); using SnoopCompile; length(uinvalidated(i))' |
8044dba
to
dc76a47
Compare
The fields of `StringIndexError` are abstractly typed, so there's no reason to specialize, I think. The change seems like it could prevent some invalidation on loading user code.
4a45773
to
7f373e3
Compare
nsajko
commented
Mar 8, 2025
@nospecialize
for string_index_err
and StringIndexError
@nospecialize
for string_index_err
This was referenced Mar 11, 2025
This was referenced Mar 20, 2025
KristofferC
reviewed
Mar 31, 2025
@@ -9,7 +9,7 @@ struct StringIndexError <: Exception | |||
string::AbstractString | |||
index::Integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at string_index_err
this could be made ::Int
I think?
51 tasks
42 tasks
44 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 1.10
Change should be backported to the 1.10 release
backport 1.11
Change should be backported to release-1.11
backport 1.12
Change should be backported to release-1.12
error handling
Handling of exceptions by Julia or the user
invalidations
strings
"Strings!"
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.
The fields of
StringIndexError
are abstractly typed, so there's no reason to specialize on a concrete type, I think. The change seems like it could prevent some invalidation on loading user code.