Skip to content

Commit 73cdfd8

Browse files
authored
Code validation and IR verification improvements (#52844)
1 parent 0f7b598 commit 73cdfd8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

base/compiler/ssair/verify.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
function maybe_show_ir(ir::IRCode)
44
if isdefined(Core, :Main)
5-
invokelatest(Core.Main.Base.display, ir)
5+
# ensure we use I/O that does not yield, as this gets called during compilation
6+
invokelatest(Core.Main.Base.show, Core.stdout, "text/plain", ir)
67
end
78
end
89

base/compiler/validation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ end
253253

254254
function is_valid_rvalue(@nospecialize(x))
255255
is_valid_argument(x) && return true
256-
if isa(x, Expr) && x.head in (:new, :splatnew, :the_exception, :isdefined, :call, :invoke, :invoke_modify, :foreigncall, :cfunction, :gc_preserve_begin, :copyast)
256+
if isa(x, Expr) && x.head in (:new, :splatnew, :the_exception, :isdefined, :call, :invoke, :invoke_modify, :foreigncall, :cfunction, :gc_preserve_begin, :copyast, :new_opaque_closure)
257257
return true
258258
end
259259
return false

0 commit comments

Comments
 (0)