├── VERSION ├── contrib ├── vagrant │ └── .gitignore ├── mac │ ├── app │ │ ├── .gitignore │ │ ├── julia.icns │ │ ├── startup.applescript │ │ └── README.md │ ├── juliarc.jl │ └── mac-gtk.sh ├── ackrc ├── windows │ ├── 7zS.sfx │ ├── julia.ico │ ├── 7zSFX-config.txt │ ├── install-cygwin.ps1 │ ├── julia.rc │ ├── 7zSFX-manifest.xml │ └── julia-manifest.xml ├── debug_bootstrap.gdb ├── README.ackrc.txt ├── valgrind-julia.supp ├── filterArgs.sh ├── julia.desktop ├── install.sh ├── check-whitespace.sh ├── fixup-libstdc++.sh ├── relative_path.sh ├── stringreplace.c ├── travis_fastfail.sh ├── julia.appdata.xml └── commit-name.sh ├── stdlib ├── Pkg │ ├── .codecov.yml │ ├── ext │ │ └── TOML │ │ │ ├── REQUIRE │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ ├── LICENSE.md │ │ │ ├── appveyor.yml │ │ │ └── src │ │ │ └── TOML.jl │ ├── test │ │ ├── testgroups │ │ ├── test_packages │ │ │ ├── BigProject │ │ │ │ ├── test │ │ │ │ │ ├── REQUIRE │ │ │ │ │ ├── LibFoo.jl │ │ │ │ │ │ ├── test │ │ │ │ │ │ │ └── runtests.jl │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ └── LibFoo.jl │ │ │ │ │ │ ├── Project.toml │ │ │ │ │ │ └── Manifest.toml │ │ │ │ │ └── runtests.jl │ │ │ │ ├── .gitignore │ │ │ │ ├── SubModule │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── deps │ │ │ │ │ │ └── build.jl │ │ │ │ │ ├── Project.toml │ │ │ │ │ ├── test │ │ │ │ │ │ └── runtests.jl │ │ │ │ │ └── src │ │ │ │ │ │ └── SubModule.jl │ │ │ │ ├── SubModule2 │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── deps │ │ │ │ │ │ └── build.jl │ │ │ │ │ ├── Project.toml │ │ │ │ │ ├── test │ │ │ │ │ │ └── runtests.jl │ │ │ │ │ └── src │ │ │ │ │ │ └── SubModule2.jl │ │ │ │ ├── deps │ │ │ │ │ └── build.jl │ │ │ │ ├── Project.toml │ │ │ │ ├── src │ │ │ │ │ └── BigProject.jl │ │ │ │ └── Manifest.toml │ │ │ ├── RequireDependency │ │ │ │ ├── REQUIRE │ │ │ │ └── src │ │ │ │ │ └── RequireDependency.jl │ │ │ ├── PackageWithBuildSpecificTestDeps │ │ │ │ ├── test │ │ │ │ │ ├── REQUIRE │ │ │ │ │ └── runtests.jl │ │ │ │ └── src │ │ │ │ │ └── PackageWithBuildSpecificTestDeps.jl │ │ │ ├── UnregisteredWithoutProject │ │ │ │ ├── .gitignore │ │ │ │ ├── deps │ │ │ │ │ └── build.jl │ │ │ │ ├── test │ │ │ │ │ └── runtests.jl │ │ │ │ └── src │ │ │ │ │ └── UnregisteredWithoutProject.jl │ │ │ └── UnregisteredWithProject │ │ │ │ ├── test │ │ │ │ └── runtests.jl │ │ │ │ ├── Project.toml │ │ │ │ └── src │ │ │ │ └── UnregisteredWithProject.jl │ │ ├── runtests.jl │ │ └── utils.jl │ ├── bin │ │ ├── .gitignore │ │ └── update.jl │ ├── .gitignore │ ├── docs │ │ └── make.jl │ ├── Project.toml │ ├── .travis.yml │ ├── src │ │ └── Pkg2 │ │ │ └── Pkg2.jl │ └── Compat.toml ├── Markdown │ ├── docs │ │ └── src │ │ │ └── index.md │ ├── Project.toml │ └── src │ │ ├── Common │ │ └── Common.jl │ │ ├── Julia │ │ ├── Julia.jl │ │ └── interp.jl │ │ ├── render │ │ └── rich.jl │ │ └── IPython │ │ └── IPython.jl ├── OldPkg │ ├── test │ │ ├── testgroups │ │ └── runtests.jl │ └── Project.toml ├── LibGit2 │ ├── test │ │ ├── testgroups │ │ ├── runtests.jl │ │ └── keys │ │ │ ├── valid.pub │ │ │ ├── invalid.pub │ │ │ └── valid-passphrase.pub │ ├── Project.toml │ └── src │ │ └── strarray.jl ├── SparseArrays │ ├── test │ │ ├── testgroups │ │ └── runtests.jl │ └── Project.toml ├── Mmap │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Base64 │ ├── Project.toml │ ├── docs │ │ └── src │ │ │ └── index.md │ └── src │ │ └── buffer.jl ├── CRC32c │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Libdl │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Logging │ └── Project.toml ├── SHA │ ├── Project.toml │ ├── src │ │ └── hmac.jl │ ├── test │ │ └── perf.jl │ └── docs │ │ └── src │ │ └── index.md ├── Sockets │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Unicode │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── FileWatching │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Serialization │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Dates │ ├── Project.toml │ └── test │ │ ├── testgroups │ │ └── runtests.jl ├── UUIDs │ ├── Project.toml │ ├── docs │ │ └── src │ │ │ └── index.md │ └── test │ │ └── runtests.jl ├── Future │ └── Project.toml ├── Printf │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Profile │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Random │ ├── Project.toml │ └── src │ │ └── deprecated.jl ├── DelimitedFiles │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── LinearAlgebra │ ├── Project.toml │ ├── test │ │ ├── runtests.jl │ │ ├── testgroups │ │ ├── hessenberg.jl │ │ └── testutils.jl │ └── src │ │ └── conjarray.jl ├── IterativeEigensolvers │ ├── Project.toml │ └── src │ │ └── deprecated.jl ├── SharedArrays │ ├── docs │ │ └── src │ │ │ └── index.md │ └── Project.toml ├── REPL │ ├── Project.toml │ ├── test │ │ ├── runtests.jl │ │ ├── FakeTerminals.jl │ │ └── TerminalMenus │ │ │ └── runtests.jl │ └── src │ │ └── TerminalMenus │ │ ├── TerminalMenus.jl │ │ └── LICENSE.md ├── SuiteSparse │ ├── Project.toml │ ├── test │ │ └── runtests.jl │ └── src │ │ └── SuiteSparse.jl ├── InteractiveUtils │ ├── Project.toml │ └── docs │ │ └── src │ │ └── index.md ├── Test │ └── Project.toml └── Distributed │ ├── Project.toml │ └── test │ └── runtests.jl ├── test ├── llvmpasses │ ├── .gitignore │ ├── Makefile │ ├── lit.cfg │ ├── lower-handlers.ll │ ├── muladd.ll │ ├── safepoint_stress.jl │ ├── returnstwicegc.ll │ └── simdloop.ll ├── embedding │ ├── .gitignore │ ├── LocalModule.jl │ └── embedding-test.jl ├── .gitignore ├── util │ ├── segfault.jl │ └── throw_error_exception.jl ├── project │ ├── deps │ │ ├── Qux.jl │ │ ├── Bar │ │ │ └── src │ │ │ │ └── Bar.jl │ │ ├── Foo2.jl │ │ │ └── src │ │ │ │ └── Foo.jl │ │ └── Foo1 │ │ │ └── src │ │ │ └── Foo.jl │ ├── Project.toml │ └── Manifest.toml ├── test_exec.jl ├── depot │ └── packages │ │ ├── Baz │ │ └── 81oL │ │ │ └── src │ │ │ └── Baz.jl │ │ └── Foo │ │ └── I05Q │ │ └── src │ │ └── Foo.jl ├── sysinfo.jl ├── bigfloat.jl ├── test_sourcepath.jl ├── cartesian.jl ├── boundscheck.jl ├── compiler │ └── ssair.jl ├── Makefile └── llvmcall2.jl ├── deps ├── .gitignore ├── checksums │ ├── UnicodeData.txt │ │ ├── md5 │ │ └── sha512 │ ├── gmp-6.1.2.tar.bz2 │ │ ├── md5 │ │ └── sha512 │ ├── lapack-3.5.0.tgz │ │ ├── md5 │ │ └── sha512 │ ├── arpack-ng-3.3.0.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── cacert-2018-01-17.pem │ │ ├── md5 │ │ └── sha512 │ ├── cfe-6.0.0.src.tar.xz │ │ ├── md5 │ │ └── sha512 │ ├── curl-7.56.0.tar.bz2 │ │ ├── md5 │ │ └── sha512 │ ├── dsfmt-2.2.3.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── llvm-6.0.0.src.tar.xz │ │ ├── md5 │ │ └── sha512 │ ├── mbedtls-2.6.0-gpl.tgz │ │ ├── md5 │ │ └── sha512 │ ├── mpfr-4.0.0.tar.bz2 │ │ ├── md5 │ │ └── sha512 │ ├── patchelf-0.9.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── pcre2-10.30.tar.bz2 │ │ ├── md5 │ │ └── sha512 │ ├── SuiteSparse-4.4.5.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── arpack-ng-3.3.0-testA.mtx │ │ ├── md5 │ │ └── sha512 │ ├── libosxunwind-0.0.3.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── libunwind-1.1-julia2.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── mbedtls-2.6.0-apache.tgz │ │ ├── md5 │ │ └── sha512 │ ├── compiler-rt-6.0.0.src.tar.xz │ │ ├── md5 │ │ └── sha512 │ ├── i686-4.9.2-release-win32-sjlj-rt_v4-rev3.7z │ │ ├── md5 │ │ └── sha512 │ ├── llvm-3.9.1-i686-w64-mingw32-juliadeps-r07.7z │ │ ├── md5 │ │ └── sha512 │ ├── llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r07.7z │ │ ├── md5 │ │ └── sha512 │ ├── x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z │ │ ├── md5 │ │ └── sha512 │ ├── libgit2-15e119375018fba121cf58e02a9f17fe22df0df8.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── libuv-be317349252699670131395f125c3861d793ca86.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── libwhich-81e9723c0273d78493dc8c8ed570f68d9ce7e89e.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── openblas-939452ea9dcb57abdcc3f1278c6db668a4690465.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── openlibm-1581174c85f7b645b15ba1ac1c3a98fb601f0fe7.tar.gz │ │ ├── md5 │ │ └── sha512 │ ├── utf8proc-d688ac122660e465dc65c8eb7b1c2444fcd52829.tar.gz │ │ ├── md5 │ │ └── sha512 │ └── openspecfun-39699a1c1824bf88410cabb8a7438af91ea98f4c.tar.gz │ │ ├── md5 │ │ └── sha512 ├── libuv.version ├── libgit2.version ├── libwhich.version ├── openblas.version ├── openlibm.version ├── utf8proc.version ├── libssh2.version ├── NATIVE.cmake ├── Versions.make ├── tools │ ├── find_python2 │ └── jldownload ├── llvm-ver.make ├── patches │ ├── libunwind-freebsd-mapper.patch │ ├── llvm-6.0-D44650.patch │ ├── SuiteSparse-winclang.patch │ ├── libssh2-netinet-in.patch │ ├── clang-D28477.patch │ ├── llvm-D28221-avx512.patch │ ├── libgit2-agent-nonfatal.patch │ ├── llvm-symver-jlprefix.patch │ ├── llvm-D28215_FreeBSD_shlib.patch │ ├── libunwind-dwarf-ver.patch │ ├── llvm-D46460.patch │ ├── libgit2-ssh-loop.patch │ ├── libgit2-ssh.patch │ ├── gmp-exception.patch │ ├── llvm-D45070.patch │ ├── llvm-PPC-addrspaces.patch │ ├── llvm-rL326843-missing-header.patch │ ├── llvm-rL293230-icc17-cmake.patch │ └── llvm-3.9-osx-10.12.patch ├── llvm-options.mk ├── libdSFMT.def ├── gfortblas.alias ├── objconv.mk ├── openlibm.mk └── libwhich.mk ├── ui └── .gitignore ├── doc ├── src │ ├── assets │ │ ├── julia-manual.css │ │ └── logo.png │ ├── base │ │ ├── libc.md │ │ ├── stacktraces.md │ │ ├── iterators.md │ │ ├── constants.md │ │ ├── parallel.md │ │ ├── c.md │ │ ├── multi-threading.md │ │ └── simd-types.md │ ├── devdocs │ │ └── require.md │ └── manual │ │ ├── handling-operating-system-variation.md │ │ └── index.md ├── .gitignore ├── images │ ├── jltypes.ai │ ├── travis-icon.png │ ├── github_metadata_fork.png │ ├── github_metadata_develbranch.png │ └── github_metadata_pullrequest.png ├── Project.toml ├── NEWS-update.jl └── README.md ├── .gitattributes ├── src ├── support │ ├── .gitignore │ ├── ptrhash.h │ ├── strtod.h │ ├── timefuncs.h │ ├── dirpath.h │ ├── ptrhash.c │ ├── libsupport.h │ ├── bitvector.h │ ├── arraylist.h │ ├── libsupportinit.c │ ├── MurmurHash3.h │ ├── Windows.mk │ ├── _longjmp.win64.S │ ├── _setjmp.win64.S │ ├── hashing.h │ └── bitvector.c ├── flisp │ ├── mkboot1.lsp │ ├── .gitignore │ ├── equalhash.h │ ├── bootstrap.sh │ ├── julia_charmap.h │ ├── equalhash.c │ └── mkboot0.lsp ├── mk_julia_flisp_boot.scm ├── .gitignore ├── bin2hex.scm ├── debuginfo.h ├── llvm-version.h ├── uv_constants.h ├── file_constants.h ├── julia.expmap ├── features_aarch64.h ├── features_aarch32.h ├── gen_sysimg_symtab.jl ├── julia_assert.h ├── tls.h ├── builtin_proto.h └── threading.h ├── base ├── .gitignore ├── strings │ └── strings.jl ├── threads.jl ├── coreio.jl ├── docs │ └── core.jl ├── osutils.jl ├── compiler │ └── bootstrap.jl └── refvalue.jl ├── etc ├── startup.jl └── write_base_cache.jl ├── .gitignore ├── .github ├── ISSUE_TEMPLATE.md └── SUPPORT.md └── .freebsdci.sh /VERSION: -------------------------------------------------------------------------------- 1 | 0.7.0-alpha 2 | -------------------------------------------------------------------------------- /contrib/vagrant/.gitignore: -------------------------------------------------------------------------------- 1 | /.vagrant 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/.codecov.yml: -------------------------------------------------------------------------------- 1 | comment: false 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/REQUIRE: -------------------------------------------------------------------------------- 1 | julia 0.6 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/testgroups: -------------------------------------------------------------------------------- 1 | pkg 2 | resolve -------------------------------------------------------------------------------- /test/llvmpasses/.gitignore: -------------------------------------------------------------------------------- 1 | /Output/ 2 | -------------------------------------------------------------------------------- /stdlib/Markdown/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Markdown 2 | -------------------------------------------------------------------------------- /stdlib/OldPkg/test/testgroups: -------------------------------------------------------------------------------- 1 | pkg 2 | resolve -------------------------------------------------------------------------------- /stdlib/Pkg/bin/.gitignore: -------------------------------------------------------------------------------- 1 | stdlib.toml.old 2 | -------------------------------------------------------------------------------- /deps/.gitignore: -------------------------------------------------------------------------------- 1 | /srccache 2 | /build 3 | /scratch 4 | -------------------------------------------------------------------------------- /stdlib/LibGit2/test/testgroups: -------------------------------------------------------------------------------- 1 | online 2 | libgit2 3 | -------------------------------------------------------------------------------- /contrib/mac/app/.gitignore: -------------------------------------------------------------------------------- 1 | julia/ 2 | dmg/ 3 | *.dmg 4 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/test/REQUIRE: -------------------------------------------------------------------------------- 1 | Example -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/RequireDependency/REQUIRE: -------------------------------------------------------------------------------- 1 | Example -------------------------------------------------------------------------------- /test/embedding/.gitignore: -------------------------------------------------------------------------------- 1 | /embedding 2 | /embedding-debug 3 | -------------------------------------------------------------------------------- /ui/.gitignore: -------------------------------------------------------------------------------- 1 | /*.o 2 | /*.do 3 | /*.dSYM 4 | /*.obj 5 | /*.pdb 6 | -------------------------------------------------------------------------------- /deps/checksums/UnicodeData.txt/md5: -------------------------------------------------------------------------------- 1 | dde25b1cf9bbb4ba1140ac12e4128b0b 2 | -------------------------------------------------------------------------------- /deps/checksums/gmp-6.1.2.tar.bz2/md5: -------------------------------------------------------------------------------- 1 | 8ddbb26dc3bd4e2302984debba1406a5 2 | -------------------------------------------------------------------------------- /deps/checksums/lapack-3.5.0.tgz/md5: -------------------------------------------------------------------------------- 1 | b1d3e3e425b2e44a06760ff173104bdf 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/.gitignore: -------------------------------------------------------------------------------- 1 | *.jl.cov 2 | *.jl.*.cov 3 | *.jl.mem 4 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/.gitignore: -------------------------------------------------------------------------------- 1 | deps/buildartifact -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/RequireDependency/src/RequireDependency.jl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/checksums/arpack-ng-3.3.0.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 343db685ebedbb9690e4ea5f9d62c19a 2 | -------------------------------------------------------------------------------- /deps/checksums/cacert-2018-01-17.pem/md5: -------------------------------------------------------------------------------- 1 | df0df092f7590ce0cc636986f1ae084b 2 | -------------------------------------------------------------------------------- /deps/checksums/cfe-6.0.0.src.tar.xz/md5: -------------------------------------------------------------------------------- 1 | 121b3896cb0c7765d690acc5d9495d24 2 | -------------------------------------------------------------------------------- /deps/checksums/curl-7.56.0.tar.bz2/md5: -------------------------------------------------------------------------------- 1 | e0caf257103e0c77cee5be7e9ac66ca4 2 | -------------------------------------------------------------------------------- /deps/checksums/dsfmt-2.2.3.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 057c5a11d28296825fba584f561a4369 2 | -------------------------------------------------------------------------------- /deps/checksums/llvm-6.0.0.src.tar.xz/md5: -------------------------------------------------------------------------------- 1 | 788a11a35fa62eb008019b37187d09d2 2 | -------------------------------------------------------------------------------- /deps/checksums/mbedtls-2.6.0-gpl.tgz/md5: -------------------------------------------------------------------------------- 1 | f03b8cf455f246e70e83662d534e156f 2 | -------------------------------------------------------------------------------- /deps/checksums/mpfr-4.0.0.tar.bz2/md5: -------------------------------------------------------------------------------- 1 | ef619f3bb68039e35c4a219e06be72d0 2 | -------------------------------------------------------------------------------- /deps/checksums/patchelf-0.9.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 3c265508526760f233620f35d79c79fc 2 | -------------------------------------------------------------------------------- /deps/checksums/pcre2-10.30.tar.bz2/md5: -------------------------------------------------------------------------------- 1 | d3adf4b130eed854a530390f00020a65 2 | -------------------------------------------------------------------------------- /doc/src/assets/julia-manual.css: -------------------------------------------------------------------------------- 1 | nav.toc h1 { 2 | display: none; 3 | } 4 | -------------------------------------------------------------------------------- /stdlib/SparseArrays/test/testgroups: -------------------------------------------------------------------------------- 1 | higherorderfns 2 | sparse 3 | sparsevector -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | /ccall 2 | /ccalltest 3 | /ccalltest.s 4 | /libccalltest.* 5 | -------------------------------------------------------------------------------- /deps/checksums/SuiteSparse-4.4.5.tar.gz/md5: -------------------------------------------------------------------------------- 1 | a2926c27f8a5285e4a10265cc68bbc18 2 | -------------------------------------------------------------------------------- /deps/checksums/arpack-ng-3.3.0-testA.mtx/md5: -------------------------------------------------------------------------------- 1 | 2826846e98bcb009d339fb69973951d3 2 | -------------------------------------------------------------------------------- /deps/checksums/libosxunwind-0.0.3.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 40510da5eb85e099050cadbc620d0af9 2 | -------------------------------------------------------------------------------- /deps/checksums/libunwind-1.1-julia2.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 8310cbf1288248996e5b4f5450e24588 2 | -------------------------------------------------------------------------------- /deps/checksums/mbedtls-2.6.0-apache.tgz/md5: -------------------------------------------------------------------------------- 1 | 01ede06f7d00dd8a6626494d95a63f6b 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/.gitignore: -------------------------------------------------------------------------------- 1 | /tmp 2 | *.jl.mem 3 | *.jl.cov 4 | *.jl.*.cov 5 | docs/build -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule/.gitignore: -------------------------------------------------------------------------------- 1 | deps/buildartifact -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule2/.gitignore: -------------------------------------------------------------------------------- 1 | deps/buildartifact -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/PackageWithBuildSpecificTestDeps/test/REQUIRE: -------------------------------------------------------------------------------- 1 | Example -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithoutProject/.gitignore: -------------------------------------------------------------------------------- 1 | /deps/deps.jl -------------------------------------------------------------------------------- /deps/checksums/compiler-rt-6.0.0.src.tar.xz/md5: -------------------------------------------------------------------------------- 1 | ba6368e894b5528e527d86a69d8533c6 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # treat patches as files that should not be modified 2 | *.patch -text 3 | -------------------------------------------------------------------------------- /contrib/ackrc: -------------------------------------------------------------------------------- 1 | --type-set=julia=.jl 2 | --type-add=julia:firstlinematch:/^#!.*\bjulia/ 3 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | deps/ 2 | _build/ 3 | UnicodeData.txt 4 | src/stdlib/ 5 | src/NEWS.md 6 | 7 | -------------------------------------------------------------------------------- /stdlib/Mmap/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Mmap" 2 | uuid = "a63ad114-7e13-5084-954f-fe012c677804" 3 | -------------------------------------------------------------------------------- /doc/images/jltypes.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/doc/images/jltypes.ai -------------------------------------------------------------------------------- /stdlib/Base64/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Base64" 2 | uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" 3 | -------------------------------------------------------------------------------- /stdlib/CRC32c/Project.toml: -------------------------------------------------------------------------------- 1 | name = "CRC32c" 2 | uuid = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" 3 | -------------------------------------------------------------------------------- /stdlib/LibGit2/Project.toml: -------------------------------------------------------------------------------- 1 | name = "LibGit2" 2 | uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" 3 | -------------------------------------------------------------------------------- /stdlib/Libdl/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Libdl" 2 | uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" 3 | -------------------------------------------------------------------------------- /stdlib/Logging/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Logging" 2 | uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" 3 | -------------------------------------------------------------------------------- /stdlib/SHA/Project.toml: -------------------------------------------------------------------------------- 1 | name = "SHA" 2 | uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" 3 | 4 | -------------------------------------------------------------------------------- /stdlib/Sockets/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Sockets" 2 | uuid = "6462fe0b-24de-5631-8697-dd941f90decc" 3 | -------------------------------------------------------------------------------- /stdlib/Unicode/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Unicode" 2 | uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" 3 | -------------------------------------------------------------------------------- /contrib/windows/7zS.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/contrib/windows/7zS.sfx -------------------------------------------------------------------------------- /contrib/windows/julia.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/contrib/windows/julia.ico -------------------------------------------------------------------------------- /deps/checksums/i686-4.9.2-release-win32-sjlj-rt_v4-rev3.7z/md5: -------------------------------------------------------------------------------- 1 | 6217dae4a1016b37b12aeed1cc950187 2 | -------------------------------------------------------------------------------- /deps/checksums/llvm-3.9.1-i686-w64-mingw32-juliadeps-r07.7z/md5: -------------------------------------------------------------------------------- 1 | 78a8751aab4333e636ab36d1bd56216a 2 | -------------------------------------------------------------------------------- /deps/checksums/llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r07.7z/md5: -------------------------------------------------------------------------------- 1 | 96af87df3140a00df866eda5b5a99d37 2 | -------------------------------------------------------------------------------- /deps/checksums/x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z/md5: -------------------------------------------------------------------------------- 1 | b138576c92c425e8fa171a9d98e13b86 2 | -------------------------------------------------------------------------------- /deps/libuv.version: -------------------------------------------------------------------------------- 1 | LIBUV_BRANCH=julia-uv2 2 | LIBUV_SHA1=be317349252699670131395f125c3861d793ca86 3 | -------------------------------------------------------------------------------- /doc/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/doc/src/assets/logo.png -------------------------------------------------------------------------------- /contrib/mac/app/julia.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/contrib/mac/app/julia.icns -------------------------------------------------------------------------------- /deps/libgit2.version: -------------------------------------------------------------------------------- 1 | LIBGIT2_BRANCH=v0.26.0 2 | LIBGIT2_SHA1=15e119375018fba121cf58e02a9f17fe22df0df8 3 | -------------------------------------------------------------------------------- /deps/libwhich.version: -------------------------------------------------------------------------------- 1 | LIBWHICH_BRANCH=master 2 | LIBWHICH_SHA1=81e9723c0273d78493dc8c8ed570f68d9ce7e89e 3 | -------------------------------------------------------------------------------- /deps/openblas.version: -------------------------------------------------------------------------------- 1 | OPENBLAS_BRANCH=v0.3.0 2 | OPENBLAS_SHA1=939452ea9dcb57abdcc3f1278c6db668a4690465 3 | -------------------------------------------------------------------------------- /deps/openlibm.version: -------------------------------------------------------------------------------- 1 | OPENLIBM_BRANCH=v0.5.4 2 | OPENLIBM_SHA1=1581174c85f7b645b15ba1ac1c3a98fb601f0fe7 3 | -------------------------------------------------------------------------------- /deps/utf8proc.version: -------------------------------------------------------------------------------- 1 | UTF8PROC_BRANCH=v2.1.1 2 | UTF8PROC_SHA1=d688ac122660e465dc65c8eb7b1c2444fcd52829 3 | -------------------------------------------------------------------------------- /doc/images/travis-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/doc/images/travis-icon.png -------------------------------------------------------------------------------- /stdlib/FileWatching/Project.toml: -------------------------------------------------------------------------------- 1 | name = "FileWatching" 2 | uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" 3 | -------------------------------------------------------------------------------- /deps/checksums/libgit2-15e119375018fba121cf58e02a9f17fe22df0df8.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 0d6fd3ed9265c6804349149b23ae6362 2 | -------------------------------------------------------------------------------- /deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/md5: -------------------------------------------------------------------------------- 1 | d251ef0efecff323b6f570cc737d3411 2 | -------------------------------------------------------------------------------- /deps/checksums/libuv-be317349252699670131395f125c3861d793ca86.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 71e609bfc84077aff986a2765d84e3ff 2 | -------------------------------------------------------------------------------- /deps/checksums/libwhich-81e9723c0273d78493dc8c8ed570f68d9ce7e89e.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 22fd8368c7b40209dada50e3205c1294 2 | -------------------------------------------------------------------------------- /deps/checksums/openblas-939452ea9dcb57abdcc3f1278c6db668a4690465.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 48cd39d0cc38ebcbabb8c666c9725bdd 2 | -------------------------------------------------------------------------------- /deps/checksums/openlibm-1581174c85f7b645b15ba1ac1c3a98fb601f0fe7.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 46654ecc67adba1d86426b1d9dfa3bc9 2 | -------------------------------------------------------------------------------- /deps/checksums/utf8proc-d688ac122660e465dc65c8eb7b1c2444fcd52829.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 9e62d28101ad9792161813bb43402202 2 | -------------------------------------------------------------------------------- /deps/libssh2.version: -------------------------------------------------------------------------------- 1 | LIBSSH2_BRANCH=libssh2-1.8.0 2 | LIBSSH2_SHA1=30e9c1347e3b8baa2951db612f05e6d87fc8e2f2 3 | -------------------------------------------------------------------------------- /stdlib/Serialization/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Serialization" 2 | uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" 3 | -------------------------------------------------------------------------------- /contrib/debug_bootstrap.gdb: -------------------------------------------------------------------------------- 1 | file ../usr/bin/julia-debug 2 | r --build ../usr/lib/julia/sys0.bc sysimg.jl 3 | bt 4 | -------------------------------------------------------------------------------- /deps/checksums/openspecfun-39699a1c1824bf88410cabb8a7438af91ea98f4c.tar.gz/md5: -------------------------------------------------------------------------------- 1 | 00130a0879f691240df5f3ea25e6f0ba 2 | -------------------------------------------------------------------------------- /src/support/.gitignore: -------------------------------------------------------------------------------- 1 | /*.o 2 | /*.do 3 | /*.obj 4 | /*.lib 5 | /*.pdb 6 | /libsupport.a 7 | /libsupport-debug.a 8 | -------------------------------------------------------------------------------- /doc/images/github_metadata_fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/doc/images/github_metadata_fork.png -------------------------------------------------------------------------------- /contrib/README.ackrc.txt: -------------------------------------------------------------------------------- 1 | The 'ackrc' file is for Ack (http://beyondgrep.com/) 2 | Place its contents in your ~/.ackrc file. 3 | -------------------------------------------------------------------------------- /stdlib/CRC32c/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # CRC32c 2 | 3 | ```@docs 4 | CRC32c.crc32c 5 | CRC32c.crc32c(::IO, ::Integer, ::UInt32) 6 | ``` 7 | -------------------------------------------------------------------------------- /doc/Project.toml: -------------------------------------------------------------------------------- 1 | [deps] 2 | Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" 3 | Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" 4 | -------------------------------------------------------------------------------- /doc/images/github_metadata_develbranch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/doc/images/github_metadata_develbranch.png -------------------------------------------------------------------------------- /doc/images/github_metadata_pullrequest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findmyway/julia/master/doc/images/github_metadata_pullrequest.png -------------------------------------------------------------------------------- /src/flisp/mkboot1.lsp: -------------------------------------------------------------------------------- 1 | ; -*- scheme -*- 2 | 3 | (load "system.lsp") 4 | (load "compiler.lsp") 5 | (make-system-image "flisp.boot") 6 | -------------------------------------------------------------------------------- /contrib/windows/7zSFX-config.txt: -------------------------------------------------------------------------------- 1 | ;!@Install@!UTF-8! 2 | Title="The Julia Language" 3 | RunProgram="julia-installer.exe" 4 | ;!@InstallEnd@! 5 | -------------------------------------------------------------------------------- /test/util/segfault.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | unsafe_load(convert(Ptr{UInt8},C_NULL)) 4 | -------------------------------------------------------------------------------- /test/util/throw_error_exception.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | error("This purposefully dies") 4 | -------------------------------------------------------------------------------- /stdlib/Dates/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Dates" 2 | uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" 3 | 4 | [deps] 5 | Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" 6 | -------------------------------------------------------------------------------- /stdlib/Dates/test/testgroups: -------------------------------------------------------------------------------- 1 | accessors 2 | adjusters 3 | query 4 | periods 5 | ranges 6 | rounding 7 | types 8 | io 9 | arithmetic 10 | conversions 11 | -------------------------------------------------------------------------------- /stdlib/UUIDs/Project.toml: -------------------------------------------------------------------------------- 1 | name = "UUIDs" 2 | uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" 3 | 4 | [deps] 5 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 6 | -------------------------------------------------------------------------------- /base/.gitignore: -------------------------------------------------------------------------------- 1 | /pcre_h.jl 2 | /errno_h.jl 3 | /build_h.jl 4 | /file_constants.jl 5 | /uv_constants.jl 6 | /version_git.jl 7 | /version_git.jl.phony 8 | /userimg.jl 9 | -------------------------------------------------------------------------------- /stdlib/Future/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Future" 2 | uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" 3 | 4 | [deps] 5 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 6 | -------------------------------------------------------------------------------- /stdlib/LibGit2/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | include("libgit2.jl") 4 | include("online.jl") -------------------------------------------------------------------------------- /stdlib/Markdown/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Markdown" 2 | uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" 3 | 4 | [deps] 5 | Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" 6 | -------------------------------------------------------------------------------- /stdlib/OldPkg/Project.toml: -------------------------------------------------------------------------------- 1 | name = "OldPkg" 2 | uuid = "fe1c5a76-5840-53d2-82f9-288dd83ce2ce" 3 | 4 | [deps] 5 | LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" 6 | -------------------------------------------------------------------------------- /stdlib/OldPkg/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | include("pkg.jl") 4 | include("resolve.jl") 5 | -------------------------------------------------------------------------------- /stdlib/Printf/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Printf" 2 | uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" 3 | 4 | [deps] 5 | Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" 6 | -------------------------------------------------------------------------------- /stdlib/Profile/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Profile" 2 | uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" 3 | 4 | [deps] 5 | Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" 6 | -------------------------------------------------------------------------------- /deps/checksums/UnicodeData.txt/sha512: -------------------------------------------------------------------------------- 1 | 43eaf66d9cb3748012b2dfd77da1b41f667c5c7602a56bea8186b796b215bde82d555d79ab053378c2222521396354dcce5cf23a78fa3b1456062c47771c8433 2 | -------------------------------------------------------------------------------- /deps/checksums/dsfmt-2.2.3.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 6d8ddcd01aab3f9039f4f0288a8af53e290cc2f293ed8c4a8c9f3b3f12398e7eedfce8016117b425766ba89c61c86c13b3e420035b5f9bf91315b8b814c03662 2 | -------------------------------------------------------------------------------- /deps/checksums/gmp-6.1.2.tar.bz2/sha512: -------------------------------------------------------------------------------- 1 | 268db88447174617f5746d9a6ba2b105940cc1a5e73155eb23b6eedf55f8e7724eda05d161b2de19aca9e794956d226ba9ed6f23124c7c82f7e1872e32b003cf 2 | -------------------------------------------------------------------------------- /deps/checksums/lapack-3.5.0.tgz/sha512: -------------------------------------------------------------------------------- 1 | b948a0a0db032bda455ec4f519d4e89e4c29e29cecb5b6258ca61f68faaeeac9fdf4ece5c39ffcd0154c5505facbc392c7d09c8348b1d60bdd2685153ab2543f 2 | -------------------------------------------------------------------------------- /deps/checksums/mpfr-4.0.0.tar.bz2/sha512: -------------------------------------------------------------------------------- 1 | 43932f9d5e60fd5545c27ff984784dd7a286656a0297d0be7c106f72a2d2e0408702be16bd27e5b5f17a04a2069d06d644cdb4ca4ab4c26ae1a5896fc77bdefd 2 | -------------------------------------------------------------------------------- /stdlib/Random/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Random" 2 | uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 3 | 4 | [deps] 5 | Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" 6 | -------------------------------------------------------------------------------- /stdlib/Serialization/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Serialization 2 | 3 | ```@docs 4 | Serialization.serialize 5 | Serialization.deserialize 6 | Serialization.writeheader 7 | ``` 8 | -------------------------------------------------------------------------------- /deps/checksums/arpack-ng-3.3.0.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 8d0e526831d62200af9d939e77e41548875caacdf39543c3f33a00321bb18fc04ffa625d9c4103f84c1f6a03a3c362dc1df8571db9a525d46487e5d1ae682474 2 | -------------------------------------------------------------------------------- /deps/checksums/cacert-2018-01-17.pem/sha512: -------------------------------------------------------------------------------- 1 | 4cb570be809ec4ffd44190e70f3671046eb8c820b981d06f7ae1e48b9aa486cd725f2a12cc9e39f56beacbaa48c569922f9f49bed6b582c2d1a2c8f6d28e7b8c 2 | -------------------------------------------------------------------------------- /deps/checksums/cfe-6.0.0.src.tar.xz/sha512: -------------------------------------------------------------------------------- 1 | e886dd27448503bbfc7fd4f68eb089c19b2f2be4f0e5b26d3df253833f60b91d70b472a6b530063386e2252075b110ce9f5942800feddf6c34b94a75cf7bd5c6 2 | -------------------------------------------------------------------------------- /deps/checksums/curl-7.56.0.tar.bz2/sha512: -------------------------------------------------------------------------------- 1 | ba17a9fdc4b540d6053fa542bd875f321d009b9ba0cb56b16fe6c217f3856ab061f2a6c735771a0eadc28338889d071884680b4d4c243b4179872abb29915e3b 2 | -------------------------------------------------------------------------------- /deps/checksums/llvm-6.0.0.src.tar.xz/sha512: -------------------------------------------------------------------------------- 1 | a71fdd5ddc46f01327ad891cfcc198febdbe10769c57f14d8a4fb7d514621ee4080e1a641200d3353c16a16731d390270499ec6cd3dc98fadc570f3eb6b52b8c 2 | -------------------------------------------------------------------------------- /deps/checksums/mbedtls-2.6.0-gpl.tgz/sha512: -------------------------------------------------------------------------------- 1 | ed0765a476bf8a318fac1389b49d2b42e1a4ac5d4df749d241b24b8c8acea59c62fbb17e4b14057203f16ba7c58b8723ececf74d8a6b065a233a87696155076a 2 | -------------------------------------------------------------------------------- /deps/checksums/patchelf-0.9.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 715db21156e6bd91cfa626f5201b32a6619e51532f5635ef52396da8193738ba66113485b61cc1e218b16737e66f72cc2e4bb3a7a33e73061ac2ef2c6330a299 2 | -------------------------------------------------------------------------------- /deps/checksums/pcre2-10.30.tar.bz2/sha512: -------------------------------------------------------------------------------- 1 | f247a9f917c75920793b9919a45bb1426d126246e7a5d04e39d9407e44b5781f894a90cd3d232b385436b2f22be391335ab782664dd3a28c79058a2fcc74dc3e 2 | -------------------------------------------------------------------------------- /src/flisp/.gitignore: -------------------------------------------------------------------------------- 1 | /*.o 2 | /*.a 3 | /*.do 4 | /*.exe 5 | /*.obj 6 | /*.lib 7 | /*.pdb 8 | /*.exp 9 | /*.map 10 | /flisp 11 | /flisp-debug 12 | /flisp-release 13 | -------------------------------------------------------------------------------- /src/mk_julia_flisp_boot.scm: -------------------------------------------------------------------------------- 1 | (set! lastpwd (path.cwd)) 2 | (path.cwd (cadr *argv*)) 3 | (load (caddr *argv*)) 4 | (path.cwd lastpwd) 5 | (make-system-image (cadddr *argv*)) 6 | -------------------------------------------------------------------------------- /stdlib/DelimitedFiles/Project.toml: -------------------------------------------------------------------------------- 1 | name = "DelimitedFiles" 2 | uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" 3 | 4 | [deps] 5 | Mmap = "a63ad114-7e13-5084-954f-fe012c677804" 6 | -------------------------------------------------------------------------------- /stdlib/LinearAlgebra/Project.toml: -------------------------------------------------------------------------------- 1 | name = "LinearAlgebra" 2 | uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 3 | 4 | [deps] 5 | Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" 6 | -------------------------------------------------------------------------------- /test/project/deps/Qux.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | module Qux 5 | this = "Qux" 6 | end 7 | -------------------------------------------------------------------------------- /deps/checksums/SuiteSparse-4.4.5.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 7f9c19c3c58f61e7d82cd2de25eeeec910ad3d6a5c7c79c62a23cbb7dc880cddeca6efa9860a87b3b3c05e74385c8c67bf61d44149b700ac094898237915a6d9 2 | -------------------------------------------------------------------------------- /deps/checksums/arpack-ng-3.3.0-testA.mtx/sha512: -------------------------------------------------------------------------------- 1 | 00af7f2353441c4197c52d105d3670fe250a312b8e67ae2794246f2ce8cd0b63585e5c5ab764921d357efd9ad685fcc0ee5b8b8ee7ab9af2bea26ccbb97c50ba 2 | -------------------------------------------------------------------------------- /deps/checksums/compiler-rt-6.0.0.src.tar.xz/sha512: -------------------------------------------------------------------------------- 1 | 717bed116ef43ebb2e18daf6fb737472edf57564947f53fe6368d3bbb080f63e986c0d1b94dbd087be998196ad7be54f4361854f8eb5214600b82449ba02c9c1 2 | -------------------------------------------------------------------------------- /deps/checksums/libosxunwind-0.0.3.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 64c57c297b6b3779ed7d675d3ebcf471247b0d15bb560fce631afd82229adb352d438cf71509ab076610c6867bcc9ee359cf609c0257e53bea431235ff1da349 2 | -------------------------------------------------------------------------------- /deps/checksums/libunwind-1.1-julia2.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 5047890e727069c6ed74ca84bbe999ba6bc5c41d8d3914d6fbce19d18ff8a5944a7276d805ef5f67a857598852ae996a671c264d34a19123bb04d4daf6316f9a 2 | -------------------------------------------------------------------------------- /deps/checksums/mbedtls-2.6.0-apache.tgz/sha512: -------------------------------------------------------------------------------- 1 | 5eb47d95a31c63e43074a115d141dedae869c43cbe62d5cf7bde11440e14fb8879ac6ed204d0d741b3501b8ba551019a5d47cbdf6673d18b61296be4463e9ffd 2 | -------------------------------------------------------------------------------- /etc/startup.jl: -------------------------------------------------------------------------------- 1 | # This file should contain site-specific commands to be executed on Julia startup; 2 | # Users may store their own personal commands in `~/.julia/config/startup.jl`. 3 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithoutProject/deps/build.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | touch(joinpath(@__DIR__, "deps.jl")) -------------------------------------------------------------------------------- /deps/checksums/i686-4.9.2-release-win32-sjlj-rt_v4-rev3.7z/sha512: -------------------------------------------------------------------------------- 1 | 1f38cc758725f124552285940cde6d9e072a594298a09f7a542a6cc28cb25d119d80d73918e4e9207694819825787abb6eba4a83cee5892e5acaf6350221b97f 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule/deps/build.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | touch(joinpath(@__DIR__, "buildartifact")) 4 | -------------------------------------------------------------------------------- /test/test_exec.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Test 4 | # Check that the fallback test set throws immediately 5 | @test 1 == 2 6 | -------------------------------------------------------------------------------- /deps/checksums/llvm-3.9.1-i686-w64-mingw32-juliadeps-r07.7z/sha512: -------------------------------------------------------------------------------- 1 | 1a512d01f0751d184858de660cd69f1861af230f193522f6d94a61752caad32a5fa7af40f6abcfd153733107824eb3deaa6e6ef3d680eba3898af02d44a97d19 2 | -------------------------------------------------------------------------------- /deps/checksums/llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r07.7z/sha512: -------------------------------------------------------------------------------- 1 | 24697b575688fea8f2ca5f9bf3f8f96353c09efbe32923cedc111bf976d5480a82a4c4dec52fc9343715887dee98605c80c3323e4d1b2f245e239cf5604ea02d 2 | -------------------------------------------------------------------------------- /deps/checksums/x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z/sha512: -------------------------------------------------------------------------------- 1 | 50dcb3aaab3e53d5ff4561079272daf473bacc8d7a2a3720e7c594ae6e402123cb3cc6f3eabaf67df8d94fa5c01bb3e45b5bb1bc7cbb87cd2beb6b5664e02072 2 | -------------------------------------------------------------------------------- /stdlib/IterativeEigensolvers/Project.toml: -------------------------------------------------------------------------------- 1 | name = "IterativeEigensolvers" 2 | uuid = "de555fa4-b82f-55e7-8b71-53f60bbc027d" 3 | 4 | [deps] 5 | LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 6 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule2/deps/build.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | touch(joinpath(@__DIR__, "buildartifact")) 4 | -------------------------------------------------------------------------------- /deps/checksums/libuv-be317349252699670131395f125c3861d793ca86.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | c9040816b2e2439017071f1ca1293258e6066486310b2c89a8eac2524c19366033c6ff6d1eadf910961b8cec3d1dafb4a63af96a2749baa8c85a725cd1de7d43 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/test/LibFoo.jl/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using LibFoo 4 | using Test 5 | 6 | @test 1 == 1 -------------------------------------------------------------------------------- /test/project/deps/Bar/src/Bar.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | module Bar 5 | import Baz, Foo 6 | this = "Bar" 7 | end 8 | -------------------------------------------------------------------------------- /test/project/deps/Foo2.jl/src/Foo.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | module Foo 5 | import Qux 6 | this = "Foo2" 7 | end 8 | -------------------------------------------------------------------------------- /deps/checksums/libgit2-15e119375018fba121cf58e02a9f17fe22df0df8.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 88a8a42bb8d18a5a722938404e048266d0899362ac89fdfedfa9f71aeb90408d8d98b4d9b9ea2ff46755d0a2cd8686ff04d31e85827566e1290a9536b8b36ac8 2 | -------------------------------------------------------------------------------- /deps/checksums/libssh2-30e9c1347e3b8baa2951db612f05e6d87fc8e2f2.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | ae7535cf8f70e7c837e80365cd9ee7c4040d45e952871a3e5c8f1b71bd8eb2d96babb07fa4c5d66a83bb45960728ef8dbba30ab9a6387a68cf815a84cdae8795 2 | -------------------------------------------------------------------------------- /deps/checksums/libwhich-81e9723c0273d78493dc8c8ed570f68d9ce7e89e.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 6fb77b715d70d9bc95a8546c3bf97bd3677c7ea344b88bb5bc3bbfac9dceabe8a8cde7a0f64dec884cde802e4a3000e30837d3f824b5a9242348c4fe061526a3 2 | -------------------------------------------------------------------------------- /deps/checksums/openblas-939452ea9dcb57abdcc3f1278c6db668a4690465.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | ac9fb76726685fde71c865d58d7171dbb46ae9c5518ab19066e3789fe2a0a5a253406d6a6eb54aa93432f68af2045cfc6fc2c73acafc961c7732e222cac71010 2 | -------------------------------------------------------------------------------- /deps/checksums/openlibm-1581174c85f7b645b15ba1ac1c3a98fb601f0fe7.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 64bb73800f3ff9219d7094b9f5f224468ee4cb34136bef77e1ae8b849e18d5f5fc1001f2e8dd92bcf0018f78152c3b52b9284e431bbafcea21d4f594c05e19ad 2 | -------------------------------------------------------------------------------- /deps/checksums/utf8proc-d688ac122660e465dc65c8eb7b1c2444fcd52829.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | ea5212543a11781ec761b6231fb8af451cd31034bcc008b6664e1c3bb71b78e812d5634949ee6c58b4527954d5d6dd2bc127356dad3fea0865040d24968a08be 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module PkgTests 4 | 5 | include("pkg.jl") 6 | include("resolve.jl") 7 | 8 | end # module 9 | -------------------------------------------------------------------------------- /test/depot/packages/Baz/81oL/src/Baz.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | module Baz 5 | import Foo, Qux 6 | this = "Baz" 7 | end 8 | -------------------------------------------------------------------------------- /deps/checksums/openspecfun-39699a1c1824bf88410cabb8a7438af91ea98f4c.tar.gz/sha512: -------------------------------------------------------------------------------- 1 | 8681fc2f31696de2a6850cb4318c14ad39d3514742b066cf16058da87966d08e0d197fbb5104229fa19b61819a12ae5c76ea0279749f4338923cd4741ba31132 2 | -------------------------------------------------------------------------------- /test/project/Project.toml: -------------------------------------------------------------------------------- 1 | name = "TestProject" 2 | uuid = "84c38c17-0c6f-4d12-a694-d20b69c16777" 3 | 4 | [deps] 5 | Foo = "767738be-2f1f-45a9-b806-0234f3164144" 6 | Bar = "2a550a13-6bab-4a91-a4ee-dff34d6b99d0" 7 | -------------------------------------------------------------------------------- /stdlib/LinearAlgebra/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | for file in readlines(joinpath(@__DIR__, "testgroups")) 4 | include(file * ".jl") 5 | end 6 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule/Project.toml: -------------------------------------------------------------------------------- 1 | authors = ["Some One "] 2 | name = "SubModule" 3 | uuid = "0d404dc8-25d6-11e8-300e-11c8e584fb95" 4 | version = "0.1.0" 5 | 6 | [deps] 7 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Test 4 | using SubModule 5 | 6 | @test SubModule.f() == 1 7 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule2/Project.toml: -------------------------------------------------------------------------------- 1 | authors = ["Some One "] 2 | name = "SubModule2" 3 | uuid = "2d3cad7e-26b9-11e8-3e8d-a543003d541d" 4 | version = "0.1.0" 5 | 6 | [deps] 7 | -------------------------------------------------------------------------------- /stdlib/SparseArrays/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | for file in readlines(joinpath(@__DIR__, "testgroups")) 4 | include(file * ".jl") 5 | end 6 | -------------------------------------------------------------------------------- /deps/NATIVE.cmake: -------------------------------------------------------------------------------- 1 | # native toolchain file to fix llvm cross-compilation finickiness 2 | # ref http://lists.llvm.org/pipermail/llvm-dev/2016-February/095366.html 3 | set(CMAKE_C_COMPILER cc) 4 | set(CMAKE_CXX_COMPILER c++) 5 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule2/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Test 4 | using SubModule2 5 | 6 | @test SubModule2.f() == 1 7 | -------------------------------------------------------------------------------- /contrib/mac/app/startup.applescript: -------------------------------------------------------------------------------- 1 | set RootPath to POSIX path of (path to me) 2 | tell application id "com.apple.terminal" 3 | do script ("exec '" & RootPath & "Contents/Resources/julia/bin/julia'") 4 | activate 5 | end tell 6 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithProject/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using UnregisteredWithProject 4 | using Test 5 | 6 | @test f(2) == 2 7 | -------------------------------------------------------------------------------- /test/project/deps/Foo1/src/Foo.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | module Foo 5 | import Bar, Baz, Qux 6 | this = "Foo1" 7 | which = "path" 8 | end 9 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/deps/build.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using SubModule 4 | using SubModule2 5 | 6 | touch(joinpath(@__DIR__, "buildartifact")) 7 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/test/LibFoo.jl/src/LibFoo.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module LibFoo 4 | 5 | greet() = print("Hello World!") 6 | 7 | end # module 8 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithoutProject/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using UnregisteredWithoutProject 4 | using Test 5 | 6 | @test f(2) == 2 7 | -------------------------------------------------------------------------------- /stdlib/Printf/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Printf 2 | 3 | ```@meta 4 | DocTestSetup = :(using Printf) 5 | ``` 6 | 7 | ```@docs 8 | Printf.@printf 9 | Printf.@sprintf 10 | ``` 11 | 12 | ```@meta 13 | DocTestSetup = nothing 14 | ``` 15 | -------------------------------------------------------------------------------- /stdlib/SparseArrays/Project.toml: -------------------------------------------------------------------------------- 1 | name = "SparseArrays" 2 | uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" 3 | 4 | [deps] 5 | LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 6 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 7 | -------------------------------------------------------------------------------- /test/depot/packages/Foo/I05Q/src/Foo.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | module Foo 5 | import Bar, Baz, Qux 6 | this = "Foo1" 7 | which = "depot" 8 | end 9 | -------------------------------------------------------------------------------- /stdlib/SharedArrays/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Shared Arrays 2 | 3 | ```@docs 4 | SharedArrays.SharedArray 5 | SharedArrays.procs(::SharedArray) 6 | SharedArrays.sdata 7 | SharedArrays.indexpids 8 | SharedArrays.localindices 9 | ``` 10 | -------------------------------------------------------------------------------- /contrib/valgrind-julia.supp: -------------------------------------------------------------------------------- 1 | # https://github.com/JuliaLang/julia/issues/4533 2 | { 3 | msync unwind 4 | Memcheck:Param 5 | msync(start) 6 | ... 7 | obj:*/libpthread*.so 8 | ... 9 | fun:rec_backtrace_ctx 10 | } 11 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithProject/Project.toml: -------------------------------------------------------------------------------- 1 | name = "UnregisteredWithProject" 2 | uuid = "58262bb0-2073-11e8-3727-4fe182c12249" 3 | version = "0.1.0" 4 | 5 | [deps] 6 | Example = "7876af07-990d-54b4-ab0e-23690620f79a" 7 | -------------------------------------------------------------------------------- /stdlib/FileWatching/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # [File Events](@id lib-filewatching) 2 | 3 | ```@docs 4 | FileWatching.poll_fd 5 | FileWatching.poll_file 6 | FileWatching.watch_file 7 | FileWatching.watch_folder 8 | FileWatching.unwatch_folder 9 | ``` 10 | -------------------------------------------------------------------------------- /stdlib/Mmap/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Memory-mapped I/O 2 | 3 | ```@meta 4 | DocTestSetup = :(using Mmap) 5 | ``` 6 | 7 | ```@docs 8 | Mmap.Anonymous 9 | Mmap.mmap 10 | Mmap.sync! 11 | ``` 12 | 13 | ```@meta 14 | DocTestSetup = nothing 15 | ``` 16 | -------------------------------------------------------------------------------- /stdlib/Dates/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module DateTests 4 | 5 | for file in readlines(joinpath(@__DIR__, "testgroups")) 6 | include(file * ".jl") 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /stdlib/Libdl/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Dynamic Linker 2 | 3 | ```@docs 4 | Libdl.dlopen 5 | Libdl.dlopen_e 6 | Libdl.RTLD_NOW 7 | Libdl.dlsym 8 | Libdl.dlsym_e 9 | Libdl.dlclose 10 | Libdl.dlext 11 | Libdl.find_library 12 | Libdl.DL_LOAD_PATH 13 | ``` 14 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/PackageWithBuildSpecificTestDeps/src/PackageWithBuildSpecificTestDeps.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module PackageWithBuildSpecificTestDeps 4 | 5 | f(x) = x 6 | 7 | end -------------------------------------------------------------------------------- /stdlib/UUIDs/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # UUIDs 2 | 3 | ```@meta 4 | DocTestSetup = :(using UUIDs, Random) 5 | ``` 6 | 7 | ```@docs 8 | UUIDs.uuid1 9 | UUIDs.uuid4 10 | UUIDs.uuid_version 11 | ``` 12 | 13 | ```@meta 14 | DocTestSetup = nothing 15 | ``` 16 | -------------------------------------------------------------------------------- /src/flisp/equalhash.h: -------------------------------------------------------------------------------- 1 | #ifndef JL_EQUALHASH_H 2 | #define JL_EQUALHASH_H 3 | 4 | #include "htable.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | HTPROT_R(equalhash) 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /stdlib/Unicode/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Unicode 2 | 3 | ```@meta 4 | DocTestSetup = :(using Unicode) 5 | ``` 6 | 7 | ```@docs 8 | Unicode.isassigned 9 | Unicode.normalize 10 | Unicode.graphemes 11 | ``` 12 | 13 | ```@meta 14 | DocTestSetup = nothing 15 | ``` 16 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/test/LibFoo.jl/Project.toml: -------------------------------------------------------------------------------- 1 | authors = ["Some One "] 2 | name = "LibFoo" 3 | uuid = "22d9ad80-6275-11e8-2737-a9b3d0e63aa9" 4 | version = "0.1.0" 5 | 6 | [deps] 7 | Example = "7876af07-990d-54b4-ab0e-23690620f79a" 8 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithProject/src/UnregisteredWithProject.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module UnregisteredWithProject 4 | 5 | using Example 6 | 7 | export f 8 | f(x) = x 9 | 10 | end -------------------------------------------------------------------------------- /stdlib/REPL/Project.toml: -------------------------------------------------------------------------------- 1 | name = "REPL" 2 | uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" 3 | 4 | [deps] 5 | InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" 6 | Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" 7 | Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" 8 | -------------------------------------------------------------------------------- /stdlib/SuiteSparse/Project.toml: -------------------------------------------------------------------------------- 1 | name = "SuiteSparse" 2 | uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" 3 | 4 | [deps] 5 | Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" 6 | LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 7 | SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" 8 | -------------------------------------------------------------------------------- /stdlib/InteractiveUtils/Project.toml: -------------------------------------------------------------------------------- 1 | name = "InteractiveUtils" 2 | uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" 3 | 4 | [deps] 5 | Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" 6 | OldPkg = "fe1c5a76-5840-53d2-82f9-288dd83ce2ce" 7 | LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 8 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/PackageWithBuildSpecificTestDeps/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Example 4 | using PackageWithBuildSpecificTestDeps 5 | using Test 6 | 7 | @test PackageWithBuildSpecificTestDeps.f(3) == 3 -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/test/LibFoo.jl/Manifest.toml: -------------------------------------------------------------------------------- 1 | [[Example]] 2 | deps = ["Test"] 3 | git-tree-sha1 = "8eb7b4d4ca487caade9ba3e85932e28ce6d6e1f8" 4 | uuid = "7876af07-990d-54b4-ab0e-23690620f79a" 5 | version = "0.5.1" 6 | 7 | [[Test]] 8 | uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" 9 | -------------------------------------------------------------------------------- /stdlib/LinearAlgebra/test/testgroups: -------------------------------------------------------------------------------- 1 | triangular 2 | qr 3 | dense 4 | matmul 5 | schur 6 | special 7 | eigen 8 | bunchkaufman 9 | svd 10 | lapack 11 | tridiag 12 | bidiag 13 | diagonal 14 | cholesky 15 | lu 16 | symmetric 17 | generic 18 | uniformscaling 19 | lq 20 | hessenberg 21 | blas 22 | adjtrans 23 | -------------------------------------------------------------------------------- /stdlib/Base64/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Base64 2 | 3 | ```@meta 4 | DocTestSetup = :(using Base64) 5 | ``` 6 | 7 | ```@docs 8 | Base64.Base64EncodePipe 9 | Base64.base64encode 10 | Base64.Base64DecodePipe 11 | Base64.base64decode 12 | Base64.stringmime 13 | ``` 14 | 15 | ```@meta 16 | DocTestSetup = nothing 17 | ``` 18 | -------------------------------------------------------------------------------- /test/sysinfo.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # We can't guarantee that these are correct, but we can at least check 4 | # that they run 5 | @test length(Base.Sys.cpu_info()) > 0 6 | sprint(Base.Sys.cpu_summary) 7 | @test Base.Sys.uptime() > 0 8 | Base.Sys.loadavg() 9 | -------------------------------------------------------------------------------- /stdlib/SuiteSparse/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Test, Random 4 | using SuiteSparse, LinearAlgebra, SparseArrays 5 | 6 | if Base.USE_GPL_LIBS 7 | include("umfpack.jl") 8 | include("cholmod.jl") 9 | include("spqr.jl") 10 | end 11 | -------------------------------------------------------------------------------- /stdlib/Test/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Test" 2 | uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" 3 | 4 | [deps] 5 | Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" 6 | InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" 7 | Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" 8 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 9 | -------------------------------------------------------------------------------- /contrib/filterArgs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # Loop over all command line arguments 5 | for i in "$@"; do 6 | # If an argument starts with -L, echo it out sans -L! 7 | case $i in 8 | -L*) printf '"%s"\n' "${i#-L}" ;; 9 | esac 10 | done 11 | -------------------------------------------------------------------------------- /contrib/julia.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Julia 3 | Comment=High-level, high-performance dynamic language for technical computing 4 | Exec=julia 5 | Icon=julia 6 | Terminal=true 7 | Type=Application 8 | Categories=Development;ComputerScience;Building;Science;Math;NumericalAnalysis;ParallelComputing;DataVisualization;ConsoleOnly; 9 | -------------------------------------------------------------------------------- /stdlib/Pkg/bin/update.jl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env julia 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | pushfirst!(LOAD_PATH, joinpath(@__DIR__, "..", "ext")) 5 | 6 | include("loadmeta.jl") 7 | include("utils.jl") 8 | include("gitmeta.jl") 9 | include("genstdlib.jl") 10 | include("generate.jl") 11 | -------------------------------------------------------------------------------- /stdlib/SharedArrays/Project.toml: -------------------------------------------------------------------------------- 1 | name = "SharedArrays" 2 | uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" 3 | 4 | [deps] 5 | Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" 6 | Mmap = "a63ad114-7e13-5084-954f-fe012c677804" 7 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 8 | Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" 9 | -------------------------------------------------------------------------------- /stdlib/Distributed/Project.toml: -------------------------------------------------------------------------------- 1 | name = "Distributed" 2 | uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" 3 | 4 | [deps] 5 | LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" 6 | Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" 7 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 8 | Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" 9 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Test 4 | using Example 5 | using BigProject 6 | 7 | @test BigProject.f() == 1 8 | 9 | # #306 Pkg.jl 10 | cd("LibFoo.jl") do 11 | run(`$(Base.julia_cmd()) test/runtests.jl`) 12 | end -------------------------------------------------------------------------------- /src/support/ptrhash.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_PTRHASH_H 4 | #define JL_PTRHASH_H 5 | 6 | #include "htable.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | HTPROT(ptrhash) 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /deps/Versions.make: -------------------------------------------------------------------------------- 1 | LLVM_VER = 6.0.0 2 | LLVM_BB_REL = 2 3 | PCRE_VER = 10.30 4 | DSFMT_VER = 2.2.3 5 | LAPACK_VER = 3.5.0 6 | ARPACK_VER = 3.3.0 7 | SUITESPARSE_VER = 4.4.5 8 | UNWIND_VER = 1.1-julia2 9 | OSXUNWIND_VER = 0.0.3 10 | GMP_VER = 6.1.2 11 | MPFR_VER = 4.0.0 12 | PATCHELF_VER = 0.9 13 | MBEDTLS_VER = 2.6.0 14 | CURL_VER = 7.56.0 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.tar.gz 2 | /tmp 3 | /dist 4 | /dist-extras 5 | /julia 6 | /usr 7 | /usr-staging 8 | /Make.user 9 | /julia-* 10 | /source-dist.tmp 11 | /source-dist.tmp1 12 | 13 | *.exe 14 | *.dll 15 | *.dwo 16 | *.do 17 | *.o 18 | *.obj 19 | *.so 20 | *.dylib 21 | *.dSYM 22 | *.jl.cov 23 | *.jl.*.cov 24 | *.jl.mem 25 | *.ji 26 | 27 | .DS_Store 28 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | /*.o 2 | /*.do 3 | /*.exe 4 | /*.obj 5 | /*.lib 6 | /*.pdb 7 | /*.exp 8 | 9 | /boot.j.inc 10 | /julia_flisp.boot 11 | /julia_flisp.boot.inc 12 | /flisp.boot.inc 13 | 14 | /libjulia-debug.a 15 | /libjulia-debug.so 16 | /libjulia-debug.dylib 17 | /libjulia-release.a 18 | /libjulia-release.so 19 | /libjulia-release.dylib 20 | /julia_version.h 21 | -------------------------------------------------------------------------------- /test/embedding/LocalModule.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__() 4 | module LocalModule 5 | 6 | using Distributed 7 | export myapp 8 | 9 | function myapp() 10 | p = addprocs(1) 11 | @everywhere p println("Taking over the world...") 12 | rmprocs(p) 13 | nothing 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /stdlib/IterativeEigensolvers/src/deprecated.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | LinearAlgebra.A_mul_B!(y::StridedVector{T}, A::AtA_or_AAt{T}, x::StridedVector{T}) where {T} = LinearAlgebra.mul!(y, A, x) 4 | LinearAlgebra.A_mul_B!(y::StridedVector{T}, A::SVDAugmented{T}, x::StridedVector{T}) where {T} = LinearAlgebra.mul!(y, A, x) 5 | -------------------------------------------------------------------------------- /stdlib/Profile/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # [Profiling](@id lib-profiling) 2 | 3 | ```@docs 4 | Profile.@profile 5 | ``` 6 | 7 | The methods in `Profile` are not exported and need to be called e.g. as `Profile.print()`. 8 | 9 | ```@docs 10 | Profile.clear 11 | Profile.print 12 | Profile.init 13 | Profile.fetch 14 | Profile.retrieve 15 | Profile.callers 16 | Profile.clear_malloc_data 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/src/base/libc.md: -------------------------------------------------------------------------------- 1 | # C Standard Library 2 | 3 | ```@docs 4 | Base.Libc.malloc 5 | Base.Libc.calloc 6 | Base.Libc.realloc 7 | Base.Libc.free 8 | Base.Libc.errno 9 | Base.Libc.strerror 10 | Base.Libc.GetLastError 11 | Base.Libc.FormatMessage 12 | Base.Libc.time(::Base.Libc.TmStruct) 13 | Base.Libc.strftime 14 | Base.Libc.strptime 15 | Base.Libc.TmStruct 16 | Base.Libc.flush_cstdio 17 | ``` 18 | -------------------------------------------------------------------------------- /stdlib/REPL/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module REPLTests 4 | include("repl.jl") 5 | end 6 | module REPLCompletionsTest 7 | include("replcompletions.jl") 8 | end 9 | module LineEditTest 10 | include("lineedit.jl") 11 | end 12 | module TerminalMenusTest 13 | include("TerminalMenus/runtests.jl") 14 | end 15 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule/src/SubModule.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module SubModule 4 | 5 | buildfile = joinpath(@__DIR__, "..", "deps", "buildartifact") 6 | if !isfile(buildfile) 7 | error("Package built incorrectly") 8 | else 9 | include(buildfile) 10 | end 11 | 12 | f() = 1 13 | 14 | end # module 15 | -------------------------------------------------------------------------------- /doc/src/base/stacktraces.md: -------------------------------------------------------------------------------- 1 | # StackTraces 2 | 3 | ```@docs 4 | Base.StackTraces.StackFrame 5 | Base.StackTraces.StackTrace 6 | Base.StackTraces.stacktrace 7 | ``` 8 | 9 | The following methods and types in `Base.StackTraces` are not exported and need to be called e.g. 10 | as `StackTraces.lookup(ptr)`. 11 | 12 | ```@docs 13 | Base.StackTraces.lookup 14 | Base.StackTraces.remove_frames! 15 | ``` 16 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/SubModule2/src/SubModule2.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module SubModule2 4 | 5 | buildfile = joinpath(@__DIR__, "..", "deps", "buildartifact") 6 | if !isfile(buildfile) 7 | error("Package built incorrectly") 8 | else 9 | include(buildfile) 10 | end 11 | 12 | f() = 1 13 | 14 | end # module 15 | -------------------------------------------------------------------------------- /deps/tools/find_python2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # LLVM requires 2.7 <= python2 < 3 4 | # 5 | 6 | valid_python() { 7 | $1 -c 'import sys; sys.exit(not (sys.version_info >= (2,7) and sys.version_info < (3,0)))' 2> /dev/null 8 | } 9 | 10 | for python in python python2 python2.7 python27; do 11 | if valid_python $python; then 12 | echo `which $python` 13 | break 14 | fi 15 | done 16 | 17 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/UnregisteredWithoutProject/src/UnregisteredWithoutProject.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__() 4 | module UnregisteredWithoutProject 5 | 6 | if !isfile(joinpath(@__DIR__, "..", "deps", "deps.jl")) 7 | error("UnregisteredWithoutProject is not installed correctly") 8 | end 9 | 10 | export f 11 | f(x) = x 12 | 13 | end -------------------------------------------------------------------------------- /deps/llvm-ver.make: -------------------------------------------------------------------------------- 1 | LLVM_VER_MAJ:=$(word 1, $(subst ., ,$(LLVM_VER))) 2 | LLVM_VER_MIN:=$(word 2, $(subst ., ,$(LLVM_VER))) 3 | # define a "short" LLVM version for easy comparisons 4 | ifeq ($(LLVM_VER),svn) 5 | LLVM_VER_SHORT:=svn 6 | else 7 | LLVM_VER_SHORT:=$(LLVM_VER_MAJ).$(LLVM_VER_MIN) 8 | endif 9 | LLVM_VER_PATCH:=$(word 3, $(subst ., ,$(LLVM_VER))) 10 | ifeq ($(LLVM_VER_PATCH),) 11 | LLVM_VER_PATCH := 0 12 | endif 13 | -------------------------------------------------------------------------------- /src/support/strtod.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_STRTOD_H 4 | #define JL_STRTOD_H 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | JL_DLLEXPORT double jl_strtod_c(const char *nptr, char **endptr); 11 | JL_DLLEXPORT float jl_strtof_c(const char *nptr, char **endptr); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /stdlib/LibGit2/test/keys/valid.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDegDfXU73lFO6dxSucfEu7sJQw30yHlmiVdy3fdGgSgCRqvsSjJbYLQBD7IDsLc+OULZKaBht5tQL43/RsU6iJsPAUJSZls6VFNYhNhuru3R/qeTtyXiXwG/Iw9tE3bmjM/KfVKsZz+8ePXUucZcY1laoJ/PkQnot8siUDk//TzXhCtGR4+D8ndFnccmPtCW8e8b24BBD/9Zd4V2ZFAMo2FlsxzRuJvFkaAxB4ovuGgbAYEdNrkNJawJZ6uZQLkhiysLk8DMZw38rBNtDRL1TvFVM64oNIQy/wDMSaSkK2S6VWx6zHs/jvBQqE46b04WKRUQLazS6hG819QNRLOMUt valid-credentials 2 | -------------------------------------------------------------------------------- /stdlib/LibGit2/test/keys/invalid.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzUv5nyzkZ23MtcYzf7hRVDuNzmr+40/NCAZSX6cL6jZUW4eaiaQAjHGtLfORVPQDgCeStWr8faXYA6XEq50VqfijzsAlCxMeSP0u8UGGb5sF0dq7RIZJ+3xwJYBe/mWJ8UKFhrFPvxjdCdI7hDsBURdBUCYYWK7cKAEqrtzWytC3xXid0fw+4xh0iJi40bwc0CcSsaMCl00eaixjrePJuRGZN9++G5L8N/UUothjrRBhOEoznQ/7wcdfWO8f4kjltYvIOEb3sTxWaH1umC8eF1nnZYFVp/mLqqZgHYUEcd9vxi6H8QHf1FCM8sQj0rkc/kuQFcBbGjO/vmqYoXsCJ invalid-credentials 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/Project.toml: -------------------------------------------------------------------------------- 1 | authors = ["Some One "] 2 | name = "BigProject" 3 | uuid = "da7e1942-2519-11e8-2822-f5508ce758f0" 4 | version = "0.1.0" 5 | 6 | [deps] 7 | Example = "7876af07-990d-54b4-ab0e-23690620f79a" 8 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 9 | SubModule = "0d404dc8-25d6-11e8-300e-11c8e584fb95" 10 | SubModule2 = "2d3cad7e-26b9-11e8-3e8d-a543003d541d" 11 | -------------------------------------------------------------------------------- /deps/patches/libunwind-freebsd-mapper.patch: -------------------------------------------------------------------------------- 1 | --- tests/mapper.c 2014-10-06 14:46:27.000000000 -0400 2 | +++ tests/mapper.c 2014-10-06 14:47:00.000000000 -0400 3 | @@ -39,6 +39,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE 4 | #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) 5 | # define MAP_ANONYMOUS MAP_ANON 6 | #endif 7 | +#if !defined(MAP_NORESERVE) 8 | +# define MAP_NORESERVE 0 9 | +#endif 10 | 11 | int 12 | main (void) 13 | -------------------------------------------------------------------------------- /src/flisp/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp flisp.boot flisp.boot.bak 4 | 5 | echo "Creating stage 0 boot file..." 6 | #../../branches/interpreter/femtolisp/flisp mkboot0.lsp system.lsp compiler.lsp > flisp.boot.new 7 | ./flisp mkboot0.lsp system.lsp compiler.lsp > flisp.boot.new 8 | mv flisp.boot.new flisp.boot 9 | 10 | echo "Creating stage 1 boot file..." 11 | ./flisp mkboot1.lsp 12 | 13 | echo "Testing..." 14 | make test 15 | -------------------------------------------------------------------------------- /src/flisp/julia_charmap.h: -------------------------------------------------------------------------------- 1 | /* Array of {original codepoint, replacement codepoint} normalizations 2 | to perform on Julia identifiers, to canonicalize characters that 3 | are both easily confused and easily inputted by accident. */ 4 | static const uint32_t charmap[][2] = { 5 | { 0x025B, 0x03B5 }, // latin small letter open e -> greek small letter epsilon 6 | { 0x00B5, 0x03BC }, // micro sign -> greek small letter mu 7 | }; 8 | -------------------------------------------------------------------------------- /contrib/mac/juliarc.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # Set up environment for Julia OSX binary distribution 4 | let 5 | ROOT = abspath(Sys.BINDIR,"..") 6 | ENV["PATH"]="$(Sys.BINDIR):$(ENV["PATH"])" 7 | ENV["FONTCONFIG_PATH"] = joinpath(ROOT, "etc", "fonts") 8 | ENV["TK_LIBRARY"] = "/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts" 9 | end 10 | -------------------------------------------------------------------------------- /etc/write_base_cache.jl: -------------------------------------------------------------------------------- 1 | # Write the sys source cache in format readable by Base._read_dependency_src 2 | cachefile = ARGS[1] 3 | open(cachefile, "w") do io 4 | for (_, filename) in Base._included_files 5 | src = read(filename, String) 6 | write(io, Int32(sizeof(filename))) 7 | write(io, filename) 8 | write(io, UInt64(sizeof(src))) 9 | write(io, src) 10 | end 11 | write(io, Int32(0)) 12 | end 13 | -------------------------------------------------------------------------------- /doc/src/base/iterators.md: -------------------------------------------------------------------------------- 1 | # Iteration utilities 2 | 3 | ```@docs 4 | Base.Iterators.Stateful 5 | Base.Iterators.zip 6 | Base.Iterators.enumerate 7 | Base.Iterators.rest 8 | Base.Iterators.countfrom 9 | Base.Iterators.take 10 | Base.Iterators.drop 11 | Base.Iterators.cycle 12 | Base.Iterators.repeated 13 | Base.Iterators.product 14 | Base.Iterators.flatten 15 | Base.Iterators.partition 16 | Base.Iterators.filter 17 | Base.Iterators.reverse 18 | ``` 19 | -------------------------------------------------------------------------------- /stdlib/LibGit2/test/keys/valid-passphrase.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLsjzj6P2eGJEASR+MqajdDkVzCK5rTnc/BXDzgCA3Zff8uGgHQlXTX++OspluSnPKvaHFuYUWbCDEH2mwHeLWiwXk68T5+3/GqOX9/m2dxEy6TOmLQ4iOPVC5mrBrSFbHTc5J2PPh3q9hwp/p35BwWo5nCUMc+pqq7WEVdgNNziRuFyAtva2vCVDXEZ5+6FJDvysoMndoIQQlVJXHoPp8w+Eb8gOg5kxTYtpNjb7Vjx/Ux70nl26B5JYtpWUTxLHfnzPRcjGrINgtbsbVDC6BJTnSnBttxaZRcON4/pZDpcvLBhOhqBKjkRkxoMvTGeiA7M5cm/G9LWROeCc88I/D valid-credentials-with-passphrase 2 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/src/BigProject.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module BigProject 4 | 5 | buildfile = joinpath(@__DIR__, "..", "deps", "buildartifact") 6 | if !isfile(buildfile) 7 | error("Package built incorrectly") 8 | else 9 | include(buildfile) 10 | end 11 | 12 | using SubModule 13 | using SubModule2 14 | using Random 15 | 16 | f() = 1 17 | 18 | end # module 19 | -------------------------------------------------------------------------------- /deps/patches/llvm-6.0-D44650.patch: -------------------------------------------------------------------------------- 1 | Index: tools/llvm-cfi-verify/CMakeLists.txt 2 | =================================================================== 3 | --- a/tools/llvm-cfi-verify/CMakeLists.txt 4 | +++ b/tools/llvm-cfi-verify/CMakeLists.txt 5 | @@ -11,7 +11,7 @@ 6 | Symbolize 7 | ) 8 | 9 | -add_llvm_tool(llvm-cfi-verify 10 | +add_llvm_tool(llvm-cfi-verify DISABLE_LLVM_LINK_LLVM_DYLIB 11 | llvm-cfi-verify.cpp) 12 | 13 | add_subdirectory(lib) 14 | -------------------------------------------------------------------------------- /src/bin2hex.scm: -------------------------------------------------------------------------------- 1 | (define (read-u8) (io.read *input-stream* 'uint8)) 2 | (define modulo mod) 3 | (define display princ) 4 | (let loop ((b (read-u8)) 5 | (i 0)) 6 | (if (not (eof-object? b)) 7 | (begin 8 | (if (> i 0) 9 | (display ", ")) 10 | (display "0x") (display (number->string b 16)) 11 | (if (= 0 (modulo (+ 1 i) 16)) 12 | (newline)) 13 | (loop (read-u8) (+ 1 i))))) 14 | (newline) 15 | -------------------------------------------------------------------------------- /deps/patches/SuiteSparse-winclang.patch: -------------------------------------------------------------------------------- 1 | --- SuiteSparse_config/SuiteSparse_config.h 2015-07-15 03:26:41.000000000 +0000 2 | +++ SuiteSparse_config/SuiteSparse_config.h 2016-07-01 00:55:57.157465600 +0000 3 | @@ -54,7 +54,11 @@ 4 | #ifdef _WIN64 5 | 6 | #define SuiteSparse_long __int64 7 | +#ifdef _MSVC_VER 8 | #define SuiteSparse_long_max _I64_MAX 9 | +#else 10 | +#define SuiteSparse_long_max LLONG_MAX 11 | +#endif 12 | #define SuiteSparse_long_idd "I64d" 13 | 14 | #else 15 | -------------------------------------------------------------------------------- /stdlib/Pkg/docs/make.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Documenter, Pkg 4 | 5 | makedocs( 6 | modules = [Pkg], 7 | format = :html, 8 | sitename = "Pkg.jl", 9 | pages = Any[ 10 | "Pkg" => "index.md", 11 | ] 12 | ) 13 | 14 | deploydocs( 15 | repo = "github.com/JuliaLang/Pkg.jl", 16 | target = "build", 17 | julia = "nightly", 18 | deps = nothing, 19 | make = nothing, 20 | ) 21 | -------------------------------------------------------------------------------- /base/strings/strings.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | include("strings/substring.jl") 4 | include("strings/search.jl") 5 | include("strings/unicode.jl") 6 | 7 | import .Unicode: textwidth, islowercase, isuppercase, isletter, isdigit, isnumeric, iscntrl, ispunct, 8 | isspace, isprint, isxdigit, lowercase, uppercase, titlecase, lowercasefirst, uppercasefirst 9 | 10 | include("strings/util.jl") 11 | include("strings/io.jl") 12 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/.travis.yml: -------------------------------------------------------------------------------- 1 | language: julia 2 | os: 3 | - linux 4 | - osx 5 | julia: 6 | - 0.6 7 | - nightly 8 | notifications: 9 | email: false 10 | script: 11 | - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi 12 | - julia -e 'Pkg.clone(pwd()); Pkg.test("TOML"; coverage=true)' 13 | after_success: 14 | # push coverage results to Coveralls 15 | - julia -e 'cd(Pkg.dir("TOML")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' 16 | -------------------------------------------------------------------------------- /stdlib/Markdown/src/Common/Common.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | include("block.jl") 4 | include("inline.jl") 5 | 6 | @flavor common [list, indentcode, blockquote, admonition, footnote, hashheader, horizontalrule, 7 | paragraph, 8 | 9 | linebreak, escapes, inline_code, 10 | asterisk_bold, underscore_bold, asterisk_italic, underscore_italic, image, footnote_link, link, autolink] 11 | 12 | -------------------------------------------------------------------------------- /test/llvmpasses/Makefile: -------------------------------------------------------------------------------- 1 | SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) 2 | JULIAHOME := $(abspath $(SRCDIR)/../..) 3 | include $(JULIAHOME)/deps/Versions.make 4 | include $(JULIAHOME)/Make.inc 5 | include $(JULIAHOME)/deps/llvm-ver.make 6 | BUILDDIR = $(JULIAHOME)/deps/scratch 7 | include $(JULIAHOME)/deps/llvm-options.mk 8 | LLVM_SRC_DIR:=$(JULIAHOME)/deps/srccache/llvm-$(LLVM_VER) 9 | test: 10 | PATH=$$PATH:$(LLVM_BUILDDIR_withtype)/bin $(LLVM_SRC_DIR)/utils/lit/lit.py -v . 11 | .PHONY: test 12 | -------------------------------------------------------------------------------- /deps/patches/libssh2-netinet-in.patch: -------------------------------------------------------------------------------- 1 | --- tests/CMakeLists.txt 2016-10-24 23:43:39.000000000 -0700 2 | +++ tests/CMakeLists.txt 2016-11-15 20:44:32.132344000 -0800 3 | @@ -47,6 +47,7 @@ 4 | check_include_files(arpa/inet.h HAVE_ARPA_INET_H) 5 | check_include_files(windows.h HAVE_WINDOWS_H) 6 | check_include_files(winsock2.h HAVE_WINSOCK2_H) 7 | +check_include_files(netinet/in.h HAVE_NETINET_IN_H) 8 | configure_file( 9 | "${CMAKE_CURRENT_SOURCE_DIR}/libssh2_config_cmake.h.in" 10 | "${CMAKE_CURRENT_BINARY_DIR}/libssh2_config.h") 11 | -------------------------------------------------------------------------------- /doc/NEWS-update.jl: -------------------------------------------------------------------------------- 1 | # Script to automatically insert Markdown footnotes for all [#xxxx] issue 2 | # cross-references in the NEWS file. 3 | 4 | NEWS = get(ARGS, 1, "NEWS.md") 5 | 6 | s = read(NEWS, String) 7 | 8 | s = s[1:match(r"\[#[0-9]+\]:", s).offset-1]; 9 | 10 | footnote(n) = "[#$n]: https://github.com/JuliaLang/julia/issues/$n" 11 | N = map(m -> parse(Int,m.captures[1]), eachmatch(r"\[#([0-9]+)\]", s)) 12 | foots = join(map(footnote, sort!(unique(N))), "\n") 13 | 14 | open(NEWS, "w") do f 15 | println(f, s, foots) 16 | end 17 | -------------------------------------------------------------------------------- /src/support/timefuncs.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_TIMEFUNCS_H 4 | #define JL_TIMEFUNCS_H 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | struct jl_timeval { 11 | int64_t sec; /* seconds */ 12 | int64_t usec; /* microseconds */ 13 | }; 14 | 15 | JL_DLLEXPORT int jl_gettimeofday(struct jl_timeval *jtv); 16 | JL_DLLEXPORT double jl_clock_now(void); 17 | void sleep_ms(int ms); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /doc/src/base/constants.md: -------------------------------------------------------------------------------- 1 | # [Constants](@id lib-constants) 2 | 3 | ```@docs 4 | Core.nothing 5 | Base.PROGRAM_FILE 6 | Base.ARGS 7 | Base.C_NULL 8 | Base.VERSION 9 | Base.LOAD_PATH 10 | Base.Sys.BINDIR 11 | Base.Sys.CPU_CORES 12 | Base.Sys.WORD_SIZE 13 | Base.Sys.KERNEL 14 | Base.Sys.ARCH 15 | Base.Sys.MACHINE 16 | ``` 17 | 18 | See also: 19 | 20 | * [`stdin`](@ref) 21 | * [`stdout`](@ref) 22 | * [`stderr`](@ref) 23 | * [`ENV`](@ref) 24 | * [`ENDIAN_BOM`](@ref) 25 | * `Libc.MS_ASYNC` 26 | * `Libc.MS_INVALIDATE` 27 | * `Libc.MS_SYNC` 28 | -------------------------------------------------------------------------------- /test/bigfloat.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | @test big(2.0)^big(3) == 8 4 | 5 | for T in [Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Int128, UInt128, BigInt] 6 | @test T(2)^big(3.0) == 8 7 | @test big(2.0)^T(3) == 8 8 | end 9 | 10 | for x in (2f0, pi, 7.8, big(ℯ)) 11 | @test big(typeof(x)) == typeof(big(x)) 12 | @test big(typeof(complex(x, x))) == typeof(big(complex(x, x))) 13 | end 14 | 15 | # issue 15659 16 | @test (setprecision(53) do; big(1/3); end) < 1//3 17 | -------------------------------------------------------------------------------- /stdlib/DelimitedFiles/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Delimited Files 2 | 3 | ```@meta 4 | DocTestSetup = :(using DelimitedFiles) 5 | ``` 6 | 7 | ```@docs 8 | DelimitedFiles.readdlm(::Any, ::AbstractChar, ::Type, ::AbstractChar) 9 | DelimitedFiles.readdlm(::Any, ::AbstractChar, ::AbstractChar) 10 | DelimitedFiles.readdlm(::Any, ::AbstractChar, ::Type) 11 | DelimitedFiles.readdlm(::Any, ::AbstractChar) 12 | DelimitedFiles.readdlm(::Any, ::Type) 13 | DelimitedFiles.readdlm(::Any) 14 | DelimitedFiles.writedlm 15 | ``` 16 | 17 | ```@meta 18 | DocTestSetup = nothing 19 | ``` 20 | -------------------------------------------------------------------------------- /src/support/dirpath.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_DIRPATH_H 4 | #define JL_DIRPATH_H 5 | 6 | #ifdef _OS_WINDOWS_ 7 | #define PATHSEPSTRING "\\" 8 | #define PATHLISTSEPSTRING ";" 9 | #if defined(_MSC_VER) || defined(_COMPILER_CLANG_) 10 | #define PATH_MAX MAX_PATH 11 | #endif 12 | #else 13 | #define PATHSEPSTRING "/" 14 | #define PATHLISTSEPSTRING ":" 15 | #ifndef PATH_MAX // many platforms don't have a max path, we define one anyways 16 | #define PATH_MAX 1024 17 | #endif 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /contrib/windows/install-cygwin.ps1: -------------------------------------------------------------------------------- 1 | $setup = "setup-$env:ARCH.exe".Replace("i686", "x86") 2 | 3 | mkdir -Force C:\cygdownloads | Out-Null 4 | (new-object net.webclient).DownloadFile( 5 | "https://cache.julialang.org/https://cygwin.com/$setup", "C:\cygdownloads\$setup") 6 | & "C:\cygdownloads\$setup" -q -n -R C:\cygwin-$env:ARCH ` 7 | -l C:\cygdownloads -s http://mirrors.kernel.org/sourceware/cygwin -g -I ` 8 | -P "make,curl,time,p7zip,ccache,mingw64-$env:ARCH-gcc-g++,mingw64-$env:ARCH-gcc-fortran" | Where-Object ` 9 | -FilterScript {$_ -notlike "Installing file *"} | Write-Output 10 | -------------------------------------------------------------------------------- /deps/patches/clang-D28477.patch: -------------------------------------------------------------------------------- 1 | Index: projects/clang/lib/CodeGen/BackendUtil.cpp 2 | =================================================================== 3 | --- a/tools/clang/lib/CodeGen/BackendUtil.cpp 4 | +++ b/tools/clang/lib/CodeGen/BackendUtil.cpp 5 | @@ -262,7 +262,7 @@ 6 | TLII->disableAllFunctions(); 7 | else { 8 | // Disable individual libc/libm calls in TargetLibraryInfo. 9 | - LibFunc::Func F; 10 | + LibFunc F; 11 | for (auto &FuncName : CodeGenOpts.getNoBuiltinFuncs()) 12 | if (TLII->getLibFunc(FuncName, F)) 13 | TLII->setUnavailable(F); 14 | -------------------------------------------------------------------------------- /stdlib/Distributed/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # Run the distributed test outside of the main driver since it needs its own 4 | # set of dedicated workers. 5 | include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl")) 6 | disttestfile = joinpath(@__DIR__, "distributed_exec.jl") 7 | 8 | cmd = `$test_exename $test_exeflags $disttestfile` 9 | 10 | if !success(pipeline(cmd; stdout=stdout, stderr=stderr)) && ccall(:jl_running_on_valgrind,Cint,()) == 0 11 | error("Distributed test failed, cmd : $cmd") 12 | end 13 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/test_packages/BigProject/Manifest.toml: -------------------------------------------------------------------------------- 1 | [[Example]] 2 | deps = ["Test"] 3 | git-tree-sha1 = "8eb7b4d4ca487caade9ba3e85932e28ce6d6e1f8" 4 | uuid = "7876af07-990d-54b4-ab0e-23690620f79a" 5 | version = "0.5.1" 6 | 7 | [[Random]] 8 | uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 9 | 10 | [[SubModule]] 11 | path = "SubModule" 12 | uuid = "0d404dc8-25d6-11e8-300e-11c8e584fb95" 13 | version = "0.1.0" 14 | 15 | [[SubModule2]] 16 | path = "SubModule2" 17 | uuid = "2d3cad7e-26b9-11e8-3e8d-a543003d541d" 18 | version = "0.1.0" 19 | 20 | [[Test]] 21 | uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" 22 | -------------------------------------------------------------------------------- /contrib/mac/app/README.md: -------------------------------------------------------------------------------- 1 | Julia OS X packaging 2 | ==================== 3 | 4 | This builds the Julia OS X application bundle (.app folder), and stores it in a disk image 5 | (.dmg file). 6 | 7 | The application bundle is actually just a bundled applet which opens Terminal.app and 8 | executes the julia binary (which opens the REPL). All the Julia binary files and their 9 | dependencies are bundled inside this. 10 | 11 | Run `make` to build. 12 | 13 | Other files in this directory 14 | 15 | * `startup.applescript` is the script which is compiled to the applet. 16 | * `julia.icns` is the Julia icon file. 17 | -------------------------------------------------------------------------------- /src/debuginfo.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | // Declarations for debuginfo.cpp 4 | 5 | extern int jl_DI_for_fptr(uint64_t fptr, uint64_t *symsize, int64_t *slide, int64_t *section_slide, 6 | const object::ObjectFile **object, 7 | llvm::DIContext **context); 8 | 9 | extern bool jl_dylib_DI_for_fptr(size_t pointer, const object::ObjectFile **object, llvm::DIContext **context, 10 | int64_t *slide, int64_t *section_slide, 11 | bool onlySysImg, bool *isSysImg, void **saddr, char **name, char **filename); 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | If you have a question or are unsure if the behavior you're experiencing is a bug, 2 | please search or post to our Discourse site: https://discourse.julialang.org. We use 3 | the GitHub issue tracker for bug reports and feature requests only. 4 | 5 | If you're submitting a bug report, be sure to include as much relevant information as 6 | possible, including a minimal reproducible example and the output of `versioninfo()`. 7 | If you're experiencing a problem with a particular package, open an issue on that 8 | package's repository instead. 9 | 10 | Thanks for contributing to the Julia project! 11 | -------------------------------------------------------------------------------- /doc/src/base/parallel.md: -------------------------------------------------------------------------------- 1 | # Tasks 2 | 3 | ```@docs 4 | Core.Task 5 | Base.current_task 6 | Base.istaskdone 7 | Base.istaskstarted 8 | Base.yield 9 | Base.yieldto 10 | Base.task_local_storage(::Any) 11 | Base.task_local_storage(::Any, ::Any) 12 | Base.task_local_storage(::Function, ::Any, ::Any) 13 | Base.Condition 14 | Base.notify 15 | Base.schedule 16 | Base.@task 17 | Base.sleep 18 | Base.Channel 19 | Base.put!(::Channel, ::Any) 20 | Base.take!(::Channel) 21 | Base.isready(::Channel) 22 | Base.fetch(::Channel) 23 | Base.close(::Channel) 24 | Base.bind(c::Channel, task::Task) 25 | Base.asyncmap 26 | Base.asyncmap! 27 | ``` 28 | -------------------------------------------------------------------------------- /src/support/ptrhash.c: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | /* 4 | pointer hash table 5 | optimized for storing info about particular values 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "dtypes.h" 15 | #include "hashing.h" 16 | #include "ptrhash.h" 17 | 18 | #define OP_EQ(x,y) ((x)==(y)) 19 | 20 | #include "htable.inc" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | HTIMPL(ptrhash, inthash, OP_EQ) 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /stdlib/Pkg/Project.toml: -------------------------------------------------------------------------------- 1 | desc = "The next-generation Julia package manager." 2 | keywords = ["package", "management"] 3 | license = "MIT" 4 | name = "Pkg" 5 | uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" 6 | 7 | [deps] 8 | Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" 9 | LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" 10 | Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" 11 | Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" 12 | REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" 13 | Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" 14 | SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" 15 | UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" 16 | -------------------------------------------------------------------------------- /src/llvm-version.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #include 4 | #include "julia_assert.h" 5 | 6 | // The LLVM version used, JL_LLVM_VERSION, is represented as a 5-digit integer 7 | // of the form ABBCC, where A is the major version, B is minor, and C is patch. 8 | // So for example, LLVM 3.7.0 is 30700. 9 | #define JL_LLVM_VERSION (LLVM_VERSION_MAJOR * 10000 + LLVM_VERSION_MINOR * 100 \ 10 | + LLVM_VERSION_PATCH) 11 | 12 | #if JL_LLVM_VERSION < 30901 13 | #error Only LLVM versions >= 3.9.1 are supported by Julia 14 | #endif 15 | -------------------------------------------------------------------------------- /stdlib/REPL/src/TerminalMenus/TerminalMenus.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module TerminalMenus 4 | 5 | terminal = nothing # The user terminal 6 | 7 | import REPL 8 | 9 | function __init__() 10 | global terminal 11 | terminal = REPL.Terminals.TTYTerminal(get(ENV, "TERM", Sys.iswindows() ? "" : "dumb"), stdin, stdout, stderr) 12 | end 13 | 14 | include("util.jl") 15 | include("config.jl") 16 | 17 | include("AbstractMenu.jl") 18 | include("RadioMenu.jl") 19 | include("MultiSelectMenu.jl") 20 | 21 | export 22 | RadioMenu, 23 | MultiSelectMenu, 24 | request 25 | 26 | end # module 27 | -------------------------------------------------------------------------------- /test/test_sourcepath.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # source path in tasks 4 | path = Base.source_path()::String # this variable is leaked to the source script 5 | @test endswith(path, joinpath("test","test_sourcepath.jl")) 6 | @test let ct = current_task() 7 | yieldto(@task yieldto(ct, Base.source_path())) 8 | end == path 9 | @test let ct = current_task() 10 | yieldto(@task schedule(ct, Base.source_path())) 11 | end == path 12 | @test let ct = current_task(), t = @task Base.source_path() 13 | schedule(ct) 14 | yieldto(t) 15 | fetch(t) 16 | end == path 17 | @test isabspath(@__FILE__) 18 | -------------------------------------------------------------------------------- /stdlib/REPL/test/FakeTerminals.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module FakeTerminals 4 | 5 | import REPL 6 | 7 | mutable struct FakeTerminal <: REPL.Terminals.UnixTerminal 8 | in_stream::Base.IO 9 | out_stream::Base.IO 10 | err_stream::Base.IO 11 | hascolor::Bool 12 | raw::Bool 13 | FakeTerminal(stdin,stdout,stderr,hascolor=true) = 14 | new(stdin,stdout,stderr,hascolor,false) 15 | end 16 | 17 | REPL.Terminals.hascolor(t::FakeTerminal) = t.hascolor 18 | REPL.Terminals.raw!(t::FakeTerminal, raw::Bool) = t.raw = raw 19 | REPL.Terminals.size(t::FakeTerminal) = (24, 80) 20 | 21 | end 22 | -------------------------------------------------------------------------------- /src/support/libsupport.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_LIBSUPPORT_H 4 | #define JL_LIBSUPPORT_H 5 | 6 | #include "platform.h" 7 | 8 | #include 9 | #include 10 | #include "dtypes.h" 11 | #include "utils.h" 12 | #include "utf8.h" 13 | #include "ios.h" 14 | #include "timefuncs.h" 15 | #include "hashing.h" 16 | #include "ptrhash.h" 17 | #include "bitvector.h" 18 | #include "dirpath.h" 19 | #include "strtod.h" 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | JL_DLLEXPORT void libsupport_init(void); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/support/bitvector.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_BITVECTOR_H 4 | #define JL_BITVECTOR_H 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | JL_DLLEXPORT uint32_t *bitvector_new(uint64_t n, int initzero); 11 | JL_DLLEXPORT 12 | uint32_t *bitvector_resize(uint32_t *b, uint64_t oldsz, uint64_t newsz, 13 | int initzero); 14 | size_t bitvector_nwords(uint64_t nbits); 15 | JL_DLLEXPORT void bitvector_set(uint32_t *b, uint64_t n, uint32_t c); 16 | JL_DLLEXPORT uint32_t bitvector_get(uint32_t *b, uint64_t n); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /stdlib/LibGit2/src/strarray.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | 4 | function Base.cconvert(::Type{Ptr{StrArrayStruct}}, x::Vector) 5 | str_ref = Base.cconvert(Ref{Cstring}, x) 6 | sa_ref = Ref(StrArrayStruct(Base.unsafe_convert(Ref{Cstring}, str_ref), length(x))) 7 | sa_ref, str_ref 8 | end 9 | function Base.unsafe_convert(::Type{Ptr{StrArrayStruct}}, rr::Tuple{Ref{StrArrayStruct}, Ref{Cstring}}) 10 | Base.unsafe_convert(Ptr{StrArrayStruct}, first(rr)) 11 | end 12 | 13 | function Base.convert(::Type{Vector{String}}, sa::StrArrayStruct) 14 | [unsafe_string(unsafe_load(sa.strings, i)) for i = 1:sa.count] 15 | end 16 | -------------------------------------------------------------------------------- /src/flisp/equalhash.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "flisp.h" 9 | #include "equalhash.h" 10 | 11 | #include "htable.inc" 12 | 13 | #define _equal_lispvalue_(x, y, ctx) \ 14 | equal_lispvalue((fl_context_t*)ctx, (value_t)(x), (value_t)(y)) 15 | #define _hash_lispvalue_(x, ctx) \ 16 | hash_lispvalue((fl_context_t*)ctx, (value_t)(x)) 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | HTIMPL_R(equalhash, _hash_lispvalue_, _equal_lispvalue_) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /src/flisp/mkboot0.lsp: -------------------------------------------------------------------------------- 1 | ; -*- scheme -*- 2 | 3 | (if (not (bound? 'top-level-value)) (set! top-level-value %eval)) 4 | (if (not (bound? 'set-top-level-value!)) (set! set-top-level-value! set)) 5 | (if (not (bound? 'eof-object?)) (set! eof-object? (lambda (x) #f))) 6 | 7 | ;(load "compiler.lsp") 8 | 9 | (define (compile-file inf) 10 | (let ((in (file inf :read))) 11 | (let next ((E (read in))) 12 | (if (not (io.eof? in)) 13 | (begin (print (compile-thunk (expand E))) 14 | (princ "\n") 15 | (next (read in))))) 16 | (io.close in))) 17 | 18 | (define (do-boot0) 19 | (for-each (lambda (file) 20 | (compile-file file)) 21 | (cdr *argv*))) 22 | 23 | (do-boot0) 24 | -------------------------------------------------------------------------------- /stdlib/Sockets/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Sockets 2 | 3 | ```@meta 4 | DocTestSetup = :(using Sockets) 5 | ``` 6 | 7 | ```@docs 8 | Sockets.connect(::TCPSocket, ::Integer) 9 | Sockets.connect(::AbstractString) 10 | Sockets.listen(::Any) 11 | Sockets.listen(::AbstractString) 12 | Sockets.getaddrinfo 13 | Sockets.getipaddr 14 | Sockets.getalladdrinfo 15 | Sockets.getnameinfo 16 | Sockets.getsockname 17 | Sockets.getpeername 18 | Sockets.IPv4 19 | Sockets.IPv6 20 | Sockets.TCPSocket 21 | Sockets.UDPSocket 22 | Sockets.accept 23 | Sockets.listenany 24 | Sockets.bind 25 | Sockets.send 26 | Sockets.recv 27 | Sockets.recvfrom 28 | Sockets.setopt 29 | ``` 30 | 31 | ```@meta 32 | DocTestSetup = nothing 33 | ``` 34 | -------------------------------------------------------------------------------- /src/support/arraylist.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_ARRAYLIST_H 4 | #define JL_ARRAYLIST_H 5 | 6 | #define AL_N_INLINE 29 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct { 13 | size_t len; 14 | size_t max; 15 | void **items; 16 | void *_space[AL_N_INLINE]; 17 | } arraylist_t; 18 | 19 | arraylist_t *arraylist_new(arraylist_t *a, size_t size); 20 | void arraylist_free(arraylist_t *a); 21 | 22 | void arraylist_push(arraylist_t *a, void *elt); 23 | void *arraylist_pop(arraylist_t *a); 24 | void arraylist_grow(arraylist_t *a, size_t n); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /test/llvmpasses/lit.cfg: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import re 4 | import platform 5 | 6 | import lit.util 7 | import lit.formats 8 | 9 | config.name = 'Julia' 10 | config.suffixes = ['.ll','.jl'] 11 | config.test_source_root = os.path.dirname(__file__) 12 | config.test_format = lit.formats.ShTest(True) 13 | config.substitutions.append(('%shlibext', '.dylib' if platform.system() == 'Darwin' else '.dll' if 14 | platform.system() == 'Windows' else '.so')) 15 | 16 | path = os.path.pathsep.join((os.path.join(os.path.dirname(__file__),"../../usr/tools"), os.path.join(os.path.dirname(__file__),"../../usr/bin"), config.environment['PATH'])) 17 | config.environment['PATH'] = path 18 | config.environment['HOME'] = "/tmp" 19 | -------------------------------------------------------------------------------- /src/support/libsupportinit.c: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #include 4 | #include "libsupport.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | static int isInitialized = 0; 11 | 12 | void libsupport_init(void) 13 | { 14 | if (!isInitialized) { 15 | #ifdef _OS_WINDOWS_ 16 | SetConsoleCP(1252); // ANSI Latin1; Western European (Windows) 17 | #endif 18 | setlocale(LC_ALL, ""); // set to user locale 19 | setlocale(LC_NUMERIC, "C"); // use locale-independent numeric formats 20 | 21 | ios_init_stdstreams(); 22 | 23 | isInitialized=1; 24 | } 25 | } 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /stdlib/Markdown/src/Julia/Julia.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # This file contains markdown extensions designed to make documenting 4 | # Julia easy peasy. 5 | # 6 | # We start by borrowing GitHub's `fencedcode` extension – more to follow. 7 | 8 | include("interp.jl") 9 | 10 | @flavor julia [blocktex, blockinterp, hashheader, list, indentcode, fencedcode, 11 | blockquote, admonition, footnote, github_table, horizontalrule, setextheader, paragraph, 12 | 13 | linebreak, escapes, tex, interp, en_dash, inline_code, 14 | asterisk_bold, underscore_bold, asterisk_italic, underscore_italic, image, footnote_link, link, autolink] 15 | 16 | -------------------------------------------------------------------------------- /deps/llvm-options.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(LLVM_DEBUG),0) 2 | ifeq ($(LLVM_DEBUG),1) 3 | LLVM_BUILDTYPE := Debug 4 | else 5 | LLVM_BUILDTYPE := RelWithDebInfo 6 | endif 7 | else 8 | LLVM_BUILDTYPE := Release 9 | endif 10 | LLVM_CMAKE_BUILDTYPE := $(LLVM_BUILDTYPE) 11 | ifeq ($(LLVM_ASSERTIONS),1) 12 | LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+Asserts 13 | endif 14 | LLVM_FLAVOR := $(LLVM_BUILDTYPE) 15 | ifeq ($(LLVM_SANITIZE),1) 16 | ifeq ($(SANITIZE_MEMORY),1) 17 | LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+MSAN 18 | else 19 | LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+ASAN 20 | endif 21 | endif 22 | 23 | LLVM_SRC_DIR:=$(SRCCACHE)/llvm-$(LLVM_VER) 24 | LLVM_BUILD_DIR:=$(BUILDDIR)/llvm-$(LLVM_VER) 25 | LLVM_BUILDDIR_withtype := $(LLVM_BUILD_DIR)/build_$(LLVM_BUILDTYPE) 26 | -------------------------------------------------------------------------------- /stdlib/UUIDs/test/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Test, UUIDs, Random 4 | 5 | u1 = uuid1() 6 | u4 = uuid4() 7 | @test uuid_version(u1) == 1 8 | @test uuid_version(u4) == 4 9 | @test u1 == UUID(string(u1)) == UUID(GenericString(string(u1))) 10 | @test u4 == UUID(string(u4)) == UUID(GenericString(string(u4))) 11 | @test u1 == UUID(UInt128(u1)) 12 | @test u4 == UUID(UInt128(u4)) 13 | @test uuid4(MersenneTwister(0)) == uuid4(MersenneTwister(0)) 14 | @test_throws ArgumentError UUID("550e8400e29b-41d4-a716-446655440000") 15 | @test_throws ArgumentError UUID("550e8400e29b-41d4-a716-44665544000098") 16 | @test_throws ArgumentError UUID("z50e8400-e29b-41d4-a716-446655440000") 17 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Getting support for Julia 2 | 3 | We use the GitHub issue tracker for bug reports and feature requests only. If 4 | what you'd like to do is best described as a bug report or a code contribution 5 | then you should submit a GitHub issue or pull request as usual. Please see our 6 | [Notes for Julia 7 | Contributors](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md) 8 | for how to file a bug report, our contributor checklist and other helpful 9 | information. But if you have come here for help, or if you are unsure whether 10 | the behavior you're experiencing is a bug, then you should see our [Community 11 | page](https://julialang.org/community/) for a list of other places where you can 12 | get support first. 13 | -------------------------------------------------------------------------------- /test/llvmpasses/lower-handlers.ll: -------------------------------------------------------------------------------- 1 | ; RUN: opt -load libjulia%shlibext -LowerExcHandlers -S %s | FileCheck %s 2 | 3 | attributes #1 = { returns_twice } 4 | declare i32 @julia.except_enter() #1 5 | declare void @jl_pop_handler(i32) 6 | declare i8**** @julia.ptls_states() 7 | 8 | define void @simple() { 9 | top: 10 | %ptls = call i8**** @julia.ptls_states() 11 | ; CHECK: call void @llvm.lifetime.start 12 | ; CHECK: call void @jl_enter_handler 13 | ; CHECK: setjmp 14 | %r = call i32 @julia.except_enter() 15 | %cmp = icmp eq i32 %r, 0 16 | br i1 %cmp, label %try, label %catch 17 | try: 18 | br label %after 19 | catch: 20 | br label %after 21 | after: 22 | call void @jl_pop_handler(i32 1) 23 | ; CHECK: llvm.lifetime.end 24 | ret void 25 | } 26 | -------------------------------------------------------------------------------- /deps/patches/llvm-D28221-avx512.patch: -------------------------------------------------------------------------------- 1 | Index: lib/Support/Host.cpp 2 | =================================================================== 3 | --- a/lib/Support/Host.cpp 4 | +++ b/lib/Support/Host.cpp 5 | @@ -475,13 +475,14 @@ 6 | 7 | // Skylake: 8 | case 0x4e: 9 | - *Type = INTEL_COREI7; // "skylake-avx512" 10 | - *Subtype = INTEL_COREI7_SKYLAKE_AVX512; 11 | - break; 12 | case 0x5e: 13 | *Type = INTEL_COREI7; // "skylake" 14 | *Subtype = INTEL_COREI7_SKYLAKE; 15 | break; 16 | + case 0x55: 17 | + *Type = INTEL_COREI7; // "skylake-avx512" 18 | + *Subtype = INTEL_COREI7_SKYLAKE_AVX512; 19 | + break; 20 | 21 | case 0x1c: // Most 45 nm Intel Atom processors 22 | case 0x26: // 45 nm Atom Lincroft 23 | -------------------------------------------------------------------------------- /test/cartesian.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | @test Base.Cartesian.exprresolve(:(1 + 3)) == 4 4 | ex = Base.Cartesian.exprresolve(:(if 5 > 4; :x; else :y; end)) 5 | @test ex.args[2] == QuoteNode(:x) 6 | 7 | @test Base.Cartesian.lreplace!("val_col", Base.Cartesian.LReplace{String}(:col, "col", 1)) == "val_1" 8 | 9 | # test conversions for CartesianIndex 10 | 11 | @testset "CartesianIndex Conversions" begin 12 | @test convert(Int, CartesianIndex(42)) === 42 13 | @test convert(Float64, CartesianIndex(42)) === 42.0 14 | @test convert(Tuple, CartesianIndex(42, 1)) === (42, 1) 15 | # can't convert higher-dimensional indices to Int 16 | @test_throws MethodError convert(Int, CartesianIndex(42, 1)) 17 | end 18 | -------------------------------------------------------------------------------- /deps/patches/libgit2-agent-nonfatal.patch: -------------------------------------------------------------------------------- 1 | commit 70020247d1903c7a1262d967cf205a44dc6f6ebe 2 | Author: Keno Fischer 3 | Date: Wed Jul 20 19:59:00 2016 -0400 4 | 5 | Make failure to connect to ssh-agent non-fatal 6 | 7 | diff --git a/src/transports/ssh.c b/src/transports/ssh.c 8 | index cfd5736..82d2c63 100644 9 | --- a/src/transports/ssh.c 10 | +++ b/src/transports/ssh.c 11 | @@ -296,8 +296,10 @@ static int ssh_agent_auth(LIBSSH2_SESSION *session, git_cred_ssh_key *c) { 12 | 13 | rc = libssh2_agent_connect(agent); 14 | 15 | - if (rc != LIBSSH2_ERROR_NONE) 16 | + if (rc != LIBSSH2_ERROR_NONE) { 17 | + rc = LIBSSH2_ERROR_AUTHENTICATION_FAILED; 18 | goto shutdown; 19 | + } 20 | 21 | rc = libssh2_agent_list_identities(agent); 22 | 23 | -------------------------------------------------------------------------------- /contrib/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # Usage: very similar to `install` 5 | # install.sh 755 src1 src2 ... dest 6 | 7 | PERMS=$1 8 | shift 9 | 10 | ARGS="" 11 | while [ $# -gt 1 ]; do 12 | ARGS="$ARGS $1" 13 | shift 14 | done 15 | DEST=$1 16 | 17 | for SRC in $ARGS; do 18 | cp -a $SRC $DEST 19 | 20 | if [ -d "$DEST" ]; then 21 | DESTFILE="$DEST/$(basename "$SRC")" 22 | else 23 | DESTFILE="$DEST" 24 | fi 25 | 26 | # Do the chmod dance, and ignore errors on platforms that don't like setting permissions of symlinks 27 | # TODO: Test if it's a symlink instead of having to redirect stderr to /dev/null 28 | chmod $PERMS $DESTFILE 2>/dev/null 29 | done 30 | 31 | exit 0 32 | -------------------------------------------------------------------------------- /src/uv_constants.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #include "uv.h" 4 | #define XX(uc,lc) :UV_##uc, 5 | #define YY(uc,lc) (:UV_##uc,UV__##uc), 6 | const uv_handle_types = [UV_HANDLE_TYPE_MAP(XX) :UV_FILE] 7 | const uv_req_types = [UV_REQ_TYPE_MAP(XX)] 8 | const uv_err_vals = [UV_ERRNO_MAP(YY)] 9 | let 10 | handles = [:UV_UNKNOWN_HANDLE, uv_handle_types..., :UV_HANDLE_TYPE_MAX] 11 | reqs = [:UV_UNKNOWN_REQ, uv_req_types..., :UV_REQ_TYPE_PRIVATE, :UV_REQ_TYPE_MAX] 12 | for i in 1:length(handles) 13 | @eval const $(handles[i]) = $(i - 1) 14 | end 15 | for i in 1:length(reqs) 16 | @eval const $(reqs[i]) = $(i - 1) 17 | end 18 | for (v, val) in uv_err_vals 19 | @eval const $v = $val 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /stdlib/Pkg/.travis.yml: -------------------------------------------------------------------------------- 1 | language: julia 2 | 3 | julia: 4 | - nightly 5 | 6 | os: 7 | - linux 8 | - osx 9 | 10 | notifications: 11 | email: false 12 | 13 | before_script: 14 | - export PATH=$HOME/.local/bin:$PATH 15 | 16 | branches: 17 | only: 18 | - master 19 | 20 | script: 21 | - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi 22 | - julia --check-bounds=yes -e 'using UUIDs; write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"$(uuid4())\"")); 23 | import Pkg; Pkg.instantiate(); Pkg.test(; coverage=true)' 24 | 25 | after_success: 26 | - julia -e 'import Pkg; Pkg.add("Documenter"); include("docs/make.jl")' 27 | - julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' 28 | 29 | -------------------------------------------------------------------------------- /stdlib/Pkg/src/Pkg2/Pkg2.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # Trimmed-down code from Pkg2 with only the essential parts needed by loadmeta.jl 4 | 5 | module Pkg2 6 | 7 | # DIR 8 | const DIR_NAME = ".julia" 9 | _pkgroot() = abspath(get(ENV,"JULIA_PKGDIR",joinpath(homedir(),DIR_NAME))) 10 | isversioned(p::AbstractString) = ((x,y) = (VERSION.major, VERSION.minor); basename(p) == "v$x.$y") 11 | 12 | function dir() 13 | b = _pkgroot() 14 | x, y = VERSION.major, VERSION.minor 15 | d = joinpath(b,"v$x.$y") 16 | if isdir(d) || !isdir(b) || !isdir(joinpath(b, "METADATA")) 17 | return d 18 | end 19 | return b 20 | end 21 | dir(pkg::AbstractString...) = normpath(dir(),pkg...) 22 | 23 | include("types.jl") 24 | include("reqs.jl") 25 | 26 | end 27 | -------------------------------------------------------------------------------- /deps/patches/llvm-symver-jlprefix.patch: -------------------------------------------------------------------------------- 1 | From f23277bb91a4925ba8763337137a3123a7600557 Mon Sep 17 00:00:00 2001 2 | From: Valentin Churavy 3 | Date: Tue, 16 Jan 2018 17:29:05 -0500 4 | Subject: [PATCH] add JL prefix to all LLVM version suffixes 5 | 6 | --- 7 | tools/llvm-shlib/simple_version_script.map.in | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/tools/llvm-shlib/simple_version_script.map.in b/tools/llvm-shlib/simple_version_script.map.in 11 | index e9515fe7862..af082581627 100644 12 | --- a/tools/llvm-shlib/simple_version_script.map.in 13 | +++ b/tools/llvm-shlib/simple_version_script.map.in 14 | @@ -1 +1 @@ 15 | -LLVM_@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@ { global: *; }; 16 | +JL_LLVM_@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@ { global: *; }; 17 | -- 18 | 2.15.1 19 | 20 | -------------------------------------------------------------------------------- /src/file_constants.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #include 4 | #include 5 | #include 6 | const JL_DUMMY = 0 7 | const JL_O_WRONLY = O_WRONLY 8 | const JL_O_RDONLY = O_RDONLY 9 | const JL_O_RDWR = O_RDWR 10 | const JL_O_APPEND = O_APPEND 11 | const JL_O_CREAT = O_CREAT 12 | const JL_O_EXCL = O_EXCL 13 | const JL_O_TRUNC = O_TRUNC 14 | #ifdef O_TEMPORARY 15 | const JL_O_TEMPORARY = O_TEMPORARY 16 | #endif 17 | #ifdef O_SHORT_LIVED 18 | const JL_O_SHORT_LIVED = O_SHORT_LIVED 19 | #endif 20 | #ifdef O_SEQUENTIAL 21 | const JL_O_SEQUENTIAL = O_SEQUENTIAL 22 | #endif 23 | #ifdef O_RANDOM 24 | const JL_O_RANDOM = O_RANDOM 25 | #endif 26 | #ifdef O_NOCTTY 27 | const JL_O_NOCTTY = O_NOCTTY 28 | #endif 29 | -------------------------------------------------------------------------------- /test/llvmpasses/muladd.ll: -------------------------------------------------------------------------------- 1 | ; RUN: opt -load libjulia%shlibext -CombineMulAdd -S %s | FileCheck %s 2 | 3 | define double @fast_muladd1(double %a, double %b, double %c) { 4 | top: 5 | ; CHECK: {{contract|fmuladd}} 6 | %v1 = fmul double %a, %b 7 | %v2 = fadd fast double %v1, %c 8 | ; CHECK: ret double 9 | ret double %v2 10 | } 11 | 12 | define double @fast_mulsub1(double %a, double %b, double %c) { 13 | top: 14 | ; CHECK: {{contract|fmuladd}} 15 | %v1 = fmul double %a, %b 16 | %v2 = fsub fast double %v1, %c 17 | ; CHECK: ret double 18 | ret double %v2 19 | } 20 | 21 | define <2 x double> @fast_mulsub_vec1(<2 x double> %a, <2 x double> %b, <2 x double> %c) { 22 | top: 23 | ; CHECK: {{contract|fmuladd}} 24 | %v1 = fmul <2 x double> %a, %b 25 | %v2 = fsub fast <2 x double> %c, %v1 26 | ; CHECK: ret <2 x double> 27 | ret <2 x double> %v2 28 | } 29 | -------------------------------------------------------------------------------- /deps/patches/llvm-D28215_FreeBSD_shlib.patch: -------------------------------------------------------------------------------- 1 | Index: tools/llvm-shlib/CMakeLists.txt 2 | =================================================================== 3 | --- a/tools/llvm-shlib/CMakeLists.txt 4 | +++ b/tools/llvm-shlib/CMakeLists.txt 5 | @@ -37,7 +37,7 @@ 6 | add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES}) 7 | 8 | list(REMOVE_DUPLICATES LIB_NAMES) 9 | -if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # FIXME: It should be "GNU ld for elf" 10 | +if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf" 11 | # GNU ld doesn't resolve symbols in the version script. 12 | set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive) 13 | elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") 14 | -------------------------------------------------------------------------------- /test/boundscheck.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # run boundscheck tests on separate workers launched with --check-bounds={default,yes,no} 4 | 5 | cmd = `$(Base.julia_cmd()) --depwarn=error --startup-file=no boundscheck_exec.jl` 6 | if !success(pipeline(cmd; stdout=stdout, stderr=stderr)) 7 | error("boundscheck test failed, cmd : $cmd") 8 | end 9 | 10 | cmd = `$(Base.julia_cmd()) --check-bounds=yes --startup-file=no --depwarn=error boundscheck_exec.jl` 11 | if !success(pipeline(cmd; stdout=stdout, stderr=stderr)) 12 | error("boundscheck test failed, cmd : $cmd") 13 | end 14 | 15 | cmd = `$(Base.julia_cmd()) --check-bounds=no --startup-file=no --depwarn=error boundscheck_exec.jl` 16 | if !success(pipeline(cmd; stdout=stdout, stderr=stderr)) 17 | error("boundscheck test failed, cmd : $cmd") 18 | end 19 | -------------------------------------------------------------------------------- /test/project/Manifest.toml: -------------------------------------------------------------------------------- 1 | [[Foo]] 2 | deps = ["Bar", "Baz", "Qux"] 3 | uuid = "767738be-2f1f-45a9-b806-0234f3164144" 4 | git-tree-sha1 = "7c626031568a5e432112a74009c3763f9b851e3e" 5 | path = "deps/Foo1" 6 | 7 | [[Foo]] 8 | deps = ["Qux"] 9 | uuid = "6f418443-bd2e-4783-b551-cdbac608adf2" 10 | path = "deps/Foo2.jl" 11 | 12 | [[Bar]] 13 | uuid = "2a550a13-6bab-4a91-a4ee-dff34d6b99d0" 14 | path = "deps/Bar" 15 | [Bar.deps] 16 | Baz = "6801f525-dc68-44e8-a4e8-cabd286279e7" 17 | Foo = "6f418443-bd2e-4783-b551-cdbac608adf2" 18 | 19 | [[Baz]] 20 | uuid = "6801f525-dc68-44e8-a4e8-cabd286279e7" 21 | git-tree-sha1 = "efc7e24c53d6a328011975294a2c75fed2f9800a" 22 | [Baz.deps] 23 | Foo = "6f418443-bd2e-4783-b551-cdbac608adf2" 24 | Qux = "b5ec9b9c-e354-47fd-b367-a348bdc8f909" 25 | 26 | [[Qux]] 27 | uuid = "b5ec9b9c-e354-47fd-b367-a348bdc8f909" 28 | path = "deps/Qux.jl" 29 | -------------------------------------------------------------------------------- /test/llvmpasses/safepoint_stress.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # RUN: julia --startup-file=no %s | opt -load libjulia%shlibext -LateLowerGCFrame -S - | FileCheck %s 4 | 5 | println(""" 6 | %jl_value_t = type opaque 7 | declare %jl_value_t addrspace(10)* @alloc() 8 | declare void @one_arg_boxed(%jl_value_t addrspace(10)*) 9 | declare %jl_value_t*** @julia.ptls_states() 10 | 11 | define void @stress(i64 %a, i64 %b) { 12 | %ptls = call %jl_value_t*** @julia.ptls_states() 13 | """) 14 | 15 | # CHECK: %gcframe = alloca %jl_value_t addrspace(10)*, i32 10002 16 | for i = 1:10000 17 | println("\t%arg$i = call %jl_value_t addrspace(10)* @alloc()") 18 | end 19 | 20 | for i = 1:10000 21 | println("\tcall void @one_arg_boxed(%jl_value_t addrspace(10)* %arg$i)") 22 | end 23 | 24 | println(""" 25 | ret void 26 | } 27 | """) 28 | -------------------------------------------------------------------------------- /src/julia.expmap: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | __asan*; 4 | __stack_chk_guard; 5 | asprintf; 6 | bitvector_*; 7 | ev_break; 8 | get_exename; 9 | getlocalip; 10 | int32hash; 11 | int64hash; 12 | int64to32hash; 13 | ios_*; 14 | iswprint; 15 | jl_*; 16 | rec_backtrace; 17 | julia_*; 18 | libsupport_init; 19 | localtime_r; 20 | memhash; 21 | memhash32; 22 | memhash32_seed; 23 | memhash_seed; 24 | restore_arg_area_loc; 25 | restore_signals; 26 | rl_clear_input; 27 | save_arg_area_loc; 28 | u8_*; 29 | uv_*; 30 | add_library_mapping; 31 | utf8proc_*; 32 | jlbacktrace; 33 | julia_type_to_llvm; 34 | _IO_stdin_used; 35 | __ZN4llvm23createLowerSimdLoopPassEv; 36 | LLVMExtra*; 37 | 38 | /* freebsd */ 39 | environ; 40 | __progname; 41 | 42 | local: 43 | *; 44 | }; 45 | -------------------------------------------------------------------------------- /base/threads.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | """ 4 | Experimental multithreading support. 5 | """ 6 | module Threads 7 | 8 | include("threadingconstructs.jl") 9 | include("atomics.jl") 10 | include("locks.jl") 11 | 12 | """ 13 | resize_nthreads!(A, copyvalue=A[1]) 14 | 15 | Resize the array `A` to length [`nthreads()`](@ref). Any new 16 | elements that are allocated are initialized to `copy(copyvalue)`, 17 | where `copyvalue` defaults to `A[1]`. 18 | 19 | This is typically used to allocate per-thread variables, and 20 | should be called in `__init__` if `A` is a global constant. 21 | """ 22 | function resize_nthreads!(A::AbstractVector, copyvalue=A[1]) 23 | nthr = nthreads() 24 | nold = length(A) 25 | resize!(A, nthr) 26 | for i = nold+1:nthr 27 | A[i] = copy(copyvalue) 28 | end 29 | return A 30 | end 31 | 32 | end 33 | -------------------------------------------------------------------------------- /deps/libdSFMT.def: -------------------------------------------------------------------------------- 1 | LIBRARY "libdSFMT.dll" 2 | EXPORTS 3 | dsfmt_chk_init_by_array 4 | dsfmt_chk_init_gen_rand 5 | dsfmt_fill_array_close1_open2 6 | dsfmt_fill_array_close_open 7 | dsfmt_fill_array_open_close 8 | dsfmt_fill_array_open_open 9 | dsfmt_gen_rand_all 10 | dsfmt_genrand_close1_open2 11 | dsfmt_genrand_close_open 12 | dsfmt_genrand_open_close 13 | dsfmt_genrand_open_open 14 | dsfmt_genrand_uint32 15 | dsfmt_get_idstring 16 | dsfmt_get_min_array_size 17 | dsfmt_global_data DATA 18 | dsfmt_gv_fill_array_close1_open2 19 | dsfmt_gv_fill_array_close_open 20 | dsfmt_gv_fill_array_open_close 21 | dsfmt_gv_fill_array_open_open 22 | dsfmt_gv_genrand_close1_open2 23 | dsfmt_gv_genrand_close_open 24 | dsfmt_gv_genrand_open_close 25 | dsfmt_gv_genrand_open_open 26 | dsfmt_gv_genrand_uint32 27 | dsfmt_gv_init_by_array 28 | dsfmt_gv_init_gen_rand 29 | dsfmt_init_by_array 30 | dsfmt_init_gen_rand 31 | -------------------------------------------------------------------------------- /stdlib/InteractiveUtils/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # Interactive Utilities 2 | 3 | ```@meta 4 | DocTestSetup = :(using InteractiveUtils) 5 | ``` 6 | 7 | ```@docs 8 | InteractiveUtils.apropos 9 | InteractiveUtils.varinfo 10 | InteractiveUtils.versioninfo 11 | InteractiveUtils.methodswith 12 | InteractiveUtils.subtypes 13 | InteractiveUtils.edit(::AbstractString, ::Integer) 14 | InteractiveUtils.edit(::Any) 15 | InteractiveUtils.@edit 16 | InteractiveUtils.less(::AbstractString) 17 | InteractiveUtils.less(::Any) 18 | InteractiveUtils.@less 19 | InteractiveUtils.@which 20 | InteractiveUtils.@functionloc 21 | InteractiveUtils.@code_lowered 22 | InteractiveUtils.@code_typed 23 | InteractiveUtils.code_warntype 24 | InteractiveUtils.@code_warntype 25 | InteractiveUtils.code_llvm 26 | InteractiveUtils.@code_llvm 27 | InteractiveUtils.code_native 28 | InteractiveUtils.@code_native 29 | ``` 30 | 31 | ```@meta 32 | DocTestSetup = nothing 33 | ``` 34 | -------------------------------------------------------------------------------- /stdlib/Markdown/src/render/rich.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | function tohtml(io::IO, m::MIME"text/html", x) 4 | show(io, m, x) 5 | end 6 | 7 | function tohtml(io::IO, m::MIME"text/plain", x) 8 | htmlesc(io, sprint(show, m, x)) 9 | end 10 | 11 | function tohtml(io::IO, m::MIME"image/png", img) 12 | print(io, """") 15 | end 16 | 17 | function tohtml(io::IO, m::MIME"image/svg+xml", img) 18 | show(io, m, img) 19 | end 20 | 21 | # AbstractDisplay infrastructure 22 | 23 | function bestmime(val) 24 | for mime in ("text/html", "image/svg+xml", "image/png", "text/plain") 25 | showable(mime, val) && return MIME(Symbol(mime)) 26 | end 27 | error("Cannot render $val to Markdown.") 28 | end 29 | 30 | tohtml(io::IO, x) = tohtml(io, bestmime(x), x) 31 | -------------------------------------------------------------------------------- /test/compiler/ssair.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using Core.IR 4 | const Compiler = Core.Compiler 5 | 6 | let code = Any[ 7 | Expr(:gotoifnot, SlotNumber(2), 4), 8 | LabelNode(2), 9 | Expr(:(=), SlotNumber(3), 2), 10 | LabelNode(4), 11 | # Test a SlotNumber as a value of a PhiNode 12 | Expr(:(=), SSAValue(0), PhiNode(Any[2,3], Any[1, SlotNumber(3)])), 13 | Expr(:return, SSAValue(0)) 14 | ] 15 | 16 | ci = eval(Expr(:new, CodeInfo, 17 | code, 18 | nothing, 19 | Any[Any, Any, Any], 20 | Any[Any], 21 | UInt8[0, 0, 0], 22 | Any[Symbol("Self"), :arg, :slot], 23 | false, false, false, false 24 | )) 25 | 26 | Compiler.run_passes(ci, 1, Compiler.LineInfoNode[Compiler.NullLineInfo]) 27 | end 28 | 29 | # test >: 30 | let 31 | 32 | f(a,b) = a >: b 33 | code_typed(f, Tuple{Any, Any}) 34 | 35 | end 36 | -------------------------------------------------------------------------------- /deps/gfortblas.alias: -------------------------------------------------------------------------------- 1 | _sasum_ _sasum 2 | _sasum_ _SASUM 3 | _sasum_ _SASUM_ 4 | _sasum_ _sasum_gfort_ 5 | 6 | _scasum_ _scasum 7 | _scasum_ _SCASUM 8 | _scasum_ _SCASUM_ 9 | _scasum_ _scasum_gfort_ 10 | 11 | _scnrm2_ _scnrm2 12 | _scnrm2_ _SCNRM2 13 | _scnrm2_ _SCNRM2_ 14 | _scnrm2_ _scnrm2_gfort_ 15 | 16 | _sdot_ _sdot 17 | _sdot_ _SDOT 18 | _sdot_ _SDOT_ 19 | _sdot_ _sdot_gfort_ 20 | 21 | _sdsdot_ _sdsdot 22 | _sdsdot_ _SDSDOT 23 | _sdsdot_ _SDSDOT_ 24 | _sdsdot_ _sdsdot_gfort_ 25 | 26 | _snrm2_ _snrm2 27 | _snrm2_ _SNRM2 28 | _snrm2_ _SNRM2_ 29 | _snrm2_ _snrm2_gfort_ 30 | 31 | 32 | _cdotc_ _cdotc 33 | _cdotc_ _CDOTC 34 | _cdotc_ _CDOTC_ 35 | _cdotc_ _cdotc_gfort_ 36 | 37 | _cdotu_ _cdotu 38 | _cdotu_ _CDOTU 39 | _cdotu_ _CDOTU_ 40 | _cdotu_ _cdotu_gfort_ 41 | 42 | _zdotc_ _zdotc 43 | _zdotc_ _ZDOTC 44 | _zdotc_ _ZDOTC_ 45 | _zdotc_ _zdotc_gfort_ 46 | 47 | _zdotu_ _zdotu 48 | _zdotu_ _ZDOTU 49 | _zdotu_ _ZDOTU_ 50 | _zdotu_ _zdotu_gfort_ 51 | -------------------------------------------------------------------------------- /src/support/MurmurHash3.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // MurmurHash3 was written by Austin Appleby, and is placed in the public 3 | // domain. The author hereby disclaims copyright to this source code. 4 | 5 | #ifndef JL_MURMURHASH3_H 6 | #define JL_MURMURHASH3_H 7 | 8 | //----------------------------------------------------------------------------- 9 | // Platform-specific functions and macros 10 | #include 11 | 12 | //----------------------------------------------------------------------------- 13 | 14 | void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out ); 15 | 16 | void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out ); 17 | 18 | void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out ); 19 | 20 | //----------------------------------------------------------------------------- 21 | 22 | #endif // MURMURHASH3_H 23 | -------------------------------------------------------------------------------- /stdlib/LinearAlgebra/src/conjarray.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # TODO: remove this type stub between 0.7 and 1.0 4 | 5 | """ 6 | ConjArray(array) 7 | 8 | A lazy-view wrapper of an `AbstractArray`, taking the elementwise complex conjugate. This 9 | type is usually constructed (and unwrapped) via the [`conj`](@ref) function (or related 10 | [`adjoint`](@ref)), but currently this is the default behavior for `RowVector` only. For 11 | other arrays, the `ConjArray` constructor can be used directly. 12 | 13 | # Examples 14 | ```jldoctest 15 | julia> ConjArray([1+im 0; 0 1-im]) 16 | 2×2 ConjArray{Complex{Int64},2,Array{Complex{Int64},2}}: 17 | 1-1im 0+0im 18 | 0+0im 1+1im 19 | ``` 20 | """ 21 | struct ConjArray{T,N,A<:AbstractArray} <: AbstractArray{T,N} 22 | parent::A 23 | end 24 | const ConjVector{T,V<:AbstractVector} = ConjArray{T,1,V} 25 | const ConjMatrix{T,M<:AbstractMatrix} = ConjArray{T,2,M} 26 | -------------------------------------------------------------------------------- /contrib/check-whitespace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # Check for trailing white space in source files; 5 | # report an error if so 6 | 7 | # Files to check: 8 | set -f # disable glob expansion in this script 9 | file_patterns=' 10 | *.1 11 | *.c 12 | *.cpp 13 | *.h 14 | *.jl 15 | *.lsp 16 | *.scm 17 | *.inc 18 | *.make 19 | *.mk 20 | *.md 21 | *.rst 22 | *.sh 23 | *.yml 24 | *Makefile 25 | ' 26 | 27 | # TODO: Look also for trailing empty lines, and missing '\n' after the last line 28 | if git --no-pager grep --color -n --full-name -e ' $' -- $file_patterns; then 29 | echo "Error: trailing whitespace found in source file(s)" 30 | echo "" 31 | echo "This can often be fixed with:" 32 | echo " git rebase --whitespace=fix HEAD~1" 33 | echo "or" 34 | echo " git rebase --whitespace=fix master" 35 | echo "and then a forced push of the correct branch" 36 | exit 1 37 | fi 38 | -------------------------------------------------------------------------------- /contrib/windows/julia.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 1 VERSIONINFO 4 | FILEVERSION JLVER 5 | PRODUCTVERSION JLVER 6 | /* 7 | FILEFLAGSMASK VS_FF_PRERELEASE 8 | FILEFLAGS VS_FF_PRERELEASE 9 | */ 10 | FILEOS VOS_DOS_WINDOWS32 11 | FILETYPE VFT_APP 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | BEGIN 17 | VALUE "CompanyName", "JuliaLang" 18 | VALUE "FileDescription", "Julia Programming Language" 19 | VALUE "FileVersion", JLVER_STR 20 | VALUE "InternalName", "julia" 21 | VALUE "LegalCopyright", "MIT Licensed" 22 | VALUE "OriginalFilename", "julia.exe" 23 | VALUE "ProductName", "Julia" 24 | VALUE "ProductVersion", JLVER_STR 25 | END 26 | END 27 | 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | /* US English, Unicode */ 31 | VALUE "Translation", 0x409, 1200 32 | END 33 | END 34 | 2 ICON "julia.ico" 35 | 1 RT_MANIFEST "julia-manifest.xml" 36 | -------------------------------------------------------------------------------- /contrib/fixup-libstdc++.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # Run as: fixup-libstdc++.sh 5 | 6 | if [ -z "$1" ]; then 7 | echo "Usage: $0 " 8 | exit 1 9 | fi 10 | 11 | libdir="$1" 12 | private_libdir="$2" 13 | 14 | if [ ! -f "$libdir/libjulia.so" ]; then 15 | echo "ERROR: Could not open $libdir/libjulia.so" >&2 16 | exit 2 17 | fi 18 | 19 | find_shlib () 20 | { 21 | if [ -f "$1" ]; then 22 | ldd "$1" | grep $2 | cut -d' ' -f3 | xargs 23 | fi 24 | } 25 | 26 | # Discover libstdc++ location and name 27 | LIBSTD=$(find_shlib "$libdir/libjulia.so" "libstdc++.so") 28 | LIBSTD_NAME=$(basename $LIBSTD) 29 | LIBSTD_DIR=$(dirname $LIBSTD) 30 | 31 | if [ ! -f "$private_libdir/$LIBSTD_NAME" ] && [ -f "$LIBSTD_DIR/$LIBSTD_NAME" ]; then 32 | cp -v "$LIBSTD_DIR/$LIBSTD_NAME" "$private_libdir" 33 | chmod 755 "$private_libdir/$LIBSTD_NAME" 34 | fi 35 | -------------------------------------------------------------------------------- /deps/patches/libunwind-dwarf-ver.patch: -------------------------------------------------------------------------------- 1 | From 155540bf1b1b57bd73ba1e7c1c77f3e4467bf253 Mon Sep 17 00:00:00 2001 2 | From: Yichao Yu 3 | Date: Sat, 1 Oct 2016 15:24:09 +0000 4 | Subject: [PATCH 2/3] Allow DWARF version 4 5 | 6 | --- 7 | src/dwarf/Gfde.c | 3 ++- 8 | 1 file changed, 2 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/src/dwarf/Gfde.c b/src/dwarf/Gfde.c 11 | index dc973fe..c1d6e1c 100644 12 | --- a/src/dwarf/Gfde.c 13 | +++ b/src/dwarf/Gfde.c 14 | @@ -116,7 +116,8 @@ parse_cie (unw_addr_space_t as, unw_accessors_t *a, unw_word_t addr, 15 | if ((ret = dwarf_readu8 (as, a, &addr, &version, arg)) < 0) 16 | return ret; 17 | 18 | - if (version != 1 && version != DWARF_CIE_VERSION) 19 | + if (version != 1 && version != DWARF_CIE_VERSION && 20 | + !(version == 4 && DWARF_CIE_VERSION)) 21 | { 22 | Debug (1, "Got CIE version %u, expected version 1 or " 23 | STR (DWARF_CIE_VERSION) "\n", version); 24 | -- 25 | 2.10.0 26 | 27 | -------------------------------------------------------------------------------- /deps/patches/llvm-D46460.patch: -------------------------------------------------------------------------------- 1 | Index: lib/Analysis/LoopInfo.cpp 2 | =================================================================== 3 | --- a/lib/Analysis/LoopInfo.cpp 4 | +++ b/lib/Analysis/LoopInfo.cpp 5 | @@ -223,15 +223,14 @@ 6 | BasicBlock *H = getHeader(); 7 | for (BasicBlock *BB : this->blocks()) { 8 | TerminatorInst *TI = BB->getTerminator(); 9 | - MDNode *MD = nullptr; 10 | 11 | // Check if this terminator branches to the loop header. 12 | - for (BasicBlock *Successor : TI->successors()) { 13 | - if (Successor == H) { 14 | - MD = TI->getMetadata(LLVMContext::MD_loop); 15 | - break; 16 | - } 17 | - } 18 | + bool IsPredecessor = any_of(TI->successors(), 19 | + [=](BasicBlock *Successor) { return Successor == H; }); 20 | + if (!IsPredecessor) 21 | + continue; 22 | + 23 | + MDNode *MD = TI->getMetadata(LLVMContext::MD_loop); 24 | if (!MD) 25 | return nullptr; 26 | 27 | -------------------------------------------------------------------------------- /src/features_aarch64.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | // AArch64 features definition 4 | // hwcap 5 | JL_FEATURE_DEF(crypto, 3, 0) 6 | JL_FEATURE_DEF(crc, 7, 0) 7 | JL_FEATURE_DEF(lse, 8, 40000) // ARMv8.1-Atomics 8 | JL_FEATURE_DEF(fullfp16, 9, 0) 9 | JL_FEATURE_DEF(rdm, 12, 50000) // ARMv8.1-SIMD 10 | JL_FEATURE_DEF(jscvt, 13, UINT32_MAX) // Linux Kernel HWCAP name 11 | JL_FEATURE_DEF(fcma, 14, UINT32_MAX) // Linux Kernel HWCAP name 12 | JL_FEATURE_DEF(rcpc, 15, 60000) 13 | JL_FEATURE_DEF(dcpop, 16, UINT32_MAX) // Linux Kernel HWCAP name 14 | // JL_FEATURE_DEF(dotprod, ???, 60000) // ARMv8.2-DotProd 15 | // JL_FEATURE_DEF(ras, ???, 0) 16 | // JL_FEATURE_DEF(sve, ???, UINT32_MAX) 17 | 18 | // hwcap2 19 | // JL_FEATURE_DEF(?, 32 + ?, 0) 20 | 21 | // custom bits to match llvm model 22 | JL_FEATURE_DEF(v8_1a, 32 * 2 + 0, 0) 23 | JL_FEATURE_DEF(v8_2a, 32 * 2 + 1, 0) 24 | JL_FEATURE_DEF(v8_3a, 32 * 2 + 2, 60000) 25 | // JL_FEATURE_DEF(v8_4a, 32 * 2 + 3, ???) 26 | -------------------------------------------------------------------------------- /src/support/Windows.mk: -------------------------------------------------------------------------------- 1 | !INCLUDE <..\..\Windows.inc> 2 | 3 | .SUFFIXES: .c 4 | 5 | NAME = support 6 | 7 | HEADERS = \ 8 | arraylist.h \ 9 | bitvector.h \ 10 | dirpath.h \ 11 | dtypes.h \ 12 | hashing.h \ 13 | htable.h \ 14 | ios.h \ 15 | libsupport.h \ 16 | MurmurHash3.h \ 17 | ptrhash.h \ 18 | strtod.h \ 19 | timefuncs.h \ 20 | utf8.h \ 21 | utils.h \ 22 | platform.h 23 | 24 | OBJECTS = \ 25 | hashing.obj \ 26 | timefuncs.obj \ 27 | strtod.obj \ 28 | ptrhash.obj \ 29 | operators.obj \ 30 | utf8.obj \ 31 | ios.obj \ 32 | htable.obj \ 33 | bitvector.obj \ 34 | int2str.obj \ 35 | libsupportinit.obj \ 36 | arraylist.obj \ 37 | asprintf.obj \ 38 | dirname.obj 39 | 40 | INCLUDE = $(INCLUDE);$(MAKEDIR)\..\..\deps\libuv\include 41 | CFLAGS = $(CFLAGS) -D_CRT_SECURE_NO_WARNINGS -DLIBRARY_EXPORTS 42 | 43 | default: lib$(NAME).lib 44 | 45 | lib$(NAME).lib: $(OBJECTS) 46 | $(AR) /OUT:$@ $(OBJECTS) 47 | 48 | .c.obj: 49 | $(CC) $(CFLAGS) $< 50 | 51 | # vim: noexpandtab:ts=4:sw=4: 52 | 53 | -------------------------------------------------------------------------------- /stdlib/SuiteSparse/src/SuiteSparse.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | __precompile__(true) 4 | 5 | module SuiteSparse 6 | 7 | import Base: \ 8 | import LinearAlgebra: ldiv!, rdiv! 9 | 10 | ## Functions to switch to 0-based indexing to call external sparse solvers 11 | 12 | # Convert from 1-based to 0-based indices 13 | function decrement!(A::AbstractArray{T}) where T<:Integer 14 | for i in 1:length(A); A[i] -= oneunit(T) end 15 | A 16 | end 17 | decrement(A::AbstractArray{<:Integer}) = decrement!(copy(A)) 18 | 19 | # Convert from 0-based to 1-based indices 20 | function increment!(A::AbstractArray{T}) where T<:Integer 21 | for i in 1:length(A); A[i] += oneunit(T) end 22 | A 23 | end 24 | increment(A::AbstractArray{<:Integer}) = increment!(copy(A)) 25 | 26 | if Base.USE_GPL_LIBS 27 | include("umfpack.jl") 28 | include("cholmod.jl") 29 | include("spqr.jl") 30 | include("deprecated.jl") 31 | end 32 | 33 | end # module SuiteSparse 34 | -------------------------------------------------------------------------------- /src/features_aarch32.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | // AArch32 features definition 4 | // hwcap 5 | JL_FEATURE_DEF(neon, 12, 0) 6 | JL_FEATURE_DEF(vfp3, 13, 0) 7 | // JL_FEATURE_DEF(vfpv3d16, 14, 0) // d16 8 | JL_FEATURE_DEF(vfp4, 16, 0) 9 | JL_FEATURE_DEF_NAME(hwdiv_arm, 17, 0, "hwdiv-arm") 10 | JL_FEATURE_DEF(hwdiv, 18, 0) 11 | JL_FEATURE_DEF(d32, 19, 0) // -d16 12 | 13 | // hwcap2 14 | JL_FEATURE_DEF(crypto, 32 + 0, 0) 15 | JL_FEATURE_DEF(crc, 32 + 4, 0) 16 | // JL_FEATURE_DEF(ras, 32 + ???, 0) 17 | // JL_FEATURE_DEF(fullfp16, 32 + ???, 0) 18 | 19 | // custom bits to match llvm model 20 | JL_FEATURE_DEF(aclass, 32 * 2 + 0, 0) 21 | JL_FEATURE_DEF(rclass, 32 * 2 + 1, 0) 22 | JL_FEATURE_DEF(mclass, 32 * 2 + 2, 0) 23 | JL_FEATURE_DEF(v7, 32 * 2 + 3, 0) 24 | JL_FEATURE_DEF(v8, 32 * 2 + 4, 0) 25 | JL_FEATURE_DEF(v8_1a, 32 * 2 + 5, 0) 26 | JL_FEATURE_DEF(v8_2a, 32 * 2 + 6, 0) 27 | JL_FEATURE_DEF(v8_3a, 32 * 2 + 7, 60000) 28 | JL_FEATURE_DEF(v8_m_main, 32 * 2 + 8, 0) 29 | -------------------------------------------------------------------------------- /stdlib/SHA/src/hmac.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | struct HMAC_CTX{CTX<:SHA_CTX} 4 | context::CTX 5 | outer::Vector{UInt8} 6 | 7 | function HMAC_CTX(ctx::CTX, key::Vector{UInt8}, blocksize::Integer=blocklen(CTX)) where CTX 8 | if length(key) > blocksize 9 | _ctx = CTX() 10 | update!(_ctx, key) 11 | key = digest!(_ctx) 12 | end 13 | 14 | pad = blocksize - length(key) 15 | 16 | if pad > 0 17 | key = [key; fill(0x00, pad)] 18 | end 19 | 20 | update!(ctx, key .⊻ 0x36) 21 | new{CTX}(ctx, key .⊻ 0x5c) 22 | end 23 | end 24 | 25 | function update!(ctx::HMAC_CTX, data, datalen=length(data)) 26 | update!(ctx.context, data, datalen) 27 | end 28 | 29 | function digest!(ctx::HMAC_CTX{CTX}) where CTX 30 | digest = digest!(ctx.context) 31 | _ctx = CTX() 32 | update!(_ctx, ctx.outer) 33 | update!(_ctx, digest) 34 | digest!(_ctx) 35 | end 36 | -------------------------------------------------------------------------------- /doc/src/base/c.md: -------------------------------------------------------------------------------- 1 | # C Interface 2 | 3 | ```@docs 4 | ccall 5 | Core.Intrinsics.cglobal 6 | Base.@cfunction 7 | Base.unsafe_convert 8 | Base.cconvert 9 | Base.unsafe_load 10 | Base.unsafe_store! 11 | Base.unsafe_copyto!{T}(::Ptr{T}, ::Ptr{T}, ::Any) 12 | Base.unsafe_copyto!{T}(::Array{T}, ::Any, ::Array{T}, ::Any, ::Any) 13 | Base.copyto! 14 | Base.pointer 15 | Base.unsafe_wrap{T,N}(::Union{Type{Array},Type{Array{T}},Type{Array{T,N}}}, ::Ptr{T}, ::NTuple{N,Int}) 16 | Base.pointer_from_objref 17 | Base.unsafe_pointer_to_objref 18 | Base.disable_sigint 19 | Base.reenable_sigint 20 | Base.systemerror 21 | Core.Ptr 22 | Core.Ref 23 | Base.Cchar 24 | Base.Cuchar 25 | Base.Cshort 26 | Base.Cushort 27 | Base.Cint 28 | Base.Cuint 29 | Base.Clong 30 | Base.Culong 31 | Base.Clonglong 32 | Base.Culonglong 33 | Base.Cintmax_t 34 | Base.Cuintmax_t 35 | Base.Csize_t 36 | Base.Cssize_t 37 | Base.Cptrdiff_t 38 | Base.Cwchar_t 39 | Base.Cfloat 40 | Base.Cdouble 41 | ``` 42 | 43 | # LLVM Interface 44 | 45 | ```@docs 46 | Core.Intrinsics.llvmcall 47 | ``` 48 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Julia Documentation README 2 | 3 | Julia's documentation is written in Markdown. A reference of all supported syntax can be found in the [manual](https://docs.julialang.org/en/latest/manual/documentation/#markdown-syntax). All documentation can be found in the Markdown files in `doc/src/` and the docstrings in Julia source files in `base/`. 4 | 5 | ## Requirements 6 | 7 | This documentation is built using the [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl) package. 8 | 9 | All dependencies are automatically installed into a sandboxed package directory in `doc/deps/` to avoid interfering with user-installed packages. 10 | 11 | ## Building 12 | 13 | To build Julia's documentation run 14 | 15 | ```sh 16 | $ make docs 17 | ``` 18 | 19 | from the root directory. This will build the HTML documentation and output it to the `doc/_build/` folder. 20 | 21 | ## Testing 22 | 23 | To run the doctests found in the manual run 24 | 25 | ```sh 26 | $ make -C doc check 27 | ``` 28 | 29 | from the root directory. 30 | 31 | -------------------------------------------------------------------------------- /src/support/_longjmp.win64.S: -------------------------------------------------------------------------------- 1 | #define CNAME jl_longjmp 2 | #include "ENTRY.amd64.h" 3 | mov rbx,QWORD PTR [rcx+8] 4 | mov rsp,QWORD PTR [rcx+16] 5 | mov rbp,QWORD PTR [rcx+24] 6 | mov rsi,QWORD PTR [rcx+32] 7 | mov rdi,QWORD PTR [rcx+40] 8 | mov r12,QWORD PTR [rcx+48] 9 | mov r13,QWORD PTR [rcx+56] 10 | mov r14,QWORD PTR [rcx+64] 11 | mov r15,QWORD PTR [rcx+72] 12 | mov r8, QWORD PTR [rcx+80] 13 | movaps xmm6,XMMWORD PTR [rcx+96] 14 | movaps xmm7,XMMWORD PTR [rcx+112] 15 | movaps xmm8,XMMWORD PTR [rcx+128] 16 | movaps xmm9,XMMWORD PTR [rcx+144] 17 | movaps xmm10,XMMWORD PTR [rcx+160] 18 | movaps xmm11,XMMWORD PTR [rcx+176] 19 | movaps xmm12,XMMWORD PTR [rcx+192] 20 | movaps xmm13,XMMWORD PTR [rcx+208] 21 | movaps xmm14,XMMWORD PTR [rcx+224] 22 | movaps xmm15,XMMWORD PTR [rcx+240] 23 | mov eax,edx 24 | test eax,eax 25 | jne a 26 | inc eax 27 | a: mov QWORD PTR [rsp],r8 28 | ret 29 | #include "END.h" 30 | -------------------------------------------------------------------------------- /stdlib/SHA/test/perf.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using SHA 4 | 5 | if isempty(ARGS) 6 | error("need file to test sha perf") 7 | elseif !isfile(ARGS[1]) 8 | error("file $(ARGS[1]) does not exist") 9 | end 10 | 11 | 12 | function do_tests(filepath) 13 | # test performance 14 | print("read: ") 15 | @time begin 16 | fh = open(filepath, "r") 17 | bytes = read(fh) 18 | end 19 | GC.gc() 20 | 21 | print("SHA-1: ") 22 | sha1(bytes) 23 | GC.gc() 24 | @time sha1(bytes) 25 | 26 | print("SHA2-256: ") 27 | sha256(bytes) 28 | GC.gc() 29 | @time sha256(bytes) 30 | 31 | print("SHA2-512: ") 32 | sha512(bytes) 33 | GC.gc() 34 | @time sha512(bytes) 35 | 36 | print("SHA3-256: ") 37 | sha3_256(bytes) 38 | GC.gc() 39 | @time sha3_256(bytes) 40 | 41 | print("SHA3-512: ") 42 | sha3_512(bytes) 43 | GC.gc() 44 | @time sha3_512(bytes) 45 | end 46 | 47 | do_tests(ARGS[1]) 48 | -------------------------------------------------------------------------------- /src/support/_setjmp.win64.S: -------------------------------------------------------------------------------- 1 | #define CNAME jl_setjmp 2 | #include "ENTRY.amd64.h" 3 | mov rdx,QWORD PTR [rsp] 4 | mov QWORD PTR [rcx],0 5 | mov QWORD PTR [rcx+8],rbx 6 | mov QWORD PTR [rcx+16],rsp 7 | mov QWORD PTR [rcx+24],rbp 8 | mov QWORD PTR [rcx+32],rsi 9 | mov QWORD PTR [rcx+40],rdi 10 | mov QWORD PTR [rcx+48],r12 11 | mov QWORD PTR [rcx+56],r13 12 | mov QWORD PTR [rcx+64],r14 13 | mov QWORD PTR [rcx+72],r15 14 | mov QWORD PTR [rcx+80],rdx 15 | mov QWORD PTR [rcx+88],0 16 | movaps XMMWORD PTR [rcx+96],xmm6 17 | movaps XMMWORD PTR [rcx+112],xmm7 18 | movaps XMMWORD PTR [rcx+128],xmm8 19 | movaps XMMWORD PTR [rcx+144],xmm9 20 | movaps XMMWORD PTR [rcx+160],xmm10 21 | movaps XMMWORD PTR [rcx+176],xmm11 22 | movaps XMMWORD PTR [rcx+192],xmm12 23 | movaps XMMWORD PTR [rcx+208],xmm13 24 | movaps XMMWORD PTR [rcx+224],xmm14 25 | movaps XMMWORD PTR [rcx+240],xmm15 26 | xor rax,rax 27 | ret 28 | #include "END.h" 29 | -------------------------------------------------------------------------------- /deps/objconv.mk: -------------------------------------------------------------------------------- 1 | ## objconv ## 2 | 3 | $(SRCCACHE)/objconv.zip: | $(SRCCACHE) 4 | $(JLDOWNLOAD) $@ http://www.agner.org/optimize/objconv.zip 5 | 6 | $(BUILDDIR)/objconv/source-extracted: $(SRCCACHE)/objconv.zip 7 | -rm -r $(dir $@) 8 | mkdir -p $(BUILDDIR) 9 | unzip -d $(dir $@) $< 10 | cd $(dir $@) && unzip source.zip 11 | echo 1 > $@ 12 | 13 | $(BUILDDIR)/objconv/build-compiled: $(BUILDDIR)/objconv/source-extracted 14 | cd $(dir $<) && $(CXX) -o objconv -O2 *.cpp 15 | echo 1 > $@ 16 | 17 | $(eval $(call staged-install, \ 18 | objconv,objconv, \ 19 | BINFILE_INSTALL,$$(BUILDDIR)/objconv/objconv,,)) 20 | 21 | clean-objconv: 22 | -rm $(BUILDDIR)/objconv/build-compiled $(build_depsbindir)/objconv 23 | 24 | distclean-objconv: 25 | -rm -rf $(SRCCACHE)/objconv.zip $(BUILDDIR)/objconv 26 | 27 | 28 | get-objconv: $(SRCCACHE)/objconv.zip 29 | extract-objconv: $(BUILDDIR)/objconv/source-extracted 30 | configure-objconv: extract-objconv 31 | compile-objconv: $(BUILDDIR)/objconv/build-compiled 32 | fastcheck-objconv: check-objconv 33 | check-objconv: compile-objconv 34 | -------------------------------------------------------------------------------- /stdlib/Markdown/src/IPython/IPython.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | mutable struct LaTeX 4 | formula::String 5 | end 6 | 7 | @trigger '$' -> 8 | function tex(stream::IO, md::MD) 9 | result = parse_inline_wrapper(stream, "\$", rep = true) 10 | return result === nothing ? nothing : LaTeX(result) 11 | end 12 | 13 | function blocktex(stream::IO, md::MD) 14 | withstream(stream) do 15 | ex = tex(stream, md) 16 | if ex ≡ nothing 17 | return false 18 | else 19 | push!(md, ex) 20 | return true 21 | end 22 | end 23 | end 24 | 25 | show(io::IO, tex::LaTeX) = 26 | print(io, '$', tex.formula, '$') 27 | 28 | latex(io::IO, tex::LaTeX) = 29 | println(io, "\$\$", tex.formula, "\$\$") 30 | 31 | latexinline(io::IO, tex::LaTeX) = 32 | print(io, '$', tex.formula, '$') 33 | 34 | term(io::IO, tex::LaTeX, cols) = printstyled(io, tex.formula, color=:magenta) 35 | terminline(io::IO, tex::LaTeX) = printstyled(io, tex.formula, color=:magenta) 36 | -------------------------------------------------------------------------------- /src/gen_sysimg_symtab.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # script to generate tables of common symbols from a system image 4 | # steps to rerun this: 5 | # 1. empty the contents of common_symbols*.inc 6 | # 2. modify dump.c to write symbols in a clearly marked format (#define GEN_SYMTAB_MODE) 7 | # 3. build sys.ji 8 | # 4. cd src && ../julia gen_sysimg_symtab.jl ../usr/lib/julia/sys.ji 9 | 10 | fname = ARGS[1] 11 | 12 | io,_ = open(pipeline(`strings -n 4 $fname`, 13 | `tr -d "() \t"`, 14 | `grep JJJ`, 15 | `sort`, `uniq -c`, `sort -g -r`, 16 | `head -n 354`)) # 102 + 252 17 | 18 | function outputline(io, line) 19 | row = split(line, " ", keep=false) 20 | println(io, "jl_symbol(\"", row[2][4:end], "\"),") 21 | end 22 | 23 | lines = eachline(io) 24 | 25 | open(f->foreach(l->outputline(f,l), Base.Iterators.take(lines,102)), "common_symbols1.inc", "w") 26 | open(f->foreach(l->outputline(f,l), lines), "common_symbols2.inc", "w") 27 | -------------------------------------------------------------------------------- /test/embedding/embedding-test.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # tests the output of the embedding example is correct 4 | using Test 5 | 6 | if Sys.iswindows() 7 | # libjulia needs to be in the same directory as the embedding executable or in path 8 | ENV["PATH"] = string(Sys.BINDIR, ";", ENV["PATH"]) 9 | end 10 | 11 | @test length(ARGS) == 1 12 | @testset "embedding example" begin 13 | out = Pipe() 14 | err = Pipe() 15 | p = run(pipeline(Cmd(ARGS), stdin=devnull, stdout=out, stderr=err), wait=false) 16 | close(out.in) 17 | close(err.in) 18 | out_task = @async readlines(out) 19 | err = read(err, String) 20 | @test err == "MethodError: no method matching this_function_has_no_methods()\n" 21 | @test success(p) 22 | lines = fetch(out_task) 23 | @test length(lines) == 10 24 | @test parse(Float64, lines[1]) ≈ sqrt(2) 25 | @test lines[8] == "called bar" 26 | @test lines[9] == "calling new bar" 27 | @test lines[10] == " From worker 2:\tTaking over the world..." 28 | end 29 | -------------------------------------------------------------------------------- /deps/patches/libgit2-ssh-loop.patch: -------------------------------------------------------------------------------- 1 | commit eac62497aec204568a494743f829d922787d69c5 2 | Author: Curtis Vogt 3 | Date: Thu Sep 21 15:51:52 2017 -0500 4 | 5 | Ask for credentials again when passphrase is wrong 6 | 7 | When trying to decode the private key it looks like LibSSH2 returns a 8 | LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED when the passphrase is incorrect. 9 | 10 | diff --git a/src/transports/ssh.c b/src/transports/ssh.c 11 | index 172ef413c..ec3b0b6ff 100644 12 | --- a/src/transports/ssh.c 13 | +++ b/src/transports/ssh.c 14 | @@ -420,8 +420,8 @@ static int _git_ssh_authenticate_session( 15 | } 16 | } while (LIBSSH2_ERROR_EAGAIN == rc || LIBSSH2_ERROR_TIMEOUT == rc); 17 | 18 | - if (rc == LIBSSH2_ERROR_PASSWORD_EXPIRED || rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED) 19 | - return GIT_EAUTH; 20 | + if (rc == LIBSSH2_ERROR_PASSWORD_EXPIRED || rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED || rc == LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED) 21 | + return GIT_EAUTH; 22 | 23 | if (rc != LIBSSH2_ERROR_NONE) { 24 | if (!giterr_last()) 25 | -------------------------------------------------------------------------------- /contrib/relative_path.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # both $1 and $2 are absolute paths beginning with / 5 | # returns relative path to $2/$target from $1/$source 6 | 7 | relpath () { 8 | [ $# -ge 1 ] && [ $# -le 2 ] || return 1 9 | current="${2:+"$1"}" 10 | target="${2:-"$1"}" 11 | [ "$target" != . ] || target=/ 12 | target="/${target##/}" 13 | [ "$current" != . ] || current=/ 14 | current="${current:="/"}" 15 | current="/${current##/}" 16 | appendix="${target##/}" 17 | relative='' 18 | while appendix="${target#"$current"/}" 19 | [ "$current" != '/' ] && [ "$appendix" = "$target" ]; do 20 | if [ "$current" = "$appendix" ]; then 21 | relative="${relative:-.}" 22 | echo "${relative#/}" 23 | return 0 24 | fi 25 | current="${current%/*}" 26 | relative="$relative${relative:+/}.." 27 | done 28 | relative="$relative${relative:+${appendix:+/}}${appendix#/}" 29 | echo "$relative" 30 | } 31 | relpath "$@" 32 | -------------------------------------------------------------------------------- /contrib/stringreplace.c: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | int main( int argc, char ** argv ) { 8 | if( argc < 5 ) { 9 | printf("Usage:\n"); 10 | printf(" %s \n", argv[0] ); 11 | return -1; 12 | } 13 | 14 | unsigned long offset = strtoul(argv[1], NULL, 16); 15 | char * replacement = argv[2]; 16 | unsigned long maxlen = strtoul(argv[3], NULL, 10); 17 | 18 | FILE * f = fopen( argv[4], "r+" ); 19 | if( !f ) { 20 | printf( "ERROR: Could not open %s for writing!\n", argv[4] ); 21 | return -1; 22 | } 23 | 24 | if( strlen(replacement) > maxlen ) { 25 | printf( "ERROR: Replacement string length (%lu) is greater than maxlen! (%lu)\n", strlen(replacement), maxlen ); 26 | return -1; 27 | } 28 | 29 | fseek( f, offset, SEEK_SET ); 30 | fwrite( replacement, strlen(replacement)+1, 1, f ); 31 | 32 | fclose( f ); 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /src/julia_assert.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | // Include this file instead of `assert.h` directly. 4 | // This is necessary because LLVM sometimes has bugs that cause runtime assertion if 5 | // the `NDEBUG` setting is different from the one used to compile LLVM. 6 | // For C++ files, we set `NDEBUG` to match what LLVM expects and use `JL_NDEBUG` to 7 | // enable assertions in julia code. After including this file, the definition of `assert` will 8 | // match the setting given in `JL_NDEBUG` and `NDEBUG` will remain unchanged. 9 | // 10 | // Files that need `assert` should include this file after all other includes. 11 | // All files should also check `JL_NDEBUG` instead of `NDEBUG`. 12 | 13 | #ifdef NDEBUG 14 | # ifndef JL_NDEBUG 15 | # undef NDEBUG 16 | # include 17 | // Set NDEBUG back so that we can include another LLVM header right after 18 | # define NDEBUG 19 | # else 20 | # include 21 | # endif 22 | #else 23 | # ifdef JL_NDEBUG 24 | # undef JL_NDEBUG 25 | # endif 26 | # include 27 | #endif 28 | -------------------------------------------------------------------------------- /deps/patches/libgit2-ssh.patch: -------------------------------------------------------------------------------- 1 | --- CMakeLists.txt 2016-05-26 23:13:48.000000000 -0400 2 | +++ CMakeLists.txt 2016-07-02 23:20:55.842735529 -0400 3 | @@ -354,14 +354,16 @@ 4 | 5 | # Optional external dependency: libssh2 6 | IF (USE_SSH) 7 | - PKG_CHECK_MODULES(LIBSSH2 libssh2) 8 | + FIND_PACKAGE(Libssh2) 9 | + GET_TARGET_PROPERTY(LIBSSH2_INCLUDE_DIRS Libssh2::libssh2 INTERFACE_INCLUDE_DIRECTORIES) 10 | + GET_TARGET_PROPERTY(LIBSSH2_LOCATION Libssh2::libssh2 IMPORTED_LOCATION_RELEASE) 11 | + GET_FILENAME_COMPONENT(LIBSSH2_LIBRARY_DIRS ${LIBSSH2_LOCATION} PATH) 12 | + SET(LIBSSH2_LIBRARIES "-lssh2") 13 | ENDIF() 14 | -IF (LIBSSH2_FOUND) 15 | +IF (Libssh2_FOUND) 16 | ADD_DEFINITIONS(-DGIT_SSH) 17 | INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIRS}) 18 | LINK_DIRECTORIES(${LIBSSH2_LIBRARY_DIRS}) 19 | - LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS}) 20 | - #SET(LIBGIT2_PC_LIBS "${LIBGIT2_PC_LIBS} ${LIBSSH2_LDFLAGS}") 21 | SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES}) 22 | 23 | CHECK_LIBRARY_EXISTS("${LIBSSH2_LIBRARIES}" libssh2_userauth_publickey_frommemory "${LIBSSH2_LIBRARY_DIRS}" HAVE_LIBSSH2_MEMORY_CREDENTIALS) 24 | -------------------------------------------------------------------------------- /doc/src/base/multi-threading.md: -------------------------------------------------------------------------------- 1 | 2 | # Multi-Threading 3 | 4 | This experimental interface supports Julia's multi-threading capabilities. Types and functions 5 | described here might (and likely will) change in the future. 6 | 7 | ```@docs 8 | Base.Threads.threadid 9 | Base.Threads.nthreads 10 | Base.Threads.@threads 11 | Base.Threads.Atomic 12 | Base.Threads.atomic_cas! 13 | Base.Threads.atomic_xchg! 14 | Base.Threads.atomic_add! 15 | Base.Threads.atomic_sub! 16 | Base.Threads.atomic_and! 17 | Base.Threads.atomic_nand! 18 | Base.Threads.atomic_or! 19 | Base.Threads.atomic_xor! 20 | Base.Threads.atomic_max! 21 | Base.Threads.atomic_min! 22 | Base.Threads.atomic_fence 23 | ``` 24 | 25 | ## ccall using a threadpool (Experimental) 26 | 27 | ```@docs 28 | Base.@threadcall 29 | ``` 30 | 31 | ## Synchronization Primitives 32 | 33 | ```@docs 34 | Base.Threads.AbstractLock 35 | Base.lock 36 | Base.unlock 37 | Base.trylock 38 | Base.islocked 39 | Base.ReentrantLock 40 | Base.Threads.Mutex 41 | Base.Threads.SpinLock 42 | Base.Threads.RecursiveSpinLock 43 | Base.Semaphore 44 | Base.acquire 45 | Base.release 46 | ``` 47 | 48 | -------------------------------------------------------------------------------- /deps/patches/gmp-exception.patch: -------------------------------------------------------------------------------- 1 | diff -r 842c2ba359bf errno.c 2 | --- a/errno.c Sun Jan 24 22:06:51 2016 +0100 3 | +++ b/errno.c Thu Jan 28 13:37:54 2016 -0500 4 | @@ -33,24 +33,24 @@ 5 | see https://www.gnu.org/licenses/. */ 6 | 7 | #include 8 | + 9 | +#include 10 | + 11 | #include "gmp.h" 12 | #include "gmp-impl.h" 13 | 14 | int gmp_errno = 0; 15 | 16 | 17 | -/* The deliberate divide by zero triggers an exception on most systems. On 18 | - those where it doesn't, for example power and powerpc, use abort instead. 19 | - 20 | - Enhancement: Perhaps raise(SIGFPE) (or the same with kill()) would be 21 | - better than abort. Perhaps it'd be possible to get the BSD style 22 | - FPE_INTDIV_TRAP parameter in there too. */ 23 | - 24 | +/* Use SIGFPE on systems which have it. Otherwise, deliberate divide 25 | + by zero, which triggers an exception on most systems. On those 26 | + where it doesn't, for example power and powerpc, use abort instead. */ 27 | void 28 | __gmp_exception (int error_bit) 29 | { 30 | gmp_errno |= error_bit; 31 | __gmp_junk = 10 / __gmp_0; 32 | + raise (SIGFPE); 33 | abort (); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /stdlib/LinearAlgebra/test/hessenberg.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module TestHessenberg 4 | 5 | using Test, LinearAlgebra, Random 6 | 7 | let n = 10 8 | srand(1234321) 9 | 10 | Areal = randn(n,n)/2 11 | Aimg = randn(n,n)/2 12 | 13 | @testset for eltya in (Float32, Float64, ComplexF32, ComplexF64, BigFloat, Int) 14 | A = eltya == Int ? 15 | rand(1:7, n, n) : 16 | convert(Matrix{eltya}, eltya <: Complex ? 17 | complex.(Areal, Aimg) : 18 | Areal) 19 | 20 | if eltya != BigFloat 21 | H = hessenberg(A) 22 | @test size(H.Q, 1) == size(A, 1) 23 | @test size(H.Q, 2) == size(A, 2) 24 | @test size(H.Q) == size(A) 25 | @test_throws ErrorException H.Z 26 | @test convert(Array, H) ≈ A 27 | @test (H.Q * H.H) * H.Q' ≈ A 28 | @test (H.Q' *A) * H.Q ≈ H.H 29 | #getindex for HessenbergQ 30 | @test H.Q[1,1] ≈ Array(H.Q)[1,1] 31 | end 32 | end 33 | end 34 | 35 | end # module TestHessenberg 36 | -------------------------------------------------------------------------------- /deps/patches/llvm-D45070.patch: -------------------------------------------------------------------------------- 1 | Index: lib/Target/NVPTX/NVPTXTargetMachine.cpp 2 | =================================================================== 3 | --- a/lib/Target/NVPTX/NVPTXTargetMachine.cpp 4 | +++ b/lib/Target/NVPTX/NVPTXTargetMachine.cpp 5 | @@ -44,6 +44,14 @@ 6 | cl::desc("Disable load/store vectorizer"), 7 | cl::init(false), cl::Hidden); 8 | 9 | +// TODO: Remove this flag when we are confident with no regressions. 10 | +static cl::opt DisableRequireStructuredCFG( 11 | + "disable-nvptx-require-structured-cfg", 12 | + cl::desc("Transitional flag to turn off NVPTX's requirement on preserving " 13 | + "structured CFG. The requirement should be disabled only when " 14 | + "unexpected regressions happen."), 15 | + cl::init(false), cl::Hidden); 16 | + 17 | namespace llvm { 18 | 19 | void initializeNVVMIntrRangePass(PassRegistry&); 20 | @@ -108,6 +116,8 @@ 21 | drvInterface = NVPTX::NVCL; 22 | else 23 | drvInterface = NVPTX::CUDA; 24 | + if (!DisableRequireStructuredCFG) 25 | + setRequiresStructuredCFG(true); 26 | initAsmInfo(); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /base/coreio.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | print(xs...) = print(stdout::IO, xs...) 4 | println(xs...) = println(stdout::IO, xs...) 5 | println(io::IO) = print(io, '\n') 6 | 7 | struct DevNullStream <: IO end 8 | const devnull = DevNullStream() 9 | isreadable(::DevNullStream) = false 10 | iswritable(::DevNullStream) = true 11 | isopen(::DevNullStream) = true 12 | read(::DevNullStream, ::Type{UInt8}) = throw(EOFError()) 13 | write(::DevNullStream, ::UInt8) = 1 14 | unsafe_write(::DevNullStream, ::Ptr{UInt8}, n::UInt)::Int = n 15 | close(::DevNullStream) = nothing 16 | flush(::DevNullStream) = nothing 17 | wait_connected(::DevNullStream) = nothing 18 | wait_readnb(::DevNullStream) = wait() 19 | wait_readbyte(::DevNullStream) = wait() 20 | wait_close(::DevNullStream) = wait() 21 | eof(::DevNullStream) = true 22 | 23 | let CoreIO = Union{Core.CoreSTDOUT, Core.CoreSTDERR} 24 | global write, unsafe_write 25 | write(io::CoreIO, x::UInt8) = Core.write(io, x) 26 | unsafe_write(io::CoreIO, x::Ptr{UInt8}, nb::UInt) = Core.unsafe_write(io, x, nb) 27 | end 28 | 29 | stdin = devnull 30 | stdout = Core.stdout 31 | stderr = Core.stderr 32 | -------------------------------------------------------------------------------- /contrib/travis_fastfail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | curlhdr="Accept: application/vnd.travis-ci.2+json" 5 | endpoint="https://api.travis-ci.org/repos/$TRAVIS_REPO_SLUG" 6 | 7 | # Fail fast for superseded builds to PR's 8 | if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then 9 | newestbuildforthisPR=$(curl -H "$curlhdr" $endpoint/builds?event_type=pull_request | \ 10 | jq ".builds | map(select(.pull_request_number == $TRAVIS_PULL_REQUEST))[0].number") 11 | if [ $newestbuildforthisPR != null -a $newestbuildforthisPR != \"$TRAVIS_BUILD_NUMBER\" ]; then 12 | echo "There are newer queued builds for this pull request, failing early." 13 | exit 1 14 | fi 15 | else 16 | # And for non-latest push builds in branches other than master or release* 17 | case $TRAVIS_BRANCH in 18 | master | release*) 19 | ;; 20 | *) 21 | if [ \"$TRAVIS_BUILD_NUMBER\" != $(curl -H "$curlhdr" \ 22 | $endpoint/branches/$TRAVIS_BRANCH | jq ".branch.number") ]; then 23 | echo "There are newer queued builds for this branch, failing early." 24 | exit 1 25 | fi 26 | ;; 27 | esac 28 | fi 29 | -------------------------------------------------------------------------------- /test/Makefile: -------------------------------------------------------------------------------- 1 | SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) 2 | JULIAHOME := $(abspath $(SRCDIR)/..) 3 | BUILDDIR := . 4 | STDLIBDIR := $(abspath $(JULIAHOME)/stdlib) 5 | include $(JULIAHOME)/Make.inc 6 | # TODO: this Makefile ignores BUILDDIR, except for computing JULIA_EXECUTABLE 7 | 8 | TESTGROUPS = unicode strings compiler 9 | TESTS = all stdlib $(TESTGROUPS) \ 10 | $(patsubst $(STDLIBDIR)/%/,%,$(dir $(wildcard $(STDLIBDIR)/*/.))) \ 11 | $(filter-out TestHelpers runtests testdefs, \ 12 | $(patsubst $(SRCDIR)/%.jl,%,$(wildcard $(SRCDIR)/*.jl))) \ 13 | $(foreach group,$(TESTGROUPS), \ 14 | $(patsubst $(SRCDIR)/%.jl,%,$(wildcard $(SRCDIR)/$(group)/*.jl))) 15 | # run `make print-TESTS` to see a list of all tests that can be run 16 | 17 | EMBEDDING_ARGS := "JULIA=$(JULIA_EXECUTABLE)" "BIN=$(SRCDIR)/embedding" "CC=$(CC)" 18 | 19 | default: all 20 | 21 | $(TESTS): 22 | @cd $(SRCDIR) && \ 23 | $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no ./runtests.jl $@) 24 | 25 | embedding: 26 | @$(MAKE) -C $(SRCDIR)/$@ check $(EMBEDDING_ARGS) 27 | 28 | clean: 29 | @$(MAKE) -C embedding $@ $(EMBEDDING_ARGS) 30 | 31 | .PHONY: $(TESTS) embedding clean 32 | -------------------------------------------------------------------------------- /deps/patches/llvm-PPC-addrspaces.patch: -------------------------------------------------------------------------------- 1 | From 15899eaab58e96bb7bbe7a14099674e255656a50 Mon Sep 17 00:00:00 2001 2 | From: Valentin Churavy 3 | Date: Fri, 23 Feb 2018 14:41:20 -0500 4 | Subject: [PATCH] Make AddrSpaceCast noops on PPC 5 | 6 | PPC as AArch64 doesn't have address-spaces so we can drop them in the backend 7 | --- 8 | lib/Target/PowerPC/PPCISelLowering.h | 5 +++++ 9 | 1 file changed, 5 insertions(+) 10 | 11 | diff --git a/lib/Target/PowerPC/PPCISelLowering.h b/lib/Target/PowerPC/PPCISelLowering.h 12 | index e60504507d3..c9b89773968 100644 13 | --- a/lib/Target/PowerPC/PPCISelLowering.h 14 | +++ b/lib/Target/PowerPC/PPCISelLowering.h 15 | @@ -761,6 +761,11 @@ namespace llvm { 16 | ReuseLoadInfo() : IsInvariant(false), Alignment(0), Ranges(nullptr) {} 17 | }; 18 | 19 | + bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override { 20 | + // Addrspacecasts are always noops. 21 | + return true; 22 | + } 23 | + 24 | bool canReuseLoadAddress(SDValue Op, EVT MemVT, ReuseLoadInfo &RLI, 25 | SelectionDAG &DAG, 26 | ISD::LoadExtType ET = ISD::NON_EXTLOAD) const; 27 | -- 28 | 2.16.2 29 | 30 | -------------------------------------------------------------------------------- /base/docs/core.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module CoreDocs 4 | 5 | import ..esc, ..push!, ..getindex, ..unsafe_load, ..Csize_t, ..@nospecialize 6 | 7 | function doc!(source::LineNumberNode, mod::Module, str, ex) 8 | @nospecialize str ex 9 | push!(DOCS, Core.svec(mod, ex, str, source.file, source.line)) 10 | nothing 11 | end 12 | const DOCS = Array{Core.SimpleVector,1}() 13 | 14 | isexpr(@nospecialize(x), h::Symbol) = isa(x, Expr) && x.head === h 15 | 16 | lazy_iterpolate(s::AbstractString) = Expr(:call, Core.svec, s) 17 | lazy_iterpolate(@nospecialize x) = isexpr(x, :string) ? Expr(:call, Core.svec, x.args...) : x 18 | 19 | function docm(source::LineNumberNode, mod::Module, str, x) 20 | out = Expr(:call, doc!, QuoteNode(source), mod, lazy_iterpolate(str), Expr(:quote, x)) 21 | if isexpr(x, :module) 22 | out = Expr(:toplevel, out, x) 23 | elseif isexpr(x, :call) 24 | else 25 | out = Expr(:block, x, out) 26 | end 27 | return esc(out) 28 | end 29 | docm(source::LineNumberNode, mod::Module, x) = 30 | isexpr(x, :->) ? docm(source, mod, x.args[1], x.args[2].args[2]) : error("invalid '@doc'.") 31 | 32 | end 33 | -------------------------------------------------------------------------------- /doc/src/base/simd-types.md: -------------------------------------------------------------------------------- 1 | # SIMD Support 2 | 3 | Type `VecElement{T}` is intended for building libraries of SIMD operations. Practical use of it 4 | requires using `llvmcall`. The type is defined as: 5 | 6 | ```julia 7 | struct VecElement{T} 8 | value::T 9 | end 10 | ``` 11 | 12 | It has a special compilation rule: a homogeneous tuple of `VecElement{T}` maps to an LLVM `vector` 13 | type when `T` is a primitive bits type and the tuple length is in the set {2-6,8-10,16}. 14 | 15 | At `-O3`, the compiler *might* automatically vectorize operations on such tuples. For example, 16 | the following program, when compiled with `julia -O3` generates two SIMD addition instructions 17 | (`addps`) on x86 systems: 18 | 19 | ```julia 20 | const m128 = NTuple{4,VecElement{Float32}} 21 | 22 | function add(a::m128, b::m128) 23 | (VecElement(a[1].value+b[1].value), 24 | VecElement(a[2].value+b[2].value), 25 | VecElement(a[3].value+b[3].value), 26 | VecElement(a[4].value+b[4].value)) 27 | end 28 | 29 | triple(c::m128) = add(add(c,c),c) 30 | 31 | code_native(triple,(m128,)) 32 | ``` 33 | 34 | However, since the automatic vectorization cannot be relied upon, future use will mostly be via 35 | libraries that use `llvmcall`. 36 | -------------------------------------------------------------------------------- /stdlib/Random/src/deprecated.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # PR #25567 4 | Base.@deprecate_binding dSFMT DSFMT 5 | 6 | # PR #21359 7 | 8 | @deprecate srand(r::MersenneTwister, filename::AbstractString, n::Integer=4) srand(r, read!(filename, Vector{UInt32}(undef, Int(n)))) 9 | @deprecate srand(filename::AbstractString, n::Integer=4) srand(read!(filename, Vector{UInt32}(undef, Int(n)))) 10 | @deprecate MersenneTwister(filename::AbstractString) srand(MersenneTwister(0), read!(filename, Vector{UInt32}(undef, Int(4)))) 11 | 12 | function randjump(mt::MersenneTwister, jumps::Integer, jumppoly::AbstractString) 13 | depwarn("`randjump(rng, jumps, jumppoly::AbstractString)` is deprecated; use `randjump(rng, steps, jumps)` instead", :randjump) 14 | Base.Random._randjump(mt, DSFMT.GF2X(jumppoly), jumps) 15 | end 16 | 17 | @deprecate randjump(mt::MersenneTwister, jumps::Integer) randjump(mt, big(10)^20, jumps) 18 | 19 | # PR #25429 20 | @deprecate rand(r::AbstractRNG, dims::Dims) rand(r, Float64, dims) 21 | @deprecate rand( dims::Dims) rand(Float64, dims) 22 | 23 | # PR #25668 24 | @deprecate RandomDevice(unlimited::Bool) RandomDevice(; unlimited=unlimited) 25 | -------------------------------------------------------------------------------- /doc/src/devdocs/require.md: -------------------------------------------------------------------------------- 1 | # Module loading 2 | 3 | [`Base.require`](@ref) is responsible for loading modules and it also manages the 4 | precompilation cache. It is the implementation of the `import` statement. 5 | 6 | ## Experimental features 7 | The features below are experimental and not part of the stable Julia API. 8 | Before building upon them inform yourself about the current thinking and whether they might change soon. 9 | 10 | ### Module loading callbacks 11 | 12 | It is possible to listen to the modules loaded by `Base.require`, by registering a callback. 13 | 14 | ```julia 15 | loaded_packages = Channel{Symbol}() 16 | callback = (mod::Symbol) -> put!(loaded_packages, mod) 17 | push!(Base.package_callbacks, callback) 18 | ``` 19 | 20 | Please note that the symbol given to the callback is a non-unique identifier and 21 | it is the responsibility of the callback provider to walk the module chain to 22 | determine the fully qualified name of the loaded binding. 23 | 24 | The callback below is an example of how to do that: 25 | 26 | ```julia 27 | # Get the fully-qualified name of a module. 28 | function module_fqn(name::Symbol) 29 | fqn = fullname(Base.root_module(name)) 30 | return join(fqn, '.') 31 | end 32 | ``` 33 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/README.md: -------------------------------------------------------------------------------- 1 | # TOML.jl 2 | 3 | A [TOML v0.4.0](https://github.com/toml-lang/toml) parser for Julia. 4 | 5 | [![Build Status](https://travis-ci.org/wildart/TOML.jl.svg?branch=master)](https://travis-ci.org/wildart/TOML.jl) 6 | [![Coverage Status](https://coveralls.io/repos/wildart/TOML.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/wildart/TOML.jl?branch=master) 7 | [![Build status](https://ci.appveyor.com/api/projects/status/quhhe2m3e9vbim6u?svg=true)](https://ci.appveyor.com/project/wildart/toml-jl) 8 | 9 | **Installation**: `julia> Pkg.clone("https://github.com/wildart/TOML.jl.git")` 10 | 11 | ## Basic Usage 12 | 13 | ```julia 14 | 15 | julia> using TOML 16 | 17 | julia> TOML.parse(""" 18 | name = "value" 19 | """) 20 | Dict{String,Any} with 1 entry: 21 | "name" => "value" 22 | 23 | julia> TOML.parsefile("etc/example.toml") 24 | ``` 25 | 26 | ## Documentation 27 | ```julia 28 | TOML.print(io::IO, a::Associative) 29 | ``` 30 | Writes a TOML representation to the supplied `IO`. 31 | 32 | ```julia 33 | TOML.parse(s::AbstractString) 34 | TOML.parse(io::IO) 35 | TOML.parsefile(filename::AbstractString) 36 | ``` 37 | Parses a TOML `AbstractString` or `IO` stream into a nested `Array`or `Dict`. 38 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/LICENSE.md: -------------------------------------------------------------------------------- 1 | The TOML.jl package is licensed under the MIT "Expat" License: 2 | 3 | > Copyright (c) 2016: Art Wild. 4 | > 5 | > Permission is hereby granted, free of charge, to any person obtaining a copy 6 | > of this software and associated documentation files (the "Software"), to deal 7 | > in the Software without restriction, including without limitation the rights 8 | > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | > copies of the Software, and to permit persons to whom the Software is 10 | > furnished to do so, subject to the following conditions: 11 | > 12 | > The above copyright notice and this permission notice shall be included in all 13 | > copies or substantial portions of the Software. 14 | > 15 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | > SOFTWARE. 22 | > 23 | -------------------------------------------------------------------------------- /contrib/windows/7zSFX-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /deps/openlibm.mk: -------------------------------------------------------------------------------- 1 | ## openlibm ## 2 | OPENLIBM_GIT_URL := git://github.com/JuliaLang/openlibm.git 3 | OPENLIBM_TAR_URL = https://api.github.com/repos/JuliaLang/openlibm/tarball/$1 4 | $(eval $(call git-external,openlibm,OPENLIBM,,,$(BUILDDIR))) 5 | 6 | OPENLIBM_FLAGS := ARCH="$(ARCH)" REAL_ARCH="$(MARCH)" CC="$(CC)" FC="$(FC)" AR="$(AR)" OS="$(OS)" USECLANG=$(USECLANG) USEGCC=$(USEGCC) 7 | 8 | $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/build-compiled: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted 9 | $(MAKE) -C $(dir $<) $(OPENLIBM_FLAGS) $(MAKE_COMMON) 10 | echo 1 > $@ 11 | 12 | $(eval $(call staged-install, \ 13 | openlibm,$$(OPENLIBM_SRC_DIR), \ 14 | MAKE_INSTALL,$$(OPENLIBM_FLAGS),, \ 15 | $(INSTALL_NAME_CMD)libopenlibm.$(SHLIB_EXT) $(build_shlibdir)/libopenlibm.$(SHLIB_EXT))) 16 | 17 | clean-openlibm: 18 | -rm $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/build-compiled $(build_libdir)/libopenlibm.a 19 | -$(MAKE) -C $(BUILDDIR)/$(OPENLIBM_SRC_DIR) distclean $(OPENLIBM_FLAGS) 20 | 21 | 22 | get-openlibm: $(OPENLIBM_SRC_FILE) 23 | extract-openlibm: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted 24 | configure-openlibm: extract-openlibm 25 | compile-openlibm: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/build-compiled 26 | fastcheck-openlibm: check-openlibm 27 | check-openlibm: compile-openlibm 28 | -------------------------------------------------------------------------------- /src/support/hashing.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_HASHING_H 4 | #define JL_HASHING_H 5 | 6 | #include "utils.h" 7 | #include "dtypes.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | uint_t nextipow2(uint_t i); 14 | JL_DLLEXPORT uint32_t int32hash(uint32_t a); 15 | JL_DLLEXPORT uint64_t int64hash(uint64_t key); 16 | JL_DLLEXPORT uint32_t int64to32hash(uint64_t key); 17 | #ifdef _P64 18 | #define inthash int64hash 19 | #else 20 | #define inthash int32hash 21 | #endif 22 | JL_DLLEXPORT uint64_t memhash(const char *buf, size_t n); 23 | JL_DLLEXPORT uint64_t memhash_seed(const char *buf, size_t n, uint32_t seed); 24 | JL_DLLEXPORT uint32_t memhash32(const char *buf, size_t n); 25 | JL_DLLEXPORT uint32_t memhash32_seed(const char *buf, size_t n, uint32_t seed); 26 | 27 | #ifdef _P64 28 | STATIC_INLINE uint64_t bitmix(uint64_t a, uint64_t b) 29 | { 30 | return int64hash(a^bswap_64(b)); 31 | } 32 | #else 33 | STATIC_INLINE uint32_t bitmix(uint32_t a, uint32_t b) 34 | { 35 | return int64to32hash((((uint64_t)a) << 32) | (uint64_t)b); 36 | } 37 | #endif 38 | #define bitmix(a, b) (bitmix)((uintptr_t)(a), (uintptr_t)(b)) 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /stdlib/REPL/src/TerminalMenus/LICENSE.md: -------------------------------------------------------------------------------- 1 | The TerminalMenus.jl package is licensed under the MIT "Expat" License: 2 | 3 | > Copyright (c) 2017: Nick Paul. 4 | > 5 | > Permission is hereby granted, free of charge, to any person obtaining a copy 6 | > of this software and associated documentation files (the "Software"), to deal 7 | > in the Software without restriction, including without limitation the rights 8 | > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | > copies of the Software, and to permit persons to whom the Software is 10 | > furnished to do so, subject to the following conditions: 11 | > 12 | > The above copyright notice and this permission notice shall be included in all 13 | > copies or substantial portions of the Software. 14 | > 15 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | > SOFTWARE. 22 | > 23 | -------------------------------------------------------------------------------- /contrib/windows/julia-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /contrib/mac/mac-gtk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # This script will attempt to download and build GTK+-3, 5 | # including dependencies, in ~/gtk (also puts stuff in 6 | # ~/.local, ~/Source, ~/.jhbuildrc*) 7 | # While this should work, it may be preferable to execute 8 | # each line separately in the terminal 9 | 10 | curl -O https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh 11 | sh gtk-osx-build-setup.sh 12 | export PATH=$PATH:~/.local/bin/ 13 | sed -i -e 's/^setup_sdk/#setup_sdk/g' ~/.jhbuildrc-custom 14 | cat << EOF >> .jhbuildrc-custom 15 | setup_sdk(target=_target, sdk_version=_target, architectures=[_default_arch]) 16 | os.environ["DYLD_LIBRARY_PATH"] = "" 17 | build_policy = "updated-deps" 18 | modules = [ "meta-gtk-osx-bootstrap", 19 | "freetype", "fontconfig", 20 | "meta-gtk-osx-core", 21 | "meta-gtk-osx-themes", 22 | "gtk-quartz-engine" ] 23 | EOF 24 | 25 | jhbuild bootstrap --skip=libiconv --ignore-system 26 | jhbuild build 27 | 28 | cd ~/gtk/source 29 | curl -O http://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.6/gtk-mac-bundler-0.6.1.tar.bz2 30 | tar jxvf gtk-mac-bundler-0.6.1.tar.bz2 31 | cd gtk-mac-bundler-0.6.1 32 | make install 33 | cd ~/gtk 34 | 35 | 36 | -------------------------------------------------------------------------------- /stdlib/Pkg/test/utils.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | function temp_pkg_dir(fn::Function) 4 | local env_dir 5 | local old_load_path 6 | local old_depot_path 7 | try 8 | old_load_path = copy(LOAD_PATH) 9 | old_depot_path = copy(DEPOT_PATH) 10 | empty!(LOAD_PATH) 11 | empty!(DEPOT_PATH) 12 | mktempdir() do env_dir 13 | mktempdir() do depot_dir 14 | pushfirst!(LOAD_PATH, env_dir) 15 | pushfirst!(DEPOT_PATH, depot_dir) 16 | # Add the standard library paths back 17 | vers = "v$(VERSION.major).$(VERSION.minor)" 18 | push!(LOAD_PATH, abspath(Sys.BINDIR, "..", "share", "julia", "stdlib", vers)) 19 | fn(env_dir) 20 | end 21 | end 22 | finally 23 | empty!(LOAD_PATH) 24 | empty!(DEPOT_PATH) 25 | append!(LOAD_PATH, old_load_path) 26 | append!(DEPOT_PATH, old_depot_path) 27 | end 28 | end 29 | 30 | function cd_tempdir(f) 31 | mktempdir() do tmp 32 | cd(tmp) do 33 | f(tmp) 34 | end 35 | end 36 | end 37 | 38 | isinstalled(pkg) = Base.locate_package(Base.PkgId(pkg.uuid, pkg.name)) !== nothing 39 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | matrix: 3 | - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" 4 | - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" 5 | - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" 6 | - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" 7 | 8 | branches: 9 | only: 10 | - master 11 | 12 | notifications: 13 | - provider: Email 14 | on_build_success: false 15 | on_build_failure: false 16 | on_build_status_changed: false 17 | 18 | install: 19 | # Download most recent Julia Windows binary 20 | - ps: (new-object net.webclient).DownloadFile( 21 | $env:JULIA_URL, 22 | "C:\projects\julia-binary.exe") 23 | # Run installer silently, output to C:\projects\julia 24 | - C:\projects\julia-binary.exe /S /D=C:\projects\julia 25 | 26 | build_script: 27 | # Need to convert from shallow to complete for Pkg.clone to work 28 | - IF EXIST .git\shallow (git fetch --unshallow) 29 | - C:\projects\julia\bin\julia -e "versioninfo(); 30 | Pkg.clone(pwd(), \"TOML\") 31 | 32 | test_script: 33 | - C:\projects\julia\bin\julia -e "Pkg.test(\"TOML\")" 34 | -------------------------------------------------------------------------------- /deps/patches/llvm-rL326843-missing-header.patch: -------------------------------------------------------------------------------- 1 | From 7c9054610e354340f9474dcd13a927f929912d1d Mon Sep 17 00:00:00 2001 2 | From: Eugene Zelenko 3 | Date: Tue, 6 Mar 2018 23:06:13 +0000 4 | Subject: [PATCH] [Transforms] Add missing header for InstructionCombining.cpp, 5 | in order to export LLVMInitializeInstCombine as extern "C". Fixes PR35947. 6 | 7 | Patch by Brenton Bostick. 8 | 9 | Differential revision: https://reviews.llvm.org/D44140 10 | 11 | 12 | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326843 91177308-0d34-0410-b5e6-96231b3b80d8 13 | --- 14 | lib/Transforms/InstCombine/InstructionCombining.cpp | 1 + 15 | 1 file changed, 1 insertion(+) 16 | 17 | diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp 18 | index a3b2fe9e5d2..7ec73433e8f 100644 19 | --- a/lib/Transforms/InstCombine/InstructionCombining.cpp 20 | +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp 21 | @@ -34,6 +34,7 @@ 22 | //===----------------------------------------------------------------------===// 23 | 24 | #include "InstCombineInternal.h" 25 | +#include "llvm-c/Initialization.h" 26 | #include "llvm/ADT/APInt.h" 27 | #include "llvm/ADT/ArrayRef.h" 28 | #include "llvm/ADT/DenseMap.h" 29 | -- 30 | 2.16.2 31 | 32 | -------------------------------------------------------------------------------- /src/tls.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_TLS_H 4 | #define JL_TLS_H 5 | 6 | // Thread-local storage access 7 | 8 | // Copied from libuv. Add `JL_CONST_FUNC` so that the compiler 9 | // can optimize this better. 10 | static inline unsigned long JL_CONST_FUNC jl_thread_self(void) 11 | { 12 | #ifdef _OS_WINDOWS_ 13 | return (unsigned long)GetCurrentThreadId(); 14 | #else 15 | return (unsigned long)pthread_self(); 16 | #endif 17 | } 18 | 19 | typedef struct _jl_tls_states_t jl_tls_states_t; 20 | 21 | typedef jl_tls_states_t *jl_ptls_t; 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | JL_DLLEXPORT int16_t jl_threadid(void); 28 | JL_DLLEXPORT void jl_threading_profile(void); 29 | 30 | JL_DLLEXPORT JL_CONST_FUNC jl_ptls_t (jl_get_ptls_states)(void); 31 | 32 | #ifndef JULIA_ENABLE_THREADING 33 | extern JL_DLLEXPORT jl_tls_states_t jl_tls_states; 34 | #define jl_get_ptls_states() (&jl_tls_states) 35 | #else // ifndef JULIA_ENABLE_THREADING 36 | typedef jl_ptls_t (*jl_get_ptls_states_func)(void); 37 | #if !defined(_OS_DARWIN_) && !defined(_OS_WINDOWS_) 38 | JL_DLLEXPORT void jl_set_ptls_states_getter(jl_get_ptls_states_func f); 39 | #endif 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /test/llvmpasses/returnstwicegc.ll: -------------------------------------------------------------------------------- 1 | ; RUN: opt -load libjulia%shlibext -LateLowerGCFrame -S %s | FileCheck %s 2 | 3 | %jl_value_t = type opaque 4 | 5 | declare void @boxed_simple(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*) 6 | declare %jl_value_t addrspace(10)* @jl_box_int64(i64) 7 | declare %jl_value_t*** @julia.ptls_states() 8 | declare i32 @sigsetjmp(i8*, i32) returns_twice 9 | declare void @one_arg_boxed(%jl_value_t addrspace(10)*) 10 | 11 | define void @try_catch(i64 %a, i64 %b) 12 | { 13 | ; Because of the returns_twice function, we need to keep aboxed live everywhere 14 | ; CHECK: %gcframe = alloca %jl_value_t addrspace(10)*, i32 4 15 | top: 16 | %sigframe = alloca [208 x i8], align 16 17 | %sigframe.sub = getelementptr inbounds [208 x i8], [208 x i8]* %sigframe, i64 0, i64 0 18 | call %jl_value_t*** @julia.ptls_states() 19 | %aboxed = call %jl_value_t addrspace(10)* @jl_box_int64(i64 %a) 20 | %val = call i32 @sigsetjmp(i8 *%sigframe.sub, i32 0) returns_twice 21 | %cmp = icmp eq i32 %val, 0 22 | br i1 %cmp, label %zero, label %not 23 | zero: 24 | %bboxed = call %jl_value_t addrspace(10)* @jl_box_int64(i64 %b) 25 | call void @one_arg_boxed(%jl_value_t addrspace(10)* %bboxed) 26 | unreachable 27 | not: 28 | call void @one_arg_boxed(%jl_value_t addrspace(10)* %aboxed) 29 | ret void 30 | } 31 | -------------------------------------------------------------------------------- /doc/src/manual/handling-operating-system-variation.md: -------------------------------------------------------------------------------- 1 | # Handling Operating System Variation 2 | 3 | When dealing with platform libraries, it is often necessary to provide special cases for various 4 | platforms. The variable `Sys.KERNEL` can be used to write these special cases. There are several 5 | functions in the `Sys` module intended to make this easier: `isunix`, `islinux`, `isapple`, 6 | `isbsd`, and `iswindows`. These may be used as follows: 7 | 8 | ```julia 9 | if Sys.iswindows() 10 | some_complicated_thing(a) 11 | end 12 | ``` 13 | 14 | Note that `islinux` and `isapple` are mutually exclusive subsets of `isunix`. Additionally, 15 | there is a macro `@static` which makes it possible to use these functions to conditionally hide 16 | invalid code, as demonstrated in the following examples. 17 | 18 | Simple blocks: 19 | 20 | ``` 21 | ccall((@static Sys.iswindows() ? :_fopen : :fopen), ...) 22 | ``` 23 | 24 | Complex blocks: 25 | 26 | ```julia 27 | @static if Sys.islinux() 28 | some_complicated_thing(a) 29 | else 30 | some_different_thing(a) 31 | end 32 | ``` 33 | 34 | When chaining conditionals (including `if`/`elseif`/`end`), the `@static` must be repeated for 35 | each level (parentheses optional, but recommended for readability): 36 | 37 | ```julia 38 | @static Sys.iswindows() ? :a : (@static Sys.isapple() ? :b : :c) 39 | ``` 40 | -------------------------------------------------------------------------------- /contrib/julia.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | julia.desktop 5 | CC-BY-SA-3.0 6 | MIT and LGPL-2.1+ and GPL-2.0+ 7 | 8 |

