Skip to content

Commit 8dd45c0

Browse files
authored
Merge pull request #203 from oscardssmith/fix-on-master
remove getindex definition on 1.11
2 parents 9b2a506 + 74d5208 commit 8dd45c0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/stage1/compiler_utils.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ function Base.push!(cfg::CFG, bb::BasicBlock)
77
push!(cfg.index, bb.stmts.start)
88
end
99

10-
Base.getindex(ir::IRCode, ssa::SSAValue) =
11-
Core.Compiler.getindex(ir, ssa)
10+
if VERSION <= v"1.11.0-DEV.116"
11+
Base.getindex(ir::IRCode, ssa::SSAValue) = Core.Compiler.getindex(ir, ssa)
12+
end
1213

1314
Base.copy(ir::IRCode) = Core.Compiler.copy(ir)
1415

src/stage1/recurse.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ function optic_transform!(ci, mi, nargs, N)
273273
# SSA conversion
274274
meth = mi.def::Method
275275
domtree = construct_domtree(ir.cfg.blocks)
276-
defuse_insts = scan_slot_def_use(Int(meth.nargs), ci, ir.stmts.inst)
276+
stmts = VERSION < v"1.11.0-DEV.258" ? ir.stmts.inst : ir.stmts.stmt
277+
defuse_insts = scan_slot_def_use(Int(meth.nargs), ci, stmts)
277278
ci.ssavaluetypes = Any[Any for i = 1:ci.ssavaluetypes]
278279
ir = construct_ssa!(ci, ir, domtree, defuse_insts, ci.slottypes, SimpleInferenceLattice.instance)
279280
ir = compact!(ir)

0 commit comments

Comments
 (0)