Skip to content

Commit

Permalink
Merge pull request #83 from omlins/inc-compil
Browse files Browse the repository at this point in the history
Make hide communication compatible with incremental compilation
  • Loading branch information
omlins committed Mar 16, 2023
2 parents 598a6bb + cd2d3d0 commit 092a052
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ParallelKernel/shared.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ is_call(arg) = ( isa(arg, Expr) && (arg.head == :call) )
is_block(arg) = ( isa(arg, Expr) && (arg.head == :block) )
is_parallel_call(x) = isexpr(x, :macrocall) && (x.args[1] == Symbol("@parallel") || x.args[1] == :(@parallel))

macro get_args(args...) return args end
extract_args(call::Expr, macroname::Symbol) = eval(substitute(deepcopy(call), macroname, Symbol("@get_args")))
function extract_args(call::Expr, macroname::Symbol)
if (call.head != :macrocall) @ModuleInternalError("argument is not a macro call.") end
if (call.args[1] != macroname) @ModuleInternalError("unexpected macro name.") end
return (call.args[3:end]...,)
end

extract_kernelcall_args(call::Expr) = split_args(call.args[2:end]; in_kernelcall=true)

Expand Down

0 comments on commit 092a052

Please sign in to comment.