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: 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 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 diff --git a/src/tokenize.jl b/src/tokenize.jl index 6eb76954..0ea9be19 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 = min(lastindex(str), MAX_KW_LENGTH) + while ind <= L h = simple_hash(str[ind], h) ind = nextind(str, ind) end