diff --git a/base/compiler/ssair/ir.jl b/base/compiler/ssair/ir.jl index c37562a06c2ca..e217141a9a535 100644 --- a/base/compiler/ssair/ir.jl +++ b/base/compiler/ssair/ir.jl @@ -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()) diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index fdd7c0d3b48aa..727edd2825933 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -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 diff --git a/base/task.jl b/base/task.jl index 79e85024ac0d0..ba96d7bca5095 100644 --- a/base/task.jl +++ b/base/task.jl @@ -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 """