Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ end
@test fir(nothing, false, 1) === 11

ir = @code_ir f_try_catch7()
@test func(ir)(nothing) === 1.
fir = func(ir)
@test fir(nothing) === 1.

ir = @code_ir f_try_catch8(1.)
fir = func(ir)
Expand Down
12 changes: 6 additions & 6 deletions test/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ let
@test inline_at !== nothing
ir = IRTools.inline(ir1, inline_at, ir2)
f = IRTools.func(ir)
@test f(nothing, 2, 3) == 3
@test f(nothing, 3, 2) == 3
@test invokelatest(f, nothing, 2, 3) == 3
@test invokelatest(f, nothing, 3, 2) == 3
end

function foo1(x)
Expand All @@ -77,8 +77,8 @@ let
end
@test inline_at !== nothing
ir3 = IRTools.inline(ir, inline_at, ir2)
@test IRTools.func(ir3)(nothing, 2) == 12
@test IRTools.func(ir3)(nothing, 101) == 101
@test invokelatest(IRTools.func(ir3), nothing, 2) == 12
@test invokelatest(IRTools.func(ir3), nothing, 101) == 101
end


Expand All @@ -103,6 +103,6 @@ let
end
@test inline_at !== nothing
ir3 = IRTools.inline(ir, inline_at, ir2)
@test IRTools.func(ir3)(nothing, 2) == foo2(2)
@test IRTools.func(ir3)(nothing, -2) == foo2(-2)
@test invokelatest(IRTools.func(ir3), nothing, 2) == foo2(2)
@test invokelatest(IRTools.func(ir3), nothing, -2) == foo2(-2)
end
Loading