Comment wording cleanups.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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<bool> {
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -109,7 +109,7 @@ struct EbbHeaderBlockData<Variable> {
|
||||
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<Value> = 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();
|
||||
|
||||
@@ -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<Offset32> {
|
||||
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<Uoffset32> {
|
||||
if let Some(Token::Integer(text)) = self.token() {
|
||||
|
||||
@@ -177,7 +177,7 @@ pub fn translate_function_body(
|
||||
let mut func_imports = FunctionImports::new();
|
||||
let mut stack: Vec<Value> = Vec::new();
|
||||
let mut control_stack: Vec<ControlStackFrame> = 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,
|
||||
|
||||
Reference in New Issue
Block a user