Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Nov 29, 2023
1 parent 354d182 commit 223f464
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/abstractinterpret/abstractanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ struct AnalysisResult
reports::Vector{InferenceErrorReport}
end

# TODO use `(result::InferenceResult).analysis_results` to cache JET analysis result
# when updating to v1.11.

"""
CachedAnalysisResult
Expand Down
6 changes: 2 additions & 4 deletions src/abstractinterpret/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -689,11 +689,9 @@ function CC.abstract_eval_statement(analyzer::AbstractAnalyzer, @nospecialize(e)
end

function CC.builtin_tfunction(analyzer::AbstractAnalyzer,
@nospecialize(f), argtypes::Vector{Any},
sv::InferenceState) # `AbstractAnalyzer` isn't overloaded on `return_type`
@nospecialize(f), argtypes::Vector{Any}, sv::InferenceState) # `AbstractAnalyzer` isn't overloaded on `return_type`
ret = @invoke CC.builtin_tfunction(analyzer::AbstractInterpreter,
f::Any, argtypes::Vector{Any},
sv::Union{InferenceState,Nothing})
f::Any, argtypes::Vector{Any}, sv::Union{InferenceState,Nothing})

if f === getglobal
if istoplevel_getproperty(sv)
Expand Down
4 changes: 2 additions & 2 deletions src/analyzers/jetanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,9 @@ function CC.abstract_eval_value(analyzer::JETAnalyzer, @nospecialize(e), vtypes:
end

function CC.builtin_tfunction(analyzer::JETAnalyzer,
@nospecialize(f), argtypes::Array{Any,1}, sv::InferenceState) # `AbstractAnalyzer` isn't overloaded on `return_type`
@nospecialize(f), argtypes::Vector{Any}, sv::InferenceState) # `AbstractAnalyzer` isn't overloaded on `return_type`
ret = @invoke CC.builtin_tfunction(analyzer::AbstractAnalyzer,
f::Any, argtypes::Array{Any,1}, sv::InferenceState)
f::Any, argtypes::Vector{Any}, sv::InferenceState)

if f === fieldtype
# the valid widest possible return type of `fieldtype_tfunc` is `Union{Type,TypeVar}`
Expand Down

0 comments on commit 223f464

Please sign in to comment.