diff --git a/scripts/clusterfuzz/run.py b/scripts/clusterfuzz/run.py index abd1d5ad5ba..811c4be85e2 100755 --- a/scripts/clusterfuzz/run.py +++ b/scripts/clusterfuzz/run.py @@ -87,7 +87,7 @@ # Enable all features but disable ones not yet ready for fuzzing. This may # be a smaller set than fuzz_opt.py, as that enables a few experimental # flags, while here we just fuzz with d8's --wasm-staging. This should be - # synchonized with bundle_clusterfuzz. + # synchronized with bundle_clusterfuzz. '-all', '--disable-shared-everything', '--disable-fp16', diff --git a/scripts/test/generate_atomic_spec_test.py b/scripts/test/generate_atomic_spec_test.py index 0b98b98579c..51b06767028 100644 --- a/scripts/test/generate_atomic_spec_test.py +++ b/scripts/test/generate_atomic_spec_test.py @@ -147,7 +147,7 @@ def func(): ) """ return f''';; Memory index must come before memory ordering if present. -;; Both immediates are optional; an ommitted memory ordering will be treated as seqcst. +;; Both immediates are optional; an omitted memory ordering will be treated as seqcst. (func $test-all-ops {indent(newline.join(statement(template, mem_idx, mem_ptr_type, ordering) for template, (mem_idx, mem_ptr_type), ordering in all_combinations()))} )''' diff --git a/src/analysis/lattice.h b/src/analysis/lattice.h index 977bea0d5a9..f0de5e07e25 100644 --- a/src/analysis/lattice.h +++ b/src/analysis/lattice.h @@ -61,7 +61,7 @@ concept Lattice = requires(const L& lattice, // The analysis framework only uses bottom elements and least upper bounds (i.e. // joins) directly, so lattices do not necessarily need to implement top -// elements and greatest lower bounds (i.e. meets) to be useable, even though +// elements and greatest lower bounds (i.e. meets) to be usable, even though // they are required for mathematical lattices. Implementing top elements and // meets does have the benefit of making a lattice generically invertable, // though. See lattices/inverted.h. diff --git a/src/analysis/monotone-analyzer.h b/src/analysis/monotone-analyzer.h index 91251103248..a24c38baef1 100644 --- a/src/analysis/monotone-analyzer.h +++ b/src/analysis/monotone-analyzer.h @@ -22,7 +22,7 @@ template class MonotoneCFGAnalyzer { std::vector states; public: - // Will constuct BlockState objects corresponding to BasicBlocks from the + // Will construct BlockState objects corresponding to BasicBlocks from the // given CFG. MonotoneCFGAnalyzer(L& lattice, TxFn& txfn, CFG& cfg); diff --git a/src/analysis/reaching-definitions-transfer-function.h b/src/analysis/reaching-definitions-transfer-function.h index 7a4fe1afcbe..3cca04839d4 100644 --- a/src/analysis/reaching-definitions-transfer-function.h +++ b/src/analysis/reaching-definitions-transfer-function.h @@ -26,7 +26,7 @@ namespace wasm::analysis { // When collecting results, the transfer function takes the states and converts // it into a map of LocalGets to LocalSets which affect it. The fictitious -// inital value LocalSetes will be converted to nullptrs. +// initial value LocalSetes will be converted to nullptrs. class ReachingDefinitionsTransferFunction : public VisitorTransferFunc fakeInitialValueSets; @@ -54,7 +54,7 @@ class ReachingDefinitionsTransferFunction // Helper function which creates fictitious LocalSets for a function, // inserts them into fakeInitialValueSets and fakeSetPtrs. It returns a // vector of actual LocalSets in the function and fictitious LocalSets for - // use when instatitating the lattice. + // use when instantiating the lattice. static std::vector listLocalSets(Function* func, std::vector& fakeInitialValueSets, diff --git a/src/binaryen-c.h b/src/binaryen-c.h index 10225ce027a..63a8020e095 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -3062,7 +3062,7 @@ BINARYEN_API void BinaryenModulePrintStackIR(BinaryenModuleRef module); BINARYEN_API void BinaryenModulePrintAsmjs(BinaryenModuleRef module); // Validate a module, showing errors on problems. -// @return 0 if an error occurred, 1 if validated succesfully +// @return 0 if an error occurred, 1 if validated successfully BINARYEN_API bool BinaryenModuleValidate(BinaryenModuleRef module); // Runs the standard optimization passes on the module. Uses the currently set @@ -3283,7 +3283,7 @@ BINARYEN_API BinaryenModuleAllocateAndWriteResult BinaryenModuleAllocateAndWrite(BinaryenModuleRef module, const char* sourceMapUrl); -// Serialize a module in s-expression form. Implicity allocates the returned +// Serialize a module in s-expression form. Implicitly allocates the returned // char* with malloc(), and expects the user to free() them manually // once not needed anymore. BINARYEN_API char* BinaryenModuleAllocateAndWriteText(BinaryenModuleRef module); diff --git a/src/cfg/Relooper.h b/src/cfg/Relooper.h index 28a19033196..b89c8a39ffd 100644 --- a/src/cfg/Relooper.h +++ b/src/cfg/Relooper.h @@ -15,7 +15,7 @@ */ /* -This is an optimized C++ implemention of the Relooper algorithm originally +This is an optimized C++ implementation of the Relooper algorithm originally developed as part of Emscripten. This implementation includes optimizations added since the original academic paper [1] was published about it. diff --git a/src/cfg/cfg-traversal.h b/src/cfg/cfg-traversal.h index 2afc76a6835..ca5021e9696 100644 --- a/src/cfg/cfg-traversal.h +++ b/src/cfg/cfg-traversal.h @@ -304,7 +304,7 @@ struct CFGWalker : public PostWalker { } } - // Exception thrown. Note outselves so that we will create a link to each + // Exception thrown. Note ourselves so that we will create a link to each // catch within the try / each destination block within the try_table when // we get there. self->throwingInstsStack[i].push_back(self->currBasicBlock); diff --git a/src/ir/ExpressionManipulator.cpp b/src/ir/ExpressionManipulator.cpp index 51ed7552d48..23a36ebdcc7 100644 --- a/src/ir/ExpressionManipulator.cpp +++ b/src/ir/ExpressionManipulator.cpp @@ -21,7 +21,7 @@ namespace wasm::ExpressionManipulator { Expression* flexibleCopy(Expression* original, Module& wasm, CustomCopier custom) { - // Perform the copy using a stack of tasks (avoiding recusion). + // Perform the copy using a stack of tasks (avoiding recursion). struct CopyTask { // The thing to copy. Expression* original; diff --git a/src/ir/child-typer.h b/src/ir/child-typer.h index 07b7004b8c8..132a0168855 100644 --- a/src/ir/child-typer.h +++ b/src/ir/child-typer.h @@ -22,7 +22,7 @@ namespace wasm { -// CRTP visitor for determining constaints on the types of expression children. +// CRTP visitor for determining constraints on the types of expression children. // For each child of the visited expression, calls a callback with the VarTypes // giving the constraint on the child: // diff --git a/src/ir/eh-utils.cpp b/src/ir/eh-utils.cpp index 43fd1627d31..19f48477a70 100644 --- a/src/ir/eh-utils.cpp +++ b/src/ir/eh-utils.cpp @@ -42,7 +42,7 @@ getFirstPop(Expression* catchBody, bool& isPopNested, Expression**& popPtr) { auto* implicitBlock = catchBody->dynCast(); // Go down the line for the first child until we reach a leaf. A pop should be - // in that first-decendant line. + // in that first-descendant line. Expression** firstChildPtr = nullptr; while (true) { if (firstChild->is()) { diff --git a/src/ir/manipulation.h b/src/ir/manipulation.h index 1ad2b1161bb..dbb34edbe66 100644 --- a/src/ir/manipulation.h +++ b/src/ir/manipulation.h @@ -26,7 +26,7 @@ template inline OutputType* convert(InputType* input) { static_assert(sizeof(OutputType) <= sizeof(InputType), "Can only convert to a smaller size Expression node"); - input->~InputType(); // arena-allocaed, so no destructor, but avoid UB. + input->~InputType(); // arena-allocated, so no destructor, but avoid UB. OutputType* output = (OutputType*)(input); new (output) OutputType; return output; @@ -57,7 +57,7 @@ inline Unreachable* unreachable(InputType* target) { template inline OutputType* convert(InputType* input, MixedArena& allocator) { assert(sizeof(OutputType) <= sizeof(InputType)); - input->~InputType(); // arena-allocaed, so no destructor, but avoid UB. + input->~InputType(); // arena-allocated, so no destructor, but avoid UB. OutputType* output = (OutputType*)(input); new (output) OutputType(allocator); return output; diff --git a/src/ir/match.h b/src/ir/match.h index 3d42eee359a..383ff8d057a 100644 --- a/src/ir/match.h +++ b/src/ir/match.h @@ -67,7 +67,7 @@ namespace wasm::Match { // // Matches Binary expressions. Takes an optional pointer to Binary* at which // to store the matched Binary*, followed by either a BinaryOp or an -// Abstract::Op describing which binary expresions to match, followed by +// Abstract::Op describing which binary expressions to match, followed by // matchers to apply to the binary expression's left and right operands. // // select diff --git a/src/ir/module-splitting.cpp b/src/ir/module-splitting.cpp index d88f21ee24a..f5825a93bf0 100644 --- a/src/ir/module-splitting.cpp +++ b/src/ir/module-splitting.cpp @@ -1141,7 +1141,7 @@ void ModuleSplitter::shareImportableItems() { // It's not used anywhere, so delete it. Unlike other unused module items // (memories, tables, and tags) that can just sit in the primary module // and later be DCE'ed by another pass, we should remove it here, because - // an unused global can contain an initialier that refers to another + // an unused global can contain an initializer that refers to another // global that will be moved to a secondary module, like // (global $unused i32 (global.get $a)) // $a is moved to a secondary globalsToRemove.push_back(global->name); diff --git a/src/ir/principal-type.cpp b/src/ir/principal-type.cpp index c0c502b6e3a..66e87e4f02c 100644 --- a/src/ir/principal-type.cpp +++ b/src/ir/principal-type.cpp @@ -1031,7 +1031,7 @@ bool PrincipalType::compose(const PrincipalType& next) { apply(assignments, *this); // If a type variable was instantiated with bottom type (i.e. unreachable) due - // to popping from an unreachabile stack, the result type may end with some + // to popping from an unreachable stack, the result type may end with some // number of unreachables. This is nonsensical, since `unreachable` is not a // concrete type. We could have alternatively left the variables // uninstantiated, but it would have no corresponding introduction on the left diff --git a/src/ir/table-utils.h b/src/ir/table-utils.h index cee88fcdbc7..4e788a2685e 100644 --- a/src/ir/table-utils.h +++ b/src/ir/table-utils.h @@ -122,7 +122,7 @@ bool usesExpressions(ElementSegment* curr, Module* module); // Information about a table's optimizability. struct TableInfo { - // Whether the table may be modifed at runtime, either because it is imported + // Whether the table may be modified at runtime, either because it is imported // or exported, or table.set operations exist for it in the code. bool mayBeModified = false; diff --git a/src/parser/parsers.h b/src/parser/parsers.h index c6919d0b3ed..db41a2534cc 100644 --- a/src/parser/parsers.h +++ b/src/parser/parsers.h @@ -1340,7 +1340,7 @@ loop(Ctx& ctx, const std::vector& annotations, bool folded) { // | '(' 'try' label blocktype '(' 'do' instr* ')' // ('(' 'catch' tagidx instr* ')')* // ('(' 'catch_all' instr* ')')? ')' -// | 'try' label blocktype instr* 'deledate' label +// | 'try' label blocktype instr* 'delegate' label // | '(' 'try' label blocktype '(' 'do' instr* ')' // '(' 'delegate' label ')' ')' template diff --git a/src/passes/CodeFolding.cpp b/src/passes/CodeFolding.cpp index 65e3e3471ed..c4a7804695c 100644 --- a/src/passes/CodeFolding.cpp +++ b/src/passes/CodeFolding.cpp @@ -246,7 +246,7 @@ struct CodeFolding auto* right = curr->ifFalse->dynCast(); // If one is a block and the other isn't, and the non-block is a tail of the // other, we can fold that - for our convenience, we just add a block and - // run the rest of the optimization mormally. + // run the rest of the optimization normally. auto maybeAddBlock = [this](Block* block, Expression*& other) -> Block* { // If other is a suffix of the block, wrap it in a block. // @@ -594,10 +594,10 @@ struct CodeFolding for (auto* item : items) { saved += Measurer::measure(item) * (tails.size() - 1); } - // compure the cost: in non-fallthroughs, we are replacing the final + // compute the cost: in non-fallthroughs, we are replacing the final // element with a br; for a fallthrough, if there is one, we must // add a return element (for the function body, so it doesn't reach us) - // TODO: handle fallthroughts for return + // TODO: handle fallthroughs for return Index cost = tails.size(); // we also need to add two blocks: for us to break to, and to contain // that block and the merged code. very possibly one of the blocks diff --git a/src/passes/CodePushing.cpp b/src/passes/CodePushing.cpp index 67bef95c468..57dd9993417 100644 --- a/src/passes/CodePushing.cpp +++ b/src/passes/CodePushing.cpp @@ -424,7 +424,7 @@ class Pusher { // TODO: After pushing we could recurse and run both this function and // optimizeSegment in that location. For now, leave that to later - // cycles of the optimizer, as this case seems rairly rare. + // cycles of the optimizer, as this case seems fairly rare. return true; }; diff --git a/src/passes/DataFlowOpts.cpp b/src/passes/DataFlowOpts.cpp index 79878f4c962..a3d169ec8ce 100644 --- a/src/passes/DataFlowOpts.cpp +++ b/src/passes/DataFlowOpts.cpp @@ -135,7 +135,7 @@ struct DataFlowOpts : public WalkerPass> { } // Now we know that all our DataFlow inputs are constant, and all // our Binaryen IR representations of them are constant too. RUn - // precompute, which will transform the expression into a constanat. + // precompute, which will transform the expression into a constant. Module temp; // XXX we should copy expr here, in principle, and definitely will need to // when we do arbitrarily regenerated expressions diff --git a/src/passes/DeNaN.cpp b/src/passes/DeNaN.cpp index 0251a0c589f..01845f4a6b0 100644 --- a/src/passes/DeNaN.cpp +++ b/src/passes/DeNaN.cpp @@ -201,7 +201,7 @@ struct DeNaN : public WalkerPass< module->addFunction(std::move(func)); }; - // Check if a contant v128 may contain f32 or f64 NaNs. + // Check if a constant v128 may contain f32 or f64 NaNs. bool hasNaNLane(Const* c) { assert(c->type == Type::v128); auto value = c->value; diff --git a/src/passes/EncloseWorld.cpp b/src/passes/EncloseWorld.cpp index 34ceb51bfc2..2061937d8b6 100644 --- a/src/passes/EncloseWorld.cpp +++ b/src/passes/EncloseWorld.cpp @@ -17,7 +17,7 @@ // // "Closes" the world, in the sense of making it more compatible with the // --closed-world flag, in a potentially destructive manner. This is mainly -// useful for fuzzing (in that a random module is usually very incomptable with +// useful for fuzzing (in that a random module is usually very incompatible with // closed world, with most types being public and hence unoptimizable, but // running this pass makes as many as we can fully private). // diff --git a/src/passes/Flatten.cpp b/src/passes/Flatten.cpp index 1c2cfbcd536..10c791f609e 100644 --- a/src/passes/Flatten.cpp +++ b/src/passes/Flatten.cpp @@ -265,7 +265,7 @@ struct Flatten // br_if leaves a value on the stack if not taken, which later can // be the last element of the enclosing innermost block and flow // out. The local we created using 'getTempForBreakTarget' returns - // the return type of the block this branch is targetting, which may + // the return type of the block this branch is targeting, which may // not be the same with the innermost block's return type. For // example, // (block $any (result anyref) diff --git a/src/passes/GenerateDynCalls.cpp b/src/passes/GenerateDynCalls.cpp index a49ff1408d9..2645994461a 100644 --- a/src/passes/GenerateDynCalls.cpp +++ b/src/passes/GenerateDynCalls.cpp @@ -18,7 +18,7 @@ // Create `dynCall` helper functions used by emscripten. These allow JavaScript // to call back into WebAssembly given a function pointer (table index). These // are used primarily to implement the `invoke` functions which in turn are used -// to implment exceptions handling and setjmp/longjmp. Creates one for each +// to implement exceptions handling and setjmp/longjmp. Creates one for each // signature in the indirect function table. // diff --git a/src/passes/GlobalEffects.cpp b/src/passes/GlobalEffects.cpp index 06e25edf090..ef0977d12fa 100644 --- a/src/passes/GlobalEffects.cpp +++ b/src/passes/GlobalEffects.cpp @@ -102,7 +102,7 @@ struct GenerateGlobalEffects : public Pass { // Compute the transitive closure of effects. To do so, first construct for // each function a list of the functions that it is called by (so we need to - // propogate its effects to them), and then we'll construct the closure of + // propagate its effects to them), and then we'll construct the closure of // that. // // callers[foo] = [func that calls foo, another func that calls foo, ..] diff --git a/src/passes/GlobalStructInference.cpp b/src/passes/GlobalStructInference.cpp index ae9d14488be..bb5a077648a 100644 --- a/src/passes/GlobalStructInference.cpp +++ b/src/passes/GlobalStructInference.cpp @@ -473,8 +473,8 @@ struct GlobalStructInference : public Pass { if (values.size() == 1) { // The case of 1 value is simple: trap if the ref is null, and // otherwise return the value. Since the field is immutable, there - // cannot have been any writes to it we must synchonize with, so we do - // not need a fence. + // cannot have been any writes to it we must synchronize with, so we + // do not need a fence. replaceCurrent(builder.makeSequence( builder.makeDrop(builder.makeRefAs(RefAsNonNull, ref)), getReadValue(values[0], fieldIndex, field, curr))); @@ -655,7 +655,7 @@ struct GlobalStructInference : public Pass { } }; - // Find the optimization opportunitites in parallel. + // Find the optimization opportunities in parallel. ModuleUtils::ParallelFunctionAnalysis optimization( *module, [&](Function* func, GlobalsToUnnest& globalsToUnnest) { if (func->imported()) { diff --git a/src/passes/GlobalTypeOptimization.cpp b/src/passes/GlobalTypeOptimization.cpp index dcb28817ea0..8171ce1c501 100644 --- a/src/passes/GlobalTypeOptimization.cpp +++ b/src/passes/GlobalTypeOptimization.cpp @@ -424,7 +424,7 @@ struct GlobalTypeOptimization : public Pass { std::unordered_set subtypesExposed; // Mark the relevant prototype field as read and return true iff we newly - // know we have to propate the exposure to subtypes. + // know we have to propagate the exposure to subtypes. auto noteExposed = [&](HeapType type, Exactness exact = Inexact) -> bool { if (auto desc = type.getDescriptorType(); desc && JSUtils::hasPossibleJSPrototypeField(*desc)) { diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp index 86377067f6f..42feafa3861 100644 --- a/src/passes/I64ToI32Lowering.cpp +++ b/src/passes/I64ToI32Lowering.cpp @@ -489,7 +489,7 @@ struct I64ToI32Lowering : public WalkerPass> { return; } // We cannot break this up into smaller operations as it must be atomic. - // Lower to an instrinsic function that wasm2js will implement. + // Lower to an intrinsic function that wasm2js will implement. TempVar lowBits = getTemp(); TempVar highBits = getTemp(); auto* getLow = builder->makeCall( diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index 13d0b7630f1..cd328a7e1be 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -63,7 +63,7 @@ enum class InliningMode { // We do not know yet if this function can be inlined, as that has // not been computed yet. Unknown, - // This function cannot be inlinined in any way. + // This function cannot be inlined in any way. Uninlineable, // This function can be inlined fully, that is, normally: the entire function // can be inlined. This is in contrast to split/partial inlining, see below. @@ -1260,7 +1260,7 @@ struct Inlining : public Pass { // whether to optimize where we inline bool optimize = false; - // the information for each function. recomputed in each iteraction + // the information for each function. recomputed in each interaction NameInfoMap infos; std::unique_ptr functionSplitter; diff --git a/src/passes/LLVMNontrappingFPToIntLowering.cpp b/src/passes/LLVMNontrappingFPToIntLowering.cpp index d14e58af806..382d4155b36 100644 --- a/src/passes/LLVMNontrappingFPToIntLowering.cpp +++ b/src/passes/LLVMNontrappingFPToIntLowering.cpp @@ -74,7 +74,7 @@ struct LLVMNonTrappingFPToIntLoweringImpl Builder builder(*getModule()); Index v = Builder::addVar(getFunction(), curr->value->type); // if fabs(operand) < INT_MAX then use the trapping operation, else return - // INT_MIN. The altnernate value is correct for the case where the input is + // INT_MIN. The alternate value is correct for the case where the input is // INT_MIN itself; otherwise it's UB so any value will do. replaceCurrent(builder.makeIf( builder.makeBinary( diff --git a/src/passes/MemoryPacking.cpp b/src/passes/MemoryPacking.cpp index 9d94492ecb2..83fb1b6e494 100644 --- a/src/passes/MemoryPacking.cpp +++ b/src/passes/MemoryPacking.cpp @@ -44,7 +44,7 @@ namespace wasm { namespace { -// A subsection of an orginal memory segment. If `isZero` is true, memory.fill +// A subsection of an original memory segment. If `isZero` is true, memory.fill // will be used instead of memory.init for this range. struct Range { bool isZero; @@ -651,7 +651,7 @@ void MemoryPacking::createSplitSegments( if (segment->name.is()) { // Name the first range after the original segment and all following // ranges get numbered accordingly. This means that for segments that - // canot be split (segments that contains a single range) the input and + // cannot be split (segments that contains a single range) the input and // output segment have the same name. if (!segmentCount) { name = segment->name; diff --git a/src/passes/Monomorphize.cpp b/src/passes/Monomorphize.cpp index 2798eaec4ba..f4536692402 100644 --- a/src/passes/Monomorphize.cpp +++ b/src/passes/Monomorphize.cpp @@ -636,7 +636,7 @@ struct Monomorphize : public Pass { return; } - // TODO: ignore calls with unreachable operands for simplicty + // TODO: ignore calls with unreachable operands for simplicity // Compute the call context, and the new operands that the call would send // if we use that context. diff --git a/src/passes/OptimizeCasts.cpp b/src/passes/OptimizeCasts.cpp index 55f9a72899e..e2e7c8c43ab 100644 --- a/src/passes/OptimizeCasts.cpp +++ b/src/passes/OptimizeCasts.cpp @@ -387,7 +387,7 @@ struct EarlyCastApplier : public PostWalker { } }; -// Find the best casted verisons of local.gets: other local.gets with the same +// Find the best casted versions of local.gets: other local.gets with the same // value, but cast to a more refined type. struct BestCastFinder : public LinearExecutionWalker { diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index e388775caab..9ea8a7aa982 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -783,7 +783,7 @@ struct OptimizeInstructions curr->op == DivUInt32) { // u32(x) / C ==> u32(x) >= C iff C > 2^31 // We avoid applying this for C == 2^31 due to conflict - // with other rule which transform to more prefereble + // with other rule which transform to more preferable // right shift operation. curr->op = c == -1 ? EqInt32 : GeUInt32; return replaceCurrent(curr); @@ -813,7 +813,7 @@ struct OptimizeInstructions c > std::numeric_limits::min() && curr->op == DivUInt64) { // u64(x) / C ==> u64(u64(x) >= C) iff C > 2^63 // We avoid applying this for C == 2^31 due to conflict - // with other rule which transform to more prefereble + // with other rule which transform to more preferable // right shift operation. // And apply this only for shrinkLevel == 0 due to it // increasing size by one byte. @@ -1478,7 +1478,7 @@ struct OptimizeInstructions // To avoid such risks we should keep in mind the following: // // * Before removing a cast we should use its type information in the best - // way we can. Only after doing so should a cast be removed. In the exmaple + // way we can. Only after doing so should a cast be removed. In the example // above, that means first seeing that the ref.test must return 1, and only // then possibly removing the ref.cast. // * Do not remove a cast if removing it might remove useful information for @@ -1673,7 +1673,7 @@ struct OptimizeInstructions // // TODO We could recurse here. // TODO We could do similar things for casts (rule out an impossible arm). - // TODO Worth thinking about an 'assume' instrinsic of some form that + // TODO Worth thinking about an 'assume' intrinsic of some form that // annotates knowledge about a value, or another mechanism to allow // that information to be passed around. @@ -2783,7 +2783,7 @@ struct OptimizeInstructions } // Check if two consecutive inputs to an instruction are equal. As they are - // consecutive, no code can execeute in between them, which simplies the + // consecutive, no code can execute in between them, which simplifies the // problem here (and which is the case we care about in this pass, which does // simple peephole optimizations - all we care about is a single instruction // at a time, and its inputs). @@ -3463,7 +3463,8 @@ struct OptimizeInstructions } // remove added/subbed zeros struct ZeroRemover : public PostWalker { - // TODO: we could save the binarys and costs we drop, and reuse them later + // TODO: we could save the Binary and Const nodes we drop, and reuse them + // later PassOptions& passOptions; @@ -4586,7 +4587,7 @@ struct OptimizeInstructions c1->value = Literal::makeFromInt32(total, c1->type); return inner; } else { - // overflow. Handle different scenarious + // overflow. Handle different scenarios if (hasAnyRotateShift(op)) { // overflow always accepted in rotation shifts c1->value = Literal::makeFromInt32(effectiveTotal, c1->type); @@ -5025,7 +5026,7 @@ struct OptimizeInstructions switch (curr->op) { case TruncSFloat64ToInt32: case TruncSatSFloat64ToInt32: { - // i32 -> f64 -> i32 rountripping optimization: + // i32 -> f64 -> i32 roundtripping optimization: // i32.trunc(_sat)_f64_s(f64.convert_i32_s(x)) ==> x Expression* x; if (matches(curr->value, unary(ConvertSInt32ToFloat64, any(&x)))) { @@ -5035,7 +5036,7 @@ struct OptimizeInstructions } case TruncUFloat64ToInt32: case TruncSatUFloat64ToInt32: { - // u32 -> f64 -> u32 rountripping optimization: + // u32 -> f64 -> u32 roundtripping optimization: // i32.trunc(_sat)_f64_u(f64.convert_i32_u(x)) ==> x Expression* x; if (matches(curr->value, unary(ConvertUInt32ToFloat64, any(&x)))) { @@ -5850,7 +5851,7 @@ struct OptimizeInstructions if (validTypes && validEffects && validChildren) { // Replace ifTrue with its child. curr->ifTrue = ifTrueChild; - // Relace ifFalse with its child, and reuse that node outside. + // Replace ifFalse with its child, and reuse that node outside. auto* reuse = curr->ifFalse; curr->ifFalse = ifFalseChild; // curr's type may have changed, if the instructions we moved out diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp index 72630663591..12ea129173d 100644 --- a/src/passes/PostEmscripten.cpp +++ b/src/passes/PostEmscripten.cpp @@ -82,7 +82,7 @@ static void calcSegmentOffsets(Module& wasm, OffsetSearcher(std::unordered_map& offsets) : offsets(offsets) {} void visitMemoryInit(MemoryInit* curr) { - // The desitination of the memory.init is either a constant + // The destination of the memory.init is either a constant // or the result of an addition with __memory_base in the // case of PIC code. auto* dest = curr->dest->dynCast(); diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index a5f8da4b42c..fbaf09232b9 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -104,7 +104,7 @@ class PrecomputingExpressionRunner // Limit evaluation depth for 2 reasons: first, it is highly unlikely // that we can do anything useful to precompute a hugely nested expression - // (we should succed at smaller parts of it first). Second, a low limit is + // (we should succeed at smaller parts of it first). Second, a low limit is // helpful to avoid platform differences in native stack sizes. static const Index MAX_DEPTH = 50; diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 5432a2f471b..1e910868ef8 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -3766,7 +3766,7 @@ class MinifiedPrinter : public Printer { Pass* createMinifiedPrinterPass() { return new MinifiedPrinter(); } -// Prints out a module withough elision, i.e., the full ast +// Prints out a module without elision, i.e., the full ast class FullPrinter : public Printer { public: diff --git a/src/passes/RedundantSetElimination.cpp b/src/passes/RedundantSetElimination.cpp index 7ede2ba35e9..c5017848b1d 100644 --- a/src/passes/RedundantSetElimination.cpp +++ b/src/passes/RedundantSetElimination.cpp @@ -23,7 +23,7 @@ // A risk here is that we extend live ranges, e.g. we may use the default // value at the very end of a function, keeping that local alive throughout. // For that reason it is probably better to run this near the end of -// optimization, and especially after coalesce-locals. A final vaccum +// optimization, and especially after coalesce-locals. A final vacuum // should be done after it, as this pass can leave around drop()s of // values no longer necessary. // @@ -123,7 +123,7 @@ struct RedundantSetElimination // Use a value numbering for the values of expressions. ValueNumbering valueNumbering; - // In additon to valueNumbering, each block has values for each merge. + // In addition to valueNumbering, each block has values for each merge. std::unordered_map> blockMergeValues; diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp index bb539a5c823..77fd6840818 100644 --- a/src/passes/RemoveUnusedBrs.cpp +++ b/src/passes/RemoveUnusedBrs.cpp @@ -1192,7 +1192,7 @@ struct RemoveUnusedBrs : public WalkerPass> { : public PostWalker> { // Map of all labels (branch targets) to the branches going to them. (We - // only care about blocks here, and not loops, but for simplicitly we + // only care about blocks here, and not loops, but for simplicity we // store all branch targets since blocks are 99% of that set anyhow. Any // loops are ignored later.) std::unordered_map> labelToBranches; diff --git a/src/passes/SafeHeap.cpp b/src/passes/SafeHeap.cpp index fe5b21507fb..d5a4f8843de 100644 --- a/src/passes/SafeHeap.cpp +++ b/src/passes/SafeHeap.cpp @@ -17,7 +17,7 @@ // // Instruments code to check for incorrect heap access. This checks // for dereferencing 0 (null pointer access), reading past the valid -// top of sbrk()-addressible memory, and incorrect alignment notation. +// top of sbrk()-addressable memory, and incorrect alignment notation. // #include "asmjs/shared-constants.h" diff --git a/src/passes/SignaturePruning.cpp b/src/passes/SignaturePruning.cpp index ae920839fd4..4670d1c0015 100644 --- a/src/passes/SignaturePruning.cpp +++ b/src/passes/SignaturePruning.cpp @@ -315,7 +315,7 @@ struct SignaturePruning : public Pass { // Create a new signature. When the TypeRewriter operates below it will // modify the existing heap type in place to change its signature to this // one. TypeRewriter will also ensure that distinct types remain - // disctinct, even if they have the same signature after optimization. + // distinct, even if they have the same signature after optimization. newSignatures[type] = Signature(Type(newParams), sig.results); // removeParameters() updates the type as it goes, but in this pass we diff --git a/src/passes/SimplifyGlobals.cpp b/src/passes/SimplifyGlobals.cpp index 14cd6f6de9e..83eeb84e84f 100644 --- a/src/passes/SimplifyGlobals.cpp +++ b/src/passes/SimplifyGlobals.cpp @@ -148,7 +148,7 @@ struct GlobalUseScanner : public WalkerPass> { // if (global % 17 < 4) { global = 1 } // // What we want to disallow is using the global to actually do something that - // is noticeeable *aside* from writing the global, like this: + // is noticeable *aside* from writing the global, like this: // // if (global ? foo() : bar()) { .. } // @@ -582,7 +582,7 @@ struct SimplifyGlobals : public Pass { } if (info.imported || info.exported) { - // If the global is observable from the outside, we can't do anythng + // If the global is observable from the outside, we can't do anything // here. // // TODO: optimize the case of an imported but immutable global, etc. diff --git a/src/passes/TypeGeneralizing.cpp b/src/passes/TypeGeneralizing.cpp index 139ba8efbbd..03a0a0f11a7 100644 --- a/src/passes/TypeGeneralizing.cpp +++ b/src/passes/TypeGeneralizing.cpp @@ -560,7 +560,7 @@ struct TransferFn : OverriddenVisitor { for (size_t i = 0; i < numParams; ++i) { if (candidateSig.params[i] != sig.params[i]) { // Generalizing further would restrict how much we could generalize - // this argument, so we choose not to generalize futher. + // this argument, so we choose not to generalize further. // TODO: Experiment with making the opposite choice. goto done; } @@ -815,7 +815,7 @@ struct TransferFn : OverriddenVisitor { auto srcType = curr->srcRef->type.getHeapType(); if (destType.isBottom() || srcType.isBottom()) { // This will be emitted as unreachable. Do not require anything of the - // input, exept that the bottom refs remain bottom. + // input, except that the bottom refs remain bottom. clearStack(); auto nullref = Type(HeapType::none, Nullable); push(destType.isBottom() ? nullref : Type::none); diff --git a/src/passes/TypeMerging.cpp b/src/passes/TypeMerging.cpp index 5853ead9ad6..8ca33699716 100644 --- a/src/passes/TypeMerging.cpp +++ b/src/passes/TypeMerging.cpp @@ -467,7 +467,7 @@ bool TypeMerging::merge(MergeKind kind) { // Normally splitting partitions like this would require re-running DFA // minimization afterward, but in this case it is not possible that the // manual splits cause types in any other partition to become - // differentiatable. A type and its subtype cannot differ by referring to + // differentiable. A type and its subtype cannot differ by referring to // different, unrelated types in the same position because then they would // not be in a valid subtype relationship. std::vector> newPartitions; diff --git a/src/passes/TypeSSA.cpp b/src/passes/TypeSSA.cpp index 2c99f91ed76..ee63e5ee4b8 100644 --- a/src/passes/TypeSSA.cpp +++ b/src/passes/TypeSSA.cpp @@ -167,7 +167,7 @@ struct Analyzer void note(Expression**, Constraints type) { // Check closed type constraints for exactness. Other kinds of type - // constaints do not concern us. + // constraints do not concern us. // TODO: Handle tuples? for (auto varType : type) { if (auto* t = std::get_if(&varType)) { @@ -198,8 +198,8 @@ struct Analyzer void visitGlobal(Global* global) { // This could be more precise by checking that the init expression is not - // null before inhibiting optimization, or by just inhibiting optmization of - // the allocations used in the initialization, but this is simpler. + // null before inhibiting optimization, or by just inhibiting optimization + // of the allocations used in the initialization, but this is simpler. for (auto type : global->type) { if (type.isExact()) { disallowedTypes.insert(type.getHeapType()); diff --git a/src/passes/Unsubtyping.cpp b/src/passes/Unsubtyping.cpp index b3eac815170..5f01610adeb 100644 --- a/src/passes/Unsubtyping.cpp +++ b/src/passes/Unsubtyping.cpp @@ -1066,7 +1066,7 @@ struct Unsubtyping : Pass, Noter { } // TODO: Consider running the fixup only if we are actually removing any // descriptors. This would require a better way of detecting this than - // collecing and iterating over all the types, though. + // collecting and iterating over all the types, though. struct Rewriter : WalkerPass> { const TypeTree& types; diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 2b5ec3f191b..a450b133b32 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -417,7 +417,7 @@ struct Vacuum : public WalkerPass> { } // sink a drop into an arm of an if-else if the other arm ends in an // unreachable, as it if is a branch, this can make that branch optimizable - // and more vaccuming possible + // and more vacuuming possible auto* iff = curr->value->dynCast(); if (iff && iff->ifFalse && iff->type.isConcrete()) { // reuse the drop in both cases diff --git a/src/support/mixed_arena.h b/src/support/mixed_arena.h index bb06d1aa062..a5f00281e3f 100644 --- a/src/support/mixed_arena.h +++ b/src/support/mixed_arena.h @@ -32,7 +32,7 @@ // // Arena-style bump allocation is important for two reasons: First, so that // allocation is quick, and second, so that allocated items are close together, -// which is cache-friendy. Arena allocation is also useful for a minor third +// which is cache-friendly. Arena allocation is also useful for a minor third // reason which is to make freeing all the items in an arena very quick. // // Each WebAssembly Module has an arena allocator, which should be used @@ -100,7 +100,7 @@ struct MixedArena { // allocator for us there. but carefully, as others may do so as // well. we may waste a few allocations here, but it doesn't matter // as this can only happen as the chain is built up, i.e., - // O(# of cores) per allocator, and our allocatrs are long-lived. + // O(# of cores) per allocator, and our allocators are long-lived. if (!allocated) { allocated = new MixedArena(); // has our thread id } diff --git a/src/support/path.h b/src/support/path.h index 8383bc53ea8..82c9f751845 100644 --- a/src/support/path.h +++ b/src/support/path.h @@ -44,7 +44,7 @@ char getPathSeparator(); std::string getDirName(const std::string& path); std::string getBaseName(const std::string& path); -// Get the binaryen root dor. +// Get the binaryen root dir. std::string getBinaryenRoot(); // Get the binaryen bin dir. diff --git a/src/support/topological_sort.h b/src/support/topological_sort.h index c0e1a93712e..c96047e07b1 100644 --- a/src/support/topological_sort.h +++ b/src/support/topological_sort.h @@ -38,7 +38,7 @@ struct CycleException {}; // An adjacency list containing edges from vertices to their successors. Uses // `Index` because we are primarily sorting elements of Wasm modules. If we ever -// need to sort signficantly larger objects, we might need to switch to +// need to sort significantly larger objects, we might need to switch to // `size_t` or make this a template parameter. using Graph = std::vector>; diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h index bc1ac4a1478..1e089f0b8c8 100644 --- a/src/tools/optimization-options.h +++ b/src/tools/optimization-options.h @@ -357,7 +357,7 @@ struct OptimizationOptions : public ToolOptions { // Pass arguments with the same name as the pass are stored per-instance on // PassInfo, while all other arguments are stored globally on - // passOptions.arguments (which is what the overriden method on ToolOptions + // passOptions.arguments (which is what the overridden method on ToolOptions // does). void addPassArg(const std::string& key, const std::string& value) override { // Scan the current pass list for the last defined instance of a pass named diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp index adc5a4fe988..8cccf8c7ea2 100644 --- a/src/tools/wasm-ctor-eval.cpp +++ b/src/tools/wasm-ctor-eval.cpp @@ -1107,7 +1107,7 @@ EvalCtorOutcome evalCtor(EvallingModuleRunner& instance, // the locals here. That is, we need to save the local state in the function, // which we do by setting up at the entry. We update this list of expressions // at the same time as applyToModule() - we must only do it after an entire - // atomic "chunk" has been processed succesfully, we do not want partial + // atomic "chunk" has been processed successfully, we do not want partial // updates from an item in the block that we only partially evalled. When we // construct the (partially) evalled function, we will create local.sets of // these expressions at the beginning. @@ -1213,7 +1213,7 @@ EvalCtorOutcome evalCtor(EvallingModuleRunner& instance, // module. Note that we must serialize the locals now as doing so may // cause changes that must be applied to the module (e.g. GC data may // cause globals to be added). And we must apply to the module now, and - // not later, as we must do so right after a successfull partial eval + // not later, as we must do so right after a successful partial eval // (after any failure to eval, the global state is no long valid to be // applied to the module, as incomplete changes may have occurred). // diff --git a/src/tools/wasm-reduce/wasm-reduce.cpp b/src/tools/wasm-reduce/wasm-reduce.cpp index bc5dabfcab0..e002a499545 100644 --- a/src/tools/wasm-reduce/wasm-reduce.cpp +++ b/src/tools/wasm-reduce/wasm-reduce.cpp @@ -1559,7 +1559,7 @@ More documentation can be found at } } - // no point in a factor lorger than the size + // no point in a factor larger than the size assert(newSize > 4); // wasm modules are >4 bytes anyhow factor = std::min(factor, int(newSize) / 4); diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 5b6990ea57b..af9567ae762 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -188,7 +188,7 @@ struct ExnData { // // The key idea in this approach to suspending and resuming is that to suspend // you want to unwind the stack - you "jump" back to some outer scope - and to -// reume, we want to rewind the stack - to get everything back exactly the way +// resume, we want to rewind the stack - to get everything back exactly the way // it was, so we can pick things back up. And, to achieve that, we really just // need two things: // * To rewind the call stack. If we called foo() and then bar(), we want to @@ -1958,7 +1958,7 @@ class ExpressionRunner : public OverriddenVisitor { Flow visitTryTable(TryTable* curr) { WASM_UNREACHABLE("unimp"); } Flow visitThrow(Throw* curr) { // Single-module implementation. This is used from Precompute, for example. - // It is overriden in ModuleRunner to add logic for finding the proper + // It is overridden in ModuleRunner to add logic for finding the proper // imported tag (which single-module cases don't care about). Literals arguments; VISIT_ARGUMENTS(flow, curr->operands, arguments); diff --git a/src/wasm-ir-builder.h b/src/wasm-ir-builder.h index d6aed8a1c32..44b4ba0b270 100644 --- a/src/wasm-ir-builder.h +++ b/src/wasm-ir-builder.h @@ -466,7 +466,7 @@ class IRBuilder : public UnifiedExpressionVisitor> { // When transitioning to a new scope for a delimiter like `else` or catch, // most of the scope context is preserved, but some parts need to be reset. // `keepInput` means that control flow parameters are available at the - // begninning of the scope after the delimiter. + // beginning of the scope after the delimiter. void resetForDelimiter(bool keepInput) { exprStack.clear(); unreachable = false; diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index a3bdc5a3905..e8f6a62b45b 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -115,7 +115,7 @@ struct UnifiedExpressionVisitor : public Visitor { // template struct Walker : public VisitorType { - // Useful methods for visitor implementions + // Useful methods for visitor implementations // Replace the current node. You can call this in your visit*() methods. // Note that the visit*() for the result node is not called for you (i.e., diff --git a/src/wasm-type.h b/src/wasm-type.h index 3667f67888e..a0340c2b083 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -764,7 +764,7 @@ struct Array { // TypeBuilder - allows for the construction of recursive types. Contains a // table of `n` mutable HeapTypes and can construct temporary types that are -// backed by those HeapTypes, refering to them by reference. Those temporary +// backed by those HeapTypes, referring to them by reference. Those temporary // types are owned by the TypeBuilder and should only be used in the // construction of HeapTypes to insert into the TypeBuilder. Temporary types // should never be used in the construction of normal Types, only other diff --git a/src/wasm.h b/src/wasm.h index 9f61b4432ae..941d759ce6b 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -122,7 +122,7 @@ enum UnaryOp { TruncSFloat64ToInt64, TruncUFloat64ToInt32, TruncUFloat64ToInt64, - // reintepret bits to int + // reinterpret bits to int ReinterpretFloat32, ReinterpretFloat64, // int to float @@ -143,7 +143,7 @@ enum UnaryOp { ReinterpretInt64, // Extend signed subword-sized integer. This differs from e.g. ExtendSInt32 - // because the input integer is in an i64 value insetad of an i32 value. + // because the input integer is in an i64 value instead of an i32 value. ExtendS8Int32, ExtendS16Int32, ExtendS8Int64, @@ -1095,7 +1095,7 @@ class AtomicFence : public SpecificExpression { AtomicFence() = default; AtomicFence(MixedArena& allocator) : AtomicFence() {} - // Current wasm threads only supports sequentialy consistent atomics, but + // Current wasm threads only supports sequentially consistent atomics, but // other orderings may be added in the future. This field is reserved for // that, and currently set to 0. uint8_t order = 0; diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 4c450bdb2d1..592020e1fef 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -121,7 +121,7 @@ class StringConstantTracker { OffsetSearcher(std::unordered_map& offsets) : offsets(offsets) {} void visitMemoryInit(MemoryInit* curr) { - // The desitination of the memory.init is either a constant + // The destination of the memory.init is either a constant // or the result of an addition with __memory_base in the // case of PIC code. auto* dest = curr->dest->dynCast(); diff --git a/src/wasm/wasm-stack-opts.cpp b/src/wasm/wasm-stack-opts.cpp index b3a4d15e26d..eae9b6c681f 100644 --- a/src/wasm/wasm-stack-opts.cpp +++ b/src/wasm/wasm-stack-opts.cpp @@ -209,7 +209,7 @@ void StackIROptimizer::local2Stack() { bool optimized = false; // Do not optimize multivalue locals, since those will be better // optimized when they are visited in the binary writer and this - // optimization would intefere with that one. + // optimization would interfere with that one. if (auto* get = inst->origin->dynCast(); get && inst->type.isSingle() && !deferredGets.contains(get)) { // Use another local to clarify what instIndex means in this scope. diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index b7c2c8d2bd0..8ff0e9c362a 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -2761,7 +2761,7 @@ TypeBuilder::BuildResult TypeBuilder::build() { auto group = (*built)[0].getRecGroup(); auto uniqueGroup = impl->unique.insertOrGet(group); if (group != uniqueGroup) { - // There is a conflict. Find the set of missing featuers that would + // There is a conflict. Find the set of missing features that would // resolve the conflict if enabled. FeatureSet missingFeatures = FeatureSet::None; FeatureSet potential = FeatureSet::GC | FeatureSet::CustomDescriptors; diff --git a/test/lit/exec/delegate-vacuum.wast b/test/lit/exec/delegate-vacuum.wast index 90436fe309e..171fca8e85f 100644 --- a/test/lit/exec/delegate-vacuum.wast +++ b/test/lit/exec/delegate-vacuum.wast @@ -1,7 +1,7 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. ;; RUN: wasm-opt %s --vacuum --fuzz-exec -all -q -o /dev/null 2>&1 | filecheck %s -;; Test the effect of vaccum on delegation. The delegate target must not +;; Test the effect of vacuum on delegation. The delegate target must not ;; "escape" the current function scope and affect anything external, that is, ;; it must be cleared on function exit. diff --git a/test/lit/passes/cfp.wast b/test/lit/passes/cfp.wast index 81946889b05..fa7fb9277d6 100644 --- a/test/lit/passes/cfp.wast +++ b/test/lit/passes/cfp.wast @@ -3262,7 +3262,7 @@ ) ) (drop - ;; This can be optimzied in principle, but our analysis cannot yet prove + ;; This can be optimized in principle, but our analysis cannot yet prove ;; there is no synchronization. TODO. (struct.atomic.get acqrel $shared 0 (local.get 0) diff --git a/test/lit/passes/heap2local.wast b/test/lit/passes/heap2local.wast index ae42ea45c1b..1f72d5f947c 100644 --- a/test/lit/passes/heap2local.wast +++ b/test/lit/passes/heap2local.wast @@ -1004,7 +1004,7 @@ ;; After the outer one is optimized, the inner one can be optimized in ;; principle, as it can be seen to no longer escape. However, we depend ;; on other optimizations to actually remove the outer allocation (like - ;; vacuum), and so it cannot be optimized. If we ran vaccum, and then + ;; vacuum), and so it cannot be optimized. If we ran vacuum, and then ;; additional iterations, this might be handled. (struct.new_default $struct.recursive) ) diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast index 4d0703d5f91..9dc52715724 100644 --- a/test/lit/passes/optimize-instructions-gc.wast +++ b/test/lit/passes/optimize-instructions-gc.wast @@ -679,7 +679,7 @@ (func $flip-tee-of-as-non-null-non-nullable (param $x (ref any)) (param $y (ref null any)) (drop (local.tee $x - ;; this *cannnot* be moved through the tee outward, as the param is in + ;; this *cannot* be moved through the tee outward, as the param is in ;; fact non-nullable, and we depend on the ref.as_non_null in order to ;; get a valid type to assign to it (ref.as_non_null diff --git a/test/lit/passes/optimize-instructions-mvp.wast b/test/lit/passes/optimize-instructions-mvp.wast index c744c0eb3ad..a301cc6858c 100644 --- a/test/lit/passes/optimize-instructions-mvp.wast +++ b/test/lit/passes/optimize-instructions-mvp.wast @@ -18144,7 +18144,7 @@ ;; CHECK-NEXT: ) (func $skip-added-constants-negative (result i32) ;; Reasonable negative constants can be optimized. But the add is - ;; canoncalized into a sub, and atm we do not optimize such added constants. + ;; canonicalized into a sub, and atm we do not optimize such added constants. (i32.ge_s (i32.add (i32.shr_u @@ -18174,7 +18174,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $skip-added-constants-negative-flip (result i32) - ;; As above, but flipped. The add is canoncalized into a sub, and atm we do + ;; As above, but flipped. The add is canonicalized into a sub, and atm we do ;; not optimize such added constants. (i32.ge_s (i32.add @@ -18233,7 +18233,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $skip-added-constants-mix-flip (result i32) - ;; As above, but with sign flipped. The add is canoncalized into a sub, and + ;; As above, but with sign flipped. The add is canonicalized into a sub, and ;; atm we do not optimize such added constants. (i32.ge_s (i32.add diff --git a/test/lit/passes/vacuum_all-features.wast b/test/lit/passes/vacuum_all-features.wast index e689b853668..bdc313e7b1b 100644 --- a/test/lit/passes/vacuum_all-features.wast +++ b/test/lit/passes/vacuum_all-features.wast @@ -1394,7 +1394,7 @@ (func $1 (tuple.drop 2 (block $block (result funcref i32) - ;; we can vaccum out all parts of this block: the br_if is not taken, there + ;; we can vacuum out all parts of this block: the br_if is not taken, there ;; is a nop, and the tuple at the end goes to a dropped block anyhow. this ;; test specifically verifies handling of tuples containing non-nullable ;; types, for which we try to create a zero in an intermediate step along diff --git a/test/passes/remove-unused-names_vacuum.wast b/test/passes/remove-unused-names_vacuum.wast index 66412353cac..128e1af08f3 100644 --- a/test/passes/remove-unused-names_vacuum.wast +++ b/test/passes/remove-unused-names_vacuum.wast @@ -1,7 +1,7 @@ (module (func $return-i32-but-body-is-unreachable3 (result i32) (local $label i32) - (block ;; without a name here, vaccum had a too-eager bug + (block ;; without a name here, vacuum had a too-eager bug (loop $while-in$1 (br $while-in$1) ) @@ -9,7 +9,7 @@ ) (func $return-i32-but-body-is-unreachable4 (result i32) (local $label i32) - (block ;; without a name here, vaccum had a too-eager bug + (block ;; without a name here, vacuum had a too-eager bug (loop $while-in$1 (br $while-in$1) ) @@ -25,13 +25,13 @@ ) (func $return-i32-but-body-is-unreachable5 (result i32) (local $label i32) - (block ;; without a name here, vaccum had a too-eager bug + (block ;; without a name here, vacuum had a too-eager bug (unreachable) ) ) (func $return-i32-but-body-is-unreachable6 (result i32) (local $label i32) - (block ;; without a name here, vaccum had a too-eager bug + (block ;; without a name here, vacuum had a too-eager bug (unreachable) ) (i32.const 0) diff --git a/test/spec/br_on_cast_desc_eq.wast b/test/spec/br_on_cast_desc_eq.wast index c40653b753a..a85eac015aa 100644 --- a/test/spec/br_on_cast_desc_eq.wast +++ b/test/spec/br_on_cast_desc_eq.wast @@ -356,7 +356,7 @@ (type $desc (describes $struct) (struct)) ) (func (param $any anyref) (param $desc (ref null $desc)) (result (ref null (exact $struct))) - ;; The sent type cannnot be exact because the descriptor is not exact. + ;; The sent type cannot be exact because the descriptor is not exact. (br_on_cast_desc_eq 0 anyref (ref null $struct) (local.get $any) (local.get $desc) diff --git a/test/spec/relaxed-atomics.wast b/test/spec/relaxed-atomics.wast index c23d3c3da96..3707daf3148 100644 --- a/test/spec/relaxed-atomics.wast +++ b/test/spec/relaxed-atomics.wast @@ -5,7 +5,7 @@ (memory i64 1 1) ;; Memory index must come before memory ordering if present. - ;; Both immediates are optional; an ommitted memory ordering will be treated as seqcst. + ;; Both immediates are optional; an omitted memory ordering will be treated as seqcst. (func $test-all-ops (drop (i32.atomic.load (i32.const 0))) (drop (i32.atomic.load acqrel (i32.const 0))) diff --git a/third_party/llvm-project/DWARFContext.cpp b/third_party/llvm-project/DWARFContext.cpp index 64c153bfa6e..f11aa1fde18 100644 --- a/third_party/llvm-project/DWARFContext.cpp +++ b/third_party/llvm-project/DWARFContext.cpp @@ -1296,7 +1296,7 @@ struct SymInfo { }; /// Returns the address of symbol relocation used against and a section index. -/// Used for futher relocations computation. Symbol's section load address is +/// Used for further relocations computation. Symbol's section load address is static Expected getSymbolInfo(const object::ObjectFile &Obj, const RelocationRef &Reloc, const LoadedObjectInfo *L,