Skip to content

Commit

Permalink
Move vector_any from Base to Core.
Browse files Browse the repository at this point in the history
This enables calls to kwargs functions, for which the frontend generates a call to vector_any.
  • Loading branch information
maleadt committed Sep 7, 2016
1 parent e3d3b3a commit e84a9f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e84a9f9

Please sign in to comment.