Skip to content

Commit 631bf17

Browse files
authored
Merge pull request #43297 from JuliaLang/backports-release-1.7
release-1.7: Backports for 1.7.1
2 parents 3bf9d17 + 7599df4 commit 631bf17

File tree

24 files changed

+327
-202
lines changed

24 files changed

+327
-202
lines changed

base/loading.jl

+12-1
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,8 @@ function srctext_files(f::IO, srctextpos::Int64)
16521652
end
16531653

16541654
# Test to see if this UUID is mentioned in this `Project.toml`; either as
1655-
# the top-level UUID (e.g. that of the project itself) or as a dependency.
1655+
# the top-level UUID (e.g. that of the project itself), as a dependency,
1656+
# or as a extra for Preferences.
16561657
function get_uuid_name(project::Dict{String, Any}, uuid::UUID)
16571658
uuid_p = get(project, "uuid", nothing)::Union{Nothing, String}
16581659
name = get(project, "name", nothing)::Union{Nothing, String}
@@ -1667,6 +1668,16 @@ function get_uuid_name(project::Dict{String, Any}, uuid::UUID)
16671668
end
16681669
end
16691670
end
1671+
for subkey in ("deps", "extras")
1672+
subsection = get(project, subkey, nothing)::Union{Nothing, Dict{String, Any}}
1673+
if subsection !== nothing
1674+
for (k, v) in subsection
1675+
if uuid == UUID(v::String)
1676+
return k
1677+
end
1678+
end
1679+
end
1680+
end
16701681
return nothing
16711682
end
16721683

base/version_git.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,10 @@ if [ -z "$fork_master_timestamp" ]; then
8585
fi
8686

8787
build_system_directory="../.buildkite"
88-
if [[ -d "${build_system_directory}/.git" ]]; then
88+
if [ -d "${build_system_directory}/.git" ]; then
8989
build_system_commit=$(git -C "${build_system_directory}" rev-parse HEAD)
9090
build_system_commit_short=$(git -C "${build_system_directory}" rev-parse --short HEAD)
9191
else
92-
echo "Warning: The build system directory does not exist or is not a Git repo: ${build_system_directory}" >&2
9392
build_system_commit=""
9493
build_system_commit_short=""
9594
fi

deps/checksums/Pkg-0779de5302e03bf768f9167fa4aad4d78ba3af96.tar.gz/md5

-1
This file was deleted.

deps/checksums/Pkg-0779de5302e03bf768f9167fa4aad4d78ba3af96.tar.gz/sha512

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9d69e3c7c27dc5254db9e1a928292cb5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
80851a743a44176a6d10871b928ba8d025591e2fbfc125354904dcfafa7a5175080df216a5de8fd7c49d356a8491c6a5f63010e366a6819551ade352e4a34ab0

deps/checksums/openblas

+92-92
Large diffs are not rendered by default.

