Fix some spelling issues (#3385)
Fix some of the spelling issues found by CSpell.
This commit is contained in:
@ -13,7 +13,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Object header of a WASM object, as the adddress of allocated memory
|
||||
* Object header of a WASM object, as the address of allocated memory
|
||||
* must be 8-byte aligned, the lowest 3 bits are zero, we use them to
|
||||
* mark the object:
|
||||
* bits[0] is 1: the object is an externref object
|
||||
@ -85,7 +85,7 @@ typedef struct WASMArrayObject {
|
||||
/* Must be pointer of WASMRttObject of array type */
|
||||
WASMObjectHeader header;
|
||||
/* (<array length> << 2) | <array element size>,
|
||||
* elem_count = lenght >> 2
|
||||
* elem_count = length >> 2
|
||||
* elem_size = 2 ^ (length & 0x3)
|
||||
*/
|
||||
uint32 length;
|
||||
|
||||
@ -127,7 +127,7 @@ execute_main(WASMModuleInstanceCommon *module_inst, int32 argc, char *argv[])
|
||||
#if WASM_ENABLE_THREAD_MGR != 0
|
||||
if (ret) {
|
||||
/* On a successful return from the `_start` function,
|
||||
we terminate other threads by mimicing wasi:proc_exit(0).
|
||||
we terminate other threads by mimicking wasi:proc_exit(0).
|
||||
|
||||
Note:
|
||||
- A return from the `main` function is an equivalent of
|
||||
@ -516,11 +516,11 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
|
||||
case VALUE_TYPE_V128:
|
||||
{
|
||||
/* it likes 0x123\0x234 or 123\234 */
|
||||
/* retrive first i64 */
|
||||
/* retrieve first i64 */
|
||||
*(uint64 *)(argv1 + p) = strtoull(argv[i], &endptr, 0);
|
||||
/* skip \ */
|
||||
endptr++;
|
||||
/* retrive second i64 */
|
||||
/* retrieve second i64 */
|
||||
*(uint64 *)(argv1 + p + 2) = strtoull(endptr, &endptr, 0);
|
||||
p += 4;
|
||||
break;
|
||||
|
||||
@ -536,7 +536,7 @@ search_thread_local_store_num(Vector *stores_by_tid, korp_tid tid,
|
||||
#endif
|
||||
|
||||
static unsigned
|
||||
retrive_thread_local_store_num(Vector *stores_by_tid, korp_tid tid)
|
||||
retrieve_thread_local_store_num(Vector *stores_by_tid, korp_tid tid)
|
||||
{
|
||||
#ifndef os_thread_local_attribute
|
||||
unsigned i = 0;
|
||||
@ -664,8 +664,8 @@ wasm_store_new(wasm_engine_t *engine)
|
||||
if (!engine || singleton_engine != engine)
|
||||
return NULL;
|
||||
|
||||
if (!retrive_thread_local_store_num(&engine->stores_by_tid,
|
||||
os_self_thread())) {
|
||||
if (!retrieve_thread_local_store_num(&engine->stores_by_tid,
|
||||
os_self_thread())) {
|
||||
if (!wasm_runtime_init_thread_env()) {
|
||||
LOG_ERROR("init thread environment failed");
|
||||
return NULL;
|
||||
@ -734,8 +734,8 @@ wasm_store_delete(wasm_store_t *store)
|
||||
|
||||
if (decrease_thread_local_store_num(&singleton_engine->stores_by_tid,
|
||||
os_self_thread())) {
|
||||
if (!retrive_thread_local_store_num(&singleton_engine->stores_by_tid,
|
||||
os_self_thread())) {
|
||||
if (!retrieve_thread_local_store_num(&singleton_engine->stores_by_tid,
|
||||
os_self_thread())) {
|
||||
wasm_runtime_destroy_thread_env();
|
||||
}
|
||||
}
|
||||
@ -2263,7 +2263,7 @@ wasm_module_new_ex(wasm_store_t *store, const wasm_byte_vec_t *binary,
|
||||
result = result || (pkg_type == Wasm_Module_AoT);
|
||||
#endif
|
||||
if (!result) {
|
||||
LOG_VERBOSE("current building isn't compatiable with the module,"
|
||||
LOG_VERBOSE("current building isn't compatible with the module,"
|
||||
"may need recompile");
|
||||
goto quit;
|
||||
}
|
||||
@ -3386,7 +3386,7 @@ wasm_func_call(const wasm_func_t *func, const wasm_val_vec_t *params,
|
||||
}
|
||||
}
|
||||
|
||||
/* copy parametes */
|
||||
/* copy parameters */
|
||||
if (param_count
|
||||
&& !params_to_argv(params, wasm_functype_params(func->type), argv,
|
||||
&argc)) {
|
||||
|
||||
@ -71,7 +71,7 @@ struct wasm_memorytype_t {
|
||||
|
||||
struct wasm_externtype_t {
|
||||
uint32 extern_kind;
|
||||
/* reservered space */
|
||||
/* reserved space */
|
||||
uint8 data[1];
|
||||
};
|
||||
|
||||
@ -205,7 +205,7 @@ struct wasm_extern_t {
|
||||
wasm_name_t *module_name;
|
||||
wasm_name_t *name;
|
||||
wasm_externkind_t kind;
|
||||
/* reservered space */
|
||||
/* reserved space */
|
||||
uint8 data[1];
|
||||
};
|
||||
|
||||
|
||||
@ -202,7 +202,7 @@ wasm_exec_env_destroy(WASMExecEnv *exec_env)
|
||||
wasm_cluster_wait_for_all_except_self(cluster, exec_env);
|
||||
#if WASM_ENABLE_DEBUG_INTERP != 0
|
||||
/* Must fire exit event after other threads exits, otherwise
|
||||
the stopped thread will be overrided by other threads */
|
||||
the stopped thread will be overriden by other threads */
|
||||
wasm_cluster_thread_exited(exec_env);
|
||||
#endif
|
||||
/* We have waited for other threads, this is the only alive thread, so
|
||||
|
||||
@ -71,7 +71,7 @@ uint32
|
||||
get_lib_rats_export_apis(NativeSymbol **p_lib_rats_apis);
|
||||
|
||||
static bool
|
||||
compare_type_with_signautre(uint8 type, const char signature)
|
||||
compare_type_with_signature(uint8 type, const char signature)
|
||||
{
|
||||
const char num_sig_map[] = { 'F', 'f', 'I', 'i' };
|
||||
|
||||
@ -122,10 +122,10 @@ check_symbol_signature(const WASMFuncType *type, const char *signature)
|
||||
sig = *p++;
|
||||
|
||||
/* a f64/f32/i64/i32/externref parameter */
|
||||
if (compare_type_with_signautre(type->types[i], sig))
|
||||
if (compare_type_with_signature(type->types[i], sig))
|
||||
continue;
|
||||
|
||||
/* a pointer/string paramter */
|
||||
/* a pointer/string parameter */
|
||||
if (type->types[i] != VALUE_TYPE_I32)
|
||||
/* pointer and string must be i32 type */
|
||||
return false;
|
||||
@ -156,7 +156,7 @@ check_symbol_signature(const WASMFuncType *type, const char *signature)
|
||||
return false;
|
||||
|
||||
/* result types includes: f64,f32,i64,i32,externref */
|
||||
if (!compare_type_with_signautre(type->types[i], *p))
|
||||
if (!compare_type_with_signature(type->types[i], *p))
|
||||
return false;
|
||||
|
||||
p++;
|
||||
|
||||
@ -922,7 +922,7 @@ wasm_runtime_is_xip_file(const uint8 *buf, uint32 size)
|
||||
read_uint16(p, p_end, e_type);
|
||||
return (e_type == E_TYPE_XIP) ? true : false;
|
||||
}
|
||||
else if (section_type >= AOT_SECTION_TYPE_SIGANATURE) {
|
||||
else if (section_type >= AOT_SECTION_TYPE_SIGNATURE) {
|
||||
return false;
|
||||
}
|
||||
p += section_size;
|
||||
@ -1034,7 +1034,7 @@ wasm_runtime_register_module_internal(const char *module_name,
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* module has empyt name, reset it */
|
||||
/* module has empty name, reset it */
|
||||
node->module_name = module_name;
|
||||
return true;
|
||||
}
|
||||
@ -2150,7 +2150,7 @@ wasm_runtime_finalize_call_function(WASMExecEnv *exec_env,
|
||||
bh_assert((argv && ret_argv) || (argc == 0));
|
||||
|
||||
if (argv == ret_argv) {
|
||||
/* no need to transfrom externref results */
|
||||
/* no need to transform externref results */
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2823,7 +2823,7 @@ void
|
||||
wasm_runtime_set_bounds_checks(WASMModuleInstanceCommon *module_inst,
|
||||
bool enable)
|
||||
{
|
||||
/* Alwary disable bounds checks if hw bounds checks enabled */
|
||||
/* Always disable bounds checks if hw bounds checks is enabled */
|
||||
#ifdef OS_ENABLE_HW_BOUND_CHECK
|
||||
enable = false;
|
||||
#endif
|
||||
@ -5892,7 +5892,7 @@ wasm_externref_ref2obj(uint32 externref_idx, void **p_extern_obj)
|
||||
{
|
||||
ExternRefMapNode *node;
|
||||
|
||||
/* catch a `ref.null` vairable */
|
||||
/* catch a `ref.null` variable */
|
||||
if (externref_idx == NULL_REF) {
|
||||
*p_extern_obj = NULL;
|
||||
return true;
|
||||
@ -6866,7 +6866,7 @@ wasm_runtime_load_depended_module(const WASMModuleCommon *parent_module,
|
||||
goto delete_loading_module;
|
||||
}
|
||||
if (get_package_type(buffer, buffer_size) != parent_module->module_type) {
|
||||
LOG_DEBUG("moudle %s type error", sub_module_name);
|
||||
LOG_DEBUG("module %s type error", sub_module_name);
|
||||
goto destroy_file_buffer;
|
||||
}
|
||||
|
||||
@ -7130,7 +7130,7 @@ wasm_runtime_detect_native_stack_overflow(WASMExecEnv *exec_env)
|
||||
uint8 *boundary = exec_env->native_stack_boundary;
|
||||
RECORD_STACK_USAGE(exec_env, (uint8 *)&boundary);
|
||||
if (boundary == NULL) {
|
||||
/* the platfrom doesn't support os_thread_get_stack_boundary */
|
||||
/* the platform doesn't support os_thread_get_stack_boundary */
|
||||
return true;
|
||||
}
|
||||
#if defined(OS_ENABLE_HW_BOUND_CHECK) && WASM_DISABLE_STACK_HW_BOUND_CHECK == 0
|
||||
@ -7153,7 +7153,7 @@ wasm_runtime_detect_native_stack_overflow_size(WASMExecEnv *exec_env,
|
||||
uint8 *boundary = exec_env->native_stack_boundary;
|
||||
RECORD_STACK_USAGE(exec_env, (uint8 *)&boundary);
|
||||
if (boundary == NULL) {
|
||||
/* the platfrom doesn't support os_thread_get_stack_boundary */
|
||||
/* the platform doesn't support os_thread_get_stack_boundary */
|
||||
return true;
|
||||
}
|
||||
#if defined(OS_ENABLE_HW_BOUND_CHECK) && WASM_DISABLE_STACK_HW_BOUND_CHECK == 0
|
||||
|
||||
@ -909,7 +909,7 @@ WASMExport *
|
||||
loader_find_export(const WASMModuleCommon *module, const char *module_name,
|
||||
const char *field_name, uint8 export_kind, char *error_buf,
|
||||
uint32 error_buf_size);
|
||||
#endif /* WASM_ENALBE_MULTI_MODULE */
|
||||
#endif /* WASM_ENABLE_MULTI_MODULE */
|
||||
|
||||
bool
|
||||
wasm_runtime_is_built_in_module(const char *module_name);
|
||||
|
||||
Reference in New Issue
Block a user