Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/JuliaLang/julia into jq/g…
Browse files Browse the repository at this point in the history
…risu

Conflicts:
	contrib/vagrant/Vagrantfile
  • Loading branch information
quinnj committed Aug 27, 2014
2 parents 7d84a31 + 678103a commit 4c96830
Show file tree
Hide file tree
Showing 59 changed files with 2,107 additions and 1,670 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ notifications:
email: false
irc:
channels:
- "chat.freenode.net#julia"
- "chat.freenode.net#julia-notifications"
on_success: change
on_failure: always
webhooks:
Expand All @@ -26,15 +26,17 @@ before_install:
sudo apt-get update -qq -y;
sudo apt-get install patchelf gfortran llvm-3.3-dev libsuitesparse-dev libopenblas-dev liblapack-dev libarpack2-dev libfftw3-dev libgmp-dev libpcre3-dev libunwind7-dev libopenlibm-dev librmath-dev libmpfr-dev -y;
elif [ `uname` = "Darwin" ]; then
BUILDOPTS="USECLANG=1 LLVM_CONFIG=llvm-config-3.3 LLVM_LLC=llc-3.3 VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC='-I/usr/local/include'";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND; do
export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1";
done;
brew tap staticfloat/julia;
brew install -v --only-dependencies --HEAD julia;
brew update;
brew upgrade gcc;
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";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND; do
export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1";
done;
export LDFLAGS="-L$(brew --prefix openblas-julia)/lib -L$(brew --prefix suite-sparse-julia)/lib";
export DYLD_FALLBACK_LIBRARY_PATH="/usr/local/lib:/lib:/usr/lib:$(brew --prefix openblas-julia)/lib:$(brew --prefix suite-sparse-julia)/lib:$(brew --prefix arpack-julia)/lib";
make $BUILDOPTS -C contrib -f repackage_system_suitesparse4.make;
fi
script:
Expand All @@ -47,4 +49,4 @@ script:
- cd .. && mv julia julia2
- cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia-debug --check-bounds=yes runtests.jl all && /tmp/julia/bin/julia-debug --check-bounds=yes runtests.jl pkg
- cd - && mv julia2 julia
- echo "Ready for packaging..."
- echo "Ready for packaging..."
9 changes: 1 addition & 8 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ endif
# disable automatic Makefile rules
.SUFFIXES:

# find out if git repository is availible
# find out if git repository is available
ifeq ($(shell [ -e $(JULIAHOME)/.git ] && echo true || echo "Warning: git information unavailable; versioning information limited" >&2), true)
NO_GIT = 0
else
Expand Down Expand Up @@ -769,14 +769,7 @@ pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)))))

JULIA_EXECUTABLE_debug = $(build_bindir)/julia-debug$(EXE)
JULIA_EXECUTABLE_release = $(build_bindir)/julia$(EXE)

ifeq ($(OS), WINNT)
JULIA_EXECUTABLE = $(JULIA_EXECUTABLE_release)
else ifdef JULIA_VAGRANT_BUILD
JULIA_EXECUTABLE = $(JULIA_EXECUTABLE_release)
else
JULIA_EXECUTABLE = $(JULIAHOME)/julia
endif

# Colors for make
ifndef VERBOSE
Expand Down
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,14 @@ ifeq ($(OS), WINNT)
cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/echo.exe && \
cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/printf.exe )
cd $(DESTDIR)$(bindir) && 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.
cd $(prefix) && find * | sed -e 's/\//\\/g' -e 's/$$/\r/g' > etc/uninstall.log

# build nsis package
$(call spawn,./dist-extras/nsis/makensis.exe) -NOCD -DVersion=$(JULIA_VERSION) -DArch=$(ARCH) -DCommit=$(JULIA_COMMIT) ./contrib/windows/build-installer.nsi

# compress nsis installer and combine with 7zip self-extracting header
./dist-extras/7z a -mx9 "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" julia-installer.exe
cat ./contrib/windows/7zS.sfx ./contrib/windows/7zSFX-config.txt "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" > "julia-${JULIA_VERSION}-${ARCH}.exe"
-rm -f julia-installer.exe
Expand All @@ -347,21 +354,17 @@ source-dist: git-submodules
git submodule --quiet foreach 'git ls-files | sed "s&^&$$path/&"' >> source-dist.tmp

# Remove unwanted files
sed '/\.git/d' source-dist.tmp > source-dist.tmp1
sed '/\.travis/d' source-dist.tmp1 > source-dist.tmp
sed -e '/\.git/d' -e '/\.travis/d' source-dist.tmp > source-dist.tmp1

# Create tarball
tar -cz -T source-dist.tmp --no-recursion -f julia-$(JULIA_VERSION)_$(JULIA_COMMIT).tar.gz
rm -f source-dist.tmp source-dist.tmp1
# Prefix everything with the current directory name (usually "julia"), then create tarball
DIRNAME=$$(basename $$(pwd)); \
sed -e "s_.*_$$DIRNAME/&_" source-dist.tmp1 > source-dist.tmp; \
cd ../ && tar -cz -T $$DIRNAME/source-dist.tmp --no-recursion -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT).tar.gz

clean: | $(CLEAN_TARGETS)
@$(MAKE) -C base clean
@$(MAKE) -C src clean
@$(MAKE) -C ui clean
for repltype in "basic" "readline"; do \
rm -f $(build_bindir)/julia-debug-$${repltype}; \
rm -f $(build_bindir)/julia-$${repltype}; \
done
@rm -f julia
@rm -f *~ *# *.tar.gz
@rm -f $(build_bindir)/stringreplace source-dist.tmp source-dist.tmp1
Expand All @@ -371,7 +374,7 @@ clean: | $(CLEAN_TARGETS)

