Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove iterator.jl from coreimg #18934

Merged
merged 1 commit into from
Oct 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove iterator.jl from coreimg
After very minor changes it's no longer used.
JeffBezanson committed Oct 14, 2016

Verified

This commit was signed with the committer’s verified signature. The key has expired.
HighCrit HighCrit
commit b43819122dfb08b74253a2b347f30ca4886ba3a0
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -198,7 +198,6 @@ CORE_SRCS := $(addprefix $(JULIAHOME)/, \
base/inference.jl \
base/int.jl \
base/intset.jl \
base/iterator.jl \
base/nofloat_hashing.jl \
base/number.jl \
base/operators.jl \
1 change: 0 additions & 1 deletion base/coreimg.jl
Original file line number Diff line number Diff line change
@@ -59,7 +59,6 @@ include("reduce.jl")
## core structures
include("intset.jl")
include("associative.jl")
include("iterator.jl")

# core docsystem
include("docs/core.jl")
8 changes: 8 additions & 0 deletions base/essentials.jl
Original file line number Diff line number Diff line change
@@ -63,6 +63,12 @@ function tuple_type_tail(T::DataType)
return Tuple{argtail(T.parameters...)...}
end

tuple_type_cons{S}(::Type{S}, ::Type{Union{}}) = Union{}
function tuple_type_cons{S,T<:Tuple}(::Type{S}, ::Type{T})
@_pure_meta
Tuple{S, T.parameters...}
end

isvarargtype(t::ANY) = isa(t, DataType) && is((t::DataType).name, Vararg.name)
isvatuple(t::DataType) = (n = length(t.parameters); n > 0 && isvarargtype(t.parameters[n]))
unwrapva(t::ANY) = isvarargtype(t) ? t.parameters[1] : t
@@ -231,3 +237,5 @@ function vector_any(xs::ANY...)
end
a
end

isempty(itr) = done(itr, start(itr))
5 changes: 3 additions & 2 deletions base/inference.jl
Original file line number Diff line number Diff line change
@@ -1019,7 +1019,8 @@ function abstract_apply(af::ANY, fargs, aargtypes::Vector{Any}, vtypes::VarTable
end

function pure_eval_call(f::ANY, argtypes::ANY, atype::ANY, vtypes::VarTable, sv::InferenceState)
for a in drop(argtypes,1)
for i = 2:length(argtypes)
a = argtypes[i]
if !(isa(a,Const) || isconstType(a,false))
return false
end
@@ -1055,7 +1056,7 @@ function pure_eval_call(f::ANY, argtypes::ANY, atype::ANY, vtypes::VarTable, sv:
return false
end

args = Any[ isa(a,Const) ? a.val : a.parameters[1] for a in drop(argtypes,1) ]
args = Any[ (a=argtypes[i]; isa(a,Const) ? a.val : a.parameters[1]) for i in 2:length(argtypes) ]
try
return abstract_eval_constant(f(args...))
catch
7 changes: 0 additions & 7 deletions base/iterator.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license

isempty(itr) = done(itr, start(itr))

_min_length(a, b, ::IsInfinite, ::IsInfinite) = min(length(a),length(b)) # inherit behaviour, error
_min_length(a, b, A, ::IsInfinite) = length(a)
_min_length(a, b, ::IsInfinite, B) = length(b)
@@ -143,11 +141,6 @@ zip(a, b, c...) = Zip(a, zip(b, c...))
length(z::Zip) = _min_length(z.a, z.z, iteratorsize(z.a), iteratorsize(z.z))
size(z::Zip) = promote_shape(size(z.a), size(z.z))
indices(z::Zip) = promote_shape(indices(z.a), indices(z.z))
tuple_type_cons{S}(::Type{S}, ::Type{Union{}}) = Union{}
function tuple_type_cons{S,T<:Tuple}(::Type{S}, ::Type{T})
@_pure_meta
Tuple{S, T.parameters...}
end
eltype{I,Z}(::Type{Zip{I,Z}}) = tuple_type_cons(eltype(I), eltype(Z))
@inline start(z::Zip) = tuple(start(z.a), start(z.z))
@inline function next(z::Zip, st)