Skip to content

Commit

Permalink
fixup! Wrap MethodLookupResult with MethodLookupQuery to remember fro…
Browse files Browse the repository at this point in the history
…m whence we came
  • Loading branch information
vchuravy committed Nov 26, 2024
1 parent 04ba416 commit eede6e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/src/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ function handle_modifyop!_call!(ir::IRCode, idx::Int, stmt::Expr, info::ModifyOp
info isa ConstCallInfo && (info = info.call)
info isa MethodMatchInfo || return nothing
length(info.edges) == length(info.results) == 1 || return nothing
match = info.results[1]::MethodMatch
match = info.query.results[1]::MethodMatch
match.fully_covers || return nothing
edge = info.edges[1]
edge === nothing && return nothing
Expand Down
2 changes: 1 addition & 1 deletion Compiler/src/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3038,7 +3038,7 @@ function _hasmethod_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, sv
if match === nothing
rt = Const(false)
vresults = MethodLookupResult(Any[], valid_worlds, true)
vinfo = MethodMatchInfo(vresults, mt, types, false) # XXX: this should actually be an info with invoke-type edge
vinfo = MethodMatchInfo(MethodLookupQuery(vresults, argtype_by_index(argtypes, typeidx), types), mt, false) # XXX: this should actually be an info with invoke-type edge
else
rt = Const(true)
vinfo = InvokeCallInfo(nothing, match, nothing, types)
Expand Down

0 comments on commit eede6e9

Please sign in to comment.