@@ -52,38 +52,35 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
52
52
return Some {Any} (=== (getargs (args, frame)... ))
53
53
end
54
54
elseif f === Core. _apply
55
- argswrapped = getargs (args, frame)
55
+ args = getargs (args, frame)
56
56
if ! expand
57
- return Some {Any} (Core. _apply (argswrapped ... ))
57
+ return Some {Any} (Core. _apply (args ... ))
58
58
end
59
- new_expr = Expr (:call , argswrapped[1 ])
60
- popfirst! (argswrapped)
61
- argsflat = append_any (argswrapped... )
62
- for x in argsflat
59
+ new_expr = Expr (:call , args[1 ])
60
+ popfirst! (args)
61
+ for x in args
63
62
push! (new_expr. args, (isa (x, Symbol) || isa (x, Expr) || isa (x, QuoteNode)) ? QuoteNode (x) : x)
64
63
end
65
64
return new_expr
66
65
elseif @static isdefined (Core, :_call_latest ) ? f === Core. _call_latest : false
67
- argswrapped = getargs (args, frame)
66
+ args = getargs (args, frame)
68
67
if ! expand
69
- return Some {Any} (Core. _call_latest (argswrapped ... ))
68
+ return Some {Any} (Core. _call_latest (args ... ))
70
69
end
71
- new_expr = Expr (:call , argswrapped[1 ])
72
- popfirst! (argswrapped)
73
- argsflat = append_any (argswrapped)
74
- for x in argsflat
70
+ new_expr = Expr (:call , args[1 ])
71
+ popfirst! (args)
72
+ for x in args
75
73
push! (new_expr. args, (isa (x, Symbol) || isa (x, Expr) || isa (x, QuoteNode)) ? QuoteNode (x) : x)
76
74
end
77
75
return new_expr
78
76
elseif @static isdefined (Core, :_apply_latest ) ? f === Core. _apply_latest : false
79
- argswrapped = getargs (args, frame)
77
+ args = getargs (args, frame)
80
78
if ! expand
81
- return Some {Any} (Core. _apply_latest (argswrapped ... ))
79
+ return Some {Any} (Core. _apply_latest (args ... ))
82
80
end
83
- new_expr = Expr (:call , argswrapped[1 ])
84
- popfirst! (argswrapped)
85
- argsflat = append_any (argswrapped... )
86
- for x in argsflat
81
+ new_expr = Expr (:call , args[1 ])
82
+ popfirst! (args)
83
+ for x in args
87
84
push! (new_expr. args, (isa (x, Symbol) || isa (x, Expr) || isa (x, QuoteNode)) ? QuoteNode (x) : x)
88
85
end
89
86
return new_expr
0 commit comments