From e84a9f9a46b38b8e41c3e330a81e196367b4bd58 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 7 Sep 2016 15:05:02 -0400 Subject: [PATCH] Move vector_any from Base to Core. This enables calls to kwargs functions, for which the frontend generates a call to vector_any. --- base/base.jl | 10 ---------- base/essentials.jl | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/base/base.jl b/base/base.jl index 9fa8d77cb4a150..65ea7d517bb8da 100644 --- a/base/base.jl +++ b/base/base.jl @@ -145,16 +145,6 @@ finalize(o::ANY) = ccall(:jl_finalize_th, Void, (Ptr{Void}, Any,), gc(full::Bool=true) = ccall(:jl_gc_collect, Void, (Cint,), full) gc_enable(on::Bool) = ccall(:jl_gc_enable, Cint, (Cint,), on)!=0 -# used by interpolating quote and some other things in the front end -function vector_any(xs::ANY...) - n = length(xs) - a = Array{Any}(n) - @inbounds for i = 1:n - arrayset(a,xs[i],i) - end - a -end - immutable Nullable{T} isnull::Bool value::T diff --git a/base/essentials.jl b/base/essentials.jl index 75fa67251fa565..0363f7a525d1cd 100644 --- a/base/essentials.jl +++ b/base/essentials.jl @@ -217,3 +217,13 @@ const (:) = Colon() # For passing constants through type inference immutable Val{T} end + +# used by interpolating quote and some other things in the front end +function vector_any(xs::ANY...) + n = length(xs) + a = Array{Any}(n) + @inbounds for i = 1:n + Core.arrayset(a,xs[i],i) + end + a +end