Skip to content

Commit

Permalink
Don't recurse into Base.Threads. Fixes #74
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Feb 26, 2019
1 parent 8947d80 commit 46557ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/JuliaInterpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ function prepare_call(@nospecialize(f), allargs; enter_generated = false)
args = allargs
sig = method.sig
isa(method, TypeMapEntry) && (method = method.func)
if method.module == Core.Compiler || method compiled_methods
if method.module == Core.Compiler || method.module == Base.Threads || method compiled_methods
return Compiled()
end
# Get static parameters
Expand Down
7 changes: 7 additions & 0 deletions test/interpret.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,10 @@ function add1234(x::Tuple{Int32,Int32,Int32,Int32})
x)
end
@test @interpret(add1234(map(Int32,(2,3,4,5)))) === map(Int32,(3,5,7,9))

# issue #74
let A = [1]
wkd = WeakKeyDict()
@interpret setindex!(wkd, 2, A)
@test wkd[A] == 2
end

0 comments on commit 46557ee

Please sign in to comment.