Permalink
Browse files

Merge branch 'master' of github.com:JuliaLang/julia

Conflicts:
	Make.inc
	Makefile
	base/client.jl
	base/librandom.jl
	base/pkg.jl
	base/start_image.jl
	base/sysimg.jl
	deps/Makefile
	extras/iostring.jl
	src/gf.c
	src/init.c
	src/julia.h
	src/module.c
	src/task.c
	ui/Makefile
	ui/webserver/webserver.cpp
  • Loading branch information...
Keno committed Dec 5, 2012
2 parents 0976783 + 7a7fc10 commit 73e1ae20ef6ad4614834e5defac08f908c266fe4
Showing with 2,054 additions and 2,107 deletions.
  1. +9 −8 .travis.yml
  2. +49 −30 Make.inc
  3. +13 −9 Makefile
  4. +2 −1 README.md
  5. +9 −1 base/abstractarray.jl
  6. +2 −0 base/base.jl
  7. +22 −21 base/blas.jl
  8. +2 −2 base/boot.jl
  9. +25 −12 base/client.jl
  10. +12 −12 base/complex.jl
  11. +30 −1 base/darray2.jl
  12. +3 −0 base/dict.jl
  13. +0 −1 base/dsp.jl
  14. +5 −0 base/error.jl
  15. +7 −0 base/export.jl
  16. +1 −1 base/expr.jl
  17. +31 −30 base/fftw.jl
  18. +2 −5 base/file.jl
  19. +16 −7 base/float.jl
  20. +3 −2 base/floatfuncs.jl
  21. +0 −2 base/git.jl
  22. +1 −4 base/grisu.jl
  23. +26 −24 base/inference.jl
  24. +4 −7 base/io.jl
  25. +134 −87 base/lapack.jl
  26. +1 −1 base/libc.jl
  27. +18 −23 base/librandom.jl
  28. +103 −40 base/linalg_dense.jl
  29. +112 −78 base/math.jl
  30. +2 −4 base/multi.jl
  31. +5 −8 base/pcre.jl
  32. +51 −32 base/pkg.jl
  33. +6 −3 base/pkgmetadata.jl
  34. +0 −1 base/printf.jl
  35. +0 −1 base/rng.jl
  36. +2 −0 base/set.jl
  37. +2 −2 base/show.jl
  38. +0 −31 base/start_image.jl
  39. +0 −1 base/string.jl
  40. +10 −34 base/sysimg.jl
  41. +5 −11 base/util.jl
  42. +28 −9 contrib/fixup-libgfortran.sh
  43. +3 −2 contrib/julia-mode.el
  44. +3 −1 contrib/julia.xml
  45. +1 −0 deps/.gitignore
  46. +165 −91 deps/Makefile
  47. +1 −1 deps/Rmath/src/Makefile
  48. +3 −2 deps/Versions.make
  49. +1 −1 deps/lighttpd.conf
  50. +8 −4 doc/helpdb.jl
  51. +27 −9 doc/manual/modules.rst
  52. +3 −3 doc/stdlib/base.rst
  53. +0 −1 examples/bigfib.jl
  54. +3 −2 examples/tk_examples.jl
  55. +1 −1 examples/wav.jl
  56. +3 −2 examples/winston_tk.jl
  57. +0 −1 extras/arpack.jl
  58. +55 −1 extras/bitarray.jl
  59. +1 −3 extras/glpk.jl
  60. +0 −1 extras/gzip.jl
  61. +0 −1 extras/linprog.jl
  62. +55 −44 extras/profile.jl
  63. +4 −1 extras/strpack.jl
  64. +0 −1 extras/suitesparse.jl
  65. +0 −1 extras/zlib.jl
  66. +12 −6 src/Makefile
  67. +0 −1 src/alloc.c
  68. +6 −6 src/array.c
  69. +1 −3 src/ast.c
  70. +27 −35 src/builtins.c
  71. +148 −20 src/ccall.cpp
  72. +4 −2 src/cgutils.cpp
  73. +41 −32 src/codegen.cpp
  74. +10 −1 src/dlload.c
  75. +1 −14 src/dump.c
  76. +6 −7 src/gc.c
  77. +16 −7 src/gf.c
  78. +5 −4 src/init.c
  79. +5 −6 src/interpreter.c
  80. +61 −29 src/julia-parser.scm
  81. +41 −12 src/julia-syntax.scm
  82. +5 −1 src/julia.expmap
  83. +24 −32 src/julia.h
  84. +1 −1 src/module.c
  85. +65 −101 src/task.c
  86. +13 −7 src/toplevel.c
  87. +6 −0 src/utils.scm
  88. +35 −24 test/bitarray.jl
  89. +36 −0 test/core.jl
  90. +344 −346 test/linalg.jl
  91. +27 −23 test/math.jl
  92. +12 −4 test/runtests.jl
  93. +4 −4 ui/Makefile
  94. +6 −1 ui/repl-readline.c
  95. +0 −4 ui/repl.c
  96. +2 −0 ui/webserver/webserver.cpp
  97. +0 −505 ui/zeromq/zmq.jl
  98. +0 −43 ui/zeromq/zmq_client_julia.jl
  99. +0 −43 ui/zeromq/zmq_serialize_julia.jl
  100. +0 −63 ui/zeromq/zmq_server_julia.jl
