mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Fix several typos and fix bh_log calculate mills (#3441)
This commit is contained in:
parent
0ceffe74a7
commit
30ed97cddc
|
@ -1204,7 +1204,7 @@ create_memory_info(const AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||||
func_ctx->mem_space_unchanged = mem_space_unchanged;
|
func_ctx->mem_space_unchanged = mem_space_unchanged;
|
||||||
|
|
||||||
memory_count = module->memory_count + module->import_memory_count;
|
memory_count = module->memory_count + module->import_memory_count;
|
||||||
/* If the module dosen't have memory, reserve
|
/* If the module doesn't have memory, reserve
|
||||||
one mem_info space with empty content */
|
one mem_info space with empty content */
|
||||||
if (memory_count == 0)
|
if (memory_count == 0)
|
||||||
memory_count = 1;
|
memory_count = 1;
|
||||||
|
|
|
@ -2364,12 +2364,11 @@ wasm_instantiate(WASMModule *module, WASMModuleInstance *parent,
|
||||||
(uint64)memory->num_bytes_per_page * memory->cur_page_count;
|
(uint64)memory->num_bytes_per_page * memory->cur_page_count;
|
||||||
bh_assert(memory_data || memory_size == 0);
|
bh_assert(memory_data || memory_size == 0);
|
||||||
|
|
||||||
bh_assert(
|
bh_assert(data_seg->base_offset.init_expr_type
|
||||||
data_seg->base_offset.init_expr_type == INIT_EXPR_TYPE_GET_GLOBAL
|
== INIT_EXPR_TYPE_GET_GLOBAL
|
||||||
|| (data_seg->base_offset.init_expr_type == INIT_EXPR_TYPE_I32_CONST
|
|| data_seg->base_offset.init_expr_type
|
||||||
&& !memory->is_memory64)
|
== (memory->is_memory64 ? INIT_EXPR_TYPE_I64_CONST
|
||||||
|| (data_seg->base_offset.init_expr_type == INIT_EXPR_TYPE_I64_CONST
|
: INIT_EXPR_TYPE_I32_CONST));
|
||||||
&& memory->is_memory64));
|
|
||||||
|
|
||||||
if (data_seg->base_offset.init_expr_type == INIT_EXPR_TYPE_GET_GLOBAL) {
|
if (data_seg->base_offset.init_expr_type == INIT_EXPR_TYPE_GET_GLOBAL) {
|
||||||
if (!check_global_init_expr(module,
|
if (!check_global_init_expr(module,
|
||||||
|
|
|
@ -38,7 +38,7 @@ bh_log(LogLevel log_level, const char *file, int line, const char *fmt, ...)
|
||||||
t = t % (60 * 60);
|
t = t % (60 * 60);
|
||||||
m = t / 60;
|
m = t / 60;
|
||||||
s = t % 60;
|
s = t % 60;
|
||||||
mills = (uint32)(usec % 1000);
|
mills = (uint32)((usec % 1000000) / 1000);
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%03" PRIu32, h, m, s,
|
"%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%03" PRIu32, h, m, s,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user