diff --git a/lib/cretonne/meta/base/settings.py b/lib/cretonne/meta/base/settings.py index 186c808524..46ff16d851 100644 --- a/lib/cretonne/meta/base/settings.py +++ b/lib/cretonne/meta/base/settings.py @@ -1,7 +1,7 @@ """ Cretonne shared settings. -This module defines settings are are relevant for all code generators. +This module defines settings relevant for all code generators. """ from __future__ import absolute_import from cdsl.settings import SettingGroup, BoolSetting, EnumSetting diff --git a/lib/cretonne/meta/gen_instr.py b/lib/cretonne/meta/gen_instr.py index 104f779e2d..3b43ad368b 100644 --- a/lib/cretonne/meta/gen_instr.py +++ b/lib/cretonne/meta/gen_instr.py @@ -451,8 +451,8 @@ def gen_type_constraints(fmt, instrs): def gen_format_constructor(iform, fmt): # type: (InstructionFormat, srcgen.Formatter) -> None """ - Emit a method for creating and inserting inserting an `iform` instruction, - where `iform` is an instruction format. + Emit a method for creating and inserting an `iform` instruction, where + `iform` is an instruction format. All instruction formats take an `opcode` argument and a `ctrl_typevar` argument for deducing the result types. diff --git a/lib/cretonne/src/ir/layout.rs b/lib/cretonne/src/ir/layout.rs index c1cc62b110..7f3247c080 100644 --- a/lib/cretonne/src/ir/layout.rs +++ b/lib/cretonne/src/ir/layout.rs @@ -1017,14 +1017,14 @@ pub trait CursorBase { /// - If the cursor points to the top of an EBB, the new EBB is inserted above the current one. /// - If the cursor is not pointing at anything, the new EBB is placed last in the layout. /// - /// This means that is is always valid to call this method, and it always leaves the cursor in + /// This means that it is always valid to call this method, and it always leaves the cursor in /// a state that will insert instructions into the new EBB. fn insert_ebb(&mut self, new_ebb: Ebb) { use self::CursorPosition::*; match self.position() { At(inst) => { self.layout_mut().split_ebb(new_ebb, inst); - // All other cases move to `After(ebb)`, but in this case we we'll stay `At(inst)`. + // All other cases move to `After(ebb)`, but in this case we'll stay `At(inst)`. return; } Nowhere => self.layout_mut().append_ebb(new_ebb), diff --git a/lib/filecheck/src/checker.rs b/lib/filecheck/src/checker.rs index 19d8ae8092..9c88df8eb4 100644 --- a/lib/filecheck/src/checker.rs +++ b/lib/filecheck/src/checker.rs @@ -103,7 +103,7 @@ impl CheckerBuilder { /// Add a potential directive line. /// - /// Returns true if this is a a directive with one of the known prefixes. + /// Returns true if this is a directive with one of the known prefixes. /// Returns false if no known directive was found. /// Returns an error if there is a problem with the directive. pub fn directive(&mut self, l: &str) -> Result { @@ -206,7 +206,7 @@ impl Checker { state.recorder.directive(dct_idx); if let Some((match_begin, match_end)) = state.match_positive(pat, range)? { if let Directive::Unordered(_) = *dct { - // This was an unordered unordered match. + // This was an unordered match. // Keep track of the largest matched position, but leave `last_ordered` alone. state.max_match = max(state.max_match, match_end); } else { diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index a7d98004d1..c896e13f8e 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -393,7 +393,7 @@ where self.func.dfg.signatures.get(sigref) } - /// Creates a argument for a specific `Ebb` by appending it to the list of already existing + /// Creates an argument for a specific `Ebb` by appending it to the list of already existing /// arguments. /// /// **Note:** this function has to be called at the creation of the `Ebb` before adding diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs index 3fefb4e555..279630ef00 100644 --- a/lib/frontend/src/ssa.rs +++ b/lib/frontend/src/ssa.rs @@ -109,7 +109,7 @@ struct EbbHeaderBlockData { sealed: bool, // The ebb which this block is part of. ebb: Ebb, - // List of current Ebb arguments for which a earlier def has not been found yet. + // List of current Ebb arguments for which an earlier def has not been found yet. undef_variables: Vec<(Variable, Value)>, } @@ -426,7 +426,7 @@ where preds: &[(Block, Inst)], ) -> (Value, SideEffects) { let mut pred_values: ZeroOneOrMore = ZeroOneOrMore::Zero(); - // TODO: find a way not not allocate a vector + // TODO: find a way to not allocate a vector let mut jump_args_to_append: Vec<(Block, Inst, Value)> = Vec::new(); let ty = dfg.value_type(temp_arg_val); let mut side_effects = SideEffects::new(); diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index f8e90de1aa..d35ee6bcb4 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -571,7 +571,7 @@ impl<'a> Parser<'a> { // Match and consume an optional offset32 immediate. // - // Note that that this will match an empty string as an empty offset, and that if an offset is + // Note that this will match an empty string as an empty offset, and that if an offset is // present, it must contain a sign. fn optional_offset32(&mut self) -> Result { if let Some(Token::Integer(text)) = self.token() { @@ -587,7 +587,7 @@ impl<'a> Parser<'a> { // Match and consume an optional uoffset32 immediate. // - // Note that that this will match an empty string as an empty offset, and that if an offset is + // Note that this will match an empty string as an empty offset, and that if an offset is // present, it must contain a `+` sign. fn optional_uoffset32(&mut self) -> Result { if let Some(Token::Integer(text)) = self.token() { diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 91dfb00281..62d5adcfe8 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -177,7 +177,7 @@ pub fn translate_function_body( let mut func_imports = FunctionImports::new(); let mut stack: Vec = Vec::new(); let mut control_stack: Vec = Vec::new(); - // We introduce a arbitrary scope for the FunctionBuilder object + // We introduce an arbitrary scope for the FunctionBuilder object { let mut builder = FunctionBuilder::new(&mut func, il_builder); let first_ebb = builder.create_ebb(); @@ -1237,7 +1237,7 @@ fn translate_unreachable_operator( match frame { // If it is a loop we also have to seal the body loop block ControlStackFrame::Loop { header, .. } => builder.seal_block(header), - // If it is a if then the code after is reachable again + // If it is an if then the code after is reachable again ControlStackFrame::If { .. } => { state.real_unreachable_stack_depth = 1; } @@ -1297,7 +1297,7 @@ fn args_count( signatures[functions[index]].argument_types.len() } -// Given a index in the function index space, search for it in the function imports and if it is +// Given an index in the function index space, search for it in the function imports and if it is // not there add it to the function imports. fn find_function_import( index: FunctionIndex,