Skip to content

Commit 85276e2

Browse files
committed
move shuffle back to toplevel
1 parent dd3c53a commit 85276e2

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/MacroTools.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ const animals_file = joinpath(@__DIR__, "..", "animals.txt")
2222
_animals = split(read(animals_file, String))
2323
resize!(animals, length(_animals))
2424
animals .= Symbol.(lowercase.(_animals))
25-
25+
Random.shuffle!(animals)
2626

2727
end # module

src/utils.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ function gensym_ids(ex)
190190
end
191191
end
192192

193-
const l = ReentrantLock()
194-
const shuffled = Ref{Bool}(false)
195-
196193
"""
197194
alias_gensyms(expr)
198195
@@ -208,12 +205,6 @@ julia> MacroTools.alias_gensyms(:(\$x+\$y))
208205
```
209206
"""
210207
function alias_gensyms(ex)
211-
lock(l) do
212-
if !shuffled[]
213-
Random.shuffle!(animals)
214-
shuffled[] = true
215-
end
216-
end
217208
left = copy(animals)
218209
syms = Dict{Symbol, Symbol}()
219210
prewalk(ex) do x

0 commit comments

Comments
 (0)