9 | Julia is a high-level, high-performance dynamic programming language for 10 | technical computing, with syntax that is familiar to users of other 11 | technical computing environments. It provides a sophisticated compiler, 12 | distributed parallel execution, numerical accuracy, and an extensive 13 | mathematical function library. 14 |

15 |

16 | The library, largely written in Julia itself, 17 | also integrates mature, best-of-breed C and Fortran libraries for linear 18 | algebra, random number generation, signal processing, and string processing. 19 | In addition, the Julia developer community is contributing a number of 20 | external packages through Julia’s built-in package manager at a rapid pace. 21 |

22 |
23 | 24 | https://julialang.org/images/julia-gnome.png 25 | 26 | https://julialang.org/ 27 | julia-dev@googlegroups.com 28 |
29 | -------------------------------------------------------------------------------- /base/osutils.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | """ 4 | @static 5 | 6 | Partially evaluate an expression at parse time. 7 | 8 | For example, `@static Sys.iswindows() ? foo : bar` will evaluate `Sys.iswindows()` and insert 9 | either `foo` or `bar` into the expression. 10 | This is useful in cases where a construct would be invalid on other platforms, 11 | such as a `ccall` to a non-existent function. 12 | `@static if Sys.isapple() foo end` and `@static foo <&&,||> bar` are also valid syntax. 13 | """ 14 | macro static(ex) 15 | if isa(ex, Expr) 16 | @label loop 17 | hd = ex.head 18 | if hd ∈ (:if, :elseif, :&&, :||) 19 | cond = Core.eval(__module__, ex.args[1]) 20 | if xor(cond, hd === :||) 21 | return esc(ex.args[2]) 22 | elseif length(ex.args) == 3 23 | br = ex.args[3] 24 | if br isa Expr && br.head === :elseif 25 | ex = br 26 | @goto loop 27 | else 28 | return esc(ex.args[3]) 29 | end 30 | elseif hd ∈ (:if, :elseif) 31 | return nothing 32 | else 33 | return cond 34 | end 35 | end 36 | end 37 | throw(ArgumentError("invalid @static macro")) 38 | end 39 | -------------------------------------------------------------------------------- /deps/patches/llvm-rL293230-icc17-cmake.patch: -------------------------------------------------------------------------------- 1 | From eca8aa608d962e09ea9710670f1c412f608a6f12 Mon Sep 17 00:00:00 2001 2 | From: Yichao Yu 3 | Date: Thu, 26 Jan 2017 23:50:18 +0000 4 | Subject: [PATCH] CMake is funky on detecting Intel 17 as GCC compatible. 5 | 6 | Summary: This adds a fallback in case that the Intel compiler is failed to be detected correctly. 7 | 8 | Reviewers: chapuni 9 | 10 | Reviewed By: chapuni 11 | 12 | Subscribers: llvm-commits, mgorny 13 | 14 | Differential Revision: https://reviews.llvm.org/D27610 15 | 16 | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293230 91177308-0d34-0410-b5e6-96231b3b80d8 17 | --- 18 | cmake/modules/DetermineGCCCompatible.cmake | 2 ++ 19 | 1 file changed, 2 insertions(+) 20 | 21 | diff --git a/cmake/modules/DetermineGCCCompatible.cmake b/cmake/modules/DetermineGCCCompatible.cmake 22 | index 1bf15fcba72..1369ebe9d0e 100644 23 | --- a/cmake/modules/DetermineGCCCompatible.cmake 24 | +++ b/cmake/modules/DetermineGCCCompatible.cmake 25 | @@ -7,5 +7,7 @@ if(NOT DEFINED LLVM_COMPILER_IS_GCC_COMPATIBLE) 26 | set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF) 27 | elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) 28 | set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) 29 | + elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" ) 30 | + set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) 31 | endif() 32 | endif() 33 | -- 34 | 2.11.0 35 | 36 | -------------------------------------------------------------------------------- /deps/libwhich.mk: -------------------------------------------------------------------------------- 1 | ## LIBWHICH ## 2 | LIBWHICH_GIT_URL := git://github.com/vtjnash/libwhich.git 3 | LIBWHICH_TAR_URL = https://api.github.com/repos/vtjnash/libwhich/tarball/$1 4 | $(eval $(call git-external,libwhich,LIBWHICH,,,$(BUILDDIR))) 5 | 6 | LIBWHICH_OBJ_LIB := $(build_depsbindir)/libwhich 7 | LIBWHICH_MFLAGS := CC="$(CC)" 8 | 9 | $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/source-extracted 10 | $(MAKE) -C $(dir $<) $(LIBWHICH_MFLAGS) libwhich 11 | echo 1 > $@ 12 | 13 | $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-checked: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled 14 | ifeq ($(OS),$(BUILD_OS)) 15 | $(MAKE) -C $(dir $@) $(LIBWHICH_MFLAGS) check 16 | endif 17 | echo 1 > $@ 18 | 19 | define LIBWHICH_INSTALL 20 | mkdir -p $2/$$(build_depsbindir) 21 | cp $1/libwhich $2/$$(build_depsbindir) 22 | endef 23 | $(eval $(call staged-install, \ 24 | libwhich,$(LIBWHICH_SRC_DIR), \ 25 | LIBWHICH_INSTALL,,,)) 26 | 27 | clean-libwhich: 28 | -rm $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled 29 | -$(MAKE) -C $(BUILDDIR)/$(LIBWHICH_SRC_DIR) clean 30 | 31 | get-libwhich: $(LIBWHICH_SRC_FILE) 32 | extract-libwhich: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/source-extracted 33 | configure-libwhich: extract-libwhich 34 | compile-libwhich: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-compiled 35 | fastcheck-libwhich: check-libwhich 36 | check-libwhich: $(BUILDDIR)/$(LIBWHICH_SRC_DIR)/build-checked 37 | -------------------------------------------------------------------------------- /deps/patches/llvm-3.9-osx-10.12.patch: -------------------------------------------------------------------------------- 1 | --- a/projects/compiler-rt/cmake/builtin-config-ix.cmake 2 | +++ b/projects/compiler-rt/cmake/builtin-config-ix.cmake 3 | @@ -57,9 +57,6 @@ 4 | find_darwin_sdk_dir(DARWIN_tvos_SYSROOT appletvos) 5 | 6 | set(DARWIN_EMBEDDED_PLATFORMS) 7 | - set(DARWIN_osx_BUILTIN_MIN_VER 10.5) 8 | - set(DARWIN_osx_BUILTIN_MIN_VER_FLAG 9 | - -mmacosx-version-min=${DARWIN_osx_BUILTIN_MIN_VER}) 10 | 11 | if(COMPILER_RT_ENABLE_IOS) 12 | list(APPEND DARWIN_EMBEDDED_PLATFORMS ios) 13 | @@ -101,20 +98,6 @@ 14 | set(CAN_TARGET_${arch} 1) 15 | endforeach() 16 | 17 | - # Need to build a 10.4 compatible libclang_rt 18 | - set(DARWIN_10.4_SYSROOT ${DARWIN_osx_SYSROOT}) 19 | - set(DARWIN_10.4_BUILTIN_MIN_VER 10.4) 20 | - set(DARWIN_10.4_BUILTIN_MIN_VER_FLAG 21 | - -mmacosx-version-min=${DARWIN_10.4_BUILTIN_MIN_VER}) 22 | - set(DARWIN_10.4_SKIP_CC_KEXT On) 23 | - darwin_test_archs(10.4 DARWIN_10.4_ARCHS i386 x86_64) 24 | - message(STATUS "OSX 10.4 supported builtin arches: ${DARWIN_10.4_ARCHS}") 25 | - if(DARWIN_10.4_ARCHS) 26 | - # don't include the Haswell slice in the 10.4 compatibility library 27 | - list(REMOVE_ITEM DARWIN_10.4_ARCHS x86_64h) 28 | - list(APPEND BUILTIN_SUPPORTED_OS 10.4) 29 | - endif() 30 | - 31 | foreach(platform ${DARWIN_EMBEDDED_PLATFORMS}) 32 | if(DARWIN_${platform}sim_SYSROOT) 33 | set(DARWIN_${platform}sim_BUILTIN_MIN_VER 34 | -------------------------------------------------------------------------------- /src/builtin_proto.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef JL_BUILTIN_PROTO_H 4 | #define JL_BUILTIN_PROTO_H 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | // declarations for julia-callable builtin functions 11 | 12 | #ifdef DEFINE_BUILTIN_GLOBALS 13 | #define DECLARE_BUILTIN(name) \ 14 | JL_CALLABLE(jl_f_##name); \ 15 | jl_value_t *jl_builtin_##name 16 | #else 17 | #define DECLARE_BUILTIN(name) \ 18 | JL_CALLABLE(jl_f_##name); \ 19 | extern jl_value_t *jl_builtin_##name 20 | #endif 21 | 22 | DECLARE_BUILTIN(throw); DECLARE_BUILTIN(is); 23 | DECLARE_BUILTIN(typeof); DECLARE_BUILTIN(sizeof); 24 | DECLARE_BUILTIN(issubtype); DECLARE_BUILTIN(isa); 25 | DECLARE_BUILTIN(_apply); DECLARE_BUILTIN(_apply_pure); 26 | DECLARE_BUILTIN(_apply_latest); 27 | DECLARE_BUILTIN(isdefined); DECLARE_BUILTIN(nfields); 28 | DECLARE_BUILTIN(tuple); DECLARE_BUILTIN(svec); 29 | DECLARE_BUILTIN(getfield); DECLARE_BUILTIN(setfield); 30 | DECLARE_BUILTIN(fieldtype); DECLARE_BUILTIN(arrayref); 31 | DECLARE_BUILTIN(arrayset); DECLARE_BUILTIN(arraysize); 32 | DECLARE_BUILTIN(apply_type); DECLARE_BUILTIN(applicable); 33 | DECLARE_BUILTIN(invoke); DECLARE_BUILTIN(_expr); 34 | DECLARE_BUILTIN(typeassert); DECLARE_BUILTIN(ifelse); 35 | 36 | JL_CALLABLE(jl_f_invoke_kwsorter); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /base/compiler/bootstrap.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # make sure that typeinf is executed before turning on typeinf_ext 4 | # this ensures that typeinf_ext doesn't recurse before it can add the item to the workq 5 | # especially try to make sure any recursive and leaf functions have concrete signatures, 6 | # since we won't be able to specialize & infer them at runtime 7 | 8 | let fs = Any[typeinf_ext, typeinf, typeinf_edge, pure_eval_call, optimize, run_passes], 9 | world = ccall(:jl_get_world_counter, UInt, ()) 10 | for x in T_FFUNC_VAL 11 | push!(fs, x[3]) 12 | end 13 | for i = 1:length(T_IFUNC) 14 | if isassigned(T_IFUNC, i) 15 | x = T_IFUNC[i] 16 | push!(fs, x[3]) 17 | else 18 | println(stderr, "WARNING: tfunc missing for ", reinterpret(IntrinsicFunction, Int32(i))) 19 | end 20 | end 21 | for f in fs 22 | for m in _methods_by_ftype(Tuple{typeof(f), Vararg{Any}}, 10, typemax(UInt)) 23 | # remove any TypeVars from the intersection 24 | typ = Any[m[1].parameters...] 25 | for i = 1:length(typ) 26 | if isa(typ[i], TypeVar) 27 | typ[i] = typ[i].ub 28 | end 29 | end 30 | typeinf_type(m[3], Tuple{typ...}, m[2], true, Params(world)) 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /stdlib/Base64/src/buffer.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # Data buffer for pipes. 4 | mutable struct Buffer 5 | data::Vector{UInt8} 6 | ptr::Ptr{UInt8} 7 | size::Int 8 | 9 | function Buffer(bufsize) 10 | data = Vector{UInt8}(undef, bufsize) 11 | return new(data, pointer(data), 0) 12 | end 13 | end 14 | 15 | Base.empty!(buffer::Buffer) = buffer.size = 0 16 | Base.getindex(buffer::Buffer, i::Integer) = unsafe_load(buffer.ptr, i) 17 | Base.setindex!(buffer::Buffer, v::UInt8, i::Integer) = unsafe_store!(buffer.ptr, v, i) 18 | Base.firstindex(buffer::Buffer) = 1 19 | Base.lastindex(buffer::Buffer) = buffer.size 20 | Base.pointer(buffer::Buffer) = buffer.ptr 21 | capacity(buffer::Buffer) = Int(pointer(buffer.data, lastindex(buffer.data) + 1) - buffer.ptr) 22 | 23 | function consumed!(buffer::Buffer, n::Integer) 24 | @assert n ≤ buffer.size 25 | buffer.ptr += n 26 | buffer.size -= n 27 | end 28 | 29 | function read_to_buffer(io::IO, buffer::Buffer) 30 | offset = buffer.ptr - pointer(buffer.data) 31 | copyto!(buffer.data, 1, buffer.data, offset, buffer.size) 32 | buffer.ptr = pointer(buffer.data) + buffer.size 33 | if !eof(io) 34 | n = min(bytesavailable(io), capacity(buffer) - buffer.size) 35 | unsafe_read(io, buffer.ptr + buffer.size, n) 36 | buffer.size += n 37 | end 38 | return 39 | end 40 | -------------------------------------------------------------------------------- /test/llvmcall2.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | using InteractiveUtils: code_llvm 4 | 5 | function declared_floor(x::Float64) 6 | return ccall("llvm.floor.f64", llvmcall, Float64, (Float64,), x) 7 | end 8 | @test declared_floor(4.2) == 4.0 9 | ir = sprint(code_llvm, declared_floor, Tuple{Float64}) 10 | @test occursin("call double @llvm.floor.f64", ir) # should be inlined 11 | 12 | function doubly_declared_floor(x::Float64) 13 | a = ccall("llvm.floor.f64", llvmcall, Float64, (Float64,), x) 14 | b = ccall("llvm.floor.f64", llvmcall, Float64, (Float64,), x + 1) - 1 15 | return a + b 16 | end 17 | @test doubly_declared_floor(4.2) == 8.0 18 | 19 | function doubly_declared2_trunc(x::Float64) 20 | a = ccall("llvm.trunc.f64", llvmcall, Float64, (Float64,), x) 21 | b = ccall("llvm.trunc.f64", llvmcall, Float64, (Float64,), x + 1) - 1 22 | return a + b 23 | end 24 | @test doubly_declared2_trunc(4.2) == 8.0 25 | 26 | # Test for single line 27 | function declared_ceil(x::Float64) 28 | return ccall("llvm.ceil.f64", llvmcall, Float64, (Float64,), x) 29 | end 30 | @test declared_ceil(4.2) == 5.0 31 | 32 | # Test for multiple lines 33 | function ceilfloor(x::Float64) 34 | a = ccall("llvm.ceil.f64", llvmcall, Float64, (Float64,), x) 35 | b = ccall("llvm.floor.f64", llvmcall, Float64, (Float64,), a) 36 | return b 37 | end 38 | @test ceilfloor(7.4) == 8.0 39 | -------------------------------------------------------------------------------- /test/llvmpasses/simdloop.ll: -------------------------------------------------------------------------------- 1 | ; RUN: opt -load libjulia%shlibext -LowerSIMDLoop -S %s | FileCheck %s 2 | 3 | declare void @julia.simdloop_marker() 4 | 5 | define void @simd_test(double *%a, double *%b) { 6 | top: 7 | br label %loop 8 | loop: 9 | %i = phi i64 [0, %top], [%nexti, %loop] 10 | %aptr = getelementptr double, double *%a, i64 %i 11 | %bptr = getelementptr double, double *%b, i64 %i 12 | ; CHECK: llvm.mem.parallel_loop_access 13 | %aval = load double, double *%aptr 14 | %bval = load double, double *%aptr 15 | %cval = fadd double %aval, %bval 16 | store double %cval, double *%bptr 17 | %nexti = add i64 %i, 1 18 | call void @julia.simdloop_marker() 19 | %done = icmp sgt i64 %nexti, 500 20 | br i1 %done, label %loopdone, label %loop 21 | loopdone: 22 | ret void 23 | } 24 | 25 | define double @simd_test_sub(double *%a) { 26 | top: 27 | br label %loop 28 | loop: 29 | %i = phi i64 [0, %top], [%nexti, %loop] 30 | %v = phi double [0.000000e+00, %top], [%nextv, %loop] 31 | %aptr = getelementptr double, double *%a, i64 %i 32 | ; CHECK: llvm.mem.parallel_loop_access 33 | %aval = load double, double *%aptr 34 | %nextv = fsub double %v, %aval 35 | ; CHECK: fsub fast double %v, %aval 36 | %nexti = add i64 %i, 1 37 | call void @julia.simdloop_marker() 38 | %done = icmp sgt i64 %nexti, 500 39 | br i1 %done, label %loopdone, label %loop 40 | loopdone: 41 | ret double %nextv 42 | } 43 | 44 | !1 = !{} 45 | -------------------------------------------------------------------------------- /src/threading.h: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | #ifndef THREADING_H 4 | #define THREADING_H 5 | 6 | #include 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include "threadgroup.h" 12 | #include "julia.h" 13 | 14 | #define PROFILE_JL_THREADING 0 15 | 16 | // thread ID 17 | extern jl_ptls_t *jl_all_tls_states; 18 | extern JL_DLLEXPORT int jl_n_threads; // # threads we're actually using 19 | 20 | // thread state 21 | enum { 22 | TI_THREAD_INIT, 23 | TI_THREAD_WORK 24 | }; 25 | 26 | // passed to thread function 27 | typedef struct { 28 | int16_t volatile state; 29 | int16_t tid; 30 | ti_threadgroup_t *tg; 31 | } ti_threadarg_t; 32 | 33 | // commands to thread function 34 | enum { 35 | TI_THREADWORK_DONE, 36 | TI_THREADWORK_RUN 37 | }; 38 | 39 | // work command to thread function 40 | typedef struct { 41 | uint8_t command; 42 | jl_method_instance_t *mfunc; 43 | jl_callptr_t fptr; 44 | jl_value_t **args; 45 | uint32_t nargs; 46 | jl_value_t *ret; 47 | jl_module_t *current_module; 48 | size_t world_age; 49 | } ti_threadwork_t; 50 | 51 | // thread function 52 | void ti_threadfun(void *arg); 53 | 54 | // helpers for thread function 55 | jl_value_t *ti_runthread(jl_function_t *f, jl_svec_t *args, size_t nargs); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif /* THREADING_H */ 62 | -------------------------------------------------------------------------------- /src/support/bitvector.c: -------------------------------------------------------------------------------- 1 | // This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | /* 4 | bit vector primitives 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "dtypes.h" 12 | #include "bitvector.h" 13 | 14 | #ifdef _OS_WINDOWS_ 15 | #include 16 | #endif 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | uint32_t *bitvector_resize(uint32_t *b, uint64_t oldsz, uint64_t newsz, 23 | int initzero) 24 | { 25 | uint32_t *p; 26 | size_t sz = ((newsz+31)>>5) * sizeof(uint32_t); 27 | p = (uint32_t*)LLT_REALLOC(b, sz); 28 | if (p == NULL) return NULL; 29 | if (initzero && newsz>oldsz) { 30 | size_t osz = ((oldsz+31)>>5) * sizeof(uint32_t); 31 | memset(&p[osz/sizeof(uint32_t)], 0, sz-osz); 32 | } 33 | return p; 34 | } 35 | 36 | uint32_t *bitvector_new(uint64_t n, int initzero) 37 | { 38 | return bitvector_resize(NULL, 0, n, initzero); 39 | } 40 | 41 | size_t bitvector_nwords(uint64_t nbits) 42 | { 43 | return ((nbits+31)>>5); 44 | } 45 | 46 | void bitvector_set(uint32_t *b, uint64_t n, uint32_t c) 47 | { 48 | if (c) 49 | b[n>>5] |= (1<<(n&31)); 50 | else 51 | b[n>>5] &= ~(1<<(n&31)); 52 | } 53 | 54 | uint32_t bitvector_get(uint32_t *b, uint64_t n) 55 | { 56 | return b[n>>5] & (1<<(n&31)); 57 | } 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /contrib/commit-name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is a part of Julia. License is MIT: https://julialang.org/license 3 | 4 | # Needs to be run from a julia repo clone 5 | # First argument (optional) is a ref to the commit 6 | 7 | gitref=${1:-HEAD} 8 | 9 | ver=$(git show "$gitref:VERSION") 10 | major=$(echo $ver | cut -f 1 -d .) 11 | minor=$(echo $ver | cut -f 2 -d .) 12 | 13 | if [ $major = 0 -a $minor -lt 5 ]; then 14 | # use tag based build number prior to 0.5.0- 15 | last_tag=$(git describe --tags --abbrev=0 "$gitref") 16 | nb=$(git rev-list --count "$gitref" "^$last_tag") 17 | if [ $nb = 0 ]; then 18 | echo $ver 19 | else 20 | echo "$ver+$nb" 21 | fi 22 | else 23 | topdir=$(git rev-parse --show-toplevel) 24 | verchanged=$(git blame -L ,1 -sl $gitref -- "$topdir/VERSION" | cut -f 1 -d " ") 25 | nb=$(git rev-list --count "$gitref" "^$verchanged") 26 | pre=$(echo $ver | cut -s -f 2 -d "-") 27 | if [ $ver = "0.5.0-dev" ]; then 28 | # bump to 0.5.0-dev was one commit after tag during 0.5.0-dev 29 | nb=$(expr $nb + 1) 30 | elif [ $ver = "0.5.0-pre" ]; then 31 | # bump to 0.5.0-pre was 5578 commits after tag 32 | nb=$(expr $nb + 5578) 33 | fi 34 | if [ -n "$pre" ]; then 35 | if [ $major = 0 -a $minor -le 5 ]; then 36 | echo "$ver+$nb" 37 | else 38 | echo "$ver.$nb" 39 | fi 40 | else 41 | echo $ver 42 | fi 43 | fi 44 | -------------------------------------------------------------------------------- /stdlib/Pkg/ext/TOML/src/TOML.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | module TOML 4 | using Dates 5 | 6 | include("parser.jl") 7 | include("print.jl") 8 | 9 | "Convert `TOML.Table` to `Dict{String,Any}`" 10 | function table2dict(tbl::Union{Nothing,Table}) 11 | tbl == nothing && return Dict{String,Any}() 12 | return table2dict(get(tbl)) 13 | end 14 | 15 | function table2dict(tbl::Table) 16 | ret = Dict{String,Any}() 17 | for (k,v) in tbl.values 18 | if isa(v, Table) 19 | ret[k] = table2dict(v) 20 | elseif isa(v, Array) && length(v)>0 && isa(v[1], Table) 21 | ret[k] = [table2dict(e) for e in v] 22 | else 23 | ret[k] = v 24 | end 25 | end 26 | return ret 27 | end 28 | 29 | "Parse IO input and return result as dictionary." 30 | function parse(io::IO) 31 | parser = Parser(io) 32 | res = parse(parser) 33 | length(parser.errors)>0 && throw(CompositeException(parser.errors)) 34 | return table2dict(res) 35 | end 36 | 37 | "Parse string" 38 | function parse(str::AbstractString) 39 | io = IOBuffer(str) 40 | res = parse(io) 41 | close(io) 42 | return res 43 | end 44 | 45 | "Parse file" 46 | parsefile(filename::AbstractString) = open(parse, filename, "r") 47 | 48 | end 49 | -------------------------------------------------------------------------------- /base/refvalue.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | ### Methods for a Ref object that can store a single value of any type 4 | 5 | mutable struct RefValue{T} <: Ref{T} 6 | x::T 7 | RefValue{T}() where {T} = new() 8 | RefValue{T}(x) where {T} = new(x) 9 | end 10 | RefValue(x::T) where {T} = RefValue{T}(x) 11 | isassigned(x::RefValue) = isdefined(x, :x) 12 | 13 | function unsafe_convert(P::Type{Ptr{T}}, b::RefValue{T}) where T 14 | if datatype_pointerfree(RefValue{T}) 15 | p = pointer_from_objref(b) 16 | elseif isconcretetype(T) && T.mutable 17 | p = pointer_from_objref(b.x) 18 | else 19 | # If the slot is not leaf type, it could be either immutable or not. 20 | # If it is actually an immutable, then we can't take it's pointer directly 21 | # Instead, explicitly load the pointer from the `RefValue`, 22 | # which also ensures this returns same pointer as the one rooted in the `RefValue` object. 23 | p = pointerref(Ptr{Ptr{Cvoid}}(pointer_from_objref(b)), 1, Core.sizeof(Ptr{Cvoid})) 24 | end 25 | return convert(P, p) 26 | end 27 | function unsafe_convert(P::Type{Ptr{Any}}, b::RefValue{Any}) 28 | return convert(P, pointer_from_objref(b)) 29 | end 30 | unsafe_convert(::Type{Ptr{Cvoid}}, b::RefValue{T}) where {T} = convert(Ptr{Cvoid}, unsafe_convert(Ptr{T}, b)) 31 | 32 | getindex(b::RefValue) = b.x 33 | setindex!(b::RefValue, x) = (b.x = x; b) 34 | -------------------------------------------------------------------------------- /stdlib/LinearAlgebra/test/testutils.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | # Test approximate equality of vectors or columns of matrices modulo floating 4 | # point roundoff and phase (sign) differences. 5 | # 6 | # This function is designed to test for equality between vectors of floating point 7 | # numbers when the vectors are defined only up to a global phase or sign, such as 8 | # normalized eigenvectors or singular vectors. The global phase is usually 9 | # defined consistently, but may occasionally change due to small differences in 10 | # floating point rounding noise or rounding modes, or through the use of 11 | # different conventions in different algorithms. As a result, most tests checking 12 | # such vectors have to detect and discard such overall phase differences. 13 | # 14 | # Inputs: 15 | # a, b:: StridedVecOrMat to be compared 16 | # err :: Default: m^3*(eps(S)+eps(T)), where m is the number of rows 17 | # 18 | # Raises an error if any columnwise vector norm exceeds err. Otherwise, returns 19 | # nothing. 20 | function test_approx_eq_modphase(a::StridedVecOrMat{S}, b::StridedVecOrMat{T}, 21 | err = length(axes(a,1))^3*(eps(S)+eps(T))) where {S<:Real,T<:Real} 22 | @test axes(a,1) == axes(b,1) && axes(a,2) == axes(b,2) 23 | for i in axes(a,2) 24 | v1, v2 = a[:, i], b[:, i] 25 | @test min(abs(norm(v1-v2)),abs(norm(v1+v2))) ≈ 0.0 atol=err 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /stdlib/Markdown/src/Julia/interp.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | function _parse(stream::IO; greedy::Bool = true, raise::Bool = true) 4 | pos = position(stream) 5 | ex, Δ = Meta.parse(read(stream, String), 1, greedy = greedy, raise = raise) 6 | seek(stream, pos + Δ - 1) 7 | return ex 8 | end 9 | 10 | function interpinner(stream::IO, greedy = false) 11 | startswith(stream, '$') || return 12 | (eof(stream) || Char(peek(stream)) in whitespace) && return 13 | try 14 | return _parse(stream::IOBuffer, greedy = greedy) 15 | catch e 16 | return 17 | end 18 | end 19 | 20 | @trigger '$' -> 21 | function interp(stream::IO, md::MD) 22 | withstream(stream) do 23 | ex = interpinner(stream) 24 | return ex 25 | end 26 | end 27 | 28 | function blockinterp(stream::IO, md::MD) 29 | withstream(stream) do 30 | ex = interpinner(stream) 31 | if ex ≡ nothing 32 | return false 33 | else 34 | push!(md, ex) 35 | return true 36 | end 37 | end 38 | end 39 | 40 | toexpr(x) = x 41 | 42 | toexpr(xs::Vector{Any}) = Expr(:call, GlobalRef(Base,:getindex), Any, map(toexpr, xs)...) 43 | 44 | for T in Any[MD, Paragraph, Header, Link, Bold, Italic] 45 | @eval function toexpr(md::$T) 46 | Expr(:call, typeof(md), $(map(x->:(toexpr(md.$x)), fieldnames(Base.unwrap_unionall(T)))...)) 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /stdlib/REPL/test/TerminalMenus/runtests.jl: -------------------------------------------------------------------------------- 1 | # This file is a part of Julia. License is MIT: https://julialang.org/license 2 | 3 | import REPL 4 | using REPL.TerminalMenus 5 | using Test 6 | 7 | TerminalMenus.config(supress_output=true) 8 | 9 | function simulateInput(expectedResult, menu::TerminalMenus.AbstractMenu, keys...) 10 | # If we cannot write to the buffer, skip the test 11 | !(:buffer in fieldnames(typeof(stdin))) && return true 12 | 13 | keydict = Dict(:up => "\e[A", 14 | :down => "\e[B", 15 | :enter => "\r") 16 | 17 | for key in keys 18 | if isa(key, Symbol) 19 | write(stdin.buffer, keydict[key]) 20 | else 21 | write(stdin.buffer, "$key") 22 | end 23 | end 24 | 25 | request(menu) == expectedResult 26 | end 27 | 28 | include("radio_menu.jl") 29 | include("multiselect_menu.jl") 30 | 31 | # Other test 32 | 33 | # scroll must only accept symbols 34 | @test_throws TypeError TerminalMenus.config(scroll=true) 35 | # :foo is not a valid scroll option 36 | @test_throws ArgumentError TerminalMenus.config(scroll=:foo) 37 | # Test scroll wrap 38 | TerminalMenus.config(scroll=:wrap) 39 | @test TerminalMenus.CONFIG[:scroll_wrap] == true 40 | # Updating some params shouldn't change other ones 41 | TerminalMenus.config(charset=:ascii) 42 | @test TerminalMenus.CONFIG[:scroll_wrap] == true 43 | TerminalMenus.config(scroll=:nowrap) 44 | @test TerminalMenus.CONFIG[:scroll_wrap] == false 45 | -------------------------------------------------------------------------------- /deps/tools/jldownload: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # usage: jldownload [] 4 | # 5 | 6 | CACHE_HOST=https://cache.julialang.org 7 | 8 | WGET=$(which wget 2>/dev/null) 9 | CURL=$(which curl 2>/dev/null) 10 | FETCH=$(which fetch 2>/dev/null) 11 | 12 | TIMEOUT=15 # seconds 13 | WGET_OPTS="--no-check-certificate --tries=1 --timeout=$TIMEOUT" 14 | CURL_OPTS="-fkL --connect-timeout $TIMEOUT -y $TIMEOUT" 15 | FETCH_OPTS="-T $TIMEOUT" 16 | 17 | if [ $# -eq 1 ]; then 18 | CURL_OPTS="$CURL_OPTS -O" 19 | URL=$1 20 | elif [ $# -eq 2 ]; then 21 | WGET_OPTS="$WGET_OPTS -O $1" 22 | CURL_OPTS="$CURL_OPTS -o $1" 23 | FETCH_OPTS="$FETCH_OPTS -o $1" 24 | URL=$2 25 | else 26 | exit 1 27 | fi 28 | 29 | CACHE_URL="$CACHE_HOST/$URL" 30 | 31 | if [ -x "$CURL" ] && $CURL -V >/dev/null; then 32 | GETURL="$CURL $CURL_OPTS" 33 | elif [ -x "$WGET" ] && $WGET --help >/dev/null 2>&1; then 34 | GETURL="$WGET $WGET_OPTS" 35 | elif [ -x "$FETCH" ]; then 36 | GETURL="$FETCH $FETCH_OPTS" 37 | else 38 | echo "Could not find working curl, wget, or fetch." 39 | echo "You need to install one of these to download dependencies." 40 | exit 1 41 | fi 42 | 43 | # Try to get from the cache if it is possible. Note that the cache will 44 | # forward to the original URL if it has not cached this download yet, or 45 | # if the URL is not cacheable. We fallback to directly querying the 46 | # uncached URL to protect against cache service downtime 47 | $GETURL $CACHE_URL || $GETURL $URL 48 | -------------------------------------------------------------------------------- /.freebsdci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # FreeBSD CI Build Scripts 3 | # The flow of a FreeBSD CI (https://freebsdci.julialang.org) build: 4 | # 5 | # 1. `cleanup` 6 | # 2. `compile` 7 | # 3. `build-state` 8 | # 4. `runtests` 9 | # 5. `test-embedding` 10 | # 11 | # Detail of flow is controlled by the variable `factory` 12 | # here. 13 | # https://github.com/iblis17/julia-fbsd-buildbot/blob/master/master/master.cfg 14 | # 15 | # Usage: .freebsdci.sh 16 | 17 | set -xe 18 | 19 | build-state(){ 20 | gmake build-stats 21 | } 22 | 23 | cleanup(){ 24 | git clean -fdx 25 | } 26 | 27 | compile(){ 28 | export MALLOC_CONF='junk:false' 29 | export VERBOSE=1 30 | export FORCE_ASSERTIONS=1 31 | export LLVM_ASSERTIONS=1 32 | export USECCACHE=1 33 | 34 | gmake check-whitespace 35 | gmake all -j $MAKE_JOBS_NUMBER 36 | } 37 | 38 | runtests(){ 39 | export MALLOC_CONF='junk:false' 40 | export VERBOSE=1 41 | export FORCE_ASSERTIONS=1 42 | export LLVM_ASSERTIONS=1 43 | export JULIA_TEST_MAXRSS_MB=600 44 | export JULIA_CPU_CORES=$MAKE_JOBS_NUMBER 45 | 46 | ./usr/bin/julia --check-bounds=yes test/runtests.jl all 47 | ./usr/bin/julia --check-bounds=yes test/runtests.jl \ 48 | LibGit2/online OldPkg/pkg Pkg/pkg download 49 | } 50 | 51 | test-embedding(){ 52 | export JULIA='../../julia' 53 | export BIN='../../tmp' 54 | 55 | mkdir -vp tmp 56 | gmake -C test embedding 57 | } 58 | 59 | 60 | if [ -z $1 ] 61 | then 62 | exit 1 63 | fi 64 | 65 | $1 66 | -------------------------------------------------------------------------------- /doc/src/manual/index.md: -------------------------------------------------------------------------------- 1 | # The Julia Manual 2 | 3 | * [Introduction](@ref man-introduction) 4 | * [Getting Started](@ref man-getting-started) 5 | * [Variables](@ref) 6 | * [Integers and Floating-Point Numbers](@ref) 7 | * [Mathematical Operations and Elementary Functions](@ref) 8 | * [Complex and Rational Numbers](@ref) 9 | * [Strings](@ref) 10 | * [Functions](@ref) 11 | * [Control Flow](@ref) 12 | * [Scope of Variables](@ref scope-of-variables) 13 | * [Types](@ref man-types) 14 | * [Methods](@ref) 15 | * [Constructors](@ref man-constructors) 16 | * [Conversion and Promotion](@ref conversion-and-promotion) 17 | * [Interfaces](@ref) 18 | * [Modules](@ref) 19 | * [Documentation](@ref) 20 | * [Metaprogramming](@ref) 21 | * [Multi-dimensional Arrays](@ref man-multi-dim-arrays) 22 | * [Missing Values](@ref missing) 23 | * [Networking and Streams](@ref) 24 | * [Parallel Computing](@ref) 25 | * [Dates](@ref) 26 | * [Running External Programs](@ref) 27 | * [Calling C and Fortran Code](@ref) 28 | * [Handling Operating System Variation](@ref) 29 | * [Environment Variables](@ref) 30 | * [Embedding Julia](@ref) 31 | * [Profiling](@ref) 32 | * [Memory allocation analysis](@ref) 33 | * [Stack Traces](@ref) 34 | * [Performance Tips](@ref man-performance-tips) 35 | * [Workflow Tips](@ref man-workflow-tips) 36 | * [Style Guide](@ref) 37 | * [Frequently Asked Questions](@ref) 38 | * [Noteworthy Differences from other Languages](@ref) 39 | * [Unicode Input](@ref) 40 | -------------------------------------------------------------------------------- /stdlib/Pkg/Compat.toml: -------------------------------------------------------------------------------- 1 | [123] # this name doesn't matter, just needs to be unique 2 | url = "http://github.com/PkgA/issues/123" 3 | desc = "PkgA accidentally changed its `foo` API and broke PkgB" 4 | 5 | # The name/uuid mapping of a package is recorded when a compatibility entry 6 | # is created. This is only used to decode the package names below and does 7 | # not need to match the name used in Config.toml or Manifest.toml, nor do 8 | # they need to be updated later if those change for any reason. They may be 9 | # updated, however, for clarity. 10 | 11 | [123.uuids] 12 | PkgA = "uuid#1" 13 | PkgB = "uuid#2" 14 | 15 | # A key-value pair in a broken/fixed stanza is satisfied if the named package 16 | # on the LHS is checked out at a commit that is a descendant of the commit on 17 | # the RHS. A broken/fixed stanza is satisfied if all of its key-value pairs 18 | # are satisfied. If the value of "broken" or "fixed" is a single stanza (i.e. 19 | # a dict) then it is satisfied if that stanza is. If a "broken" or "fixed" 20 | # entry is an array, then it is satisfied if any of its stanzas are satisfied. 21 | # A set of package versions is considered "broken" if the "broken" entry is 22 | # satisfied but the "fixed" entry is not satisfied. 23 | 24 | [123.broken] 25 | PkgA = "commit#1" 26 | PkgB = "commit#2" 27 | 28 | [[123.fixed]] 29 | PkgA = "commit#5" 30 | PkgB = "commit#6" 31 | 32 | [[123.fixed]] 33 | PkgA = "commit#3" 34 | 35 | [[123.fixed]] 36 | PkgB = "commit#4" 37 | -------------------------------------------------------------------------------- /stdlib/SHA/docs/src/index.md: -------------------------------------------------------------------------------- 1 | # SHA 2 | 3 | 4 | Usage is very straightforward: 5 | ```julia 6 | julia> using SHA 7 | 8 | julia> bytes2hex(sha256("test")) 9 | "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" 10 | ``` 11 | 12 | Each exported function (at the time of this writing, SHA-1, SHA-2 224, 256, 384 and 512, and SHA-3 224, 256, 384 and 512 functions are implemented) takes in either an `Array{UInt8}`, a `ByteString` or an `IO` object. This makes it trivial to checksum a file: 13 | 14 | ```julia 15 | shell> cat /tmp/test.txt 16 | test 17 | julia> using SHA 18 | 19 | julia> open("/tmp/test.txt") do f 20 | sha2_256(f) 21 | end 22 | 32-element Array{UInt8,1}: 23 | 0x9f 24 | 0x86 25 | 0xd0 26 | 0x81 27 | 0x88 28 | 0x4c 29 | 0x7d 30 | 0x65 31 | ⋮ 32 | 0x5d 33 | 0x6c 34 | 0x15 35 | 0xb0 36 | 0xf0 37 | 0x0a 38 | 0x08 39 | ``` 40 | 41 | Note the lack of a newline at the end of `/tmp/text.txt`. Julia automatically inserts a newline before the `julia>` prompt. 42 | 43 | Due to the colloquial usage of `sha256` to refer to `sha2_256`, convenience functions are provided, mapping `shaxxx()` function calls to `sha2_xxx()`. For SHA-3, no such colloquialisms exist and the user must use the full `sha3_xxx()` names. 44 | 45 | `shaxxx()` takes `AbstractString` and array-like objects (`NTuple` and `Array`) with elements of type `UInt8`. 46 | 47 | Note that, at the time of this writing, the SHA3 code is not optimized, and as such is roughly an order of magnitude slower than SHA2. 48 | --------------------------------------------------------------------------------