Skip to content

Commit cb52e88

Browse files
committed
tmp
1 parent e9b6b55 commit cb52e88

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/libasr/codegen/asr_to_wasm.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
294294
}
295295

296296
});
297+
wa.emit_return();
297298
});
298299
}
299300

@@ -366,6 +367,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
366367

367368
wa.emit_local_get(3);
368369
wa.emit_call(m_rt_func_used_idx[print_i64]);
370+
wa.emit_return();
369371
});
370372
}
371373

@@ -379,6 +381,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
379381
wa.emit_local_get(1);
380382
wa.emit_local_get(3);
381383
wa.emit_f32_add();
384+
wa.emit_return();
382385
});
383386
}
384387

@@ -392,6 +395,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
392395
wa.emit_local_get(1);
393396
wa.emit_local_get(3);
394397
wa.emit_f64_add();
398+
wa.emit_return();
395399
});
396400
}
397401

@@ -405,6 +409,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
405409
wa.emit_local_get(1);
406410
wa.emit_local_get(3);
407411
wa.emit_f32_sub();
412+
wa.emit_return();
408413
});
409414
}
410415

@@ -418,6 +423,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
418423
wa.emit_local_get(1);
419424
wa.emit_local_get(3);
420425
wa.emit_f64_sub();
426+
wa.emit_return();
421427
});
422428
}
423429

@@ -443,6 +449,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
443449
wa.emit_f32_mul();
444450

445451
wa.emit_f32_add();
452+
wa.emit_return();
446453
});
447454
}
448455

@@ -468,6 +475,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
468475
wa.emit_f64_mul();
469476

470477
wa.emit_f64_add();
478+
wa.emit_return();
471479
});
472480
}
473481

@@ -484,6 +492,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
484492

485493
wa.emit_f32_add();
486494
wa.emit_f32_sqrt();
495+
wa.emit_return();
487496
});
488497
}
489498

@@ -500,6 +509,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
500509

501510
wa.emit_f64_add();
502511
wa.emit_f64_sqrt();
512+
wa.emit_return();
503513
});
504514
}
505515

src/libasr/codegen/wasm_assembler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ class WASMAssembler: public WASM_INSTS_VISITOR::WASMInstsAssembler<WASMAssembler
318318

319319
func_body();
320320

321-
wasm::emit_b8(m_code_section, m_al, 0x0F); // wasm return instruction
322321
wasm::emit_expr_end(m_code_section, m_al);
323322
wasm::fixup_len(m_code_section, m_al, len_idx_code_section_func_size);
324323

0 commit comments

Comments
 (0)