Skip to content

Commit ce1d735

Browse files
committed
Merge branch 'master' into teh/ntuple
2 parents 7cd9db7 + 8ef420c commit ce1d735

File tree

189 files changed

+5065
-3281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+5065
-3281
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ before_install:
3939
brew tap staticfloat/julia;
4040
brew rm --force $(brew deps --HEAD julia);
4141
brew update;
42-
sed -i '' -e "s@https://downloads.sf.net/project/machomebrew/Bottles@https://cache.e.ip.saba.us/https://downloads.sf.net/project/machomebrew/Bottles@" /usr/local/Library/Homebrew/software_spec.rb;
43-
sed -i '' -e "s@https://homebrew.bintray.com@https://cache.e.ip.saba.us/https://homebrew.bintray.com@" /usr/local/Library/Homebrew/software_spec.rb;
4442
brew install -v --only-dependencies --HEAD julia;
4543
BUILDOPTS="USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm33-julia)/bin/llvm-config-3.3 VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include";
4644
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";

DISTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ pregenerate the `base/version_git.jl` file with:
2929
Julia has lots of build dependencies where we use patched versions that has not
3030
yet been included by the popular package managers. These dependencies will usually
3131
be automatically downloaded when you build, but if you want to be able to build
32-
Julia on a computer without internet access you should create a source-dist archive
33-
with the special make target
32+
Julia on a computer without internet access you should create a full-source-dist
33+
archive with the special make target
3434

35-
make source-dist
35+
make full-source-dist
3636

3737
that creates a julia-version-commit.tar.gz archive with all required dependencies.
3838

@@ -66,9 +66,9 @@ The full list of CPU targets supported by LLVM can be obtained by running
6666
Linux
6767
-----
6868

