Skip to content

Commit fdb7415

Browse files
bors[bot]vchuravy
andauthored
Merge #247
247: nix overdub of _unsafe_getindex r=vchuravy a=vchuravy bors r+ (cherry picked from commit 0c23a67) Co-authored-by: Valentin Churavy <v.churavy@gmail.com>
2 parents 51a59dc + 2e9f69e commit fdb7415

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/compiler.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,5 @@ function generate_overdubs(mod, Ctx)
8989
return k - Base.exponent_bias(T)
9090
end
9191
end
92-
93-
if VERSION >= v"1.6"
94-
@inline function Cassette.overdub(::$Ctx, ::typeof(Base._unsafe_getindex),
95-
::IndexStyle, A::AbstractArray, I::Vararg{Union{Real, AbstractArray}, N}) where N
96-
shape = index_shape(I...)
97-
dest = similar(A, shape)
98-
map(unsafe_length, axes(dest)) == map(unsafe_length, shape) || throw(DimensionMismatch("output array is the wrong size"))
99-
_unsafe_getindex!(dest, A, I...)
100-
return dest
101-
end
102-
end
10392
end
10493
end

0 commit comments

Comments
 (0)