deps/gmp.mk

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ $(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied: $(SRCCACHE)/gm
3939
patch -p1 < $(SRCDIR)/patches/gmp_alloc_overflow_func.patch
4040
echo 1 > $@
4141

42-
$(SRCCACHE)/gmp-$(GMP_VER)/build-patched: \
42+
$(SRCCACHE)/gmp-$(GMP_VER)/source-patched: \
4343
$(SRCCACHE)/gmp-$(GMP_VER)/gmp-HG-changeset.patch-applied \
4444
$(SRCCACHE)/gmp-$(GMP_VER)/gmp-exception.patch-applied \
4545
$(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied
46+
echo 1 > $@
4647

47-
$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted $(SRCCACHE)/gmp-$(GMP_VER)/build-patched
48+
$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted $(SRCCACHE)/gmp-$(GMP_VER)/source-patched
4849
mkdir -p $(dir $@)
4950
cd $(dir $@) && \
5051
$(dir $<)/configure $(CONFIGURE_COMMON) F77= --enable-cxx --enable-shared --disable-static $(GMP_CONFIGURE_OPTS)

doc/Manifest.toml

+17-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
manifest_format = "2.0"
44

5+
[[deps.ANSIColoredPrinters]]
6+
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
7+
uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
8+
version = "0.0.1"
9+
510
[[deps.Base64]]
611
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
712

@@ -11,15 +16,15 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
1116

1217
[[deps.DocStringExtensions]]
1318
deps = ["LibGit2"]
14-
git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f"
19+
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
1520
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
16-
version = "0.8.5"
21+
version = "0.8.6"
1722

1823
[[deps.Documenter]]
19-
deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
20-
git-tree-sha1 = "5acbebf1be22db43589bc5aa1bb5fcc378b17780"
24+
deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
25+
git-tree-sha1 = "f425293f7e0acaf9144de6d731772de156676233"
2126
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
22-
version = "0.27.0"
27+
version = "0.27.10"
2328

2429
[[deps.IOCapture]]
2530
deps = ["Logging", "Random"]
@@ -33,9 +38,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
3338

3439
[[deps.JSON]]
3540
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
36-
git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
41+
git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37"
3742
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
38-
version = "0.21.1"
43+
version = "0.21.2"
3944

4045
[[deps.LibGit2]]
4146
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
@@ -53,12 +58,13 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
5358

5459
[[deps.NetworkOptions]]
5560
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
61+
version = "1.2.0"
5662

5763
[[deps.Parsers]]
5864
deps = ["Dates"]
59-
git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc"
65+
git-tree-sha1 = "ae4bbcadb2906ccc085cf52ac286dc1377dceccc"
6066
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
61-
version = "1.1.0"
67+
version = "2.1.2"
6268

6369
[[deps.Printf]]
6470
deps = ["Unicode"]
@@ -69,11 +75,12 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
6975
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
7076

7177
[[deps.Random]]
72-
deps = ["Serialization"]
78+
deps = ["SHA", "Serialization"]
7379
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
7480

7581
[[deps.SHA]]
7682
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
83+
version = "0.7.0"
7784

7885
[[deps.Serialization]]
7986
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

doc/make.jl

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ makedocs(
303303
# Update URLs to external stdlibs (JuliaLang/julia#43199)
304304
for (root, _, files) in walkdir(output_path), file in joinpath.(root, files)
305305
endswith(file, ".html") || continue
306+
local str
306307
str = read(file, String)
307308
# Index page links, update
308309
# https://github.com/JuliaLang/julia/blob/master/stdlib/${STDLIB_NAME}-${STDLIB_COMMIT}/path/to.md

doc/src/manual/functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ and the `::Integer` specification means that it will only be callable when `n` i
7474

7575
Argument-type declarations **normally have no impact on performance**: regardless of what argument types (if any) are declared, Julia compiles a specialized version of the function for the actual argument types passed by the caller. For example, calling `fib(1)` will trigger the compilation of specialized version of `fib` optimized specifically for `Int` arguments, which is then re-used if `fib(7)` or `fib(15)` are called. (There are rare exceptions when an argument-type declaration can trigger additional compiler specializations; see: [Be aware of when Julia avoids specializing](@ref).) The most common reasons to declare argument types in Julia are, instead:
7676

77-
* **Dispatch:** As explained in [Methods](@ref), you can have different versions ("methods") of a function for different argument types, in which case the argument types are used to determine which implementation is called for which arguments. For example, you might implement a completely different algorithm `fib(x::Number) = ...` that works for any `Number` type by using [Binet's formula](https://en.wikipedia.org/wiki/Fibonacci_number#Binet's_formula) to extend it to non-integer values.
77+
* **Dispatch:** As explained in [Methods](@ref), you can have different versions ("methods") of a function for different argument types, in which case the argument types are used to determine which implementation is called for which arguments. For example, you might implement a completely different algorithm `fib(x::Number) = ...` that works for any `Number` type by using [Binet's formula](https://en.wikipedia.org/wiki/Fibonacci_number#Binet%27s_formula) to extend it to non-integer values.
7878
* **Correctness:** Type declarations can be useful if your function only returns correct results for certain argument types. For example, if we omitted argument types and wrote `fib(n) = n ≤ 2 ? one(n) : fib(n-1) + fib(n-2)`, then `fib(1.5)` would silently give us the nonsensical answer `1.0`.
7979
* **Clarity:** Type declarations can serve as a form of documentation about the expected arguments.
8080

src/array.c

+8-31
Original file line numberDiff line numberDiff line change
@@ -219,51 +219,28 @@ JL_DLLEXPORT jl_array_t *jl_reshape_array(jl_value_t *atype, jl_array_t *data,
219219
jl_value_t *_dims)
220220
{
221221
jl_task_t *ct = jl_current_task;
222-
jl_array_t *a;
222+
assert(jl_types_equal(jl_tparam0(jl_typeof(data)), jl_tparam0(atype)));
223+
223224
size_t ndims = jl_nfields(_dims);
224225
assert(is_ntuple_long(_dims));
225226
size_t *dims = (size_t*)_dims;
226-
assert(jl_types_equal(jl_tparam0(jl_typeof(data)), jl_tparam0(atype)));
227-
228227
int ndimwords = jl_array_ndimwords(ndims);
229228
int tsz = sizeof(jl_array_t) + ndimwords * sizeof(size_t) + sizeof(void*);
230-
a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, atype);
229+
jl_array_t *a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, atype);
231230
// No allocation or safepoint allowed after this
231+
// copy data (except dims) from the old object
232232
a->flags.pooled = tsz <= GC_MAX_SZCLASS;
233233
a->flags.ndims = ndims;
234234
a->offset = 0;
235235
a->data = NULL;
236236
a->flags.isaligned = data->flags.isaligned;
237-
jl_array_t *owner = (jl_array_t*)jl_array_owner(data);
238-
jl_value_t *eltype = jl_tparam0(atype);
239-
size_t elsz = 0, align = 0;
240-
int isboxed = !jl_islayout_inline(eltype, &elsz, &align);
241-
assert(isboxed == data->flags.ptrarray);
242-
if (!isboxed) {
243-
a->elsize = LLT_ALIGN(elsz, align);
244-
jl_value_t *ownerty = jl_typeof(owner);
245-
size_t oldelsz = 0, oldalign = 0;
246-
if (ownerty == (jl_value_t*)jl_string_type) {
247-
oldalign = 1;
248-
}
249-
else {
250-
jl_islayout_inline(jl_tparam0(ownerty), &oldelsz, &oldalign);
251-
}
252-
if (oldalign < align)
253-
jl_exceptionf(jl_argumenterror_type,
254-
"reinterpret from alignment %d bytes to alignment %d bytes not allowed",
255-
(int) oldalign, (int) align);
256-
a->flags.ptrarray = 0;
257-
a->flags.hasptr = data->flags.hasptr;
258-
}
259-
else {
260-
a->elsize = sizeof(void*);
261-
a->flags.ptrarray = 1;
262-
a->flags.hasptr = 0;
263-
}
237+
a->elsize = data->elsize;
238+
a->flags.ptrarray = data->flags.ptrarray;
239+
a->flags.hasptr = data->flags.hasptr;
264240

265241
// if data is itself a shared wrapper,
266242
// owner should point back to the original array
243+
jl_array_t *owner = (jl_array_t*)jl_array_owner(data);
267244
jl_array_data_owner(a) = (jl_value_t*)owner;
268245

269246
a->flags.how = 3;

src/datatype.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ int jl_struct_try_layout(jl_datatype_t *dt)
248248
return 1;
249249
}
250250

251-
int jl_datatype_isinlinealloc(jl_datatype_t *ty, int pointerfree) JL_NOTSAFEPOINT
251+
int jl_datatype_isinlinealloc(jl_datatype_t *ty, int pointerfree)
252252
{
253-
if (ty->name->mayinlinealloc && (ty->isconcretetype || ((jl_datatype_t*)jl_unwrap_unionall(ty->name->wrapper))->layout)) { // TODO: use jl_struct_try_layout(dt) (but it is a safepoint)
253+
if (ty->name->mayinlinealloc && jl_struct_try_layout(ty)) {
254254
if (ty->layout->npointers > 0) {
255255
if (pointerfree)
256256
return 0;
@@ -264,7 +264,7 @@ int jl_datatype_isinlinealloc(jl_datatype_t *ty, int pointerfree) JL_NOTSAFEPOIN
264264
return 0;
265265
}
266266

267-
static unsigned union_isinlinable(jl_value_t *ty, int pointerfree, size_t *nbytes, size_t *align, int asfield) JL_NOTSAFEPOINT
267+
static unsigned union_isinlinable(jl_value_t *ty, int pointerfree, size_t *nbytes, size_t *align, int asfield)
268268
{
269269
if (jl_is_uniontype(ty)) {
270270
unsigned na = union_isinlinable(((jl_uniontype_t*)ty)->a, 1, nbytes, align, asfield);
@@ -290,19 +290,19 @@ static unsigned union_isinlinable(jl_value_t *ty, int pointerfree, size_t *nbyte
290290
return 0;
291291
}
292292

293-
int jl_uniontype_size(jl_value_t *ty, size_t *sz) JL_NOTSAFEPOINT
293+
int jl_uniontype_size(jl_value_t *ty, size_t *sz)
294294
{
295295
size_t al = 0;
296296
return union_isinlinable(ty, 0, sz, &al, 0) != 0;
297297
}
298298

299-
JL_DLLEXPORT int jl_islayout_inline(jl_value_t *eltype, size_t *fsz, size_t *al) JL_NOTSAFEPOINT
299+
JL_DLLEXPORT int jl_islayout_inline(jl_value_t *eltype, size_t *fsz, size_t *al)
300300
{
301301
unsigned countbits = union_isinlinable(eltype, 0, fsz, al, 1);
302302
return (countbits > 0 && countbits < 127) ? countbits : 0;
303303
}
304304

305-
JL_DLLEXPORT int jl_stored_inline(jl_value_t *eltype) JL_NOTSAFEPOINT
305+
JL_DLLEXPORT int jl_stored_inline(jl_value_t *eltype)
306306
{
307307
size_t fsz = 0, al = 0;
308308
return jl_islayout_inline(eltype, &fsz, &al);

src/jltypes.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ static int layout_uses_free_typevars(jl_value_t *v, jl_typeenv_t *env)
4646
layout_uses_free_typevars(((jl_uniontype_t*)v)->b, env);
4747
if (jl_is_vararg(v)) {
4848
jl_vararg_t *vm = (jl_vararg_t*)v;
49-
if (vm->T) {
50-
if (layout_uses_free_typevars(vm->T, env))
51-
return 1;
52-
if (vm->N && layout_uses_free_typevars(vm->N, env))
53-
return 1;
54-
}
49+
if (vm->T && layout_uses_free_typevars(vm->T, env))
50+
return 1;
51+
if (vm->N && layout_uses_free_typevars(vm->N, env))
52+
return 1;
5553
return 0;
5654
}
5755
if (jl_is_unionall(v)) {

src/julia.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1495,8 +1495,8 @@ JL_DLLEXPORT void jl_set_nth_field(jl_value_t *v, size_t i, jl_value_t *r
14951495
JL_DLLEXPORT int jl_field_isdefined(jl_value_t *v, size_t i) JL_NOTSAFEPOINT;
14961496
JL_DLLEXPORT jl_value_t *jl_get_field(jl_value_t *o, const char *fld);
14971497
JL_DLLEXPORT jl_value_t *jl_value_ptr(jl_value_t *a);
1498-
int jl_uniontype_size(jl_value_t *ty, size_t *sz) JL_NOTSAFEPOINT;
1499-
JL_DLLEXPORT int jl_islayout_inline(jl_value_t *eltype, size_t *fsz, size_t *al) JL_NOTSAFEPOINT;
1498+
int jl_uniontype_size(jl_value_t *ty, size_t *sz);
1499+
JL_DLLEXPORT int jl_islayout_inline(jl_value_t *eltype, size_t *fsz, size_t *al);
15001500

15011501
// arrays
15021502
JL_DLLEXPORT jl_array_t *jl_new_array(jl_value_t *atype, jl_value_t *dims);

src/signals-unix.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -817,10 +817,10 @@ static void *signal_listener(void *arg)
817817
bt_data_prof[bt_size_cur++].uintptr = 0;
818818
bt_data_prof[bt_size_cur++].uintptr = 0;
819819
}
820-
821-
// notify thread to resume
822-
jl_thread_resume(i, sig);
823820
}
821+
822+
// notify thread to resume
823+
jl_thread_resume(i, sig);
824824
}
825825
jl_unlock_profile();
826826
}

0 commit comments

Comments
 (0)