Skip to content

Commit 1524466

Browse files
authored
follow up #52309 (#52499)
1 parent 2f5daca commit 1524466

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

base/compiler/ssair/ir.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,21 +514,21 @@ end
514514
elseif isa(stmt, GotoIfNot)
515515
op == 1 || throw(BoundsError())
516516
stmt = GotoIfNot(v, stmt.dest)
517+
elseif isa(stmt, ReturnNode)
518+
op == 1 || throw(BoundsError())
519+
stmt = ReturnNode(v)
517520
elseif isa(stmt, EnterNode)
518521
op == 1 || throw(BoundsError())
519522
stmt = EnterNode(stmt.catch_dest, v)
520-
elseif isa(stmt, ReturnNode)
521-
op == 1 || throw(BoundsError())
522-
stmt = typeof(stmt)(v)
523523
elseif isa(stmt, Union{AnySSAValue, GlobalRef})
524524
op == 1 || throw(BoundsError())
525525
stmt = v
526526
elseif isa(stmt, UpsilonNode)
527527
op == 1 || throw(BoundsError())
528-
stmt = typeof(stmt)(v)
528+
stmt = UpsilonNode(v)
529529
elseif isa(stmt, PiNode)
530530
op == 1 || throw(BoundsError())
531-
stmt = typeof(stmt)(v, stmt.typ)
531+
stmt = PiNode(v, stmt.typ)
532532
elseif isa(stmt, PhiNode)
533533
op > length(stmt.values) && throw(BoundsError())
534534
isassigned(stmt.values, op) || throw(BoundsError())

base/compiler/ssair/passes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ function cfg_simplify!(ir::IRCode)
23452345
@assert length(new_bb.succs) <= 2
23462346
length(new_bb.succs) <= 1 && continue
23472347
if new_bb.succs[1] == new_bb.succs[2]
2348-
old_bb2 = findfirst(x::Int->x==bbidx, bb_rename_pred)
2348+
old_bb2 = findfirst(x::Int->x==bbidx, bb_rename_pred)::Int
23492349
terminator = ir[SSAValue(last(bbs[old_bb2].stmts))]
23502350
@assert terminator[:stmt] isa GotoIfNot
23512351
# N.B.: The dest will be renamed in process_node! below

base/task.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ end
191191
if field === :scope
192192
istaskstarted(t) && error("Setting scope on a started task directly is disallowed.")
193193
end
194-
return @invoke setproperty!(t::Any, field, v)
194+
return @invoke setproperty!(t::Any, field::Symbol, v::Any)
195195
end
196196

197197
"""

0 commit comments

Comments
 (0)