Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/codeedges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -793,10 +793,10 @@ end
#
# [Wei84]: M. Weiser, "Program Slicing," IEEE Transactions on Software Engineering, 10, pages 352-357, July 1984.
function add_control_flow!(isrequired, src::CodeInfo, cfg::CFG, postdomtree)
local changed::Bool = false
changed = Ref(false)
function mark_isrequired!(idx::Int)
if !isrequired[idx]
changed |= isrequired[idx] = true
changed[] |= isrequired[idx] = true
return true
end
return false
Expand All @@ -818,7 +818,7 @@ function add_control_flow!(isrequired, src::CodeInfo, cfg::CFG, postdomtree)
end
end
end
return changed
return changed[]
end

is_conditional_terminator(@nospecialize stmt) = stmt isa GotoIfNot ||
Expand Down
6 changes: 5 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
using Test
using Test, LoweredCodeUtils

# using LoweredCodeUtils
# @testset "Ambiguity" begin
# @test isempty(detect_ambiguities(LoweredCodeUtils, LoweredCodeUtils.JuliaInterpreter, Base, Core))
# end

if isdefined(Test, :detect_closure_boxes)
@test isempty(Test.detect_closure_boxes(LoweredCodeUtils))
end

@testset "LoweredCodeUtils.jl" begin
@testset "signatures.jl" include("signatures.jl")
@testset "codeedges.jl" include("codeedges.jl")
Expand Down
Loading