View
@@ -1,18 +1,19 @@
language: cpp
-compiler: clang
+compiler:
+ - clang
+ - gcc
notifications:
email: false
before_install:
+ - BUILDOPTS="LLVM_CONFIG=llvm-config-3.1 USE_QUIET=0"; for lib in LLVM ZLIB SUITESPARSE ARPACK BLAS FFTW LAPACK LIGHTTPD GMP PCRE LIBUNWIND READLINE GLPK; do export BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1"; done
- sudo apt-get update -qq -y
- sudo apt-get install zlib1g-dev
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
- sudo apt-get update -qq -y
- - sudo apt-get install gfortran clang llvm-3.1-dev libsuitesparse-dev libncurses5-dev libopenblas-dev libarpack2-dev libfftw3-dev libpcre3-dev libglpk-dev lighttpd libgmp-dev libunwind7-dev libreadline-dev -y
-env:
- - BUILDOPTS="LLVM_CONFIG=llvm-config-3.1 USECLANG=1 USE_SYSTEM_LLVM=1 USE_SYSTEM_ZLIB=1 USE_SYSTEM_SUITESPARSE=1 USE_SYSTEM_ARPACK=1 USE_SYSTEM_BLAS=1 USE_SYSTEM_FFTW=1 USE_SYSTEM_LAPACK=1 USE_SYSTEM_LIGHTTPD=1 USE_SYSTEM_GMP=1 USE_SYSTEM_PCRE=1 USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_READLINE=1 USE_SYSTEM_GLPK=1"
-script: make $BUILDOPTS dist
+ - sudo apt-get install gfortran llvm-3.1-dev libsuitesparse-dev libncurses5-dev libopenblas-dev libarpack2-dev libfftw3-dev libpcre3-dev libglpk-dev lighttpd libgmp-dev libunwind7-dev libreadline-dev -y
+script: make $BUILDOPTS PREFIX=/tmp/julia install
after_script:
- - make $BUILDOPTS testall
- - make $BUILDOPTS PREFIX=/tmp/julia install
+ - cd .. && mv julia julia2
- cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia runtests.jl all
- - echo "Packaging steps here"
+ - cd - && mv julia2 julia
+ - echo "Ready for packaging..."
View
@@ -56,8 +56,13 @@ USE_COPY_STACKS = 1
FC = gfortran
JFFLAGS = -O2 $(fPIC)
+ifeq ($(CC), clang)
+USEGCC = 0
+USECLANG = 1
+else
USEGCC = 1
USECLANG = 0
+endif
ifeq ($(OS), Darwin)
OSVER = $(shell uname -r | cut -b 1-2)
@@ -144,7 +149,7 @@ endif
ifeq ($(USE_SYSTEM_LIBUNWIND), 1)
LIBUNWIND=-lunwind-generic -lunwind
else
-LIBUNWIND=$(USR)/$(JL_LIBDIR)/libunwind-generic.a $(USR)/$(JL_LIBDIR)/libunwind.a
+LIBUNWIND=$(USR)/lib/libunwind-generic.a $(USR)/lib/libunwind.a
endif
ifeq ($(USE_SYSTEM_LLVM), 1)
@@ -156,13 +161,13 @@ endif
ifeq ($(USE_SYSTEM_READLINE), 1)
READLINE = -lreadline
else
-READLINE = $(USR)/$(JL_LIBDIR)/libreadline.a
+READLINE = $(USR)/lib/libreadline.a
endif
ifneq ($(OS),WINNT)
READLINE += -lncurses
else
-READLINE += $(USR)/$(JL_LIBDIR)/libhistory.a
+READLINE += $(USR)/lib/libhistory.a
endif
ifeq ($(USE_SYSTEM_PCRE), 1)
@@ -180,7 +185,7 @@ LIBBLAS = -lblas
LIBBLASNAME = libblas
endif
else
-LIBBLAS = -L$(USR)/$(JL_LIBDIR) -lopenblas
+LIBBLAS = -L$(USR)/lib -lopenblas
LIBBLASNAME = libopenblas
endif
@@ -199,38 +204,57 @@ endif
# OS specific stuff
-# must end with a / and have no trailing spaces
-INSTALL_NAME_ID_DIR = @rpath/
+# install_name_tool
+ifeq ($(OS), Darwin)
+ # must end with a / and have no trailing spaces
+ INSTALL_NAME_ID_DIR = @rpath/
+ INSTALL_NAME_CMD = install_name_tool -id $(INSTALL_NAME_ID_DIR)
+ INSTALL_NAME_CHANGE_CMD = install_name_tool -change
+else
+ INSTALL_NAME_ID_DIR =
+ INSTALL_NAME_CMD = true -ignore
+ INSTALL_NAME_CHANGE_CMD = true -ignore
+endif
-RPATH =
-RPATH_ORIGIN =
+# shared library runtime paths
+ifeq ($(OS), WINNT)
+ RPATH =
+ RPATH_ORIGIN =
+else ifeq ($(OS), Darwin)
+ RPATH = -Wl,-rpath,'@executable_path/../$(JL_PRIVATE_LIBDIR)' -Wl,-rpath,'@executable_path/../$(JL_LIBDIR)'
+ RPATH_ORIGIN =
+else
+ RPATH = -Wl,-rpath,'$$ORIGIN/../$(JL_PRIVATE_LIBDIR)' -Wl,-rpath,'$$ORIGIN/../$(JL_LIBDIR)' -Wl,-z,origin
+ RPATH_ORIGIN = -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
+endif
+# file extensions
ifeq ($(OS), WINNT)
-SHELL_EXT = bat
+ SHLIB_EXT = dll
+ SHELL_EXT = bat
+else ifeq ($(OS), Darwin)
+ SHLIB_EXT = dylib
+ SHELL_EXT = sh
+else
+ SHLIB_EXT = so
+ SHELL_EXT = sh
+endif
+
+# --whole-archive
+ifeq ($(OS), Darwin)
+ WHOLE_ARCHIVE = -Xlinker -all_load
+ NO_WHOLE_ARCHIVE =
else
-SHELL_EXT = sh
+ WHOLE_ARCHIVE = -Wl,--whole-archive
+ NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
endif
ifeq ($(OS), Linux)
-INSTALL_NAME_CMD = true -ignore
-INSTALL_NAME_CHANGE_CMD = true -ignore
-SHLIB_EXT = so
-RPATH = -Wl,-rpath,'$$ORIGIN/../$(JL_LIBDIR)' -Wl,-rpath,'$$ORIGIN/../$(JL_PRIVATE_LIBDIR)'
-RPATH_ORIGIN = -Wl,-rpath,'$$ORIGIN'
OSLIBS += -ldl -lrt -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap -Wl,--no-whole-archive $(LIBUNWIND)
-WHOLE_ARCHIVE = -Wl,--whole-archive
-NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
JLDFLAGS = -Wl,-Bdynamic
endif
ifeq ($(OS), FreeBSD)
-INSTALL_NAME_CMD = true -ignore
-INSTALL_NAME_CHANGE_CMD = true -ignore
-SHLIB_EXT = so
-RPATH = -Wl,-rpath,'$$ORIGIN/../$(JL_LIBDIR)' -Wl,-rpath,'$$ORIGIN/../$(JL_PRIVATE_LIBDIR)' -Wl,-z,origin
-RPATH_ORIGIN = -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
-WHOLE_ARCHIVE = -Wl,--whole-archive
-NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
JLDFLAGS = -Wl,-Bdynamic
OSLIBS += -lkvm -lrt -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap $(NO_WHOLE_ARCHIVE) $(LIBUNWIND)
endif
@@ -240,18 +264,13 @@ INSTALL_NAME_CMD = install_name_tool -id $(INSTALL_NAME_ID_DIR)
INSTALL_NAME_CHANGE_CMD = install_name_tool -change
RPATH = -Wl,-rpath,'@executable_path/../$(JL_LIBDIR)' -Wl,-rpath,'@executable_path/../$(JL_PRIVATE_LIBDIR)'
SHLIB_EXT = dylib
-OSLIBS += -ldl -Wl,-w -framework CoreServices -framework ApplicationServices
+OSLIBS += -ldl -Wl,-w -framework ApplicationServices
WHOLE_ARCHIVE = -Xlinker -all_load
NO_WHOLE_ARCHIVE =
JLDFLAGS =
endif
ifeq ($(OS), WINNT)
-INSTALL_NAME_CMD = true -ignore
-INSTALL_NAME_CHANGE_CMD = true -ignore
-SHLIB_EXT = dll
-WHOLE_ARCHIVE = -Wl,--whole-archive
-NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
OSLIBS += -Wl,--export-all-symbols -Wl,--version-script=$(JULIAHOME)/src/julia.expmap -lpthread $(NO_WHOLE_ARCHIVE) -lPsapi -lkernel32 -lWs2_32 -lIphlpapi
endif
View
@@ -20,6 +20,7 @@ debug release: | $(DIRS) $(BUILD)/share/julia/extras $(BUILD)/share/julia/base $
$(MAKEs) JULIA_EXECUTABLE=$(JULIA_EXECUTABLE_$@) $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji
julia-debug julia-release:
+ @-git submodule update
@$(MAKEs) -C deps
@$(MAKEs) -C src lib$@
@$(MAKEs) -C base
@@ -35,6 +36,15 @@ $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji: VERSION base/*.jl $(BUILD)/share/julia/hel
$(QUIET_JULIA) cd base && \
(test -f $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji || $(JULIA_EXECUTABLE) -bf sysimg.jl) && $(JULIA_EXECUTABLE) -f sysimg.jl || echo "Note: this error is usually fixed by running 'make cleanall'."
+# public libraries, that are installed in $(PREFIX)/lib
+JL_LIBS = julia-release julia-debug
+
+# private libraries, that are installed in $(PREFIX)/lib/julia
+JL_PRIVATE_LIBS = amd arpack cholmod colamd fftw3 fftw3f fftw3_threads \
+ fftw3f_threads glpk glpk_wrapper gmp gmp_wrapper grisu \
+ history openlibm pcre random readline Rmath spqr \
+ suitesparse_wrapper tk_wrapper umfpack z openblas
+
PREFIX ?= julia-$(JULIA_COMMIT)
install: release
@$(MAKEs) -C test/unicode
@@ -44,10 +54,10 @@ install: release
cp $(BUILD)/bin/*julia* $(PREFIX)/bin
cd $(PREFIX)/bin && ln -s julia-release-$(DEFAULT_REPL) julia
-for suffix in $(JL_LIBS) ; do \
- cp $(BUILD)/$(JL_LIBDIR)/lib$${suffix}.$(SHLIB_EXT) $(PREFIX)/$(JL_LIBDIR) ; \
+ cp -a $(BUILD)/lib/lib$${suffix}.* $(PREFIX)/$(JL_PRIVATE_LIBDIR) ; \
done
-for suffix in $(JL_PRIVATE_LIBS) ; do \
- cp $(BUILD)/$(JL_PRIVATE_LIBDIR)/lib$${suffix}.$(SHLIB_EXT) $(PREFIX)/$(JL_PRIVATE_LIBDIR) ; \
+ cp -a $(BUILD)/lib/lib$${suffix}.* $(PREFIX)/$(JL_PRIVATE_LIBDIR) ; \
done
# Copy system image
cp $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji $(PREFIX)/$(JL_PRIVATE_LIBDIR)
@@ -67,17 +77,11 @@ dist: cleanall
# -$(MAKE) -C deps clean-openblas
$(MAKE) install OPENBLAS_DYNAMIC_ARCH=1
ifeq ($(OS), Darwin)
- -./contrib/fixup-libgfortran.sh $(PREFIX)/$(JL_LIBDIR) /usr/local/lib
+ -./contrib/fixup-libgfortran.sh $(PREFIX)/$(JL_LIBDIR) $(PREFIX)/$(JL_PRIVATE_LIBDIR)
endif
tar zcvf julia-$(JULIA_COMMIT)-$(OS)-$(ARCH).tar.gz julia-$(JULIA_COMMIT)
rm -fr julia-$(JULIA_COMMIT)
-deb:
- fakeroot debian/rules binary
-
-debclean:
- fakeroot debian/rules clean
-
h2j: $(BUILD)/$(JL_LIBDIR)/libLLVM*.a $(BUILD)/$(JL_LIBDIR)/libclang*.a src/h2j.cpp
$(QUIET_CC) g++ -O2 -fno-rtti -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -Iinclude $^ -o $@
View
@@ -29,7 +29,8 @@ This is the GitHub repository of Julia source code, including instructions for c
The mailing list for developer discussion is
<http://groups.google.com/group/julia-dev/>. All are welcome, but the volume
-of messages is higher, and the discussions tend to be more esoteric.
+of messages is higher, and the discussions tend to be more esoteric. New
+developers may find the notes in [CONTRIBUTING](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md) helpful to start contributing to the julia codebase.
<a name="Currently-Supported-Platforms"/>
## Currently Supported Platforms
View
@@ -138,6 +138,9 @@ for (f,t) in ((:char, Char),
@eval ($f)(x::AbstractArray) = iround_to(similar(x,$t), x)
end
+bool(x::AbstractArray{Bool}) = x
+bool(x::AbstractArray) = copy_to(similar(x,Bool), x)
+
for (f,t) in ((:float32, Float32),
(:float64, Float64),
(:complex64, Complex64),
@@ -230,6 +233,11 @@ end
function gen_cartesian_map(cache, genbodies, ranges, exargnames, exargs...)
N = length(ranges)
if !has(cache,N)
+ if isdefined(genbodies,:code)
+ mod = genbodies.code.module
+ else
+ mod = Main
+ end
dimargnames = { symbol(string("_d",i)) for i=1:N }
ivars = { symbol(string("_i",i)) for i=1:N }
bodies = genbodies(ivars)
@@ -266,7 +274,7 @@ function gen_cartesian_map(cache, genbodies, ranges, exargnames, exargs...)
end
_F_
end
- f = eval(fexpr)
+ f = eval(mod,fexpr)
cache[N] = f
else
f = cache[N]
View
@@ -13,6 +13,8 @@ ptr_arg_convert{T}(::Type{Ptr{T}}, x) = convert(T, x)
cconvert(T, x) = convert(T, x)
# use the code in ccall.cpp to safely allocate temporary pointer arrays
cconvert{T}(::Type{Ptr{Ptr{T}}}, a::Array) = a
+# TODO: for some reason this causes a strange type inference problem
+#cconvert(::Type{Ptr{Uint8}}, s::String) = bytestring(s)
type ErrorException <: Exception
msg::String
Oops, something went wrong.

0 comments on commit 73e1ae2

Please sign in to comment.