From ead9eabe92b6c17c0f1e06e973076924fa6817be Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 14 Mar 2018 09:38:25 +0100 Subject: [PATCH] prevent fill! from inlining (#26418) --- base/array.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/array.jl b/base/array.jl index a88289af9c71b..53cb97ed7fe17 100644 --- a/base/array.jl +++ b/base/array.jl @@ -217,6 +217,7 @@ copyto!(dest::Array{T}, src::Array{T}) where {T} = copyto!(dest, 1, src, 1, leng # N.B: The generic definition in multidimensional.jl covers, this, this is just here # for bootstrapping purposes. function fill!(dest::Array{T}, x) where T + @_noinline_meta xT = convert(T, x) for i in 1:length(dest) @inbounds dest[i] = xT @@ -318,6 +319,7 @@ function fill!(a::Union{Array{UInt8}, Array{Int8}}, x::Integer) end function fill!(a::Array{T}, x) where T<:Union{Integer,AbstractFloat} + @_noinline_meta xT = convert(T, x) for i in eachindex(a) @inbounds a[i] = xT