Skip to content

Commit 3b0d895

Browse files
authored
Merge pull request #432 from rdeits/isbitstype
isbits -> isbitstype
2 parents 17913ba + 3671812 commit 3b0d895

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
julia 0.6.0
2-
Compat 0.59
2+
Compat 0.66

src/MArray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ end
9797
end
9898

9999
T = eltype(v)
100-
if isbits(T)
100+
if isbitstype(T)
101101
unsafe_store!(Base.unsafe_convert(Ptr{T}, pointer_from_objref(v)), convert(T, val), i)
102102
else
103103
# This one is unsafe (#27)
104104
# unsafe_store!(Base.unsafe_convert(Ptr{Ptr{Nothing}}, pointer_from_objref(v.data)), pointer_from_objref(val), i)
105-
error("setindex!() with non-isbits eltype is not supported by StaticArrays. Consider using SizedArray.")
105+
error("setindex!() with non-isbitstype eltype is not supported by StaticArrays. Consider using SizedArray.")
106106
end
107107

108108
return val

src/MMatrix.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ end
7373
#end
7474

7575
# This is nasty... but it turns out Julia will literally copy the whole tuple to the stack otherwise!
76-
if isbits(T)
76+
if isbitstype(T)
7777
unsafe_load(Base.unsafe_convert(Ptr{T}, pointer_from_objref(m)), i)
7878
else
7979
# Not sure about this... slow option for now...
@@ -88,12 +88,12 @@ end
8888
# throw(BoundsError(m,i))
8989
#end
9090

91-
if isbits(T)
91+
if isbitstype(T)
9292
unsafe_store!(Base.unsafe_convert(Ptr{T}, pointer_from_objref(m)), val, i)
9393
else # TODO check that this isn't crazy. Also, check it doesn't cause problems with GC...
9494
# This one is unsafe (#27)
9595
# unsafe_store!(Base.unsafe_convert(Ptr{Ptr{Nothing}}, pointer_from_objref(m.data)), pointer_from_objref(val), i)
96-
error("setindex!() with non-isbits eltype is not supported by StaticArrays. Consider using SizedArray.")
96+
error("setindex!() with non-isbitstype eltype is not supported by StaticArrays. Consider using SizedArray.")
9797
end
9898

9999
return val

src/MVector.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ end
4242
throw(BoundsError())
4343
end
4444

45-
if isbits(T)
45+
if isbitstype(T)
4646
unsafe_store!(Base.unsafe_convert(Ptr{T}, pointer_from_objref(v)), val, i)
4747
else
4848
# This one is unsafe (#27)
4949
#unsafe_store!(Base.unsafe_convert(Ptr{Ptr{Nothing}}, pointer_from_objref(v.data)), pointer_from_objref(val), i)
50-
error("setindex!() with non-isbits eltype is not supported by StaticArrays. Consider using SizedArray.")
50+
error("setindex!() with non-isbitstype eltype is not supported by StaticArrays. Consider using SizedArray.")
5151
end
5252

5353
return val

src/matrix_multiply.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ end
201201

202202
S = Size(sa[1], sb[2])
203203

204-
# Do a custom b[:, k2] to return a SVector (an isbits type) rather than (possibly) a mutable type. Avoids allocation == faster
204+
# Do a custom b[:, k2] to return a SVector (an isbitstype type) rather than (possibly) a mutable type. Avoids allocation == faster
205205
tmp_type_in = :(SVector{$(sb[1]), T})
206206
tmp_type_out = :(SVector{$(sa[1]), T})
207207
vect_exprs = [:($(Symbol("tmp_$k2"))::$tmp_type_out = partly_unrolled_multiply(Size(a), Size($(sb[1])), a,
@@ -403,7 +403,7 @@ end
403403

404404
#vect_exprs = [:($(Symbol("tmp_$k2")) = partly_unrolled_multiply(A, B[:, $k2])) for k2 = 1:sB[2]]
405405

406-
# Do a custom b[:, k2] to return a SVector (an isbits type) rather than a mutable type. Avoids allocation == faster
406+
# Do a custom b[:, k2] to return a SVector (an isbitstype type) rather than a mutable type. Avoids allocation == faster
407407
tmp_type = SVector{sb[1], eltype(c)}
408408
vect_exprs = [:($(Symbol("tmp_$k2")) = partly_unrolled_multiply($(Size(sa)), $(Size(sb[1])), a, $(Expr(:call, tmp_type, [Expr(:ref, :b, LinearIndices(sb)[i, k2]) for i = 1:sb[1]]...)))) for k2 = 1:sb[2]]
409409

test/arraymath.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import StaticArrays.arithmetic_closure
8585
@test (t*t) isa T
8686
@test (t/t) isa T
8787

88-
if isbits(T0)
88+
if isbitstype(T0)
8989
@test @allocated(arithmetic_closure(T0)) == 0
9090
end
9191
end

0 commit comments

Comments
 (0)