Skip to content

Commit 9e740ce

Browse files
committed
Avoid dynamic dispatch on most intrinsics
1 parent 7deef44 commit 9e740ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generate_builtins.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
212212
""")
213213
end
214214
# Now handle calls with bounded numbers of args
215-
fcall = generate_fcall_nargs("f", minmin, maxmax)
216215
print(io,
217216
"""
218217
if isa(f, Core.IntrinsicFunction)
219-
$fcall
218+
cargs = getargs(args, frame)
219+
return Some{Any}(ccall(:jl_f_intrinsic_call, Any, (Any, Ptr{Any}, UInt32), f, cargs, length(cargs)))
220220
""")
221221
print(io,
222222
"""

0 commit comments

Comments
 (0)