From 40f2241b3d9a9adc976edbf14d8c4d41556a5646 Mon Sep 17 00:00:00 2001 From: arfy slowy Date: Sun, 15 Aug 2021 20:20:15 +0700 Subject: [PATCH] fix: typo spelling grammar (#41883) --- base/compiler/tfuncs.jl | 2 +- src/cgutils.cpp | 4 ++-- src/features_x86.h | 2 +- src/gf.c | 2 +- src/interpreter.c | 2 +- src/llvm-late-gc-lowering.cpp | 2 +- src/llvm-lower-handlers.cpp | 2 +- test/compiler/inference.jl | 2 +- test/compiler/irpasses.jl | 2 +- test/show.jl | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index b7d280cc15c1b7..a43c9dd9afff10 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1177,7 +1177,7 @@ function apply_type_nothrow(argtypes::Array{Any, 1}, @nospecialize(rt)) else return false end - # We know the apply_type is well formed. Oherwise our rt would have been + # We know the apply_type is well formed. Otherwise our rt would have been # Bottom (or Type). (headtype === Union) && return true isa(rt, Const) && return true diff --git a/src/cgutils.cpp b/src/cgutils.cpp index a453393bbd2cc3..95bb7f46a21e5d 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -234,7 +234,7 @@ static Value *julia_pgv(jl_codectx_t &ctx, const char *cname, void *addr) false, GlobalVariable::PrivateLinkage, NULL, localname); // LLVM passes sometimes strip metadata when moving load around - // since the load at the new location satisfy the same condition as the origional one. + // since the load at the new location satisfy the same condition as the original one. // Mark the global as constant to LLVM code using our own metadata // which is much less likely to be striped. gv->setMetadata("julia.constgv", MDNode::get(gv->getContext(), None)); @@ -2407,7 +2407,7 @@ static Value *emit_arrayptr_internal(jl_codectx_t &ctx, const jl_cgval_t &tinfo, ctx.builder.CreateStructGEP(jl_array_llvmt, emit_bitcast(ctx, t, jl_parray_llvmt), 0); // index (not offset) of data field in jl_parray_llvmt - // Normally allocated array of 0 dimention always have a inline pointer. + // Normally allocated array of 0 dimension always have a inline pointer. // However, we can't rely on that here since arrays can also be constructed from C pointers. MDNode *tbaa = arraytype_constshape(tinfo.typ) ? tbaa_const : tbaa_arrayptr; PointerType *PT = cast(addr->getType()); diff --git a/src/features_x86.h b/src/features_x86.h index ad6a5eb1e515ae..3ef71fb217db69 100644 --- a/src/features_x86.h +++ b/src/features_x86.h @@ -33,7 +33,7 @@ JL_FEATURE_DEF(bmi, 32 * 2 + 3, 0) // JL_FEATURE_DEF(hle, 32 * 2 + 4, 0) // Not used and gone in LLVM 5.0 JL_FEATURE_DEF(avx2, 32 * 2 + 5, 0) JL_FEATURE_DEF(bmi2, 32 * 2 + 8, 0) -// JL_FEATURE_DEF(invpcid, 32 * 2 + 10, 0) // Priviledged instruction +// JL_FEATURE_DEF(invpcid, 32 * 2 + 10, 0) // Privileged instruction JL_FEATURE_DEF(rtm, 32 * 2 + 11, 0) // JL_FEATURE_DEF(mpx, 32 * 2 + 14, 0) // Deprecated in LLVM 10.0 JL_FEATURE_DEF(avx512f, 32 * 2 + 16, 0) diff --git a/src/gf.c b/src/gf.c index 41381ccc5178e8..52180279ab5c2b 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1351,7 +1351,7 @@ static void invalidate_external(jl_method_instance_t *mi, size_t max_world) { jl_printf((JL_STREAM*)STDERR_FILENO, "error in invalidation callback: "); jl_static_show((JL_STREAM*)STDERR_FILENO, jl_current_exception()); jl_printf((JL_STREAM*)STDERR_FILENO, "\n"); - jlbacktrace(); // writen to STDERR_FILENO + jlbacktrace(); // written to STDERR_FILENO } } } diff --git a/src/interpreter.c b/src/interpreter.c index 7858bd6ddc4eae..1ae6507ef334ee 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -516,7 +516,7 @@ static jl_value_t *eval_body(jl_array_t *stmts, interpreter_state *s, size_t ip, s->continue_at = 0; continue; } - else { // a real exeception + else { // a real exception ip = catch_ip; continue; } diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp index d8ad3d62d4cc1d..0aac7638be0d22 100644 --- a/src/llvm-late-gc-lowering.cpp +++ b/src/llvm-late-gc-lowering.cpp @@ -1573,7 +1573,7 @@ State LateLowerGCFrame::LocalScan(Function &F) { for (Use &U : CI->arg_operands()) { // Find all callee rooted arguments. // Record them instead of simply remove them from live values here - // since they can be useful during refinment + // since they can be useful during refinement // (e.g. to remove roots of objects that are refined to these) Value *V = U; if (isa(V) || !isa(V->getType()) || diff --git a/src/llvm-lower-handlers.cpp b/src/llvm-lower-handlers.cpp index 7382f3b74c0801..ae5a6f3b0c11d0 100644 --- a/src/llvm-lower-handlers.cpp +++ b/src/llvm-lower-handlers.cpp @@ -176,7 +176,7 @@ bool LowerExcHandlers::runOnFunction(Function &F) { /* Step 2: EH Frame lowering */ // Allocate stack space for each handler. We allocate these as separate - // allocas so the optimizer can later merge and reaarange them if it wants + // allocas so the optimizer can later merge and rearrange them if it wants // to. Value *handler_sz = ConstantInt::get(Type::getInt32Ty(F.getContext()), sizeof(jl_handler_t)); diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index c03bb25358e2e5..6bd8df57e8a8ab 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -2669,7 +2669,7 @@ const DenseIdx = Union{IntRange,Integer} foo_26724((result..., length(r)), I...) @test @inferred(foo_26724((), 1:4, 1:5, 1:6)) === (4, 5, 6) -# Non uniformity in expresions with PartialTypeVar +# Non uniformity in expressions with PartialTypeVar @test Core.Compiler.:⊑(Core.Compiler.PartialTypeVar(TypeVar(:N), true, true), TypeVar) let N = TypeVar(:N) @test Core.Compiler.apply_type_nothrow([Core.Compiler.Const(NTuple), diff --git a/test/compiler/irpasses.jl b/test/compiler/irpasses.jl index 3be15ef9cc3172..c4e3023184c13c 100644 --- a/test/compiler/irpasses.jl +++ b/test/compiler/irpasses.jl @@ -128,7 +128,7 @@ let nt = (a=1, b=2) @test_throws ArgumentError blah31139(nt) end -# Expr(:new) annoted as PartialStruct +# Expr(:new) annotated as PartialStruct struct FooPartial x y diff --git a/test/show.jl b/test/show.jl index 1552214d2516eb..cb9e2e9fc3b8fc 100644 --- a/test/show.jl +++ b/test/show.jl @@ -1825,7 +1825,7 @@ end @test showstr(Dict(true=>false)) == "Dict{Bool, Bool}(1 => 0)" @test showstr(Dict((1 => 2) => (3 => 4))) == "Dict((1 => 2) => (3 => 4))" - # issue #27979 (dislaying arrays of pairs containing arrays as first member) + # issue #27979 (displaying arrays of pairs containing arrays as first member) @test replstr([[1.0]=>1.0]) == "1-element Vector{Pair{Vector{Float64}, Float64}}:\n [1.0] => 1.0" # issue #28159