Skip to content

Commit

Permalink
Make SubArrays immutable
Browse files Browse the repository at this point in the history
Since #8867 this actually makes a difference in the optimizations LLVM
is able to perform.
  • Loading branch information
simonster committed Dec 12, 2014
1 parent bed2b43 commit 22881f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/subarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ typealias RangeIndex Union(Int, Range{Int}, UnitRange{Int}, Colon)
# LD is the last dimension up through which this object has efficient
# linear indexing. If LD==N, then the object itself has efficient
# linear indexing.
type SubArray{T,N,P<:AbstractArray,I<:(ViewIndex...),LD} <: AbstractArray{T,N}
immutable SubArray{T,N,P<:AbstractArray,I<:(ViewIndex...),LD} <: AbstractArray{T,N}
parent::P
indexes::I
dims::NTuple{N,Int}
Expand Down

0 comments on commit 22881f1

Please sign in to comment.