Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos [nfc] #51709

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Standard library changes
([#46196]).
* Adjoints and transposes of `Factorization` objects are no longer wrapped in `Adjoint`
and `Transpose` wrappers, respectively. Instead, they are wrapped in
`AdjointFactorization` and `TranposeFactorization` types, which themselves subtype
`AdjointFactorization` and `TransposeFactorization` types, which themselves subtype
`Factorization` ([#46874]).
* New functions `hermitianpart` and `hermitianpart!` for extracting the Hermitian
(real symmetric) part of a matrix ([#31836]).
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Command-line option changes
---------------------------

* The entry point for Julia has been standardized to `Main.main(ARGS)`. This must be explicitly opted into using the `@main` macro
(see the docstring for futher details). When opted-in, and julia is invoked to run a script or expression
(see the docstring for further details). When opted-in, and julia is invoked to run a script or expression
(i.e. using `julia script.jl` or `julia -e expr`), julia will subsequently run the `Main.main` function automatically.
This is intended to unify script and compilation workflows, where code loading may happen
in the compiler and execution of `Main.main` may happen in the resulting executable. For interactive use, there is no semantic
Expand Down
2 changes: 1 addition & 1 deletion base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ make_makeargs(args::Tuple) = _make_makeargs(args, 1)[1]
end
_make_makeargs(::Tuple{}, n::Int) = (), n

# A help struct to store the flattened index staticly
# A help struct to store the flattened index statically
struct Pick{N} <: Function end
(::Pick{N})(@nospecialize(args::Tuple)) where {N} = args[N]

Expand Down
2 changes: 1 addition & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ In the `julia` driver, if `Main.main` is marked as an entrypoint, it will be aut
the completion of script execution.

The `@main` macro may be used standalone or as part of the function definition, though in the latter
case, parenthese are required. In particular, the following are equivalent:
case, parentheses are required. In particular, the following are equivalent:

```
function (@main)(ARGS)
Expand Down
6 changes: 3 additions & 3 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ function semi_concrete_eval_call(interp::AbstractInterpreter,
if !(isa(rt, Type) && hasintersect(rt, Bool))
ir = irsv.ir
# TODO (#48913) enable double inlining pass when there are any calls
# that are newly resovled by irinterp
# that are newly resolved by irinterp
# state = InliningState(interp)
# ir = ssa_inlining_pass!(irsv.ir, state, propagate_inbounds(irsv))
effects = result.effects
Expand Down Expand Up @@ -1219,7 +1219,7 @@ end
conditional_argtypes::ConditionalArgtypes)

The implementation is able to forward `Conditional` of `conditional_argtypes`,
as well as the other general extended lattice inforamtion.
as well as the other general extended lattice information.
"""
function matching_cache_argtypes(𝕃::AbstractLattice, linfo::MethodInstance,
conditional_argtypes::ConditionalArgtypes)
Expand Down Expand Up @@ -2309,7 +2309,7 @@ function abstract_call(interp::AbstractInterpreter, arginfo::ArgInfo, sv::Infere
si = StmtInfo(!call_result_unused(sv, sv.currpc))
(; rt, effects, info) = abstract_call(interp, arginfo, si, sv)
sv.stmt_info[sv.currpc] = info
# mark this call statement as DCE-elgible
# mark this call statement as DCE-eligible
# TODO better to do this in a single pass based on the `info` object at the end of abstractinterpret?
return RTEffects(rt, effects)
end
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/abstractlattice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ end
Appropriately converts inferred type of a return value `rt` to such a type
that we know we can store in the cache and is valid and good inter-procedurally,
E.g. if `rt isa Conditional` then `rt` should be converted to `InterConditional`
or the other cachable lattice element.
or the other cacheable lattice element.

External lattice `𝕃ᵢ::ExternalLattice` may overload:
- `widenreturn(𝕃ᵢ::ExternalLattice, @nospecialize(rt), info::BestguessInfo)`
Expand Down
4 changes: 2 additions & 2 deletions base/compiler/inferencestate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ function compute_trycatch(code::Vector{Any}, ip::BitSet)
# 3: (expr) # == 1
# 3: (leave %1) # == 1
# 4: (expr) # == 0
# then we can find all trys by walking backwards from :enter statements,
# and all catches by looking at the statement after the :enter
# then we can find all `try`s by walking backwards from :enter statements,
# and all `catch`es by looking at the statement after the :enter
n = length(code)
empty!(ip)
ip.offset = 0 # for _bits_findnext
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/ssair/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ We get:
└── return %3 │
```

Even though we were in the `f` scope since the first statement, it tooks us two statements
Even though we were in the `f` scope since the first statement, it took us two statements
to catch up and print the intermediate scopes. Which scope is printed is indicated both
by the indentation of the method name and by an increased thickness of the appropriate
line for the scope.
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ function apply_type_nothrow(𝕃::AbstractLattice, argtypes::Vector{Any}, @nospe
(headtype === Union) && return true
isa(rt, Const) && return true
u = headtype
# TODO: implement optimization for isvarargtype(u) and istuple occurences (which are valid but are not UnionAll)
# TODO: implement optimization for isvarargtype(u) and istuple occurrences (which are valid but are not UnionAll)
for i = 2:length(argtypes)
isa(u, UnionAll) || return false
ai = widenconditional(argtypes[i])
Expand Down
2 changes: 1 addition & 1 deletion base/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ end

`PersistentDict` is a dictionary implemented as an hash array mapped trie,
which is optimal for situations where you need persistence, each operation
returns a new dictonary separate from the previous one, but the underlying
returns a new dictionary separate from the previous one, but the underlying
implementation is space-efficient and may share storage across multiple
separate dictionaries.

Expand Down
4 changes: 2 additions & 2 deletions base/hamt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export HAMT
#
# At each level we use a 32bit bitmap to store which elements are occupied.
# Since our storage is "sparse" we need to map from index in [0,31] to
# the actual storage index. We mask the bitmap wiht (1 << i) - 1 and count
# the actual storage index. We mask the bitmap with (1 << i) - 1 and count
# the ones in the result. The number of set ones (+1) gives us the index
# into the storage array.
#
# HAMT can be both persitent and non-persistent.
# HAMT can be both persistent and non-persistent.
# The `path` function searches for a matching entries, and for persistency
# optionally copies the path so that it can be safely mutated.

Expand Down
2 changes: 1 addition & 1 deletion base/libc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Interface to libc, the C standard library.
""" Libc

import Base: transcode, windowserror, show
# these need to be defined seperately for bootstrapping but belong to Libc
# these need to be defined separately for bootstrapping but belong to Libc
import Base: memcpy, memmove, memset, memcmp
import Core.Intrinsics: bitcast

Expand Down
2 changes: 1 addition & 1 deletion base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ struct CodegenParams
using the `swiftself` convention, which in the ordinary case means that the
pointer is kept in a register and accesses are thus very fast. If this option
is disabled, the task local state pointer must be loaded from thread local
stroage, which incurs a small amount of additional overhead. The option is enabled by
storage, which incurs a small amount of additional overhead. The option is enabled by
default.
"""
gcstack_arg::Cint
Expand Down
2 changes: 1 addition & 1 deletion base/reinterpretarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ end
"""
CyclePadding(padding, total_size)

Cylces an iterator of `Padding` structs, restarting the padding at `total_size`.
Cycles an iterator of `Padding` structs, restarting the padding at `total_size`.
E.g. if `padding` is all the padding in a struct and `total_size` is the total
aligned size of that array, `CyclePadding` will correspond to the padding in an
infinite vector of such structs.
Expand Down
4 changes: 2 additions & 2 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ Next, we [`ConsiderCountingSort`](@ref). If the range the input is small compare
length, we apply [`CountingSort`](@ref).

Next, we [`ConsiderRadixSort`](@ref). This is similar to the dispatch to counting sort,
but we conside rthe number of _bits_ in the range, rather than the range itself.
but we consider the number of _bits_ in the range, rather than the range itself.
Consequently, we apply [`RadixSort`](@ref) for any reasonably long inputs that reach this
stage.

Expand Down Expand Up @@ -1367,7 +1367,7 @@ algorithms).
Elements are first transformed with the function `by` and then compared
according to either the function `lt` or the ordering `order`. Finally, the
resulting order is reversed if `rev=true` (this preserves forward stability:
elements that compare equal are not reversed). The current implemention applies
elements that compare equal are not reversed). The current implementation applies
the `by` transformation before each comparison rather than once per element.

Passing an `lt` other than `isless` along with an `order` other than
Expand Down
2 changes: 1 addition & 1 deletion base/strings/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ end

Shifts | 0 4 10 14 18 24 8 20 12 26

The shifts that represent each state were derived using teh SMT solver Z3, to ensure when encoded into
The shifts that represent each state were derived using the SMT solver Z3, to ensure when encoded into
the rows the correct shift was a result.

Each character class row is encoding 10 states with shifts as defined above. By shifting the bitsof a row by
Expand Down
6 changes: 3 additions & 3 deletions base/toml_parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ mutable struct Parser
# Filled in in case we are parsing a file to improve error messages
filepath::Union{String, Nothing}

# Get's populated with the Dates stdlib if it exists
# Gets populated with the Dates stdlib if it exists
Dates::Union{Module, Nothing}
end

Expand Down Expand Up @@ -367,7 +367,7 @@ end
@inline peek(l::Parser) = l.current_char

# Return true if the character was accepted. When a character
# is accepted it get's eaten and we move to the next character
# is accepted it gets eaten and we move to the next character
@inline function accept(l::Parser, f::Union{Function, Char})::Bool
c = peek(l)
c == EOF_CHAR && return false
Expand Down Expand Up @@ -665,7 +665,7 @@ end
#########

function push!!(v::Vector, el)
# Since these types are typically non-inferrable, they are a big invalidation risk,
# Since these types are typically non-inferable, they are a big invalidation risk,
# and since it's used by the package-loading infrastructure the cost of invalidation
# is high. Therefore, this is written to reduce the "exposed surface area": e.g., rather
# than writing `T[el]` we write it as `push!(Vector{T}(undef, 1), el)` so that there
Expand Down
2 changes: 1 addition & 1 deletion base/version.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const VInt = UInt32
Version number type which follows the specifications of
[semantic versioning (semver)](https://semver.org/), composed of major, minor
and patch numeric values, followed by pre-release and build
alpha-numeric annotations.
alphanumeric annotations.

`VersionNumber` objects can be compared with all of the standard comparison
operators (`==`, `<`, `<=`, etc.), with the result following semver rules.
Expand Down
2 changes: 1 addition & 1 deletion contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# Prevent this from putting anyting into the Main namespace
# Prevent this from putting anything into the Main namespace
@eval Module() begin

if Threads.maxthreadid() != 1
Expand Down
2 changes: 1 addition & 1 deletion contrib/mac/frameworkapp/JuliaLauncher/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ + (ExecSandboxController *)sharedController {

@end

/// Location of an installed variant of Julia (frameowrk or nix hier).
/// Location of an installed variant of Julia (framework or nix hier).
@interface JuliaVariant : NSObject
@property(readonly, nullable) NSBundle *bundle;
@property(readonly, nonnull) NSURL *juliaexe;
Expand Down
2 changes: 1 addition & 1 deletion deps/valgrind/valgrind.h
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ typedef

/* Use these to write the name of your wrapper. NOTE: duplicates
VG_WRAP_FUNCTION_Z{U,Z} in pub_tool_redir.h. NOTE also: inserts
the default behaviour equivalance class tag "0000" into the name.
the default behaviour equivalence class tag "0000" into the name.
See pub_tool_redir.h for details -- normally you don't need to
think about this, though. */

Expand Down
6 changes: 3 additions & 3 deletions doc/src/base/scopedvalues.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ end

@sync begin
# If we instead pass a unique dictionary to each
# task we can access the dictonaries race free.
# task we can access the dictionaries race free.
with(sval_dict => Dict()) do
@spawn (sval_dict[][:a] = 3)
end
Expand All @@ -166,7 +166,7 @@ const LEVEL = ScopedValue(:GUEST)
function serve(request, response)
level = isAdmin(request) ? :ADMIN : :GUEST
with(LEVEL => level) do
Threads.@spawn handle(request, respone)
Threads.@spawn handle(request, response)
end
end

Expand Down Expand Up @@ -194,7 +194,7 @@ const sval_dict = ScopedValue(Dict())

# If you want to add new values to the dict, instead of replacing
# it, unshare the values explicitly. In this example we use `merge`
# to unshare the state of the dictonary in parent scope.
# to unshare the state of the dictionary in parent scope.
@sync begin
with(sval_dict => merge(sval_dict[], Dict(:a => 10))) do
@spawn @show sval_dict[][:a]
Expand Down
2 changes: 1 addition & 1 deletion doc/src/devdocs/pkgimg.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Dynamic libraries on macOS need to link against `-lSystem`. On recent macOS vers
To that effect we link with `-undefined dynamic_lookup`.

## [Package images optimized for multiple microarchitectures](@id pkgimgs-multi-versioning)
Similar to [multi-versioning](@ref sysimg-multi-versioning) for system images, package images support multi-versioning. If you are in a heterogenous environment, with a unified cache,
Similar to [multi-versioning](@ref sysimg-multi-versioning) for system images, package images support multi-versioning. If you are in a heterogeneous environment, with a unified cache,
DilumAluthge marked this conversation as resolved.
Show resolved Hide resolved
you can set the environment variable `JULIA_CPU_TARGET=generic` to multi-version the object caches.

## Flags that impact package image creation and selection
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/command-line-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ $
```

However, note that the current best practice recommendation is to not mix application and reusable library
code in the same package. Helper applications may be distributed as separate pacakges or as scripts with
code in the same package. Helper applications may be distributed as separate packages or as scripts with
separate `main` entry points in a package's `bin` folder.

## Parallel mode
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ modules. We will see how to manage name clashes below.

To mark a name as public without exporting it into the namespace of folks who call `using NiceStuff`,
one can use `public` instead of `export`. This marks the public name(s) as part of the public API,
but does not have any namespace implications. The `public` keyword is only availiable in Julia 1.11
but does not have any namespace implications. The `public` keyword is only available in Julia 1.11
and above. To maintain compatibility with Julia 1.10 and below, use the `@compat` macro from the
[Compat](https://github.com/JuliaLang/Compat.jl) package.

Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/noteworthy-differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ For users coming to Julia from R, these are some noteworthy differences:
paths to the `Base.LOAD_PATH` array.
* Packages from directory-based repositories do not require the `Pkg.add()` tool prior to
being loaded with `import` or `using`. They are simply available to the project.
* Directory-based package repositories are the **quickest solution** to developping local
* Directory-based package repositories are the **quickest solution** to developing local
libraries of "software modules".

### Julia &hArr; C/C++: Assembling modules
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ Version numbers can easily be expressed with non-standard string literals of the
Version number literals create [`VersionNumber`](@ref) objects which follow the
specifications of [semantic versioning](https://semver.org/),
and therefore are composed of major, minor and patch numeric values, followed by pre-release and
build alpha-numeric annotations. For example, `v"0.2.1-rc1+win64"` is broken into major version
build alphanumeric annotations. For example, `v"0.2.1-rc1+win64"` is broken into major version
`0`, minor version `2`, patch version `1`, pre-release `rc1` and build `win64`. When entering
a version literal, everything except the major version number is optional, therefore e.g. `v"0.2"`
is equivalent to `v"0.2.0"` (with empty pre-release/build annotations), `v"2"` is equivalent to
Expand Down
2 changes: 1 addition & 1 deletion src/aotcompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ static auto serializeModule(const Module &M) {
// Modules are deserialized lazily by LLVM, to avoid deserializing
// unnecessary functions. We take advantage of this by serializing
// the entire module once, then deleting the bodies of functions
// that are not in this partition. Once unnecesary functions are
// that are not in this partition. Once unnecessary functions are
// deleted, we then materialize the entire module to make use-lists
// consistent.
static void materializePreserved(Module &M, Partition &partition) {
Expand Down
2 changes: 1 addition & 1 deletion src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3167,7 +3167,7 @@ static jl_value_t *static_constant_instance(const llvm::DataLayout &DL, Constant
if (const auto *CC = dyn_cast<ConstantAggregate>(constant))
nargs = CC->getNumOperands();
else if (const auto *CAZ = dyn_cast<ConstantAggregateZero>(constant)) {
// SVE: Elsewhere we use `getMinKownValue`
// SVE: Elsewhere we use `getMinKnownValue`
nargs = CAZ->getElementCount().getFixedValue();
}
else if (const auto *CDS = dyn_cast<ConstantDataSequential>(constant))
Expand Down
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6349,7 +6349,7 @@ static Function* gen_cfun_wrapper(
BasicBlock *unboxedBB = BasicBlock::Create(ctx.builder.getContext(), "maybe-unboxed", cw);
BasicBlock *isanyBB = BasicBlock::Create(ctx.builder.getContext(), "any", cw);
BasicBlock *afterBB = BasicBlock::Create(ctx.builder.getContext(), "after", cw);
Value *isrtboxed = ctx.builder.CreateIsNull(val); // XXX: this is the wrong condition and should be inspecting runtime_dt intead
Value *isrtboxed = ctx.builder.CreateIsNull(val); // XXX: this is the wrong condition and should be inspecting runtime_dt instead
ctx.builder.CreateCondBr(isrtboxed, boxedBB, loadBB);
ctx.builder.SetInsertPoint(boxedBB);
Value *p1 = ctx.builder.CreateBitCast(val, ctx.types().T_pjlvalue);
Expand Down
2 changes: 1 addition & 1 deletion src/flisp/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static uint32_t peek(fl_context_t *fl_ctx)
fl_ctx->readtokval = fixnum(x);
}
else if (c == '!') {
// #! single line comment for shbang script support
// #! single line comment for shebang script support
do {
ch = ios_getc(readF(fl_ctx));
} while (ch != IOS_EOF && (char)ch != '\n');
Expand Down
2 changes: 1 addition & 1 deletion src/gc-heap-snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct Node {
size_t id; // This should be a globally-unique counter, but we use the memory address
size_t self_size;
size_t trace_node_id; // This is ALWAYS 0 in Javascript heap-snapshots.
// whether the from_node is attached or dettached from the main application state
// whether the from_node is attached or detached from the main application state
// https://github.com/nodejs/node/blob/5fd7a72e1c4fbaf37d3723c4c81dce35c149dc84/deps/v8/include/v8-profiler.h#L739-L745
int detachedness; // 0 - unknown, 1 - attached, 2 - detached
SmallVector<Edge, 0> edges;
Expand Down
4 changes: 2 additions & 2 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2811,7 +2811,7 @@ void gc_drain_own_chunkqueue(jl_ptls_t ptls, jl_gc_markqueue_t *mq)
}

// Main mark loop. Stack (allocated on the heap) of `jl_value_t *`
// is used to keep track of processed items. Maintaning this stack (instead of
// is used to keep track of processed items. Maintaining this stack (instead of
// native one) avoids stack overflow when marking deep objects and
// makes it easier to implement parallel marking via work-stealing
JL_EXTENSION NOINLINE void gc_mark_loop_serial(jl_ptls_t ptls)
Expand Down Expand Up @@ -2846,7 +2846,7 @@ void gc_mark_and_steal(jl_ptls_t ptls)
goto pop;
}
// Note that for the stealing heuristics, we try to
// steal chunks much more agressively than pointers,
// steal chunks much more aggressively than pointers,
// since we know chunks will likely expand into a lot
// of work for the mark loop
steal : {
Expand Down
Loading