Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
b722507
Add editor support for helix (#47042)
Seelengrab Oct 4, 2022
7f507e6
If `cache.julialang.org` is down, try to download Busybox from the up…
DilumAluthge Oct 4, 2022
b9d539d
array.jl: filter(f) compat should be 1.9 not 1.8 (#47045)
StefanKarpinski Oct 4, 2022
81c7220
IncrementalCompact: fix display of basic block boundaries. (#47043)
maleadt Oct 4, 2022
f056dbc
Fix typo in test/spawn.jl (#47049)
staticfloat Oct 4, 2022
0ddac06
IncrementalCompact: keep track of the active bb.
maleadt Oct 5, 2022
0c9419a
IncrementalCompact: fix stateful behavior when using multiple iterators.
maleadt Oct 5, 2022
ae81c88
Remove the iterator state, as the underlying IncrementalCompact keeps…
maleadt Oct 5, 2022
fe7f673
Show basic block statement ranges in CFG output. (#46985)
maleadt Oct 5, 2022
b0f3cfa
Simplify returned state.
maleadt Oct 5, 2022
65f02b3
InteractiveUtils [cosmetic]: tidy editor definitions (#47048)
StefanKarpinski Oct 5, 2022
fbd5a72
precompile: serialize the full edges graph (#46920)
vtjnash Oct 5, 2022
956e0a3
[Profile] Add Heap Snapshot tool (#46862)
apaz-cli Oct 5, 2022
1755994
[Profile] allocate exactly the space requested
vtjnash Jun 1, 2022
d797c00
use `_NAMEDTUPLE_NAME` instead of `NamedTuple_typename` [NFC] (#47057)
aviatesk Oct 5, 2022
92e68c8
🤖 Bump the Pkg stdlib from 3cbbd860a to ca9f44265 (#47069)
DilumAluthgeBot Oct 6, 2022
a3c7d7f
Merge pull request #46952 from JuliaLang/tb/ircompact_statefulness
maleadt Oct 6, 2022
ce04b75
speed up Ryu.pow5 (#46764)
oscardssmith Oct 6, 2022
f4c3eda
Eig functions error on Hermitians of NaNs (#47074)
kshyatt Oct 6, 2022
84403cb
Avoid unneeded allocation in `ldiv!(::`QRPivoted`, ...)`. (#47061)
N5N3 Oct 6, 2022
dd298dc
Doctest, typo fix, xrefs for abstract array docs (#47030)
kshyatt Oct 6, 2022
3d8eb24
Fixes for non-linearized cglobal (#47068)
vchuravy Oct 6, 2022
c5b43bb
Doctests for count (#47071)
kshyatt Oct 6, 2022
c1c2a69
Doctest for setindex (#47072)
kshyatt Oct 6, 2022
689bfe1
fix code for omitting `codeinst->inferred` from system image (#47067)
JeffBezanson Oct 6, 2022
45b96c4
gc: add missing root for binding->ty field (#46806)
staticfloat Oct 6, 2022
2c68ff9
🤖 Bump the Downloads stdlib from 0733701 to 11b6bb7 (#47024)
DilumAluthgeBot Oct 6, 2022
a27b3f8
🤖 Bump the Statistics stdlib from 0588f2c to 20fbe57 (#47046)
DilumAluthgeBot Oct 6, 2022
950ce91
quote variable name in `UndefVarError` and `UndefKeywordError` (#47077)
KristofferC Oct 6, 2022
0bd717e
Add missing check for Union{} argtypes in irinterp (#47079)
Keno Oct 7, 2022
aad2454
compiler: setup `CallInfo` interface type (#46961)
aviatesk Oct 7, 2022
ecfe8bc
pass around `CallInfo` object to the inlining algorithm [alternative]…
aviatesk Oct 7, 2022
4390918
SSAIR: refactor `NewInstruction` constructor
aviatesk Oct 4, 2022
2083888
SSAIR: disambiguate `Core.Compiler.add!`
aviatesk Oct 4, 2022
24bee81
SSAIR: make sure to propagate `info` from `NewInstruction`
aviatesk Oct 4, 2022
b794a5a
SSAIR: remove `effect_free_computed::Bool` option from `NewInstruction`
aviatesk Oct 5, 2022
0620361
Fix oracle check failure in adce_pass (#47080)
Keno Oct 7, 2022
9e53f51
Fix IR corruption in cfg_simplify! (#47073)
Keno Oct 7, 2022
5334fa8
Tests for bunchkaufman and cholesky of AbstractMatrix (#47081)
dkarrasch Oct 7, 2022
8d783ef
Merge pull request #47051 from JuliaLang/avi/ircleanup
aviatesk Oct 7, 2022
f1b05c1
doc: fix incorrect wordings on sentence (#47054)
udohjeremiah Oct 7, 2022
d498d36
Update eachsplit example, fixes #46751 (#47070)
MonliH Oct 7, 2022
f927d25
audit `copymutable_oftype` usage (#47063)
dkarrasch Oct 7, 2022
4c0f8de
Fix display of new after-attach IR nodes. (#47092)
maleadt Oct 7, 2022
df5b081
Special purpose inliner for Core.ifelse (#47096)
Keno Oct 8, 2022
95cfd62
improve performance issue of `@nospecialize`-d keyword func call (#47…
aviatesk Oct 8, 2022
0d90a0a
Don't export `axp(b)y!` from `LinearAlgebra.BLAS` (#46851)
dkarrasch Oct 8, 2022
60adc24
Replace Sorted Vector with BitSet in optimization passes (#46587)
LilithHafner Oct 8, 2022
2590712
make pending_perm a heap instead of sorted (#46586)
LilithHafner Oct 8, 2022
17afb66
Make Compiler use separate sorting algorithm. (#47066)
oscardssmith Oct 8, 2022
b67adb1
Make @specialize actually work if the module was @nospecialize'd (#47…
Keno Oct 9, 2022
25e3809
Check sizes in 3-arg diagonal (dot-)product (#47114)
dkarrasch Oct 10, 2022
d0b15c2
lattice: Thread through lattice argument for getfield_tfunc (#47097)
Keno Oct 10, 2022
6904559
tidy test cases added by #47066 (#47118)
aviatesk Oct 10, 2022
7bd8311
Add example for broadcasted ∘ (#47007)
LilithHafner Oct 10, 2022
7beeaf7
make REPL completions robust against `expanduser` throwing (#47058)
KristofferC Oct 10, 2022
cf44223
Remove unused `issorted` function from compiler (#46691)
LilithHafner Oct 10, 2022
1c1dfa2
warn against `@irrational` (#47103)
Moelf Oct 10, 2022
1471cd9
lu should throw on matrix of NaNs (#47098)
kshyatt Oct 10, 2022
0dada17
fix invalidations when loading ForwardDiff.jl (#47091)
ranocha Oct 10, 2022
abb1b2f
Update manual heading for arrays (#47018)
LilithHafner Oct 10, 2022
729cdb4
Test that *Error and *Exception types subtype Exception and fix cases…
LilithHafner Oct 10, 2022
ea99174
Make print_sorted_stdlibs robust to stray files (#46697)
LilithHafner Oct 10, 2022
6f595e6
Explicitness on the ismutable(v) function. (#46466)
udohjeremiah Oct 10, 2022
18cbaba
clarify common confusion about allocations (#46383)
stevengj Oct 10, 2022
233a37d
Fix whitespace (#47120)
DilumAluthge Oct 10, 2022
1cb70ff
type_lift_pass: Don't introduce unnecessary phi nodes (#47119)
Keno Oct 10, 2022
a68235c
optimizer: fix alloc opt on unknown offset with references (#47076)
wsmoses Oct 10, 2022
e304cd5
dump: make serialization gc-safe (#47086)
vtjnash Oct 12, 2022
9104c20
fix #46918, unstable `jl_binding_type` behavior (#46994)
JeffBezanson Oct 12, 2022
a7d446b
Do not use `Stateful` for `cmp` of `AbstractString` (#47125)
jakobnissen Oct 12, 2022
015874c
add Bidiagonal/Tridiagonal constructor from its own type (#47115)
sosuts Oct 12, 2022
0b2a8a5
Update patch version in readme (#47140)
jishnub Oct 12, 2022
b7201d6
threading: support more than nthreads at runtime
vtjnash Jul 25, 2022
b685edd
Test system: Allow the "test set mutated ENV and did not restore..." …
DilumAluthge Oct 13, 2022
faa49a0
Avoid duplicating jl_datatype_layout_t (#46973)
apaz-cli Oct 13, 2022
186c0be
🤖 Bump the SparseArrays stdlib from 1bae96d to 4694108 (#47147)
DilumAluthgeBot Oct 13, 2022
01310a9
`map` of unequal length bitarray (#47013)
Moelf Oct 13, 2022
40346e1
Improve the memory profiler documentation (#47144)
fingolfin Oct 13, 2022
08d5b0d
irshow: Fix CFG display with directly inserted new nodes (#47135)
Keno Oct 13, 2022
8bdd52d
fix bug in --strip-ir when fields are replaced with NULL (#47145)
JeffBezanson Oct 13, 2022
f424431
make CodeInstance 1 word smaller by moving the trailing UInt8 field (…
JeffBezanson Oct 13, 2022
981f3d2
[REPL] tests: be better about correct IO ordering (#47160)
vtjnash Oct 14, 2022
c63c1e4
Merge pull request #46609 from JuliaLang/jb/jn/mthreads
JeffBezanson Oct 14, 2022
3144a5b
Implement `jl_rec_backtrace` for ASM/SETJMP on FreeBSD (#47156)
ararslan Oct 14, 2022
625aed1
disable `brotli` linkage (#47165)
t-bltg Oct 14, 2022
05cfe24
Fix various bugs in maybe-undef handling (#47167)
Keno Oct 14, 2022
35431bf
Stabilize, optimize, and increase robustness of QuickSort (#45222)
LilithHafner Oct 15, 2022
8552543
compiler: fix minor issues detected by JET (#47163)
aviatesk Oct 15, 2022
532125d
Add ability to not round-trip uncached inference results through IRCo…
Keno Oct 15, 2022
d89b96b
Add `jl_print_task_backtraces()` (#46845)
kpamnany Oct 15, 2022
277b1a5
Check inlining policy before inlining semi concrete eval IR (#47139)
Keno Oct 15, 2022
97d86f8
Remove some bootstrapping hacks from sort.jl (#47173)
LilithHafner Oct 16, 2022
ccb0a02
remove kwfuncs from Julia (#47157)
vtjnash Oct 16, 2022
e569459
[MozillaCACerts_jll] Update to 2022-10-11 (#47175)
giordano Oct 16, 2022
392bc97
Revert "Add `jl_print_task_backtraces()`" (#47182)
giordano Oct 16, 2022
c2dfe1d
Also update phi counts in adce pass (#47181)
Keno Oct 17, 2022
69f8a7b
Products of `Givens` and `Rotations` (#47162)
dkarrasch Oct 17, 2022
dc3a2e8
fix spelling of :not_atomic symbol default value (#47187)
vtjnash Oct 17, 2022
2ca8d44
Thread through lattice in more places (#47188)
Keno Oct 18, 2022
b55c15e
Fix insert_node! for insertion at pending nodes (#47189)
Keno Oct 18, 2022
bc7500b
[Profile] Test heap snapshot in child process (#47205)
apaz-cli Oct 18, 2022
94736a4
sysimg relocation lists now use LEB128 format (#47204)
apaz-cli Oct 18, 2022
e8aacc8
fix linkage of libuv (#47203)
vtjnash Oct 18, 2022
61ccb32
fix incorrect quiescent finalizer detection (#47214)
vtjnash Oct 18, 2022
8181316
optimizer: simplify inlining algorithm (#47207)
aviatesk Oct 18, 2022
0aff6dd
Add utility `IRCode()` constructor (#47218)
Keno Oct 19, 2022
3d7347b
[REPL] tests: further improve IJulia IO ordering
vtjnash Oct 15, 2022
48facc8
[REPL] fix ipython_mode scope bug
vtjnash Oct 17, 2022
e1cbd11
Ensure that we run late-lowering over ccallable funcs (#47226)
vchuravy Oct 19, 2022
0d52506
Optimized heap snapshot json writing (#47217)
apaz-cli Oct 19, 2022
a311f4d
Ensure port in listenany stays UInt16 (#47213)
quinnj Oct 20, 2022
3a8a9c6
optimize: parameterize `OptimizationState` with `InliningState` prope…
aviatesk Oct 20, 2022
87fd6d9
inference: clean up `getfield_tfunc` subroutines [NFC] (#47232)
aviatesk Oct 20, 2022
198e87d
Merge pull request #47178 from JuliaLang/jn/47160.2
vtjnash Oct 20, 2022
82bd71b
fix another incorrect quiescent finalizer detection (#47230)
vtjnash Oct 20, 2022
f4c4c33
reword error when rng sampler is fed empty array (#47104)
Moelf Oct 20, 2022
7680f77
🤖 Bump the SparseArrays stdlib from 4694108 to 3c2b65f (#47242)
DilumAluthgeBot Oct 20, 2022
ecf9e56
cfg_simplify: Fix more bugs (#47240)
Keno Oct 20, 2022
cfbfa1d
fix #47249, pass `𝕃::AbstractLattice` to `fieldtype_nothrow`
aviatesk Oct 20, 2022
c52af4a
inference: fix lattice for `abstract_invoke`
aviatesk Oct 20, 2022
94aab83
irinterp: handle `gc_preserve_[begin|end]` (#47252)
aviatesk Oct 21, 2022
d5b1021
Merge pull request #47253 from JuliaLang/avi/47249
aviatesk Oct 21, 2022
b3ebc0a
improve docstring of 'evalfile' and add doctest, fixes #45559 (#47130)
wolthom Oct 21, 2022
ed786ba
use more structs for `construct_ssa` datastructures (#47251)
aviatesk Oct 21, 2022
ca3cd8b
verify_ir: BBNumber is Int not Int64 (#47271)
vchuravy Oct 21, 2022
858223d
Mark min_world and max_world as non-const (#47279)
vchuravy Oct 22, 2022
230576d
inference: pass `𝕃::AbstractLattice` to more `nothrow`-tfuncs (#47266)
aviatesk Oct 22, 2022
f3ec87a
Update test for change in CodeInstance const fields (#47284)
maleadt Oct 22, 2022
8bef4a7
make libunwind substantially faster (#47272)
vtjnash Oct 22, 2022
fa9c137
Test that internal constructor return type asserts are respected (#47…
jakobnissen Oct 22, 2022
c97adbb
optimizer: improve type stability of `OptimizationState` (#47244)
aviatesk Oct 23, 2022
54e6899
Don't attempt concrete eval if there's no information to be gained (#…
Keno Oct 23, 2022
c34347a
inference: add more constprop remarks (#47294)
aviatesk Oct 24, 2022
a21b006
Fix oracle check failures in SROA
Keno Oct 22, 2022
b809e27
Fix oracle check failure in IncrementalCompact
Keno Oct 22, 2022
fa37bcb
Parameterize OptimizerLattice like InferenceLattice (#47287)
Keno Oct 24, 2022
13c0060
concrete-eval: Use concrete eval information even if the result is to…
Keno Oct 24, 2022
a8bf137
Reduce the range of elements sorted by partialsort (#47191)
LilithHafner Oct 24, 2022
6be72c6
Add nospecialize to methodswith (#47302)
jakobnissen Oct 24, 2022
d93c661
Profile: add method for `take_heap_snapshot` with auto path (#47300)
IanButterworth Oct 24, 2022
a528f77
Make sure to preserve info in union-split (#47301)
Keno Oct 24, 2022
be1be44
Fix yet more cfg_simplify bugs (#47286)
Keno Oct 24, 2022
1e31390
Merge pull request #47289 from JuliaLang/kf/oraclefailures
Keno Oct 24, 2022
0c382c2
lowering: fix lhs-decls not handling parameters (#47274)
apaz-cli Oct 24, 2022
0645427
[InteractiveUtils] win: handle empty clipboard errors (#47311)
vtjnash Oct 24, 2022
e50b32f
GC docs (#46607)
d-netto Oct 24, 2022
fe72f81
Standardize LLVM module verification (#46387)
pchintalapudi Oct 24, 2022
afbad45
Reduce size of Profile test on 32 bit to avoid OOM (#47313)
gbaraldi Oct 24, 2022
06b74c7
Update `partialsort!` docstring (#47192)
LilithHafner Oct 25, 2022
c69dca4
🤖 Bump the Pkg stdlib from ca9f44265 to b11ca0acd (#47316)
DilumAluthgeBot Oct 25, 2022
4a45e8b
test: make ComposedFunction inference test easier (#47317)
vtjnash Oct 25, 2022
35d1289
a couple of tidy ups on #47300 (#47320)
IanButterworth Oct 25, 2022
a490197
Better Libdl.dlopen error when using non-standard extension (#46998)
fingolfin Oct 25, 2022
a1ecc80
Add C/C++ diff: scope, modules, packages. (#37167)
ma-laforge Oct 25, 2022
1a7a131
Emit safepoints at function entry (#41616)
vchuravy Oct 25, 2022
d885fc7
Fix GC assertion on array of derived pointers (#47299)
wsmoses Oct 25, 2022
22ae80c
Typo in an example (that was commented out) (#47323)
sje30 Oct 25, 2022
f4101e9
[Zlib_jll] Upgrade to v1.2.13 (#47174)
giordano Oct 26, 2022
b902123
follow up #47294, fix constprop remarks (#47321)
aviatesk Oct 26, 2022
48abb72
doc: more info on sizehint! (#47235)
udohjeremiah Oct 26, 2022
7cbf55f
Widen RangeIndex from Int to BitInteger (#43262)
mkitti Oct 26, 2022
900ffef
[CompilerSupportLibraries_jll] Update to v0.5.3
giordano Oct 26, 2022
69fdf1f
Update docs to use `Threads.threadpoolsize` instead `Base.threadpools…
wookay Oct 26, 2022
d4af142
Merge pull request #47332 from giordano/mg/csl-win-staticlibs
vchuravy Oct 26, 2022
17515cd
subtype: fix miscount of Tuple Vararg matching
vtjnash Oct 26, 2022
19d06df
fix inference of `split_rest` (#47329)
simeonschaub Oct 26, 2022
0daab8a
Fix loading of AMDGPU and CUDA (#47334)
jpsamaroo Oct 27, 2022
8ff3358
fix formatting in `identify_package` docstring (#47335)
JeffBezanson Oct 27, 2022
eca5512
Merge pull request #47336 from JuliaLang/jn/47246
vchuravy Oct 27, 2022
2ebe577
cfg_simplify: Properly handle deleted multi-predecessor (#47306)
Keno Oct 27, 2022
70c873e
Returns -> Return (#47341)
fingolfin Oct 27, 2022
6baa9a6
inlining: Use concrete-eval effects if available (#47305)
Keno Oct 27, 2022
e09e96e
Avoid double copying in `nullspace` return value (#47340)
jishnub Oct 27, 2022
f71b839
lattice: Allow external lattice to have a say in how to widen (#47307)
Keno Oct 27, 2022
42563aa
🤖 Bump the Tar stdlib from 951955b to 6bfc114 (#47355)
DilumAluthgeBot Oct 27, 2022
a4438b3
Fix list syntax typo in documentation.md (#47365)
pierre-haessig Oct 28, 2022
3ead724
Fix RefArray(::AbstractArray{T}) method duplication (#47337)
mkitti Oct 28, 2022
594d001
correct 0x literal info (#47348)
udohjeremiah Oct 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ JULIACODEGEN := LLVM
ifeq ($(FORCE_ASSERTIONS), 1)
# C++ code needs to include LLVM header with the same assertion flag as LLVM
# Use this flag to re-enable assertion in our code after all the LLVM headers are included
CXX_DISABLE_ASSERTION :=
DISABLE_ASSERTIONS :=
CXX_DISABLE_ASSERTION := -DJL_VERIFY_PASSES
DISABLE_ASSERTIONS := -DJL_VERIFY_PASSES
else
CXX_DISABLE_ASSERTION := -DJL_NDEBUG
DISABLE_ASSERTIONS := -DNDEBUG -DJL_NDEBUG
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ Multi-threading changes
An interactive task desires low latency and implicitly agrees to be short duration or to
yield frequently. Interactive tasks will run on interactive threads, if any are specified
when Julia is started ([#42302]).
* Threads started outside the Julia runtime (e.g. from C or Java) can now become able to
call into Julia code by calling `jl_adopt_thread`. This is done automatically when
entering Julia code via `cfunction` or a `@ccallable` entry point. As a consequence, the
number of threads can now change during execution ([#46609]).

Build system changes
--------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ and then use the command prompt to change into the resulting julia directory. By
Julia. However, most users should use the [most recent stable version](https://github.com/JuliaLang/julia/releases)
of Julia. You can get this version by running:

git checkout v1.8.0
git checkout v1.8.2

To build the `julia` executable, run `make` from within the julia directory.

Expand Down
17 changes: 14 additions & 3 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ setproperty!(x::Tuple, f::Int, v, order::Symbol) = setfield!(x, f, v, order) # t
getproperty(x, f::Symbol, order::Symbol) = (@inline; getfield(x, f, order))
setproperty!(x, f::Symbol, v, order::Symbol) = (@inline; setfield!(x, f, convert(fieldtype(typeof(x), f), v), order))

swapproperty!(x, f::Symbol, v, order::Symbol=:notatomic) =
swapproperty!(x, f::Symbol, v, order::Symbol=:not_atomic) =
(@inline; Core.swapfield!(x, f, convert(fieldtype(typeof(x), f), v), order))
modifyproperty!(x, f::Symbol, op, v, order::Symbol=:notatomic) =
modifyproperty!(x, f::Symbol, op, v, order::Symbol=:not_atomic) =
(@inline; Core.modifyfield!(x, f, op, v, order))
replaceproperty!(x, f::Symbol, expected, desired, success_order::Symbol=:notatomic, fail_order::Symbol=success_order) =
replaceproperty!(x, f::Symbol, expected, desired, success_order::Symbol=:not_atomic, fail_order::Symbol=success_order) =
(@inline; Core.replacefield!(x, f, expected, convert(fieldtype(typeof(x), f), desired), success_order, fail_order))

convert(::Type{Any}, Core.@nospecialize x) = x
Expand Down Expand Up @@ -103,6 +103,17 @@ include("generator.jl")
include("reflection.jl")
include("options.jl")

# define invoke(f, T, args...; kwargs...), without kwargs wrapping
# to forward to invoke
function Core.kwcall(kwargs, ::typeof(invoke), f, T, args...)
@inline
# prepend kwargs and f to the invoked from the user
T = rewrap_unionall(Tuple{Any, Core.Typeof(f), (unwrap_unionall(T)::DataType).parameters...}, T)
return invoke(Core.kwcall, T, kwargs, f, args...)
end
# invoke does not have its own call cache, but kwcall for invoke does
typeof(invoke).name.mt.max_args = 3 # invoke, f, T, args...

# core operations & types
include("promotion.jl")
include("tuple.jl")
Expand Down
22 changes: 17 additions & 5 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,25 @@ axes1(iter) = oneto(length(iter))

Return an efficient array describing all valid indices for `a` arranged in the shape of `a` itself.

They keys of 1-dimensional arrays (vectors) are integers, whereas all other N-dimensional
The keys of 1-dimensional arrays (vectors) are integers, whereas all other N-dimensional
arrays use [`CartesianIndex`](@ref) to describe their locations. Often the special array
types [`LinearIndices`](@ref) and [`CartesianIndices`](@ref) are used to efficiently
represent these arrays of integers and `CartesianIndex`es, respectively.

Note that the `keys` of an array might not be the most efficient index type; for maximum
performance use [`eachindex`](@ref) instead.

# Examples
```jldoctest
julia> keys([4, 5, 6])
3-element LinearIndices{1, Tuple{Base.OneTo{Int64}}}:
1
2
3

julia> keys([4 5; 6 7])
CartesianIndices((2, 2))
```
"""
keys(a::AbstractArray) = CartesianIndices(axes(a))
keys(a::AbstractVector) = LinearIndices(a)
Expand All @@ -154,7 +166,7 @@ keys(a::AbstractVector) = LinearIndices(a)
keytype(A::AbstractArray)

Return the key type of an array. This is equal to the
`eltype` of the result of `keys(...)`, and is provided
[`eltype`](@ref) of the result of `keys(...)`, and is provided
mainly for compatibility with the dictionary interface.

# Examples
Expand All @@ -180,7 +192,7 @@ valtype(a::AbstractArray) = valtype(typeof(a))
valtype(T::Type{<:AbstractArray})
valtype(A::AbstractArray)

Return the value type of an array. This is identical to `eltype` and is
Return the value type of an array. This is identical to [`eltype`](@ref) and is
provided mainly for compatibility with the dictionary interface.

# Examples
Expand Down Expand Up @@ -226,7 +238,7 @@ eltype(::Type{<:AbstractArray{E}}) where {E} = @isdefined(E) ? E : Any
"""
elsize(type)

Compute the memory stride in bytes between consecutive elements of `eltype`
Compute the memory stride in bytes between consecutive elements of [`eltype`](@ref)
stored inside the given `type`, if the array elements are stored densely with a
uniform linear stride.

Expand Down Expand Up @@ -2870,7 +2882,7 @@ end
"""
isless(A::AbstractVector, B::AbstractVector)

Returns true when `A` is less than `B` in lexicographic order.
Return `true` when `A` is less than `B` in lexicographic order.
"""
isless(A::AbstractVector, B::AbstractVector) = cmp(A, B) < 0

Expand Down
27 changes: 22 additions & 5 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AbstractMatrix{T} = AbstractArray{T,2}
Union type of [`AbstractVector{T}`](@ref) and [`AbstractMatrix{T}`](@ref).
"""
const AbstractVecOrMat{T} = Union{AbstractVector{T}, AbstractMatrix{T}}
const RangeIndex = Union{Int, AbstractRange{Int}, AbstractUnitRange{Int}}
const RangeIndex = Union{<:BitInteger, AbstractRange{<:BitInteger}}
const DimOrInd = Union{Integer, AbstractUnitRange}
const IntOrInd = Union{Int, AbstractUnitRange}
const DimsOrInds{N} = NTuple{N,DimOrInd}
Expand Down Expand Up @@ -152,7 +152,7 @@ size(a::Array{<:Any,N}) where {N} = (@inline; ntuple(M -> size(a, M), Val(N))::D

asize_from(a::Array, n) = n > ndims(a) ? () : (arraysize(a,n), asize_from(a, n+1)...)

allocatedinline(T::Type) = (@_total_meta; ccall(:jl_stored_inline, Cint, (Any,), T) != Cint(0))
allocatedinline(@nospecialize T::Type) = (@_total_meta; ccall(:jl_stored_inline, Cint, (Any,), T) != Cint(0))

"""
Base.isbitsunion(::Type{T})
Expand Down Expand Up @@ -951,6 +951,18 @@ end

Store the given value at the given key or index within a collection. The syntax `a[i,j,...] =
x` is converted by the compiler to `(setindex!(a, x, i, j, ...); x)`.

# Examples
```jldoctest
julia> a = Dict("a"=>1)
Dict{String, Int64} with 1 entry:
"a" => 1

julia> setindex!(a, 2, "b")
Dict{String, Int64} with 2 entries:
"b" => 2
"a" => 1
```
"""
function setindex! end

Expand Down Expand Up @@ -1247,7 +1259,12 @@ end
"""
sizehint!(s, n) -> s

Suggest that collection `s` reserve capacity for at least `n` elements. This can improve performance.
Suggest that collection `s` reserve capacity for at least `n` elements. That is, if
you expect that you're going to have to push a lot of values onto `s`, you can avoid
the cost of incremental reallocation by doing it once up front; this can improve
performance.

See also [`resize!`](@ref).

# Notes on the performance model

Expand Down Expand Up @@ -2653,8 +2670,8 @@ julia> map(filter(iseven), [1:3, 2:4, 3:5])
[2, 4]
[4]
```
!!! compat "Julia 1.8"
This method requires at least Julia 1.8.
!!! compat "Julia 1.9"
This method requires at least Julia 1.9.
"""
function filter(f)
Fix1(filter, f)
Expand Down
2 changes: 1 addition & 1 deletion base/asyncevent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Waits until `testcb()` returns `true` or `timeout` seconds have passed, whicheve
The test function is polled every `pollint` seconds. The minimum value for `pollint` is 0.001 seconds,
that is, 1 millisecond.

Returns :ok or :timed_out
Return `:ok` or `:timed_out`.
"""
function timedwait(testcb, timeout::Real; pollint::Real=0.1)
pollint >= 1e-3 || throw(ArgumentError("pollint must be ≥ 1 millisecond"))
Expand Down
28 changes: 22 additions & 6 deletions base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1779,26 +1779,42 @@ end
# map across the chunks. Otherwise, fall-back to the AbstractArray method that
# iterates bit-by-bit.
function bit_map!(f::F, dest::BitArray, A::BitArray) where F
size(A) == size(dest) || throw(DimensionMismatch("sizes of dest and A must match"))
length(A) <= length(dest) || throw(DimensionMismatch("length of destination must be >= length of collection"))
isempty(A) && return dest
destc = dest.chunks
Ac = A.chunks
for i = 1:(length(Ac)-1)
len_Ac = length(Ac)
for i = 1:(len_Ac-1)
destc[i] = f(Ac[i])
end
destc[end] = f(Ac[end]) & _msk_end(A)
# the last effected UInt64's original content
dest_last = destc[len_Ac]
_msk = _msk_end(A)
# first zero out the bits mask is going to change
destc[len_Ac] = (dest_last & (~_msk))
# then update bits by `or`ing with a masked RHS
destc[len_Ac] |= f(Ac[len_Ac]) & _msk
dest
end
function bit_map!(f::F, dest::BitArray, A::BitArray, B::BitArray) where F
size(A) == size(B) == size(dest) || throw(DimensionMismatch("sizes of dest, A, and B must all match"))
min_bitlen = min(length(A), length(B))
min_bitlen <= length(dest) || throw(DimensionMismatch("length of destination must be >= length of smallest input collection"))
isempty(A) && return dest
isempty(B) && return dest
destc = dest.chunks
Ac = A.chunks
Bc = B.chunks
for i = 1:(length(Ac)-1)
len_Ac = min(length(Ac), length(Bc))
for i = 1:len_Ac-1
destc[i] = f(Ac[i], Bc[i])
end
destc[end] = f(Ac[end], Bc[end]) & _msk_end(A)
# the last effected UInt64's original content
dest_last = destc[len_Ac]
_msk = _msk_end(min_bitlen)
# first zero out the bits mask is going to change
destc[len_Ac] = (dest_last & ~(_msk))
# then update bits by `or`ing with a masked RHS
destc[len_Ac] |= f(Ac[end], Bc[end]) & _msk
dest
end

Expand Down
11 changes: 7 additions & 4 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,11 @@ include(m::Module, fname::String) = ccall(:jl_load_, Any, (Any, Any), m, fname)

eval(m::Module, @nospecialize(e)) = ccall(:jl_toplevel_eval_in, Any, (Any, Any), m, e)

kwfunc(@nospecialize(f)) = ccall(:jl_get_keyword_sorter, Any, (Any,), f)

kwftype(@nospecialize(t)) = typeof(ccall(:jl_get_kwsorter, Any, (Any,), t))
# dispatch token indicating a kwarg (keyword sorter) call
function kwcall end
# deprecated internal functions:
kwfunc(@nospecialize(f)) = kwcall
kwftype(@nospecialize(t)) = typeof(kwcall)

mutable struct Box
contents::Any
Expand Down Expand Up @@ -615,7 +617,8 @@ end

NamedTuple() = NamedTuple{(),Tuple{}}(())

NamedTuple{names}(args::Tuple) where {names} = NamedTuple{names,typeof(args)}(args)
eval(Core, :(NamedTuple{names}(args::Tuple) where {names} =
$(Expr(:splatnew, :(NamedTuple{names,typeof(args)}), :args))))

using .Intrinsics: sle_int, add_int

Expand Down
Loading