From 90f6f2272fa853c90baca6b284c5baeffeec131b Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 31 Aug 2022 14:06:18 +0200 Subject: [PATCH 1/2] Improve type stability of `platforms_match(::AbstractPlatform, ::AbstractPlatform)` (#46547) This improvement prevents invalidations in binaryplatforms.jl when loading Static.jl. --- base/binaryplatforms.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index e2dda00bf58e7..d70cca9c48e39 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -1027,7 +1027,7 @@ function platforms_match(a::AbstractPlatform, b::AbstractPlatform) # Call the comparator, passing in which objects requested this comparison (one, the other, or both) # For some comparators this doesn't matter, but for non-symmetrical comparisons, it does. - if !comparator(ak, bk, a_comp == comparator, b_comp == comparator) + if !(comparator(ak, bk, a_comp == comparator, b_comp == comparator)::Bool) return false end end From 4ecb6376081cb418b1e8d2d674fc352356f30c50 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 31 Aug 2022 14:12:01 +0200 Subject: [PATCH 2/2] Improve inferrability of `open(f, cmd, ...)` (#46551) This fixes invalidations from loading Static.jl --- base/process.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/process.jl b/base/process.jl index 016c495a76a8b..719d1d5436ada 100644 --- a/base/process.jl +++ b/base/process.jl @@ -430,7 +430,7 @@ function open(f::Function, cmds::AbstractCmd, args...; kwargs...) rethrow() end close(P.in) - if !eof(P.out) + if !(eof(P.out)::Bool) waitkill(P) throw(_UVError("open(do)", UV_EPIPE)) end