Skip to content

Commit f649e4f

Browse files
authored
prevent expensive compilation of map (#226)
1 parent c1b99a1 commit f649e4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/generate_builtins.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
140140
return Some{Any}($fstr(argswrapped...))
141141
end
142142
argsflat = Base.append_any((argswrapped[1],), argswrapped[2:end]...)
143-
new_expr = Expr(:call, map(x->isa(x, Symbol) || isa(x, Expr) || isa(x, QuoteNode) ? QuoteNode(x) : x, argsflat)...)
143+
new_expr = Expr(:call)
144+
for x in argsflat
145+
push!(new_expr.args, (isa(x, Symbol) || isa(x, Expr) || isa(x, QuoteNode)) ? QuoteNode(x) : x)
146+
end
144147
return new_expr
145148
""")
146149
continue

0 commit comments

Comments
 (0)