Skip to content

Commit

Permalink
Use Base.IdSet
Browse files Browse the repository at this point in the history
GitHub tells me this has been available since at least 0.7.
  • Loading branch information
ToucheSir committed Mar 13, 2022
1 parent 843a52d commit 403c3ae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 26 deletions.
1 change: 0 additions & 1 deletion src/Zygote.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export rrule_via_ad

const Numeric{T<:Number} = Union{T, AbstractArray{<:T}}

include("tools/idset.jl")
include("tools/buffer.jl")
include("tools/builtins.jl")

Expand Down
4 changes: 2 additions & 2 deletions src/compiler/interface.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using InteractiveUtils
using InteractiveUtils: typesof
using Core: Typeof
import Base: copy!
import Base: copy!, IdSet
import Base.Broadcast: broadcasted, materialize!

mutable struct Context <: AContext
Expand Down Expand Up @@ -144,7 +144,7 @@ struct Params
end

Params() = Params(Buffer([], false), IdSet())
Params(xs) = Params(Buffer(xs, false), IdSet(xs))
Params(xs) = Params(Buffer(xs, false), IdSet{Any}(xs))
Params(ps::Params) = ps
Params(xs::Tuple) = Params(collect(xs))

Expand Down
4 changes: 2 additions & 2 deletions src/profiler/Profile.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Profile

using Requires
using ..Zygote: Pullback, IdSet, meta, stacklines
using ..Zygote: Pullback, meta, stacklines

function loc(f)
# TODO perhaps find most general method
Expand Down Expand Up @@ -36,7 +36,7 @@ function mem(x, seen)
sum(x -> mem(x, seen), fields(x))
end

mem(x) = mem(x, IdSet())
mem(x) = mem(x, Base.IdSet())

struct Node
func::Symbol
Expand Down
21 changes: 0 additions & 21 deletions src/tools/idset.jl

This file was deleted.

0 comments on commit 403c3ae

Please sign in to comment.