Conversation
`ismethod[3](expr)` and `ismethod[3](::Frame)` are distinct queries. Avoiding an unnecessary overload prevents unwanted type instability.
Add restrictive argument type declarations to internal utilities. This improves JETLS diagnostics and makes the intent of the codebase clearer.
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
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 PR bundles a series of small cleanups prompted by running JETLS over the codebase.
None of the exported API changes; all signature changes are to internal (non-exported) helpers.
exprandFramemethod-query overloads (8881ea6):ismethod(::Frame)/ismethod3(::Frame)are renamed tois_frame_at_method/is_frame_at_method3.They answer a different question from
ismethod(stmt)(which inspects a statement), and sharing the name introduced unnecessary union splits due to callsite argument type refinements.Revise only calls
ismethodon statements, so it is unaffected.===for symbol comparison (1f3895f)isrequired::AbstractVector{Bool},objs::Set{GlobalRef},idx::Int, etc. on thelines_required!worker and its helpers (add_requests!,add_ssa_preds!,add_named_dependencies!,add_preds!,add_obj!,add_typedefs!). This improves JETLS diagnostics and documents intent.lines_required!(isrequired, objs, src, edges, controller)now requiresobjs::Set{GlobalRef}. This overload is not covered by the docstring and every public entry point already passes aSet{GlobalRef}; only one test needed updating.@nospecializetoismethod/ismethod1/ismethod3and typeismethod_with_name'ssrc::CodeInfo.@warninmethoddef!withloc !== nothing, so a missing line-table entry no longer raises instead of warning._-prefixed names, tidyusingorder in tests.