69-
On Linux, `make dist` creates a tarball that contains a fully functional Julia
70-
installation. If you wish to create a distribution package such as a
71-
`.deb`, or `.rpm`, some extra effort is needed. See the
69+
On Linux, `make binary-dist` creates a tarball that contains a fully
70+
functional Julia installation. If you wish to create a distribution
71+
package such as a `.deb`, or `.rpm`, some extra effort is needed. See the
7272
[julia-debian](http://github.com/staticfloat/julia-debian) repository
7373
for an example of what metadata is needed for creating `.deb` packages
7474
for Debian and Ubuntu-based systems. See the
@@ -118,7 +118,7 @@ is to cross-compile from a Linux distribution such as Ubuntu. In-depth
118118
compilation instructions [are
119119
available](https://github.com/JuliaLang/julia/blob/master/README.windows.md).
120120
However the important steps for redistribution are to ensure to `make
121-
win-extras` in between `make` and `make dist`. After that process is
121+
win-extras` in between `make` and `make binary-dist`. After that process is
122122
completed, the `.zip` file created in the head Julia directory will
123123
hold a completely self-contained Julia.
124124

Make.inc

+21-25
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ private_libdir = $(prefix)/lib/$(MULTIARCH)/julia
140140
libdir = $(prefix)/lib/$(MULTIARCH)/
141141
endif
142142

143-
144143
# LLVM Options
145144
LLVMROOT = $(build_prefix)
146145
LLVM_ASSERTIONS = 0
@@ -252,7 +251,6 @@ STDLIBCPP_FLAG =
252251
ifeq ($(OS), Darwin)
253252
DARWINVER := $(shell uname -r | cut -b 1-2)
254253
DARWINVER_GTE13 := $(shell expr `uname -r | cut -b 1-2` \>= 13)
255-
OSXVER := $(shell sw_vers -productVersion | cut -b 1-4)
256254
ifeq ($(DARWINVER), 10) # Snow Leopard specific configuration
257255
USEGCC = 1
258256
USECLANG = 0
@@ -381,26 +379,6 @@ else
381379
build_shlibdir = $(build_libdir)
382380
endif
383381

384-
# If we are running on ARM, set certain options automatically
385-
ifneq (,$(findstring arm,$(ARCH)))
386-
LLVM_ASSERTIONS=1
387-
LLVM_FLAGS+="--with-cpu=cortex-a9 --with-float=hard --with-abi=aapcs-vfp --enable-assertions"
388-
389-
OPENBLAS_DYNAMIC_ARCH=0
390-
OPENBLAS_TARGET_ARCH=ARMV7
391-
USE_BLAS64=0
392-
393-
LLVM_VER=3.6.0
394-
395-
USE_SYSTEM_LIBM=1
396-
USE_SYSTEM_FFTW=1
397-
USE_SYSTEM_GMP=1
398-
USE_SYSTEM_MPFR=1
399-
400-
JCFLAGS += -fsigned-char
401-
endif
402-
403-
404382
ifeq (exists, $(shell [ -e $(JULIAHOME)/Make.user ] && echo exists ))
405383
include $(JULIAHOME)/Make.user
406384
endif
@@ -436,7 +414,6 @@ endif
436414
# if MARCH is set newer than the native processor, be forewarned that the compile might fail
437415
# JULIA_CPU_TARGET is the JIT-only complement to MARCH. Setting it explicitly is not generally necessary,
438416
# since it is set equal to MARCH by default
439-
440417
BUILD_MACHINE := $(shell $(HOSTCC) -dumpmachine)
441418
ifeq ($(ARCH),)
442419
override ARCH := $(shell $(CC) -dumpmachine | sed "s/\([^-]*\).*$$/\1/")
@@ -489,7 +466,6 @@ endif
489466
endif
490467

491468
JULIA_CPU_TARGET ?= native
492-
JCPPFLAGS += -DJULIA_TARGET_ARCH=$(JULIA_CPU_TARGET)
493469

494470
# We map amd64 to x86_64 for compatibility with systems that identify 64-bit systems as such
495471
ifeq ($(ARCH),amd64)
@@ -524,6 +500,18 @@ else
524500
$(error "unknown word-size for arch: $(ARCH)")
525501
endif
526502

503+
# If we are running on ARM, set certain options automatically
504+
ifneq (,$(findstring arm,$(ARCH)))
505+
JCFLAGS += -fsigned-char
506+
507+
LLVM_ASSERTIONS=1
508+
#LLVM_FLAGS+="--with-float=hard --with-abi=aapcs-vfp"
509+
LLVM_VER=3.6.1
510+
511+
USE_BLAS64=0
512+
OPENBLAS_DYNAMIC_ARCH=0
513+
endif
514+
527515
# Set some ARCH-specific flags
528516
ifneq ($(USEICC),1)
529517
ifeq ($(ISX86),1)
@@ -574,9 +562,17 @@ else
574562
PCRE_CONFIG = $(build_bindir)/pcre-config
575563
endif
576564

577-
# Use 64-bit libraries by default on 64-bit architectures
565+
# Use ILP64 BLAS interface when building openblas from source on 64-bit architectures
578566
ifeq ($(BINARY), 64)
567+
ifeq ($(USE_SYSTEM_BLAS), 1)
568+
ifeq ($(USE_INTEL_MKL), 1)
579569
USE_BLAS64 ?= 1
570+
else # non MKL system blas is most likely LP64
571+
USE_BLAS64 ?= 0
572+
endif
573+
else
574+
USE_BLAS64 ?= 1
575+
endif
580576
endif
581577

582578
ifeq ($(USE_SYSTEM_BLAS), 1)

Makefile

+59-22
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ endif
7676

7777
release-candidate: release test
7878
@#Check documentation
79-
@./julia doc/NEWS-update.jl #Add missing cross-references to NEWS.md
79+
@$(JULIA_EXECUTABLE) doc/NEWS-update.jl #Add missing cross-references to NEWS.md
8080
@$(MAKE) -C doc unicode #Rebuild Unicode table if necessary
81-
@./julia doc/DocCheck.jl > doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items
81+
@$(JULIA_EXECUTABLE) doc/DocCheck.jl > doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items
8282
@if [ -z "$(cat doc/UNDOCUMENTED.rst)" ]; then \
8383
rm doc/UNDOCUMENTED.rst; \
8484
else \
@@ -112,8 +112,9 @@ release-candidate: release test
112112
@echo 5. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist
113113
@echo 6. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms
114114
@echo 7. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links
115-
@echo 8. Announce on mailing lists
116-
@echo 9. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
115+
@echo 8. Update checksums on AWS for tarball and packaged binaries
116+
@echo 9. Announce on mailing lists
117+
@echo 10. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
117118
@echo
118119

119120
$(build_docdir)/helpdb.jl: doc/helpdb.jl | $(build_docdir)
@@ -130,13 +131,11 @@ ifeq ($(OS), WINNT)
130131
$(build_sysconfdir)/julia/juliarc.jl: contrib/windows/juliarc.jl
131132
endif
132133

133-
# use sys.ji if it exists, otherwise run two stages
134-
$(build_private_libdir)/sys%ji: $(build_private_libdir)/sys%o
135-
134+
.SECONDARY: $(build_private_libdir)/inference0.o
135+
.SECONDARY: $(build_private_libdir)/inference.o
136136
.SECONDARY: $(build_private_libdir)/sys.o
137-
.SECONDARY: $(build_private_libdir)/sys0.o
138137

139-
$(build_private_libdir)/sys%$(SHLIB_EXT): $(build_private_libdir)/sys%o
138+
$(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%.o
140139
ifneq ($(USEMSVC), 1)
141140
@$(call PRINT_LINK, $(CXX) -shared -fPIC -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -o $@ $< \
142141
$$([ $(OS) = Darwin ] && echo '' -Wl,-undefined,dynamic_lookup || echo '' -Wl,--unresolved-symbols,ignore-all ) \
@@ -146,17 +145,51 @@ else
146145
@true
147146
endif
148147

149-
$(build_private_libdir)/sys0.o: | $(build_private_libdir)
150-
@$(call PRINT_JULIA, cd base && \
151-
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys0) sysimg.jl)
148+
CORE_SRCS := base/boot.jl base/coreimg.jl \
149+
base/abstractarray.jl \
150+
base/array.jl \
151+
base/bool.jl \
152+
base/build_h.jl \
153+
base/dict.jl \
154+
base/error.jl \
155+
base/essentials.jl \
156+
base/expr.jl \
157+
base/functors.jl \
158+
base/hashing.jl \
159+
base/inference.jl \
160+
base/int.jl \
161+
base/intset.jl \
162+
base/iterator.jl \
163+
base/nofloat_hashing.jl \
164+
base/number.jl \
165+
base/operators.jl \
166+
base/options.jl \
167+
base/pointer.jl \
168+
base/promotion.jl \
169+
base/range.jl \
170+
base/reduce.jl \
171+
base/reflection.jl \
172+
base/subarray.jl \
173+
base/subarray2.jl \
174+
base/tuple.jl
152175

153176
BASE_SRCS := $(wildcard base/*.jl base/*/*.jl base/*/*/*.jl)
154177

178+
$(build_private_libdir)/inference0.o: $(CORE_SRCS) | $(build_private_libdir)
179+
@$(call PRINT_JULIA, cd base && \
180+
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/inference0) -f \
181+
coreimg.jl)
182+
183+
$(build_private_libdir)/inference.o: $(build_private_libdir)/inference0.$(SHLIB_EXT)
184+
@$(call PRINT_JULIA, cd base && \
185+
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/inference) -f \
186+
-J $(call cygpath_w,$(build_private_libdir)/inference0.ji) coreimg.jl)
187+
155188
COMMA:=,
156-
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(build_private_libdir)/sys0.$(SHLIB_EXT)
189+
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(build_private_libdir)/inference.$(SHLIB_EXT)
157190
@$(call PRINT_JULIA, cd base && \
158-
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys) \
159-
-J$(call cygpath_w,$(build_private_libdir))/$$([ -e $(build_private_libdir)/sys.ji ] && echo sys.ji || echo sys0.ji) -f sysimg.jl \
191+
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys) -f \
192+
-J $(call cygpath_w,$(build_private_libdir)/inference.ji) sysimg.jl \
160193
|| { echo '*** This error is usually fixed by running `make clean`. If the error persists$(COMMA) try `make cleanall`. ***' && false; } )
161194

162195
$(build_bindir)/stringreplace: contrib/stringreplace.c | $(build_bindir)
@@ -243,7 +276,7 @@ install: $(build_bindir)/stringreplace doc/_build/html
243276

244277
$(INSTALL_M) $(build_bindir)/julia* $(DESTDIR)$(bindir)/
245278
ifeq ($(OS),WINNT)
246-
-$(INSTALL_M) $(build_bindir)/*.dll $(build_bindir)/*.bat $(DESTDIR)$(bindir)/
279+
-$(INSTALL_M) $(build_bindir)/*.dll $(DESTDIR)$(bindir)/
247280
else
248281
-cp -a $(build_libexecdir) $(DESTDIR)$(prefix)
249282

@@ -339,7 +372,10 @@ endif
339372
distclean dist-clean:
340373
rm -fr julia-*.tar.gz julia*.exe julia-*.7z julia-$(JULIA_COMMIT)
341374

342-
binary-dist dist: distclean
375+
dist:
376+
@echo \'dist\' target is deprecated: use \'binary-dist\' instead.
377+
378+
binary-dist: distclean
343379
ifeq ($(USE_SYSTEM_BLAS),0)
344380
ifneq ($(OPENBLAS_DYNAMIC_ARCH),1)
345381
@echo OpenBLAS must be rebuilt with OPENBLAS_DYNAMIC_ARCH=1 to use binary-dist target
@@ -373,10 +409,8 @@ ifeq ($(JULIA_CPU_TARGET), native)
373409
endif
374410

375411
ifeq ($(OS), WINNT)
376-
ifeq ($(ARCH),x86_64)
377-
# If we are running on WIN64, also delete sys.dll until we switch to llvm3.5+
412+
# If we are running on windows, also delete sys.dll until we switch to llvm3.5+
378413
-rm -f $(DESTDIR)$(private_libdir)/sys.$(SHLIB_EXT)
379-
endif
380414

381415
[ ! -d dist-extras ] || ( cd dist-extras && \
382416
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 $(bindir) && \
@@ -419,8 +453,11 @@ light-source-dist: light-source-dist.tmp
419453
sed -e "s_.*_$$DIRNAME/&_" light-source-dist.tmp > light-source-dist.tmp1; \
420454
cd ../ && tar -cz -T $$DIRNAME/light-source-dist.tmp1 --no-recursion -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT).tar.gz
421455

456+
source-dist:
457+
@echo \'source-dist\' target is deprecated: use \'full-source-dist\' instead.
458+
422459
# Make tarball with Julia code plus all dependencies
423-
full-source-dist source-dist: light-source-dist.tmp
460+
full-source-dist: light-source-dist.tmp
424461
# Get all the dependencies downloaded
425462
@$(MAKE) -C deps getall NO_GIT=1
426463

@@ -518,7 +555,7 @@ endif
518555
cd dist-extras && \
519556
$(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920_extra.7z && \
520557
$(JLDOWNLOAD) https://unsis.googlecode.com/files/nsis-2.46.5-Unicode-setup.exe && \
521-
$(JLDOWNLOAD) busybox.exe http://intgat.tigress.co.uk/rmy/files/busybox/busybox-w32-TIG-1778-g15efec6.exe && \
558+
$(JLDOWNLOAD) busybox.exe http://frippery.org/files/busybox/busybox-w32-FRP-1-g9eb16cb.exe && \
522559
chmod a+x 7z.exe && \
523560
chmod a+x 7z.dll && \
524561
$(call spawn,./7z.exe) x -y -onsis nsis-2.46.5-Unicode-setup.exe && \

NEWS.md

+32-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ New language features
55
---------------------
66

77
* Function call overloading: for arbitrary objects `x` (not of type
8-
`Function`), `x(...)` is transformed into `call(x, ...)`, and `Base.call`
8+
`Function`), `x(...)` is transformed into `call(x, ...)`, and `call`
99
can be overloaded as desired. Constructors are now a special case of
1010
this mechanism, which allows e.g. constructors for abstract types.
1111
`T(...)` falls back to `convert(T, x)`, so all `convert` methods implicitly
@@ -23,7 +23,7 @@ New language features
2323
it operates at two different stages of evaluation. At compile time, the generated
2424
function is called with its arguments bound to the types for which it should
2525
specialize. The quoted expression it returns forms the body of the specialized
26-
method which is then called at run time. ([#7311]).
26+
method which is then called at run time ([#7311]).
2727

2828
* (Also with syntax todo) Documentation system for functions, methods, types
2929
and macros in packages and user code ([#8791]). Type `?@doc` at the repl
@@ -32,6 +32,9 @@ New language features
3232
* Varargs functions like `foo{T}(x::T...)` may now restrict the number
3333
of such arguments using `foo{T,N}(x::Vararg{T,N})` ([#11242]).
3434

35+
* The syntax `function foo end` can be used to introduce a generic function without
36+
yet adding any methods ([#8283]).
37+
3538
Language changes
3639
----------------
3740

@@ -117,6 +120,13 @@ Language changes
117120
* The built-in `NTuple` type has been removed; `NTuple{N,T}` is now
118121
implemented internally as `Tuple{Vararg{T,N}}` ([#11242]).
119122

123+
Command line option changes
124+
---------------------------
125+
126+
* The `-i` option now forces the REPL to run after loading the specified script (if any) ([#11347]).
127+
128+
* New option --handle-signals={yes|no} to disable Julia's signal handlers.
129+
120130
Compiler improvements
121131
---------------------
122132

@@ -165,6 +175,8 @@ Library improvements
165175

166176
* OpenBLAS 64-bit (ILP64) interface is now compiled with a `64_` suffix ([#8734]) to avoid conflicts with external libraries using a 32-bit BLAS ([#4923]).
167177

178+
* New `vecdot` function, analogous to `vecnorm`, for Euclidean inner products over any iterable container ([#11067]).
179+
168180
* Strings
169181

170182
* NUL-terminated strings should now be passed to C via the new `Cstring` type, not `Ptr{UInt8}` or `Ptr{Cchar}`,
@@ -373,6 +385,15 @@ Deprecated or removed
373385

374386
* Instead of `linrange`, use `linspace` ([#9666]).
375387

388+
* The functions `is_valid_char`, `is_valid_ascii`, `is_valid_utf8`, `is_valid_utf16`, and
389+
`is_valid_utf32` have been replaced by generic `isvalid` methods.
390+
The single argument form `isvalid(value)` can now be used for values of type `Char`, `ASCIIString`,
391+
`UTF8String`, `UTF16String` and `UTF32String`.
392+
The two argument form `isvalid(type, value)` can be used with the above types, with values
393+
of type `Vector{UInt8}`, `Vector{UInt16}`, `Vector{UInt32}`, and `Vector{Char}` ([#11241]).
394+
395+
* Instead of `utf32(64,123,...)` use `utf32(UInt32[64,123,...])` ([#11379]).
396+
376397
Julia v0.3.0 Release Notes
377398
==========================
378399

@@ -1321,6 +1342,7 @@ Too numerous to mention.
13211342
[#8089]: https://github.com/JuliaLang/julia/issues/8089
13221343
[#8152]: https://github.com/JuliaLang/julia/issues/8152
13231344
[#8246]: https://github.com/JuliaLang/julia/issues/8246
1345+
[#8283]: https://github.com/JuliaLang/julia/issues/8283
13241346
[#8297]: https://github.com/JuliaLang/julia/issues/8297
13251347
[#8399]: https://github.com/JuliaLang/julia/issues/8399
13261348
[#8423]: https://github.com/JuliaLang/julia/issues/8423
@@ -1385,6 +1407,7 @@ Too numerous to mention.
13851407
[#9779]: https://github.com/JuliaLang/julia/issues/9779
13861408
[#9862]: https://github.com/JuliaLang/julia/issues/9862
13871409
[#9957]: https://github.com/JuliaLang/julia/issues/9957
1410+
[#10008]: https://github.com/JuliaLang/julia/issues/10008
13881411
[#10024]: https://github.com/JuliaLang/julia/issues/10024
13891412
[#10031]: https://github.com/JuliaLang/julia/issues/10031
13901413
[#10075]: https://github.com/JuliaLang/julia/issues/10075
@@ -1412,6 +1435,13 @@ Too numerous to mention.
14121435
[#10888]: https://github.com/JuliaLang/julia/issues/10888
14131436
[#10893]: https://github.com/JuliaLang/julia/issues/10893
14141437
[#10914]: https://github.com/JuliaLang/julia/issues/10914
1438+
[#10955]: https://github.com/JuliaLang/julia/issues/10955
14151439
[#10994]: https://github.com/JuliaLang/julia/issues/10994
1440+
[#11105]: https://github.com/JuliaLang/julia/issues/11105
14161441
[#11145]: https://github.com/JuliaLang/julia/issues/11145
14171442
[#11242]: https://github.com/JuliaLang/julia/issues/11242
1443+
[#11171]: https://github.com/JuliaLang/julia/issues/11171
1444+
[#11241]: https://github.com/JuliaLang/julia/issues/11241
1445+
[#11347]: https://github.com/JuliaLang/julia/issues/11347
1446+
[#11379]: https://github.com/JuliaLang/julia/issues/11379
1447+
[#11067]: https://github.com/JuliaLang/julia/issues/11067

0 commit comments

Comments
 (0)