From 4ff795ebdf697420afa369b863b1948274475b6f Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Tue, 25 Mar 2025 11:10:36 -0500 Subject: [PATCH 1/5] Update cache version to unbreak CI (cherry picked from commit 669f1d60f94052862d2c5f9b6a6bd9971fba3f6a, PR #544) --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dcdb5f35..b6ceedb5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -92,7 +92,7 @@ jobs: with: version: 1.6 arch: x64 - - uses: actions/cache@v1 + - uses: actions/cache@v4 env: cache-name: cache-artifacts with: From 6f1ffa50e06856332be9b12113975803f8639a02 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 26 Mar 2025 16:38:21 +0100 Subject: [PATCH 2/5] also precompile for `SubString` (#542) (cherry picked from commit ef9b8ddf785359c6d1936d4d437e2fae128bc333) --- src/precompile.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/precompile.jl b/src/precompile.jl index 922be354..5a80d92d 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -6,6 +6,7 @@ let filename = joinpath(@__DIR__, "literal_parsing.jl") if _has_v1_6_hooks enable_in_core!() Meta.parse("1 + 2") + Meta.parse(SubString("1 + 2")) enable_in_core!(false) end end From ea7e2b6875e91433fd7776c62e579ebf6bb5a9f9 Mon Sep 17 00:00:00 2001 From: adienes <51664769+adienes@users.noreply.github.com> Date: Tue, 13 May 2025 17:17:17 -0400 Subject: [PATCH 3/5] simple_hash faster by lifting length(str) (cherry picked from commit 65a5ca301375d6b0e6a6cced14cd87a12a6a2733, PR #553) --- src/tokenize.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tokenize.jl b/src/tokenize.jl index 6eb76954..e0d3770e 100644 --- a/src/tokenize.jl +++ b/src/tokenize.jl @@ -1339,7 +1339,8 @@ end function simple_hash(str) ind = 1 h = UInt64(0) - while ind <= length(str) + L = length(str) + while ind <= L h = simple_hash(str[ind], h) ind = nextind(str, ind) end From dba90769316aef47721c893512195331ac265aae Mon Sep 17 00:00:00 2001 From: adienes <51664769+adienes@users.noreply.github.com> Date: Wed, 14 May 2025 12:38:11 -0400 Subject: [PATCH 4/5] Update src/tokenize.jl Co-authored-by: Sebastian Pfitzner (cherry picked from commit 542dcd76dc85048204115940e3609e863dc8a2bb, PR #553) --- src/tokenize.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokenize.jl b/src/tokenize.jl index e0d3770e..0ea9be19 100644 --- a/src/tokenize.jl +++ b/src/tokenize.jl @@ -1339,7 +1339,7 @@ end function simple_hash(str) ind = 1 h = UInt64(0) - L = length(str) + L = min(lastindex(str), MAX_KW_LENGTH) while ind <= L h = simple_hash(str[ind], h) ind = nextind(str, ind) From 4e5f85ec97504744cb766007694a89d2abf1b3d2 Mon Sep 17 00:00:00 2001 From: Neven Sajko <4944410+nsajko@users.noreply.github.com> Date: Fri, 5 Sep 2025 14:09:25 +0200 Subject: [PATCH 5/5] `_register_kinds!`: prevent unintentional closure capture, boxing (#586) (#589) The variable `i` was unintentionally shared between the generator closure in `_register_kinds!` and another part of the body of `_register_kinds!`. Thus `i` was boxed, causing trouble for inference. Fix this by moving the part of `_register_kinds!` with `i` to a new function. Fixing this should make the sysimage more resistant to invalidation, once the change propagates to Julia itself. (cherry picked from commit 00bd17ebf8b99a97ea23599dc8f1497b3c3da05b) --- src/kinds.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kinds.jl b/src/kinds.jl index c7d27e35..b6f0723a 100644 --- a/src/kinds.jl +++ b/src/kinds.jl @@ -102,6 +102,12 @@ function _register_kinds!(kind_modules, int_to_kindstr, kind_str_to_int, mod, mo error("Kind module ID $module_id already claimed by module $m") end end + _register_kinds_names!(int_to_kindstr, kind_str_to_int, module_id, names) +end + +# This function is separated from `_register_kinds!` to prevent sharing of the variable `i` +# here and in the closure in `_register_kinds!`, which causes boxing and bad inference. +function _register_kinds_names!(int_to_kindstr, kind_str_to_int, module_id, names) # Process names to conflate category BEGIN/END markers with the first/last # in the category. i = 0