Skip to content

Commit

Permalink
follow up #52309 (#52499)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Dec 13, 2023
1 parent 2f5daca commit 1524466
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions base/compiler/ssair/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -514,21 +514,21 @@ end
elseif isa(stmt, GotoIfNot)
op == 1 || throw(BoundsError())
stmt = GotoIfNot(v, stmt.dest)
elseif isa(stmt, ReturnNode)
op == 1 || throw(BoundsError())
stmt = ReturnNode(v)
elseif isa(stmt, EnterNode)
op == 1 || throw(BoundsError())
stmt = EnterNode(stmt.catch_dest, v)
elseif isa(stmt, ReturnNode)
op == 1 || throw(BoundsError())
stmt = typeof(stmt)(v)
elseif isa(stmt, Union{AnySSAValue, GlobalRef})
op == 1 || throw(BoundsError())
stmt = v
elseif isa(stmt, UpsilonNode)
op == 1 || throw(BoundsError())
stmt = typeof(stmt)(v)
stmt = UpsilonNode(v)
elseif isa(stmt, PiNode)
op == 1 || throw(BoundsError())
stmt = typeof(stmt)(v, stmt.typ)
stmt = PiNode(v, stmt.typ)
elseif isa(stmt, PhiNode)
op > length(stmt.values) && throw(BoundsError())
isassigned(stmt.values, op) || throw(BoundsError())
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2345,7 +2345,7 @@ function cfg_simplify!(ir::IRCode)
@assert length(new_bb.succs) <= 2
length(new_bb.succs) <= 1 && continue
if new_bb.succs[1] == new_bb.succs[2]
old_bb2 = findfirst(x::Int->x==bbidx, bb_rename_pred)
old_bb2 = findfirst(x::Int->x==bbidx, bb_rename_pred)::Int
terminator = ir[SSAValue(last(bbs[old_bb2].stmts))]
@assert terminator[:stmt] isa GotoIfNot
# N.B.: The dest will be renamed in process_node! below
Expand Down
2 changes: 1 addition & 1 deletion base/task.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ end
if field === :scope
istaskstarted(t) && error("Setting scope on a started task directly is disallowed.")
end
return @invoke setproperty!(t::Any, field, v)
return @invoke setproperty!(t::Any, field::Symbol, v::Any)
end

"""
Expand Down

0 comments on commit 1524466

Please sign in to comment.