Fix some coding style issues, fix doc typo and refine some codes (#392)

This commit is contained in:
Wenyong Huang
2020-09-20 08:20:45 +08:00
committed by GitHub
parent 7c8ccc7c26
commit e501a6963b
20 changed files with 155 additions and 227 deletions

View File

@ -3961,7 +3961,7 @@ fail:
LOG_OP("\nemit_op [%02x]\t", opcode); \
} while (0)
// drop local.get / const / block / loop / end
/* drop local.get / const / block / loop / end */
#define skip_label() do { \
wasm_loader_emit_backspace(loader_ctx, sizeof(int16)); \
LOG_OP("\ndelete last op\n"); \
@ -4334,7 +4334,7 @@ wasm_loader_push_frame_offset(WASMLoaderContext *ctx, uint8 type,
if (type == VALUE_TYPE_VOID)
return true;
// only check memory overflow in first traverse
/* only check memory overflow in first traverse */
if (ctx->p_code_compiled == NULL) {
if (!check_offset_push(ctx, error_buf, error_buf_size))
return false;
@ -5695,7 +5695,7 @@ handle_op_block_and_loop:
+ func->func_type->param_count + idx);
POP_TYPE(ret_type);
#if WASM_ENABLE_FAST_INTERP != 0
// emit the offset after return opcode
/* emit the offset after return opcode */
POP_OFFSET_TYPE(ret_type);
#endif
}
@ -5714,7 +5714,7 @@ handle_op_block_and_loop:
read_leb_uint32(p, p_end, func_idx);
#if WASM_ENABLE_FAST_INTERP != 0
// we need to emit func_idx before arguments
/* we need to emit func_idx before arguments */
emit_uint32(loader_ctx, func_idx);
#endif
@ -5769,7 +5769,7 @@ handle_op_block_and_loop:
read_leb_uint32(p, p_end, type_idx);
#if WASM_ENABLE_FAST_INTERP != 0
// we need to emit func_idx before arguments
/* we need to emit func_idx before arguments */
emit_uint32(loader_ctx, type_idx);
#endif