all: Fix spelling mistakes based on codespell check.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2023-03-08 14:10:02 +11:00
parent e160fe7bc6
commit b1229efbd1
191 changed files with 282 additions and 282 deletions

View File

@@ -80,7 +80,7 @@ uint8_t *mp_asm_base_get_cur_to_write_bytes(void *as_in, size_t num_bytes_to_wri
void mp_asm_base_label_assign(mp_asm_base_t *as, size_t label) {
assert(label < as->max_num_labels);
// Assiging a label ends any dead-code region, and all following machine
// Assigning a label ends any dead-code region, and all following machine
// code should be emitted (until another mp_asm_base_suppress_code() call).
as->suppress = false;

View File

@@ -290,7 +290,7 @@ bool asm_thumb_b_n_label(asm_thumb_t *as, uint label) {
#define OP_BCC_N(cond, byte_offset) (0xd000 | ((cond) << 8) | (((byte_offset) >> 1) & 0x00ff))
// all these bit arithmetics need coverage testing!
// all these bit-arithmetic operations need coverage testing!
#define OP_BCC_W_HI(cond, byte_offset) (0xf000 | ((cond) << 6) | (((byte_offset) >> 10) & 0x0400) | (((byte_offset) >> 14) & 0x003f))
#define OP_BCC_W_LO(byte_offset) (0x8000 | ((byte_offset) & 0x2000) | (((byte_offset) >> 1) & 0x0fff))

View File

@@ -3493,7 +3493,7 @@ void mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr source_file, bool
}
}
// update maximim number of labels needed
// update maximum number of labels needed
if (comp->next_label > max_num_labels) {
max_num_labels = comp->next_label;
}

View File

@@ -439,7 +439,7 @@ void mp_emit_bc_set_source_line(emit_t *emit, mp_uint_t source_line) {
}
void mp_emit_bc_label_assign(emit_t *emit, mp_uint_t l) {
// Assiging a label ends any dead-code region, and all following opcodes
// Assigning a label ends any dead-code region, and all following opcodes
// should be emitted (until another unconditional flow control).
emit->suppress = false;

View File

@@ -894,7 +894,7 @@ STATIC void emit_access_stack(emit_t *emit, int pos, vtype_kind_t *vtype, int re
}
// does an efficient X=pop(); discard(); push(X)
// needs a (non-temp) register in case the poped element was stored in the stack
// needs a (non-temp) register in case the popped element was stored in the stack
STATIC void emit_fold_stack_top(emit_t *emit, int reg_dest) {
stack_info_t *si = &emit->stack_info[emit->stack_size - 2];
si[0] = si[1];

View File

@@ -39,7 +39,7 @@
Routine for converting a arbitrary floating
point number into a string.
The code in this funcion was inspired from Fred Bayer's pdouble.c.
The code in this function was inspired from Fred Bayer's pdouble.c.
Since pdouble.c was released as Public Domain, I'm releasing this
code as public domain as well.

View File

@@ -150,10 +150,10 @@ STATIC void gc_setup_area(mp_state_mem_area_t *area, void *start, void *end) {
#endif
#if MICROPY_ENABLE_FINALISER
// clear ATBs and FTBs
// clear ATB's and FTB's
memset(area->gc_alloc_table_start, 0, gc_finaliser_table_byte_len + area->gc_alloc_table_byte_len + ALLOC_TABLE_GAP_BYTE);
#else
// clear ATBs
// clear ATB's
memset(area->gc_alloc_table_start, 0, area->gc_alloc_table_byte_len + ALLOC_TABLE_GAP_BYTE);
#endif

View File

@@ -24,7 +24,7 @@ def check_non_ascii(msg):
# Replace <char><space> with <char | 0x80>.
# Trival scheme to demo/test.
# Trivial scheme to demo/test.
def space_compression(error_strings):
for line in error_strings:
check_non_ascii(line)

View File

@@ -34,7 +34,7 @@ QSTR_GEN_CXXFLAGS += $(QSTR_GEN_FLAGS)
# tree.
#
# So for example, py/map.c would have an object file name py/map.o
# The object files will go into the build directory and mantain the same
# The object files will go into the build directory and maintain the same
# directory structure as the source tree. So the final dependency will look
# like this:
#
@@ -192,7 +192,7 @@ endif
ifneq ($(PROG),)
# Build a standalone executable (unix does this)
# The executable should have an .exe extension for builds targetting 'pure'
# The executable should have an .exe extension for builds targeting 'pure'
# Windows, i.e. msvc or mingw builds, but not when using msys or cygwin's gcc.
COMPILER_TARGET := $(shell $(CC) -dumpmachine)
ifneq (,$(findstring mingw,$(COMPILER_TARGET)))

View File

@@ -79,7 +79,7 @@ STATIC mp_obj_t mp_builtin___build_class__(size_t n_args, const mp_obj_t *args)
meta_args[2] = class_locals; // dict of members
mp_obj_t new_class = mp_call_function_n_kw(meta, 3, 0, meta_args);
// store into cell if neede
// store into cell if needed
if (cell != mp_const_none) {
mp_obj_cell_set(cell, new_class);
}

View File

@@ -217,7 +217,7 @@ mp_obj_t mp_obj_exception_make_new(const mp_obj_type_t *type, size_t n_args, siz
mp_obj_tuple_t *o_tuple;
if (n_args == 0) {
// No args, can use the empty tuple straightaway
// No args, can use the empty tuple straight away
o_tuple = (mp_obj_tuple_t *)&mp_const_empty_tuple_obj;
} else {
// Try to allocate memory for the tuple containing the args

View File

@@ -619,7 +619,7 @@ STATIC void mp_obj_instance_load_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des
mp_obj_t member = dest[0];
if (member != MP_OBJ_NULL) {
if (!(self->base.type->flags & MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS)) {
// Class doesn't have any special accessors to check so return straightaway
// Class doesn't have any special accessors to check so return straight away
return;
}

View File

@@ -553,7 +553,7 @@ STATIC mp_parse_node_t make_node_const_object(parser_t *parser, size_t src_line,
return (mp_parse_node_t)pn;
}
// Create a parse node represeting a constant object, possibly optimising the case of
// Create a parse node representing a constant object, possibly optimising the case of
// an integer, by putting the (small) integer value directly in the parse node itself.
STATIC mp_parse_node_t make_node_const_object_optimised(parser_t *parser, size_t src_line, mp_obj_t obj) {
if (mp_obj_is_small_int(obj)) {
@@ -1002,7 +1002,7 @@ STATIC void push_result_rule(parser_t *parser, size_t src_line, uint8_t rule_id,
#if MICROPY_COMP_CONST_TUPLE
if (build_tuple(parser, src_line, rule_id, num_args)) {
// we built a tuple from this rule so return straightaway
// we built a tuple from this rule so return straight away
return;
}
#endif

View File

@@ -450,7 +450,7 @@ mp_obj_t MICROPY_WRAP_MP_BINARY_OP(mp_binary_op)(mp_binary_op_t op, mp_obj_t lhs
} else {
// standard precision is enough for right-shift
if (rhs_val >= (mp_int_t)(sizeof(lhs_val) * MP_BITS_PER_BYTE)) {
// Shifting to big amounts is underfined behavior
// Shifting to big amounts is undefined behavior
// in C and is CPU-dependent; propagate sign bit.
rhs_val = sizeof(lhs_val) * MP_BITS_PER_BYTE - 1;
}

View File

@@ -50,7 +50,7 @@ typedef struct _id_info_t {
uint8_t kind;
uint8_t flags;
// when it's an ID_INFO_KIND_LOCAL this is the unique number of the local
// whet it's an ID_INFO_KIND_CELL/FREE this is the unique number of the closed over variable
// when it's an ID_INFO_KIND_CELL/FREE this is the unique number of the closed over variable
uint16_t local_num;
qstr qst;
} id_info_t;

View File

@@ -156,7 +156,7 @@ bool mp_seq_cmp_objs(mp_uint_t op, const mp_obj_t *items1, size_t len1, const mp
continue;
}
// Othewise, if they are not equal, we can have final decision based on them
// Otherwise, if they are not equal, we can have final decision based on them
if (op == MP_BINARY_OP_EQUAL) {
// In particular, if we are checking for equality, here're the answer
return false;