From cb52e881958aeaef309f2a964ae88efbf15a0581 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Fri, 7 Apr 2023 13:44:50 +0530 Subject: [PATCH] tmp --- src/libasr/codegen/asr_to_wasm.cpp | 10 ++++++++++ src/libasr/codegen/wasm_assembler.h | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libasr/codegen/asr_to_wasm.cpp b/src/libasr/codegen/asr_to_wasm.cpp index 1482de2d7f..881df0cfed 100644 --- a/src/libasr/codegen/asr_to_wasm.cpp +++ b/src/libasr/codegen/asr_to_wasm.cpp @@ -294,6 +294,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { } }); + wa.emit_return(); }); } @@ -366,6 +367,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_local_get(3); wa.emit_call(m_rt_func_used_idx[print_i64]); + wa.emit_return(); }); } @@ -379,6 +381,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_local_get(1); wa.emit_local_get(3); wa.emit_f32_add(); + wa.emit_return(); }); } @@ -392,6 +395,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_local_get(1); wa.emit_local_get(3); wa.emit_f64_add(); + wa.emit_return(); }); } @@ -405,6 +409,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_local_get(1); wa.emit_local_get(3); wa.emit_f32_sub(); + wa.emit_return(); }); } @@ -418,6 +423,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_local_get(1); wa.emit_local_get(3); wa.emit_f64_sub(); + wa.emit_return(); }); } @@ -443,6 +449,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_f32_mul(); wa.emit_f32_add(); + wa.emit_return(); }); } @@ -468,6 +475,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_f64_mul(); wa.emit_f64_add(); + wa.emit_return(); }); } @@ -484,6 +492,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_f32_add(); wa.emit_f32_sqrt(); + wa.emit_return(); }); } @@ -500,6 +509,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { wa.emit_f64_add(); wa.emit_f64_sqrt(); + wa.emit_return(); }); } diff --git a/src/libasr/codegen/wasm_assembler.h b/src/libasr/codegen/wasm_assembler.h index f2b4bc32e4..660f467a41 100644 --- a/src/libasr/codegen/wasm_assembler.h +++ b/src/libasr/codegen/wasm_assembler.h @@ -318,7 +318,6 @@ class WASMAssembler: public WASM_INSTS_VISITOR::WASMInstsAssembler