cleanall: clean
@$(MAKE) -C src clean-flisp clean-support
@rm -fr $(build_libdir)
@rm -fr $(build_shlibdir)
ifeq ($(OS),WINNT)
@rm -rf $(build_prefix)/lib
endif
Expand Down
14 changes: 9 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ Library improvements
* Symmetric and Hermitian immutables are now parametrized on matrix type ([#7992]).

* Switch from `O(N)` to `O(logN)` algorithm for `dequeue!(pq, key)`
with PriorityQueues. This provides major speedups for large
queues.
with `PriorityQueue`. This provides major speedups for large
queues ([#8011]).

* PriorityQueues now include the order type among their parameters,
* `PriorityQueue` now includes the order type among its parameters,
`PriorityQueue{KeyType,ValueType,OrderType}`. An empty queue can
be constructed as `pq = PriorityQueue(KeyType,ValueType)`, if you
intend to use the default `Forward` order, or
`pq = PriorityQueue(KeyType, ValueType, OrderType)` otherwise.
`pq = PriorityQueue(KeyType, ValueType, OrderType)` otherwise ([#8011]).

* Efficient `mean` and `median` for ranges ([#8089]).

Julia v0.3.0 Release Notes
==========================
Expand Down Expand Up @@ -58,7 +60,7 @@ New language features

* Multi-line comments ([#69], [#6128]): `#= .... =#`

* `--bounds-check=yes|no` compiler option
* `--check-bounds=yes|no` compiler option

* Unicode identifiers are normalized (NFC) so that different encodings
of equivalent strings are treated as the same identifier ([#5462]).
Expand Down Expand Up @@ -947,3 +949,5 @@ Too numerous to mention.
[#7654]: https://github.com/JuliaLang/julia/issues/7654
[#7917]: https://github.com/JuliaLang/julia/issues/7917
[#7992]: https://github.com/JuliaLang/julia/issues/7992
[#8011]: https://github.com/JuliaLang/julia/issues/8011
[#8089]: https://github.com/JuliaLang/julia/issues/8089
2 changes: 1 addition & 1 deletion base/Dates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export Period, DatePeriod, TimePeriod,
July, August, September, October, November, December,
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec,
# conversions.jl
unix2datetime, datetime2unix, now, today,
unix2datetime, datetime2unix, now, nowutc, today,
rata2datetime, datetime2rata, julian2datetime, datetime2julian,
# adjusters.jl
firstdayofweek, lastdayofweek,
Expand Down
4 changes: 3 additions & 1 deletion base/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ function complete_path(path::String, pos)
catch
return UTF8String[], 0:-1, false
end

matches = UTF8String[]
for file in files
if beginswith(file, prefix)
push!(matches, isdir(joinpath(dir, file)) ? joinpath(file,"") : file)
id = try isdir(joinpath(dir, file)) catch; false end
push!(matches, id ? joinpath(file,"") : file)
end
end
matches, (nextind(path, pos-sizeof(prefix))):pos, length(matches) > 0
Expand Down
6 changes: 6 additions & 0 deletions base/c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ function dlsym_e(hnd::Ptr, s::Union(Symbol,String))
ccall(:jl_dlsym_e, Ptr{Void}, (Ptr{Void}, Ptr{Uint8}), hnd, s)
end

dlopen(s::Symbol, flags::Integer = RTLD_LAZY | RTLD_DEEPBIND) =
dlopen(string(s), flags)

dlopen(s::String, flags::Integer = RTLD_LAZY | RTLD_DEEPBIND) =
ccall(:jl_load_dynamic_library, Ptr{Void}, (Ptr{Uint8},Uint32), s, flags)

dlopen_e(s::String, flags::Integer = RTLD_LAZY | RTLD_DEEPBIND) =
ccall(:jl_load_dynamic_library_e, Ptr{Void}, (Ptr{Uint8},Uint32), s, flags)

dlopen_e(s::Symbol, flags::Integer = RTLD_LAZY | RTLD_DEEPBIND) =
dlopen_e(string(s), flags)

dlclose(p::Ptr) = if p!=C_NULL; ccall(:uv_dlclose,Void,(Ptr{Void},),p); end

cfunction(f::Function, r, a) =
Expand Down
10 changes: 6 additions & 4 deletions base/complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,10 @@ sign(z::Complex) = z/abs(z)
-(x::Real, z::Complex) = Complex(x - real(z), -imag(z))
-(z::Complex, x::Real) = Complex(real(z) - x, imag(z))

/(z::Number, w::Complex) = z*inv(w)
/(a::Real , w::Complex) = a*inv(w)
/(z::Complex, x::Real) = Complex(real(z)/x, imag(z)/x)

function /(a::Complex, b::Complex)
function /{T<:Real}(a::Complex{T}, b::Complex{T})
are = real(a); aim = imag(a); bre = real(b); bim = imag(b)
if abs(bre) <= abs(bim)
if isinf(bre) && isinf(bim)
Expand All @@ -143,12 +142,15 @@ function /(a::Complex, b::Complex)
r = bim / bre
end
den = bre + r*bim
complex((are + aim*r)/den, (aim - are*r)/den)
Complex((are + aim*r)/den, (aim - are*r)/den)
end
end

inv{T<:Union(Float16,Float32)}(z::Complex{T}) =
oftype(z, conj(complex128(z))/abs2(complex128(z)))
oftype(z, conj(widen(z))/abs2(widen(z)))

/{T<:Union(Float16,Float32)}(z::Complex{T}, w::Complex{T}) =
oftype(z, widen(z)*inv(widen(w)))

# robust complex division for double precision
# the first step is to scale variables if appropriate ,then do calculations
Expand Down
Loading

0 comments on commit 4c96830

Please sign in to comment.