diff --git a/src/analyzers/jetanalyzer.jl b/src/analyzers/jetanalyzer.jl index d9e833617..1b4c796cc 100644 --- a/src/analyzers/jetanalyzer.jl +++ b/src/analyzers/jetanalyzer.jl @@ -36,11 +36,11 @@ struct JETAnalyzer{RP<:ReportPass} <: AbstractAnalyzer report_pass::RP method_table::CachedMethodTable{OverlayMethodTable} - function JETAnalyzer(state::AnalyzerState, analysis_cache::AnalysisCache, report_pass::RP) where RP + function JETAnalyzer(state::AnalyzerState, analysis_cache::AnalysisCache, report_pass::RP) where RP<:ReportPass method_table = CachedMethodTable(OverlayMethodTable(state.world, JET_METHOD_TABLE)) return new{RP}(state, analysis_cache, report_pass, method_table) end - function JETAnalyzer(state::AnalyzerState, report_pass::RP) where RP + function JETAnalyzer(state::AnalyzerState, report_pass::RP) where RP<:ReportPass if (@ccall jl_generating_output()::Cint) != 0 # XXX Avoid storing analysis results into a cache that persists across the # precompilation, as pkgimage currently doesn't support serializing diff --git a/src/analyzers/optanalyzer.jl b/src/analyzers/optanalyzer.jl index 9ed3b8873..30d832ebf 100644 --- a/src/analyzers/optanalyzer.jl +++ b/src/analyzers/optanalyzer.jl @@ -163,7 +163,7 @@ that are specific to the optimization analysis. --- """ -struct OptAnalyzer{RP,FF} <: AbstractAnalyzer +struct OptAnalyzer{RP<:ReportPass,FF} <: AbstractAnalyzer state::AnalyzerState analysis_cache::AnalysisCache report_pass::RP @@ -176,7 +176,7 @@ struct OptAnalyzer{RP,FF} <: AbstractAnalyzer report_pass::RP, function_filter::FF, skip_noncompileable_calls::Bool, - skip_unoptimized_throw_blocks::Bool) where {RP,FF} + skip_unoptimized_throw_blocks::Bool) where {RP<:ReportPass,FF} if (@ccall jl_generating_output()::Cint) != 0 # XXX Avoid storing analysis results into a cache that persists across the # precompilation, as pkgimage currently doesn't support serializing @@ -353,7 +353,7 @@ end # the entry constructor function OptAnalyzer(world::UInt = Base.get_world_counter(); - report_pass = OptAnalysisPass(), + report_pass::ReportPass = OptAnalysisPass(), function_filter = optanalyzer_function_filter, skip_noncompileable_calls::Bool = true, skip_unoptimized_throw_blocks::Bool = true,