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

[release-0.5] backports for 0.5.0-rc3 #18156

Merged
merged 115 commits into from
Aug 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
4160a8a
Revert "Revert "Make promote_op rely on Core.Inference.return_type""
tkelman Aug 20, 2016
b9d7579
Revert "Revert "Restore type parameter for elementwise ops""
tkelman Aug 20, 2016
19b4222
Reinstate downloading old versions of winrpm gcc dll's
tkelman Aug 16, 2016
4364ded
Only download busybox-w32 when USE_GPL_LIBS is 1
tkelman Aug 5, 2016
65aa0b0
Fix pcre clean target.
ViralBShah Aug 3, 2016
5662306
Build curl to provide proxy support for Pkg.
ViralBShah Aug 3, 2016
9a6f035
Have libgit2 use our curl.
ViralBShah Aug 3, 2016
a36da57
Fix mbedtls clean target to delete all installed files.
ViralBShah Aug 6, 2016
05197a5
Support non-1 indices and fix type problems in DFT (fixes #17896)
timholy Aug 9, 2016
14a5744
Move OffsetArray definition to TestHelpers
timholy Aug 11, 2016
df5286a
Improve inferability of promote_op
pabloferz Aug 9, 2016
6dd9e81
Fix StackOverflowError in zip_iteratorsize
timholy Aug 11, 2016
dcea839
slightly improve error message for unsupported kw arguments
JeffBezanson Aug 11, 2016
721c6b7
improve correctness of fieldtype_tfunc
vtjnash Aug 10, 2016
0c4397d
disable openssl in curl build when build agains mbedtls [fix #17910] …
wildart Aug 12, 2016
a062d65
Move documentation inline for error types declared in base/base.jl. (…
xorJane Aug 12, 2016
5cea456
Remove two cross-references
MichaelHatherly Aug 11, 2016
b68e760
Generalize getindex for AbstractUnitRanges
timholy Aug 11, 2016
e8db994
Silence unneeded output in backtrace test
timholy Aug 13, 2016
6def1e6
stop curl from rebuilding incessantly
vtjnash Aug 13, 2016
6538aad
fix a typo in Base.split (#18008)
bicycle1885 Aug 14, 2016
ede7231
Move env.jl test to separate test file
dhoegh Aug 13, 2016
e1fab83
Fix #17956 and add test. The bug was introduced in 103db50aa6c67d8e73…
dhoegh Aug 13, 2016
39c7c7f
move doc for `withenv`
dhoegh Aug 13, 2016
9d56d57
Formatting: indent the OS specific blocks.
dhoegh Aug 14, 2016
ff6d640
specialize on type in getindex for types
KristofferC Aug 14, 2016
1d3d115
Fix `@threadcall` argument passing.
maleadt Aug 4, 2016
aeb04ae
Fix missing type parameter in _array_for
timholy Aug 13, 2016
5381a43
Remove RNG from exports (#18023)
wookay Aug 15, 2016
a0ead96
A trick to fix continue/break/return handling in for loop testset.
yuyichao Aug 13, 2016
14854d7
preserve functionality of special ^ inliner in linear IR
vtjnash Aug 10, 2016
9a6e884
add model of special case ^ inliner to inference edges
vtjnash Aug 10, 2016
cd44917
fix effect_free computation over getfield
vtjnash Aug 13, 2016
1d566a9
Fix a trivial typo in devdocs
akc Aug 15, 2016
20673d9
Make Colon immutable. Fixes 18034.
tkoolen Aug 15, 2016
bc19ea4
Write up test for #15592
ranjanan Aug 12, 2016
c308b91
Expand docs on enumerate's relationship with indexing
timholy Aug 11, 2016
1c25547
Update modules.rst adding type to show for v0.5 (#18018)
musm Aug 16, 2016
c144c18
added example of array type conversion (#17663)
mzaffalon Aug 16, 2016
0136e4f
Make `find` indices-aware
timholy Aug 15, 2016
18aa36e
Fixes and more tests for indexing with non-1 logical arrays
timholy Aug 15, 2016
109a43f
fix "improved" correctness of fieldtype
vtjnash Aug 16, 2016
c2a20e1
Define find and findnz for SparseVector (#18049)
pranavtbhat Aug 16, 2016
5562759
Fix indent in sparsevector.jl
tkelman Aug 20, 2016
7c3adf7
Document known problem with setrounding.
simonbyrne Aug 16, 2016
27fadb4
Fix for consistency.
musm Aug 16, 2016
1aa1175
Some indices generalizations for linalg/generic (#18032)
timholy Aug 16, 2016
42a3262
fix #18051, allocation in sparse vector getindex
JeffBezanson Aug 16, 2016
bc7f384
Add cygpath_w call so `make -C test/perf` works in cygwin-cross
tkelman Aug 11, 2016
0388e37
fix deprecated syntax "global rng_state::Float64"
tkelman Aug 11, 2016
a3e144e
Fix a row-indexing bug with sparse matrices
tkelman Aug 14, 2016
96ef8f2
add support for split debuginfo files
vtjnash Aug 11, 2016
e5f7f5c
test libccalltest.so with split debug info
vtjnash Aug 15, 2016
9a89ff9
Add missing tests for diagonal and uniformscaling (#17921)
kshyatt Aug 17, 2016
32610e2
assume `getfield` is non-volatile if inferred to be constant
JeffBezanson Aug 16, 2016
caac581
updates to README.md (#18093)
mcprentiss Aug 18, 2016
c776bbc
move recheck_tuple_intersection to thread-local
vtjnash Aug 17, 2016
2cb13f3
ensure in_typeinf_loop is only read by the thread with the typeinf lock
vtjnash Aug 17, 2016
190064f
Add tests for flipdim, unary ops
kshyatt Aug 17, 2016
beeb6c0
Add tests for iteration methods on numbers
kshyatt Aug 17, 2016
25be0c1
Added test for complex on SharedArrays (#18097)
kshyatt Aug 18, 2016
dd604d2
Set LIB_INSTALL_DIR for cmake-based projects (#18047)
staticfloat Aug 18, 2016
e313fc9
Missing tests for strings (#18089)
kshyatt Aug 18, 2016
cb1e04d
Fix compiler warnings on 32bits
yuyichao Aug 18, 2016
ddddd4d
improve FreeBSD / generic posix support
vtjnash Aug 16, 2016
24c98c2
readme formatting
tkelman Aug 18, 2016
edcd7f9
Fix bug with operator precendence
omus Aug 16, 2016
95acc0f
Improve URL regex
omus Aug 16, 2016
a48ce16
Correct invalid SSH URL
omus Aug 16, 2016
e7d3848
Removed SSH test from libgit2-online
omus Aug 17, 2016
f703e65
Update URL parsing tests
omus Aug 17, 2016
5920a47
Fix compilation on llvm 3.9
yuyichao Aug 18, 2016
738f5ca
Build curl with minimal external libraries.
ViralBShah Aug 18, 2016
01c76ea
Improve arch/cpu detection/selection on ARM and AArch64
yuyichao Aug 18, 2016
22a73dd
fix "recommanded" typo
tkelman Aug 18, 2016
962a2cc
Add istriu, istril, issymmetric, and ishermitian methods for UniformS…
andreasnoack Aug 18, 2016
6d0aa14
fix #18085, segfault on method add in loop
JeffBezanson Aug 18, 2016
51aadfe
rational powers (fixes #18114) (#18118)
pwl Aug 19, 2016
ac9627c
More tests for osnames (#18121)
kshyatt Aug 19, 2016
6dfbbfd
Two missing tests for intset (#18128)
kshyatt Aug 19, 2016
a61909d
Make similar faster and safer (#18107)
timholy Aug 19, 2016
fd5bfed
Fix incorrect code block in rounding modes docs (#18137)
MichaelHatherly Aug 19, 2016
ca5c823
make sure .= uses Base.identity, not a local identity (#18122)
stevengj Aug 19, 2016
bd679a3
Missing tests for intfuncs
kshyatt Aug 19, 2016
782cf36
Tests for missing abstract array utils
kshyatt Aug 19, 2016
09f7005
fix #18129, optimize some more cases of captured variables
JeffBezanson Aug 18, 2016
1fb052e
replace branch in bit shift operators, helps #18135
JeffBezanson Aug 19, 2016
3239e25
Try fixing LLVM 3.3 compilation (#18138)
yuyichao Aug 20, 2016
add64d9
Add test for 15913 and 15896 (#17991)
ranjanan Aug 20, 2016
293f63a
Fixes #18141, eliminating null in value when iterating over `ENV`. (#…
twadleigh Aug 20, 2016
e576c87
Make rpath settings a bit more consistent
tkelman Aug 7, 2016
d0a632b
circcopy! needs qualification with Base. for 0.5
tkelman Aug 20, 2016
6da641f
Fix doctests
tkelman Aug 20, 2016
f5ed767
Force inlining on indices(A, d)
timholy Aug 13, 2016
bfa4e62
Clear the IRBuilder's insertion point after emitting a function.
maleadt Aug 16, 2016
fa24dff
Add test for #18054.
maleadt Aug 16, 2016
51d38f5
Expose MEMDEBUG, and use it to fix the #14173 test
maleadt Aug 19, 2016
be350f2
Increase the signal stack size.
maleadt Aug 20, 2016
727daa6
ASAN: provide default options.
maleadt Aug 16, 2016
f3566be
ASAN/MSAN: document use of sanitizers.
maleadt Aug 16, 2016
d8f5ea9
Merge pull request #18169 from JuliaLang/tb/backport-asan
tkelman Aug 21, 2016
9e1dbfd
remove some unnecessary anonymous functions
JeffBezanson Aug 10, 2016
2082241
do not catch everything in isassigned
KristofferC Aug 17, 2016
458c832
fix #10633, remove redundant definitions for `map(Integer, a)` etc.
JeffBezanson Aug 16, 2016
55a5b12
Add test for PR #17803
ranjanan Aug 11, 2016
38bec84
fix more of the #18017 regression
JeffBezanson Aug 18, 2016
285ef3e
Add note about docstrings for aliases (#18157)
MichaelHatherly Aug 21, 2016
a6a7fd2
Use unique identifier to avoid incorrect ditype reuse
yuyichao Aug 19, 2016
69a605b
reshape(::Array, Val{N}) always returns an Array
timholy Aug 20, 2016
fafdc7b
Increase MEMDEBUG allocation threshold for #14173 test
maleadt Aug 21, 2016
d45bcae
Revert "fix #18129, optimize some more cases of captured variables"
tkelman Aug 22, 2016
f06e0f1
fall back to dynamic dispatch in union-splitting optimization
JeffBezanson Aug 16, 2016
2406ed9
Fix fft(::Vector{Complex{Int}})
timholy Aug 22, 2016
fe17200
Revert "Revert "fix #18129, optimize some more cases of captured vari…
tkelman Aug 22, 2016
e5b8332
fix #18173, closure lowering error caused by #18130
JeffBezanson Aug 22, 2016
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
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ before_install:
brew install -v staticfloat/juliadeps/libgfortran;
brew install -v --only-dependencies --HEAD julia;
BUILDOPTS="-j3 USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm37-julia)/bin/llvm-config-3.7.1 LLVM_SIZE=$(brew --prefix llvm37-julia)/bin/llvm-size-3.7.1";
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1 STAGE2_DEPS=utf8proc";
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in LLVM SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND; do
export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1";
Expand Down Expand Up @@ -111,6 +111,10 @@ script:
- export JULIA_CPU_CORES=2 && export JULIA_TEST_MAXRSS_MB=600 && cd /tmp/julia/share/julia/test &&
/tmp/julia/bin/julia --check-bounds=yes runtests.jl $TESTSTORUN &&
/tmp/julia/bin/julia --check-bounds=yes runtests.jl libgit2-online pkg
- cd `dirname $TRAVIS_BUILD_DIR` && mv julia2 julia && rm -rf julia/deps/build/julia-env
- cd `dirname $TRAVIS_BUILD_DIR` && mv julia2 julia &&
rm -rf julia/deps/build/julia-env &&
rm -rf julia/deps/build/libssh2-*/CMakeFiles/Makefile2 &&
rm -rf julia/deps/build/curl-*/config.log &&
rm -rf julia/deps/build/curl-*/libtool
# uncomment the following if failures are suspected to be due to the out-of-memory killer
# - dmesg
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ their own licenses:
- [FFTW](http://fftw.org/doc/License-and-Copyright.html) [GPL2+]
- [GMP](http://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
- [LIBSSH2](https://github.com/libssh2/libssh2/blob/master/COPYING) [BSD-3]
- [MBEDTLS](https://tls.mbed.org/how-to-get) [either GPLv2 or Apache 2.0]
- [MPFR](http://www.mpfr.org/mpfr-current/mpfr.html#Copying) [LGPL3+]
Expand Down
7 changes: 7 additions & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ USE_SYSTEM_LIBUV:=0
USE_SYSTEM_UTF8PROC:=0
USE_SYSTEM_MBEDTLS:=0
USE_SYSTEM_LIBSSH2:=0
USE_SYSTEM_CURL:=0
USE_SYSTEM_LIBGIT2:=0
USE_SYSTEM_PATCHELF:=0

Expand Down Expand Up @@ -339,6 +340,11 @@ endif

STDLIBCPP_FLAG :=

ifeq ($(OS), FreeBSD)
USEGCC := 0
USECLANG := 1
endif

ifeq ($(OS), Darwin)
DARWINVER := $(shell uname -r | cut -b 1-2)
DARWINVER_GTE13 := $(shell expr `uname -r | cut -b 1-2` \>= 13)
Expand Down Expand Up @@ -459,6 +465,7 @@ endif #ARCH
LD := link
endif #USEMSVC
RANLIB := $(CROSS_COMPILE)ranlib
OBJCOPY := $(CROSS_COMPILE)objcopy

# file extensions
ifeq ($(OS), WINNT)
Expand Down
34 changes: 29 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ endif
ifeq ($(USE_SYSTEM_LIBSSH2),0)
JL_PRIVATE_LIBS += ssh2
endif
ifeq ($(USE_SYSTEM_CURL),0)
JL_PRIVATE_LIBS += curl
endif
ifeq ($(USE_SYSTEM_LIBGIT2),0)
JL_PRIVATE_LIBS += git2
endif
Expand Down Expand Up @@ -468,7 +471,11 @@ endif

ifeq ($(OS), WINNT)
[ ! -d $(JULIAHOME)/dist-extras ] || ( cd $(JULIAHOME)/dist-extras && \
cp 7z.exe 7z.dll busybox.exe libexpat-1.dll zlib1.dll $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin )
cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin )
ifeq ($(USE_GPL_LIBS), 1)
[ ! -d $(JULIAHOME)/dist-extras ] || ( cd $(JULIAHOME)/dist-extras && \
cp busybox.exe $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin )
endif
cd $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin && rm -f llvm* llc.exe lli.exe opt.exe LTO.dll bugpoint.exe macho-dump.exe

# create file listing for uninstall. note: must have Windows path separators and line endings.
Expand Down Expand Up @@ -593,7 +600,14 @@ ifneq (,$(filter $(ARCH), i386 i486 i586 i686))
$(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920.exe && \
7z x -y 7z920.exe 7z.exe 7z.dll && \
../contrib/windows/winrpm.sh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.2 \
"mingw32-libgfortran3 mingw32-libquadmath0 mingw32-libstdc++6 mingw32-libgcc_s_sjlj1 mingw32-libssp0 mingw32-libexpat1 mingw32-zlib1" && \
"mingw32-libexpat1 mingw32-zlib1" && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw32-libgfortran3-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw32-libquadmath0-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw32-libstdc++6-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw32-libgcc_s_sjlj1-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw32-libssp0-5.3.0-1.1.noarch.rpm && \
for i in *.rpm; do 7z x -y $$i; done && \
for i in *.cpio; do 7z x -y $$i; done && \
cp usr/i686-w64-mingw32/sys-root/mingw/bin/*.dll .
else ifeq ($(ARCH),x86_64)
cd $(JULIAHOME)/dist-extras && \
Expand All @@ -602,20 +616,30 @@ else ifeq ($(ARCH),x86_64)
mv _7z.dll 7z.dll && \
mv _7z.exe 7z.exe && \
../contrib/windows/winrpm.sh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_13.2 \
"mingw64-libgfortran3 mingw64-libquadmath0 mingw64-libstdc++6 mingw64-libgcc_s_seh1 mingw64-libssp0 mingw64-libexpat1 mingw64-zlib1" && \
"mingw64-libexpat1 mingw64-zlib1" && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw64-libgfortran3-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw64-libquadmath0-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw64-libstdc++6-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw64-libgcc_s_seh1-5.3.0-1.1.noarch.rpm && \
$(JLDOWNLOAD) https://julialang.s3.amazonaws.com/bin/winnt/extras/mingw64-libssp0-5.3.0-1.1.noarch.rpm && \
for i in *.rpm; do 7z x -y $$i; done && \
for i in *.cpio; do 7z x -y $$i; done && \
cp usr/x86_64-w64-mingw32/sys-root/mingw/bin/*.dll .
else
$(error no win-extras target for ARCH=$(ARCH))
endif
cd $(JULIAHOME)/dist-extras && \
$(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920_extra.7z && \
$(JLDOWNLOAD) https://unsis.googlecode.com/files/nsis-2.46.5-Unicode-setup.exe && \
$(JLDOWNLOAD) busybox.exe http://frippery.org/files/busybox/busybox-w32-FRP-483-g31277ab.exe && \
chmod a+x 7z.exe && \
chmod a+x 7z.dll && \
$(call spawn,./7z.exe) x -y -onsis nsis-2.46.5-Unicode-setup.exe && \
chmod a+x ./nsis/makensis.exe && \
chmod a+x ./nsis/makensis.exe
ifeq ($(USE_GPL_LIBS), 1)
cd $(JULIAHOME)/dist-extras && \
$(JLDOWNLOAD) busybox.exe http://frippery.org/files/busybox/busybox-w32-FRP-483-g31277ab.exe && \
chmod a+x busybox.exe
endif

# various statistics about the build that may interest the user
ifeq ($(USE_SYSTEM_LLVM), 1)
Expand Down
7 changes: 6 additions & 1 deletion README.arm.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Julia binaries for ARM

[Nightly builds](https://status.julialang.org/download/linux-arm) are
available for ARM.
available for ARMv7-A.

# Hardware requirements

Julia requires at least `armv6` and `vfpv2` instruction sets. It's recommended
to use at least `armv7-a`. `armv5` or soft float are not supported.

# Building Julia on ARM

Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ developers may find the notes in [CONTRIBUTING](https://github.com/JuliaLang/jul
- **FreeBSD**
- **Windows**

All systems are supported with both x86/64 (64-bit) and x86 (32-bit) architectures. Experimental and early support for [ARM](https://github.com/JuliaLang/julia/blob/master/README.arm.md) is available too.
All systems are supported with both x86/64 (64-bit) and x86 (32-bit) architectures. Experimental and early support for [ARM](https://github.com/JuliaLang/julia/blob/master/README.arm.md), AARCH64, and POWER (little-endian) is available too.

<a name="Source-Download-and-Compilation"/>
## Source Download and Compilation
Expand Down Expand Up @@ -235,12 +235,22 @@ When building Julia, or its dependencies, libraries installed by third party pac

### FreeBSD

On *FreeBSD Release 9.0*, install the `gcc47`, `git`, and `gmake` packages/ports, and compile Julia with the command:
On *FreeBSD Release 11.0*, install the gfortran, git, cmake, and gmake packages/ports (`pkg install gcc6 gmake git cmake`), and compile Julia with the command:

$ gmake FC=gfortran47
$ echo 'FC=gfortran6' >> Make.user
$ gmake

You must use the `gmake` command on FreeBSD instead of `make`.

Note that Julia is community-supported and we have little control over our upstream dependencies, you may still run into issues with dependencies and YMMV. Current known issues include:

- The x86 arch doesn't support threading due to lack of compiler runtime library support (set `JULIA_THREADS=0`).
- libunwind needs a small patch to its tests to compile.
- OpenBLAS patches in pkg haven't been upstreamed.
- gfortran can't link binaries. Set `FFLAGS=-Wl,-rpath,/usr/local/lib/gcc6` to work around this (upstream bug submitted to FreeBSD pkg maintainers).
- System libraries installed by pkg are not on the compiler path by default. You may need to add `LDFLAGS=/usr/local/lib` and `CPPFLAGS=/usr/local/include` to your environment or `Make.user` file to build successfully.


### Windows

In order to build Julia on Windows, see [README.windows](https://github.com/JuliaLang/julia/blob/master/README.windows.md).
Expand All @@ -263,6 +273,7 @@ Building Julia requires that the following software be installed:
- **[patch]** — for modifying source code.
- **[cmake]** — needed to build `libgit2`.
- **[openssl]** — needed for HTTPS support in `libgit2` on Linux, install via `apt-get install libssl-dev` or `yum install openssl-devel`.
- **[pkg-config]** - needed to build libgit2 correctly, especially for proxy support

Julia uses the following external libraries, which are automatically downloaded (or in a few cases, included in the Julia source repository) and then compiled from source the first time you run `make`:

Expand All @@ -283,6 +294,7 @@ Julia uses the following external libraries, which are automatically downloaded
- **[GMP]** (>= 5.0) — GNU multiple precision arithmetic library, needed for `BigInt` support.
- **[MPFR]** (>= 3.0) — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.
- **[libgit2]** (>= 0.23) — Git linkable library, used by Julia's package manager
- **[curl]** (>= 7.50) — libcurl provides download and proxy support for Julia's package manager
- **[libssh2]** (>= 1.7) — library for SSH transport, used by libgit2 for packages with SSH remotes
- **[mbedtls]** (>= 2.2) — library used for cryptography and transport layer security, used by libssh2
- **[utf8proc]** (>= 2.0) — a library for processing UTF-8 encoded Unicode strings
Expand Down Expand Up @@ -325,6 +337,7 @@ For a longer overview of Julia's dependencies, see these [slides](https://github
[openssl]: https://www.openssl.org
[libssh2]: https://www.libssh2.org
[mbedtls]: https://tls.mbed.org/
[pkg-config]: https://www.freedesktop.org/wiki/Software/pkg-config/

<a name="System-Provided-Libraries">
### System Provided Libraries
Expand Down
44 changes: 24 additions & 20 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ typealias RangeIndex Union{Int, Range{Int}, AbstractUnitRange{Int}, Colon}
typealias DimOrInd Union{Integer, AbstractUnitRange}
typealias IntOrInd Union{Int, AbstractUnitRange}
typealias DimsOrInds{N} NTuple{N,DimOrInd}
typealias NeedsShaping Union{Tuple{Integer,Vararg{Integer}}, Tuple{OneTo,Vararg{OneTo}}}

macro _inline_pure_meta()
Expr(:meta, :inline, :pure)
Expand Down Expand Up @@ -51,15 +52,19 @@ size{N}(x, d1::Integer, d2::Integer, dx::Vararg{Integer, N}) = (size(x, d1), siz

Returns the valid range of indices for array `A` along dimension `d`.
"""
indices{T,N}(A::AbstractArray{T,N}, d) = d <= N ? indices(A)[d] : OneTo(1)
function indices{T,N}(A::AbstractArray{T,N}, d)
@_inline_meta
d <= N ? indices(A)[d] : OneTo(1)
end

"""
indices(A)

Returns the tuple of valid indices for array `A`.
"""
function indices(A)
@_inline_meta
map(s->OneTo(s), size(A))
map(OneTo, size(A))
end

# Performance optimization: get rid of a branch on `d` in `indices(A,
Expand Down Expand Up @@ -177,12 +182,15 @@ function _strides{M,T,N}(out::NTuple{M}, A::AbstractArray{T,N})
end

function isassigned(a::AbstractArray, i::Int...)
# TODO
try
a[i...]
true
catch
false
catch e
if isa(e, BoundsError) || isa(e, UndefRefError)
return false
else
rethrow(e)
end
end
end

Expand Down Expand Up @@ -413,14 +421,14 @@ different element type it will create a regular `Array` instead:
2.18425e-314 2.18425e-314 2.18425e-314 2.18425e-314

"""
similar{T}(a::AbstractArray{T}) = similar(a, T)
similar( a::AbstractArray, T::Type) = similar(a, T, to_shape(indices(a)))
similar{T}(a::AbstractArray{T}, dims::Tuple) = similar(a, T, to_shape(dims))
similar{T}(a::AbstractArray{T}, dims::DimOrInd...) = similar(a, T, to_shape(dims))
similar( a::AbstractArray, T::Type, dims::DimOrInd...) = similar(a, T, to_shape(dims))
similar( a::AbstractArray, T::Type, dims) = similar(a, T, to_shape(dims))
similar{T}(a::AbstractArray{T}) = similar(a, T)
similar{T}(a::AbstractArray, ::Type{T}) = similar(a, T, to_shape(indices(a)))
similar{T}(a::AbstractArray{T}, dims::Tuple) = similar(a, T, to_shape(dims))
similar{T}(a::AbstractArray{T}, dims::DimOrInd...) = similar(a, T, to_shape(dims))
similar{T}(a::AbstractArray, ::Type{T}, dims::DimOrInd...) = similar(a, T, to_shape(dims))
similar{T}(a::AbstractArray, ::Type{T}, dims::NeedsShaping) = similar(a, T, to_shape(dims))
# similar creates an Array by default
similar{N}(a::AbstractArray, T::Type, dims::Dims{N}) = Array{T,N}(dims)
similar{T,N}(a::AbstractArray, ::Type{T}, dims::Dims{N}) = Array{T,N}(dims)

to_shape(::Tuple{}) = ()
to_shape(dims::Dims) = dims
Expand Down Expand Up @@ -709,10 +717,6 @@ of_indices(x, y) = similar(dims->y, oftype(indices(x), indices(y)))

full(x::AbstractArray) = x

map(::Type{Integer}, a::Array) = map!(Integer, similar(a,typeof(Integer(one(eltype(a))))), a)
map(::Type{Signed}, a::Array) = map!(Signed, similar(a,typeof(Signed(one(eltype(a))))), a)
map(::Type{Unsigned}, a::Array) = map!(Unsigned, similar(a,typeof(Unsigned(one(eltype(a))))), a)

## range conversions ##

map{T<:Real}(::Type{T}, r::StepRange) = T(r.start):T(r.step):T(last(r))
Expand Down Expand Up @@ -1653,12 +1657,12 @@ end

# These are needed because map(eltype, As) is not inferrable
promote_eltype_op(::Any) = (@_pure_meta; Bottom)
promote_eltype_op(op, A) = (@_pure_meta; promote_op(op, eltype(A)))
promote_eltype_op{T}(op, ::AbstractArray{T}) = (@_pure_meta; promote_op(op, T))
promote_eltype_op{T}(op, ::T ) = (@_pure_meta; promote_op(op, T))
promote_eltype_op{T}(op, ::AbstractArray{T}, A) = (@_pure_meta; promote_op(op, T, eltype(A)))
promote_eltype_op{T}(op, A, ::AbstractArray{T}) = (@_pure_meta; promote_op(op, eltype(A), T))
promote_eltype_op{R,S}(op, ::AbstractArray{R}, ::AbstractArray{S}) = (@_pure_meta; promote_op(op, R, S))
promote_eltype_op{R,S}(op, ::AbstractArray{R}, ::S) = (@_pure_meta; promote_op(op, R, S))
promote_eltype_op{R,S}(op, ::R, ::AbstractArray{S}) = (@_pure_meta; promote_op(op, R, S))
promote_eltype_op(op, A, B, C, D...) = (@_pure_meta; promote_op(op, eltype(A), promote_eltype_op(op, B, C, D...)))
promote_eltype_op(op, A, B, C, D...) = (@_pure_meta; promote_eltype_op(op, promote_eltype_op(op, A, B), C, D...))

## 1 argument
map!{F}(f::F, A::AbstractArray) = map!(f, A, A)
Expand Down
22 changes: 13 additions & 9 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,18 @@ similar{N}(a::Array, T::Type, dims::Dims{N}) = Array{T,N}(dims)
similar{T,N}(a::Array{T}, dims::Dims{N}) = Array{T,N}(dims)

# T[x...] constructs Array{T,1}
function getindex(T::Type, vals...)
function getindex{T}(::Type{T}, vals...)
a = Array{T,1}(length(vals))
@inbounds for i = 1:length(vals)
a[i] = vals[i]
end
return a
end

getindex(T::Type) = Array{T,1}(0)
getindex(T::Type, x) = (a = Array{T,1}(1); @inbounds a[1] = x; a)
getindex(T::Type, x, y) = (a = Array{T,1}(2); @inbounds (a[1] = x; a[2] = y); a)
getindex(T::Type, x, y, z) = (a = Array{T,1}(3); @inbounds (a[1] = x; a[2] = y; a[3] = z); a)
getindex{T}(::Type{T}) = (@_inline_meta; Array{T,1}(0))
getindex{T}(::Type{T}, x) = (@_inline_meta; a = Array{T,1}(1); @inbounds a[1] = x; a)
getindex{T}(::Type{T}, x, y) = (@_inline_meta; a = Array{T,1}(2); @inbounds (a[1] = x; a[2] = y); a)
getindex{T}(::Type{T}, x, y, z) = (@_inline_meta; a = Array{T,1}(3); @inbounds (a[1] = x; a[2] = y; a[3] = z); a)

function getindex(::Type{Any}, vals::ANY...)
a = Array{Any,1}(length(vals))
Expand Down Expand Up @@ -288,8 +288,8 @@ else
_default_eltype(itr::ANY) = Any
end

_array_for(T, itr, ::HasLength) = Array{T,1}(Int(length(itr)::Integer))
_array_for(T, itr, ::HasShape) = similar(Array{T}, indices(itr))
_array_for{T}(::Type{T}, itr, ::HasLength) = Array{T,1}(Int(length(itr)::Integer))
_array_for{T}(::Type{T}, itr, ::HasShape) = similar(Array{T}, indices(itr))

function collect(itr::Generator)
isz = iteratorsize(itr.iter)
Expand Down Expand Up @@ -1077,15 +1077,18 @@ function find(testf::Function, A)
# use a dynamic-length array to store the indexes, then copy to a non-padded
# array for the return
tmpI = Array{Int,1}(0)
inds = _index_remapper(A)
for (i,a) = enumerate(A)
if testf(a)
push!(tmpI, i)
push!(tmpI, inds[i])
end
end
I = Array{Int,1}(length(tmpI))
copy!(I, tmpI)
return I
end
_index_remapper(A::AbstractArray) = linearindices(A)
_index_remapper(iter) = Colon() # safe for objects that don't implement length

"""
find(A)
Expand All @@ -1110,9 +1113,10 @@ function find(A)
nnzA = countnz(A)
I = Vector{Int}(nnzA)
count = 1
inds = _index_remapper(A)
for (i,a) in enumerate(A)
if a != 0
I[count] = i
I[count] = inds[i]
count += 1
end
end
Expand Down
Loading