File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
294
294
}
295
295
296
296
});
297
+ wa.emit_return ();
297
298
});
298
299
}
299
300
@@ -366,6 +367,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
366
367
367
368
wa.emit_local_get (3 );
368
369
wa.emit_call (m_rt_func_used_idx[print_i64]);
370
+ wa.emit_return ();
369
371
});
370
372
}
371
373
@@ -379,6 +381,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
379
381
wa.emit_local_get (1 );
380
382
wa.emit_local_get (3 );
381
383
wa.emit_f32_add ();
384
+ wa.emit_return ();
382
385
});
383
386
}
384
387
@@ -392,6 +395,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
392
395
wa.emit_local_get (1 );
393
396
wa.emit_local_get (3 );
394
397
wa.emit_f64_add ();
398
+ wa.emit_return ();
395
399
});
396
400
}
397
401
@@ -405,6 +409,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
405
409
wa.emit_local_get (1 );
406
410
wa.emit_local_get (3 );
407
411
wa.emit_f32_sub ();
412
+ wa.emit_return ();
408
413
});
409
414
}
410
415
@@ -418,6 +423,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
418
423
wa.emit_local_get (1 );
419
424
wa.emit_local_get (3 );
420
425
wa.emit_f64_sub ();
426
+ wa.emit_return ();
421
427
});
422
428
}
423
429
@@ -443,6 +449,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
443
449
wa.emit_f32_mul ();
444
450
445
451
wa.emit_f32_add ();
452
+ wa.emit_return ();
446
453
});
447
454
}
448
455
@@ -468,6 +475,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
468
475
wa.emit_f64_mul ();
469
476
470
477
wa.emit_f64_add ();
478
+ wa.emit_return ();
471
479
});
472
480
}
473
481
@@ -484,6 +492,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
484
492
485
493
wa.emit_f32_add ();
486
494
wa.emit_f32_sqrt ();
495
+ wa.emit_return ();
487
496
});
488
497
}
489
498
@@ -500,6 +509,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor<ASRToWASMVisitor> {
500
509
501
510
wa.emit_f64_add ();
502
511
wa.emit_f64_sqrt ();
512
+ wa.emit_return ();
503
513
});
504
514
}
505
515
Original file line number Diff line number Diff line change @@ -318,7 +318,6 @@ class WASMAssembler: public WASM_INSTS_VISITOR::WASMInstsAssembler<WASMAssembler
318
318
319
319
func_body ();
320
320
321
- wasm::emit_b8 (m_code_section, m_al, 0x0F ); // wasm return instruction
322
321
wasm::emit_expr_end (m_code_section, m_al);
323
322
wasm::fixup_len (m_code_section, m_al, len_idx_code_section_func_size);
324
323
You can’t perform that action at this time.
0 commit comments