From ae223a340f47e66992375008ff550bd01d311bd3 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 4 Jul 2016 12:01:52 -0700 Subject: [PATCH 01/14] remove redundant !! --- src/dump.c | 6 +++--- src/toplevel.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dump.c b/src/dump.c index 4780a126f3b0a..94a1236612f3b 100644 --- a/src/dump.c +++ b/src/dump.c @@ -556,10 +556,10 @@ static void jl_serialize_datatype(ios_t *s, jl_datatype_t *dt) } write_int32(s, dt->size); - int has_instance = !!(dt->instance != NULL); - int has_layout = !!(dt->layout != NULL); + int has_instance = (dt->instance != NULL); + int has_layout = (dt->layout != NULL); write_uint8(s, dt->abstract | (dt->mutabl<<1) | (has_layout<<2) | (has_instance<<3) | - (dt->hastypevars<<4) | (dt->haswildcard<<5) | (dt->isleaftype<<6)); + (dt->hastypevars<<4) | (dt->haswildcard<<5) | (dt->isleaftype<<6)); write_int32(s, dt->depth); if (!dt->abstract) { write_uint16(s, dt->ninitialized); diff --git a/src/toplevel.c b/src/toplevel.c index 23db71a5e0fb6..5a0a7a682a333 100644 --- a/src/toplevel.c +++ b/src/toplevel.c @@ -103,7 +103,7 @@ static void jl_module_load_time_initialize(jl_module_t *m) jl_module_init_order = jl_alloc_vec_any(0); jl_array_ptr_1d_push(jl_module_init_order, (jl_value_t*)m); jl_function_t *f = jl_module_get_initializer(m); - if (f != NULL) { + if (f != NULL) { jl_value_t *tt = jl_is_type(f) ? (jl_value_t*)jl_wrap_Type(f) : jl_typeof(f); JL_GC_PUSH1(&tt); tt = (jl_value_t*)jl_apply_tuple_type_v(&tt, 1); From 555d7ee95d7275ef6f07e1e1973297fbe32323f7 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 4 Jul 2016 12:08:47 -0700 Subject: [PATCH 02/14] remove signature that docstring for `base` is attached to so repl help appears for more general inputs --- base/docs/helpdb/Base.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 2b23cd6f399df..696c3e69bd2d4 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -4083,7 +4083,7 @@ rand Convert an integer to a string in the given base, optionally specifying a number of digits to pad to. """ -base(base, n, pad) +base """ BoundsError([a],[i]) From d4d358321b2cbfc013eedcd1ad400250e66a4120 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 4 Jul 2016 20:32:07 -0700 Subject: [PATCH 03/14] Add a comma to the `require` docstring --- base/docs/helpdb/Base.jl | 6 +++--- doc/stdlib/base.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 696c3e69bd2d4..39ed4d59ea485 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -1455,9 +1455,9 @@ current `include` path but does not use it to search for files (see help for `in This function is typically used to load library code, and is implicitly called by `using` to load packages. -When searching for files, `require` first looks for package code under `Pkg.dir()`, then tries -paths in the global array `LOAD_PATH`. `require` is case-sensitive on all -platforms including those with case-insensitive filesystems like macOS and +When searching for files, `require` first looks for package code under `Pkg.dir()`, +then tries paths in the global array `LOAD_PATH`. `require` is case-sensitive on +all platforms, including those with case-insensitive filesystems like macOS and Windows. """ require diff --git a/doc/stdlib/base.rst b/doc/stdlib/base.rst index 320539cabed42..31d8e48433e1b 100644 --- a/doc/stdlib/base.rst +++ b/doc/stdlib/base.rst @@ -126,7 +126,7 @@ Getting Around Loads a source files, in the context of the ``Main`` module, on every active node, searching standard locations for files. ``require`` is considered a top-level operation, so it sets the current ``include`` path but does not use it to search for files (see help for ``include``\ ). This function is typically used to load library code, and is implicitly called by ``using`` to load packages. - When searching for files, ``require`` first looks for package code under ``Pkg.dir()``\ , then tries paths in the global array ``LOAD_PATH``\ . ``require`` is case-sensitive on all platforms including those with case-insensitive filesystems like macOS and Windows. + When searching for files, ``require`` first looks for package code under ``Pkg.dir()``\ , then tries paths in the global array ``LOAD_PATH``\ . ``require`` is case-sensitive on all platforms, including those with case-insensitive filesystems like macOS and Windows. .. function:: Base.compilecache(module::String) From b1662165a56f9c7cb9160acf50c48f55fb84f45f Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Thu, 7 Jul 2016 12:24:50 -0700 Subject: [PATCH 04/14] Remove noisy 'not-64-bit' warning from test/ccall.jl --- test/ccall.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ccall.jl b/test/ccall.jl index 8600a305ae177..7f0792a87fdd5 100644 --- a/test/ccall.jl +++ b/test/ccall.jl @@ -845,7 +845,7 @@ elseif Sys.ARCH === :powerpc64le || Sys.ARCH === :ppc64le (14, 13, 12, 11), (15, 14, 13, 12), (16, 15, 14, 13), (17, 16, 15, 14), (18, 17, 16, 15), (1024, 1023, 1022, 1021), (1025, 1024, 1023, 1022), (1026, 1025, 1024, 1023), (1027, 1026, 1025, 1024), (10028, 10027, 10026, 10025)) -else +elseif Sys.ARCH !== :i686 && Sys.ARCH !== :arm # TODO warn("ccall: no VecReg tests run for this platform") end From 625c4fa21337f02c441104353e7d551e2cdd0621 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Thu, 7 Jul 2016 14:32:22 -0700 Subject: [PATCH 05/14] Fix backslash in A_ldiv_B! docstring --- base/linalg/factorization.jl | 2 +- doc/stdlib/linalg.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/linalg/factorization.jl b/base/linalg/factorization.jl index 49254d2638dc1..2a2340e4c1f0c 100644 --- a/base/linalg/factorization.jl +++ b/base/linalg/factorization.jl @@ -51,7 +51,7 @@ end """ A_ldiv_B!([Y,] A, B) -> Y -Compute `A \ B` in-place and store the result in `Y`, returning the result. +Compute `A \\ B` in-place and store the result in `Y`, returning the result. If only two arguments are passed, then `A_ldiv_B!(A, B)` overwrites `B` with the result. diff --git a/doc/stdlib/linalg.rst b/doc/stdlib/linalg.rst index 0cdf61ae0e7a3..c671d355c2775 100644 --- a/doc/stdlib/linalg.rst +++ b/doc/stdlib/linalg.rst @@ -1473,7 +1473,7 @@ according to the usual Julia convention. .. Docstring generated from Julia source - Compute ``A B`` in-place and store the result in ``Y``\ , returning the result. If only two arguments are passed, then ``A_ldiv_B!(A, B)`` overwrites ``B`` with the result. + Compute ``A \ B`` in-place and store the result in ``Y``\ , returning the result. If only two arguments are passed, then ``A_ldiv_B!(A, B)`` overwrites ``B`` with the result. The argument ``A`` should *not* be a matrix. Rather, instead of matrices it should be a factorization object (e.g. produced by :func:`factorize` or :func:`cholfact`\ ). The reason for this is that factorization itself is both expensive and typically allocates memory (although it can also be done in-place via, e.g., :func:`lufact!`\ ), and performance-critical situations requiring ``A_ldiv_B!`` usually also require fine-grained control over the factorization of ``A``\ . From b68a7f43c4c3b022a0492b03e83a6c952b1fc909 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Thu, 7 Jul 2016 14:33:08 -0700 Subject: [PATCH 06/14] Remove "a" in "functions filter and a filter!" in noteworthy-differences --- base/range.jl | 4 ++-- doc/manual/noteworthy-differences.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/range.jl b/base/range.jl index 335f2d89cb7d1..2c819e05c5e40 100644 --- a/base/range.jl +++ b/base/range.jl @@ -661,7 +661,7 @@ end -(r::FloatRange) = FloatRange(-r.start, -r.step, r.len, r.divisor) -(r::LinSpace) = LinSpace(-r.start, -r.stop, r.len, r.divisor) -.+(x::Real, r::AbstractUnitRange) = range(x + first(r), length(r)) +.+(x::Real, r::AbstractUnitRange) = range(x + first(r), length(r)) .+(x::Real, r::Range) = (x+first(r)):step(r):(x+last(r)) #.+(x::Real, r::StepRange) = range(x + r.start, r.step, length(r)) .+(x::Real, r::FloatRange) = FloatRange(r.divisor*x + r.start, r.step, r.len, r.divisor) @@ -678,7 +678,7 @@ function .-(x::Real, r::LinSpace) x2 = x * r.divisor / (r.len - 1) LinSpace(x2 - r.start, x2 - r.stop, r.len, r.divisor) end -.-(r::AbstractUnitRange, x::Real) = range(first(r)-x, length(r)) +.-(r::AbstractUnitRange, x::Real) = range(first(r)-x, length(r)) .-(r::StepRange , x::Real) = range(r.start-x, r.step, length(r)) .-(r::FloatRange, x::Real) = FloatRange(r.start - r.divisor*x, r.step, r.len, r.divisor) function .-(r::LinSpace, x::Real) diff --git a/doc/manual/noteworthy-differences.rst b/doc/manual/noteworthy-differences.rst index f5c539393266d..27ac14abfe3de 100644 --- a/doc/manual/noteworthy-differences.rst +++ b/doc/manual/noteworthy-differences.rst @@ -103,7 +103,7 @@ some noteworthy differences that may trip up Julia users accustomed to MATLAB: - In MATLAB, an idiomatic way to remove unwanted values is to use logical indexing, like in the expression ``x(x>3)`` or in the statement ``x(x>3) = []`` to modify ``x`` in-place. In contrast, Julia provides the - higher order functions :func:`filter` and a :func:`filter!`, allowing users + higher order functions :func:`filter` and :func:`filter!`, allowing users to write ``filter(z->z>3, x)`` and ``filter!(z->z>3, x)`` as alternatives to the corresponding transliterations ``x[x.>3]`` and ``x = x[x.>3]``. Using :func:`filter!` reduces the use of temporary arrays. @@ -235,7 +235,7 @@ noteworthy differences: - In R, an idiomatic way to remove unwanted values is to use logical indexing, like in the expression ``x[x>3]`` or in the statement ``x = x[x>3]`` to modify ``x`` in-place. In contrast, Julia provides the higher order functions - :func:`filter` and a :func:`filter!`, allowing users to write + :func:`filter` and :func:`filter!`, allowing users to write ``filter(z->z>3, x)`` and ``filter!(z->z>3, x)`` as alternatives to the corresponding transliterations ``x[x.>3]`` and ``x = x[x.>3]``. Using :func:`filter!` reduces the use of temporary arrays. From a3898b1a664b4542e91d9f0d27618a06cca499a3 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 10 Jul 2016 10:48:37 -0700 Subject: [PATCH 07/14] Fix sphinx warnings about duplicate targets --- doc/manual/dates.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/dates.rst b/doc/manual/dates.rst index 08b5ba148b228..e23df78283255 100644 --- a/doc/manual/dates.rst +++ b/doc/manual/dates.rst @@ -389,7 +389,7 @@ default, the :class:`TimeType` :func:`round` method uses the ``RoundNearestTiesU rounding mode. (It's difficult to guess what breaking ties to nearest "even" :class:`TimeType` would entail.) Further details on the available ``RoundingMode`` s can be found in the -`API reference `_. +`API reference `_. Rounding should generally behave as expected, but there are a few cases in which the expected behaviour is not obvious. From 7f1290a55c5b87e9e9e3f4eb98ce29612cc20743 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 10 Jul 2016 10:49:08 -0700 Subject: [PATCH 08/14] Revert "Added performace tip for parentheses in expressions to docs" This reverts commit d459b1c7b715c6bbc47e94b8a5368abe1dc1bdac. The wording is misleading and the RST is malformed Revert "Double backticks and topic title fix" This reverts commit 7a27c60fa744fa0fe5719c96f952661f780e1e05. --- doc/manual/performance-tips.rst | 45 --------------------------------- 1 file changed, 45 deletions(-) diff --git a/doc/manual/performance-tips.rst b/doc/manual/performance-tips.rst index 2c88ae20a0703..eb092420787bc 100644 --- a/doc/manual/performance-tips.rst +++ b/doc/manual/performance-tips.rst @@ -947,51 +947,6 @@ Taken to its extreme, pre-allocation can make your code uglier, so performance measurements and some judgment may be required. -Use parentheses in long arithmetic operations ---------------------------------------------- - -If your code has a long arithmetic operation involving ``+`` or ``*`` operators, -then consider using parentheses to chain up to four or five operations together. -This is to avoid the splatting penalty from a longer list of arguments to function -return statement. - -Without parentheses: - - const k = zeros(20) - function test_mem() - return k[1] + k[2] + k[3] + k[4] + k[5] + 2.0 * k[6] + k[7] + k[8] + k[9] + k[10] - end - - function test(n::Int64) - ret = 0.0 - for i = 1:n - ret += test_mem() - end - ret - end - @time test(100000000) - - 5.017971 seconds (900.00 M allocations: 13.411 GB, 15.04% gc time) - -With: - - const k = zeros(20) - function test_mem() - return (k[1] + k[2] + k[3] + k[4] + k[5]) + 2.0 * k[6] + k[7] + k[8] + k[9] + k[10] - end - - function test(n::Int64) - ret = 0.0 - for i = 1:n - ret += test_mem() - end - ret - end - @time test(100000000) - - 0.302478 seconds (5.26 k allocations: 248.985 KB) - - Avoid string interpolation for I/O ---------------------------------- From 1b866292a1786ca302630ec67db4b662c76997b3 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 10 Jul 2016 10:58:28 -0700 Subject: [PATCH 09/14] Remove at-MIME from exports, was deleted --- base/exports.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/base/exports.jl b/base/exports.jl index 8641e82cd8fba..4cdc9e4739042 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -1216,7 +1216,6 @@ export TextDisplay, istextmime, MIME, - @MIME, @MIME_str, reprmime, stringmime, From f8cc320b3b29535d3b8a86643ee578f7e69bc812 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Fri, 8 Jul 2016 21:38:55 -0700 Subject: [PATCH 10/14] NEWS links and formatting up to and including 0.5-style comprehensions --- NEWS.md | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/NEWS.md b/NEWS.md index 0ce4d9007b03d..757a8f2776874 100644 --- a/NEWS.md +++ b/NEWS.md @@ -54,18 +54,19 @@ Language changes Instead of adding methods to `call`, methods are added by type using the syntax `(::ftype)(...) = ...`. `call` is deprecated ([#13412]). - * `using` and `import` are now case-sensitive even on case-insensitive filesystems (common on Mac and Windows) ([#13542]). + * `using` and `import` are now case-sensitive even on case-insensitive filesystems + (common on Mac and Windows) ([#13542]). * Relational symbols are now allowed as infix operators ([#8036]). - * A warning is always given when a method is overwritten (previously, this was done only when the new - and old definitions were in separate modules) ([#14759]). + * A warning is always given when a method is overwritten (previously, this was done + only when the new and old definitions were in separate modules) ([#14759]). - * `A <: B` is parsed as `Expr(:(<:), :A, :B)` in all cases ([#9503]). This also applies to the - `>:` operator. + * `A <: B` is parsed as `Expr(:(<:), :A, :B)` in all cases ([#9503]). + This also applies to the `>:` operator. * Simple 2-argument comparisons like `A < B` are parsed as calls instead of using the - `:comparison` expression type. + `:comparison` expression type ([#15524]). * The `if` keyword cannot be followed immediately by a line break ([#15763]). @@ -73,7 +74,7 @@ Language changes implemented internally as `Tuple{Vararg{T,N}}` ([#11242]). * Array comprehensions preserve the dimensions of the input ranges. For example, - `[ 2x for x in A]` will have the same dimensions as `A`. + `[2x for x in A]` will have the same dimensions as `A` ([#16622]). * The result type of an array comprehension depends only on the types of elements computed, instead of using type inference ([#7258]). If the result is empty, then @@ -97,7 +98,7 @@ Breaking changes * `pmap` keyword arguments `err_retry=true` and `err_stop=false` are deprecated. Action to be taken on errors can be specified via the `on_error` keyword argument. - Retry is specified via `retry_n`, `retry_on` and `retry_max_delay`. + Retry is specified via `retry_n`, `retry_on` and `retry_max_delay` ([#15409], [#15975], [#16663]). * `reshape` is now defined to always share data with the original array. If a reshaped copy is needed, use `copy(reshape(a))` or `copy!` to a new array of @@ -163,7 +164,8 @@ Library improvements * All dimensions indexed by scalars are now dropped, whereas previously only trailing scalar dimensions would be omitted from the result ([#13612]). - * Dimensions indexed by multidimensional arrays add dimensions. More generally, the dimensionality of the result is the sum of the dimensionalities of the indices ([#15431]). + * Dimensions indexed by multidimensional arrays add dimensions. More generally, the + dimensionality of the result is the sum of the dimensionalities of the indices ([#15431]). * New `normalize` and `normalize!` convenience functions for normalizing vectors ([#13681]). @@ -180,13 +182,13 @@ Library improvements vector instead of a one-column sparse matrix. ([#13440]) * Rank one update and downdate functions, `lowrankupdate`, `lowrankupdate!`, `lowrankdowndate`, - and `lowrankdowndate!`, for dense Cholesky factorizations ([#14243], [#14424]) + and `lowrankdowndate!`, for dense Cholesky factorizations ([#14243], [#14424]) * All `sparse` methods now retain provided numerical zeros as structural nonzeros; to drop numerical zeros, use `dropzeros!` ([#14798], [#15242]). * New `foreach` function for calling a function on every element of a collection when - the results are not needed. + the results are not needed ([#13774]). * `Cmd(cmd; ...)` now accepts new Windows-specific options `windows_verbatim` (to alter Windows command-line generation) and `windows_hide` (to @@ -208,10 +210,11 @@ Library improvements directory, instead of the private `/lib/julia` directory ([#16362]). * System reflection is now more consistently exposed from Sys and not Base. - `OS_NAME` has been replaced by `Sys.KERNEL` and always reports the name of the kernel (as reported by `uname`). - The `@windows_only` and `@osx` family of macros have been replaced with functions such as `is_windows()` and - or `is_apple()`. There's now also an `@static` macro that will evaluate the condition of an if-statement at - compile time, for when a static branch is required ([#16219]). + `OS_NAME` has been replaced by `Sys.KERNEL` and always reports the name of the + kernel (as reported by `uname`). The `@windows_only` and `@osx` family of macros + have been replaced with functions such as `is_windows()` and `is_apple()`. + There's now also an `@static` macro that will evaluate the condition of an + if-statement at compile time, for when a static branch is required ([#16219]). * Prime number related functions have been moved from `Base` to the [Primes.jl package](https://github.com/JuliaMath/Primes.jl) ([#16481]). @@ -238,7 +241,8 @@ Deprecated or removed * Deprecate `chol(A,Val{:U/:L})` in favor of `chol(A)` ([#13680]). - * `issym` is deprecated in favor of `issymmetric` to match similar functions (`ishermitian`, ...) ([#15192]) + * `issym` is deprecated in favor of `issymmetric` to match similar functions + (`ishermitian`, ...) ([#15192]) * `scale` is deprecated in favor of either `α*A`, `Diagonal(x)*A`, or `A*Diagonal(x)`. ([#15258]) @@ -252,11 +256,14 @@ Deprecated or removed [PkgDev]: https://github.com/JuliaLang/PkgDev.jl +[#550]: https://github.com/JuliaLang/julia/issues/550 [#1090]: https://github.com/JuliaLang/julia/issues/1090 [#4163]: https://github.com/JuliaLang/julia/issues/4163 [#4211]: https://github.com/JuliaLang/julia/issues/4211 [#4470]: https://github.com/JuliaLang/julia/issues/4470 +[#4867]: https://github.com/JuliaLang/julia/issues/4867 [#6190]: https://github.com/JuliaLang/julia/issues/6190 +[#7258]: https://github.com/JuliaLang/julia/issues/7258 [#8036]: https://github.com/JuliaLang/julia/issues/8036 [#8846]: https://github.com/JuliaLang/julia/issues/8846 [#9503]: https://github.com/JuliaLang/julia/issues/9503 @@ -277,6 +284,7 @@ Deprecated or removed [#13612]: https://github.com/JuliaLang/julia/issues/13612 [#13680]: https://github.com/JuliaLang/julia/issues/13680 [#13681]: https://github.com/JuliaLang/julia/issues/13681 +[#13774]: https://github.com/JuliaLang/julia/issues/13774 [#13780]: https://github.com/JuliaLang/julia/issues/13780 [#13824]: https://github.com/JuliaLang/julia/issues/13824 [#13897]: https://github.com/JuliaLang/julia/issues/13897 @@ -295,11 +303,14 @@ Deprecated or removed [#15242]: https://github.com/JuliaLang/julia/issues/15242 [#15244]: https://github.com/JuliaLang/julia/issues/15244 [#15258]: https://github.com/JuliaLang/julia/issues/15258 +[#15409]: https://github.com/JuliaLang/julia/issues/15409 [#15431]: https://github.com/JuliaLang/julia/issues/15431 +[#15524]: https://github.com/JuliaLang/julia/issues/15524 [#15550]: https://github.com/JuliaLang/julia/issues/15550 [#15609]: https://github.com/JuliaLang/julia/issues/15609 [#15731]: https://github.com/JuliaLang/julia/issues/15731 [#15763]: https://github.com/JuliaLang/julia/issues/15763 +[#15975]: https://github.com/JuliaLang/julia/issues/15975 [#16058]: https://github.com/JuliaLang/julia/issues/16058 [#16107]: https://github.com/JuliaLang/julia/issues/16107 [#16219]: https://github.com/JuliaLang/julia/issues/16219 @@ -310,7 +321,9 @@ Deprecated or removed [#16455]: https://github.com/JuliaLang/julia/issues/16455 [#16481]: https://github.com/JuliaLang/julia/issues/16481 [#16621]: https://github.com/JuliaLang/julia/issues/16621 +[#16622]: https://github.com/JuliaLang/julia/issues/16622 [#16645]: https://github.com/JuliaLang/julia/issues/16645 +[#16663]: https://github.com/JuliaLang/julia/issues/16663 [#16731]: https://github.com/JuliaLang/julia/issues/16731 [#16972]: https://github.com/JuliaLang/julia/issues/16972 [#17037]: https://github.com/JuliaLang/julia/issues/17037 From ce6a110f563705b51960675374a2d3e8252f1e3f Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 11 Jul 2016 16:17:12 -0700 Subject: [PATCH 11/14] Update contrib/add_license_to_files.jl Add test/perf/micro/randmtzig.c and src/getopt.{c,h} and rerun --- base/clusterserialize.jl | 1 + base/dates/rounding.jl | 2 ++ base/sharedarray.jl | 1 + contrib/add_license_to_files.jl | 3 +++ src/jloptions.c | 2 ++ test/cartesian.jl | 2 ++ test/dates/rounding.jl | 2 ++ 7 files changed, 13 insertions(+) diff --git a/base/clusterserialize.jl b/base/clusterserialize.jl index 11d6b1849afa6..f8505ca9b7ae5 100644 --- a/base/clusterserialize.jl +++ b/base/clusterserialize.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license + import .Serializer: known_object_data, object_number, serialize_cycle, deserialize_cycle, writetag, __deserialized_types__, serialize_typename_body, deserialize_typename_body, TYPENAME_TAG, object_numbers diff --git a/base/dates/rounding.jl b/base/dates/rounding.jl index e9a08c6fc13c2..576ad44fe7fc9 100644 --- a/base/dates/rounding.jl +++ b/base/dates/rounding.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: http://julialang.org/license + # The epochs used for date rounding are based ISO 8601's "year zero" notation const DATEEPOCH = value(Date(0)) const DATETIMEEPOCH = value(DateTime(0)) diff --git a/base/sharedarray.jl b/base/sharedarray.jl index 894c9eb7358b5..9b527f9a1b4e6 100644 --- a/base/sharedarray.jl +++ b/base/sharedarray.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: http://julialang.org/license + import .Serializer: serialize_cycle, serialize_type, writetag, UNDEFREF_TAG type SharedArray{T,N} <: DenseArray{T,N} diff --git a/contrib/add_license_to_files.jl b/contrib/add_license_to_files.jl index 3ee803b132035..1ded19a34f31b 100644 --- a/contrib/add_license_to_files.jl +++ b/contrib/add_license_to_files.jl @@ -43,6 +43,8 @@ const skipfiles = [ "../src/abi_x86.cpp", "../src/abi_x86_64.cpp", "../src/disasm.cpp", + "../src/getopt.c", + "../src/getopt.h", "../src/support/END.h", "../src/support/ENTRY.amd64.h", "../src/support/ENTRY.i387.h", @@ -54,6 +56,7 @@ const skipfiles = [ "../src/support/strtod.c", "../src/support/tzfile.h", "../src/support/utf8.c", + "../test/perf/micro/randmtzig.c", ] const ext_prefix = Dict([ diff --git a/src/jloptions.c b/src/jloptions.c index 6265e100b3afe..ab91b109a3cb5 100644 --- a/src/jloptions.c +++ b/src/jloptions.c @@ -1,3 +1,5 @@ +// This file is a part of Julia. License is MIT: http://julialang.org/license + #include #include "julia.h" diff --git a/test/cartesian.jl b/test/cartesian.jl index 907905aff13b3..3180a4f4dccfc 100644 --- a/test/cartesian.jl +++ b/test/cartesian.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: http://julialang.org/license + @test Base.Cartesian.exprresolve(:(1 + 3)) == 4 ex = Base.Cartesian.exprresolve(:(if 5 > 4; :x; else :y; end)) @test ex.args[2] == QuoteNode(:x) diff --git a/test/dates/rounding.jl b/test/dates/rounding.jl index 80218fcf0db47..1d6ec265b80ed 100644 --- a/test/dates/rounding.jl +++ b/test/dates/rounding.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: http://julialang.org/license + # Test conversion to and from the rounding epoch (ISO 8601 year 0000) @test Dates.epochdays2date(-1) == Dates.Date(-1, 12, 31) @test Dates.epochdays2date(0) == Dates.Date(0, 1, 1) From d7fcf09dd5ebc6fad2c5192ab1d4cf3fa729acbc Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 11 Jul 2016 17:35:02 -0700 Subject: [PATCH 12/14] Fix compiler warning on Windows --- ui/repl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/repl.c b/ui/repl.c index db0cacf84fbd3..b0ae9c03c1ccd 100644 --- a/ui/repl.c +++ b/ui/repl.c @@ -223,7 +223,7 @@ int wmain(int argc, wchar_t *argv[], wchar_t *envp[]) } #endif libsupport_init(); - if (argc >= 2 && strcmp(argv[1],"--lisp") == 0) { + if (argc >= 2 && strcmp((char*)argv[1],"--lisp") == 0) { jl_lisp_prompt(); return 0; } From d839bab3a621dc160acfac1cb37889526fd7f199 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Tue, 12 Jul 2016 01:17:09 -0700 Subject: [PATCH 13/14] remove last mentions of type_goto and static_typeof --- doc/devdocs/ast.rst | 8 -------- src/common_symbols2.inc | 2 -- 2 files changed, 10 deletions(-) diff --git a/doc/devdocs/ast.rst b/doc/devdocs/ast.rst index d2699c0428d62..72f1ca4774a36 100644 --- a/doc/devdocs/ast.rst +++ b/doc/devdocs/ast.rst @@ -135,14 +135,6 @@ These symbols appear in the ``head`` field of ``Expr``\s in lowered form. ``null`` has no arguments; simply yields the value ``nothing`` -``static_typeof`` - a horrible misfeature used to determine the result type of array - comprehensions. Planned to be removed. - -``type_goto`` - a virtual control flow edge used to convey type data to ``static_typeof``, - also to be removed. - ``new`` allocates a new struct-like object. First argument is the type. The ``new`` pseudo-function is lowered to this, and the type is always inserted by the diff --git a/src/common_symbols2.inc b/src/common_symbols2.inc index 8a0874f720585..a53732df4e3bb 100644 --- a/src/common_symbols2.inc +++ b/src/common_symbols2.inc @@ -70,11 +70,9 @@ jl_symbol("#print_to_string#138"), jl_symbol("Main"), jl_symbol("pointer.jl"), jl_symbol("DimensionMismatch"), -jl_symbol("type_goto"), jl_symbol("stride"), jl_symbol("uP"), jl_symbol("III"), -jl_symbol("static_typeof"), jl_symbol("uW"), jl_symbol("checked_trunc_uint"), jl_symbol("sparse/sparsematrix.jl"), From 00ed7fabfde5a4fdf4ecea2e5e421cd0bcb8e169 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Tue, 12 Jul 2016 02:21:41 -0700 Subject: [PATCH 14/14] Remove ignore_invalid_chars from docs, it's now deprecated --- base/docs/helpdb/Base.jl | 3 --- doc/stdlib/io-network.rst | 2 -- 2 files changed, 5 deletions(-) diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 39ed4d59ea485..19d0b132fcbbf 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -3523,9 +3523,6 @@ If `use_mmap` is `true`, the file specified by `source` is memory mapped for pot speedups. Default is `true` except on Windows. On Windows, you may want to specify `true` if the file is large, and is only read once and not written to. -If `ignore_invalid_chars` is `true`, bytes in `source` with invalid character encoding will -be ignored. Otherwise an error is thrown indicating the offending character position. - If `quotes` is `true`, columns enclosed within double-quote (\") characters are allowed to contain new lines and column delimiters. Double-quote characters within a quoted field must be escaped with another double-quote. Specifying `dims` as a tuple of the expected rows and diff --git a/doc/stdlib/io-network.rst b/doc/stdlib/io-network.rst index 6a78e42592b52..936258c7ac119 100644 --- a/doc/stdlib/io-network.rst +++ b/doc/stdlib/io-network.rst @@ -574,8 +574,6 @@ Text I/O If ``use_mmap`` is ``true``\ , the file specified by ``source`` is memory mapped for potential speedups. Default is ``true`` except on Windows. On Windows, you may want to specify ``true`` if the file is large, and is only read once and not written to. - If ``ignore_invalid_chars`` is ``true``\ , bytes in ``source`` with invalid character encoding will be ignored. Otherwise an error is thrown indicating the offending character position. - If ``quotes`` is ``true``\ , columns enclosed within double-quote (") characters are allowed to contain new lines and column delimiters. Double-quote characters within a quoted field must be escaped with another double-quote. Specifying ``dims`` as a tuple of the expected rows and columns (including header, if any) may speed up reading of large files. If ``comments`` is ``true``\ , lines beginning with ``comment_char`` and text following ``comment_char`` in any line are ignored. .. function:: readdlm(source, delim::Char, eol::Char; options...)