Skip to content

Commit 2d1c3e5

Browse files
authored
Merge branch 'master' into ct/fix-55548
2 parents e60a5ee + 19ac316 commit 2d1c3e5

File tree

22 files changed

+63
-24
lines changed

22 files changed

+63
-24
lines changed

base/compiler/ssair/slot2ssa.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ function fixup_slot!(ir::IRCode, ci::CodeInfo, idx::Int, slot::Int, @nospecializ
8888
insert_node!(ir, idx, NewInstruction(
8989
Expr(:throw_undef_if_not, ci.slotnames[slot], false), Any))
9090
return UNDEF_TOKEN
91+
elseif has_flag(ir.stmts[idx], IR_FLAG_NOTHROW)
92+
# if the `isdefined`-ness of this slot is guaranteed by abstract interpretation,
93+
# there is no need to form a `:throw_undef_if_not`
9194
elseif def_ssa !== true
9295
insert_node!(ir, idx, NewInstruction(
9396
Expr(:throw_undef_if_not, ci.slotnames[slot], def_ssa), Any))
@@ -153,12 +156,12 @@ end
153156

154157
function fixup_uses!(ir::IRCode, ci::CodeInfo, code::Vector{Any}, uses::Vector{Int}, slot::Int, @nospecialize(ssa))
155158
for use in uses
156-
code[use] = fixemup!(x::SlotNumber->slot_id(x)==slot, stmt::SlotNumber->(ssa, true), ir, ci, use, code[use])
159+
code[use] = fixemup!(x::SlotNumber->slot_id(x)==slot, ::SlotNumber->Pair{Any,Any}(ssa, true), ir, ci, use, code[use])
157160
end
158161
end
159162

160163
function rename_uses!(ir::IRCode, ci::CodeInfo, idx::Int, @nospecialize(stmt), renames::Vector{Pair{Any, Any}})
161-
return fixemup!(stmt::SlotNumber->true, stmt::SlotNumber->renames[slot_id(stmt)], ir, ci, idx, stmt)
164+
return fixemup!(::SlotNumber->true, x::SlotNumber->renames[slot_id(x)], ir, ci, idx, stmt)
162165
end
163166

164167
# maybe use expr_type?
@@ -656,7 +659,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, sv::OptimizationState,
656659
visited = BitSet()
657660
new_nodes = ir.new_nodes
658661
@timeit "SSA Rename" while !isempty(worklist)
659-
(item::Int, pred, incoming_vals) = pop!(worklist)
662+
(item, pred, incoming_vals) = pop!(worklist)
660663
if sv.bb_vartables[item] === nothing
661664
continue
662665
end

base/opaque_closure.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the argument type may be fixed length even if the function is variadic.
1818
This interface is experimental and subject to change or removal without notice.
1919
"""
2020
macro opaque(ex)
21-
esc(Expr(:opaque_closure, nothing, nothing, nothing, ex))
21+
esc(Expr(:opaque_closure, nothing, nothing, nothing, #= allow_partial =# true, ex))
2222
end
2323

2424
macro opaque(ty, ex)
@@ -34,7 +34,7 @@ macro opaque(ty, ex)
3434
end
3535
AT = (AT !== :_) ? AT : nothing
3636
RT = (RT !== :_) ? RT : nothing
37-
return esc(Expr(:opaque_closure, AT, RT, RT, ex))
37+
return esc(Expr(:opaque_closure, AT, RT, RT, #= allow_partial =# true, ex))
3838
end
3939

4040
# OpaqueClosure construction from pre-inferred CodeInfo/IRCode
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
70878dd96911d6960537dfee2a820d98
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
87d2bdc6c85cbbce5302aab8ffe92fc542c9c71a396844fcc04c0416be059b00298b4816ab5e5491dbf865660a3a6152f1c245875a1ec75fb49b4c7ba0d303d8

deps/checksums/Downloads-a9d274ff6588cc5dbfa90e908ee34c2408bab84a.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/Downloads-a9d274ff6588cc5dbfa90e908ee34c2408bab84a.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d992a5c629199747d68baa1593a7c37d
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
27ea738dbc4db8e4a02b00fbbdc4e2047906fe0561dd4c7f9e5ce5ea9b0b7b8ef9e29234f8e435deaa6cb3e29861130b06cb0da11118c40d78f4c475ac48db3f

deps/checksums/Pkg-d1d2fc986e7249909b450979acc4d359aacfc88e.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/Pkg-d1d2fc986e7249909b450979acc4d359aacfc88e.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)