Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions bin/generate_builtins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,6 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
f = @lookup(frame, fex)
end

if @static isdefined(Core, :OpaqueClosure) && f isa Core.OpaqueClosure
if expand
if !Core.Compiler.uncompressed_ir(f.source).inferred
return Expr(:call, f, args[2:end]...)
else
@debug "not interpreting opaque closure \$f since it contains inferred code"
end
end
return Some{Any}(f(args...))
end
if !(isa(f, Core.Builtin) || isa(f, Core.IntrinsicFunction))
return call_expr
end
Expand Down
10 changes: 0 additions & 10 deletions src/builtins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
f = @lookup(frame, fex)
end

if @static isdefined(Core, :OpaqueClosure) && f isa Core.OpaqueClosure
if expand
if !Core.Compiler.uncompressed_ir(f.source).inferred
return Expr(:call, f, args[2:end]...)
else
@debug "not interpreting opaque closure $f since it contains inferred code"
end
end
return Some{Any}(f(args...))
end
if !(isa(f, Core.Builtin) || isa(f, Core.IntrinsicFunction))
return call_expr
end
Expand Down
5 changes: 4 additions & 1 deletion src/construct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ function prepare_call(@nospecialize(f), allargs; enter_generated = false)
if @static isdefined(Core, :OpaqueClosure) && f isa Core.OpaqueClosure
method = f.source
# don't try to interpret optimized ir
if Core.Compiler.uncompressed_ir(method).inferred
is_inferred_ir = any(Core.Compiler.uncompressed_ir(f.source).code) do stmt
stmt isa Core.PiNode || stmt isa Core.PhiNode || stmt isa Core.PhiCNode || stmt isa Core.UpsilonNode
end
if is_inferred_ir
@debug "not interpreting opaque closure $f since it contains inferred code"
return nothing
end
Expand Down