diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-14 21:36:39 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-14 21:36:39 +0900 |
| commit | eca1a0d51e7c8fc4855d0303c17ed8c740d595d6 (patch) | |
| tree | 7c23b60d2534296fb7efbf2d5de2bc4cca05dbe8 /src/codegen_wasm.c | |
| parent | 66f5d895a4d071db494b49777cba3ac02cb74773 (diff) | |
| download | ducc-eca1a0d51e7c8fc4855d0303c17ed8c740d595d6.tar.gz ducc-eca1a0d51e7c8fc4855d0303c17ed8c740d595d6.tar.zst ducc-eca1a0d51e7c8fc4855d0303c17ed8c740d595d6.zip | |
Diffstat (limited to 'src/codegen_wasm.c')
| -rw-r--r-- | src/codegen_wasm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/codegen_wasm.c b/src/codegen_wasm.c index 335a527..e0be383 100644 --- a/src/codegen_wasm.c +++ b/src/codegen_wasm.c @@ -36,7 +36,7 @@ static void codegen_func_prologue(CodeGen* g, AstNode* ast) { fprintf(g->out, " (result i32)\n"); } -static void codegen_func_epilogue(CodeGen* g, AstNode* ast) { +static void codegen_func_epilogue(CodeGen*, AstNode*) { } static void codegen_int_expr(CodeGen* g, AstNode* ast) { @@ -57,7 +57,7 @@ static void codegen_binary_expr(CodeGen* g, AstNode* ast, GenMode gen_mode) { } } -static void codegen_lvar(CodeGen* g, AstNode* ast, GenMode gen_mode) { +static void codegen_lvar(CodeGen* g, AstNode* ast, GenMode) { fprintf(g->out, " local.get $l_%s\n", ast->name); } @@ -109,9 +109,6 @@ static void codegen_if_stmt(CodeGen* g, AstNode* ast) { fprintf(g->out, " )\n"); } -static void codegen_nop(CodeGen* g, AstNode* ast) { -} - static void codegen_block_stmt(CodeGen* g, AstNode* ast) { for (int i = 0; i < ast->node_len; ++i) { AstNode* stmt = ast->node_items + i; @@ -127,7 +124,7 @@ static void codegen_stmt(CodeGen* g, AstNode* ast) { } else if (ast->kind == AstNodeKind_if_stmt) { codegen_if_stmt(g, ast); } else if (ast->kind == AstNodeKind_nop) { - codegen_nop(g, ast); + // Do nothing. } else { unreachable(); } |
