From de8a93e30df9f261574c2786b6ac55e40cb2ad5d Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Mon, 29 Oct 2018 14:17:46 +0100 Subject: [PATCH] Added loop spectests --- spectests/README.md | 1 + spectests/loop_.wast | 442 +++++++++++ src/build_spectests.rs | 3 +- src/spectests/loop_.rs | 1609 ++++++++++++++++++++++++++++++++++++++++ src/spectests/mod.rs | 1 + 5 files changed, 2055 insertions(+), 1 deletion(-) create mode 100644 spectests/loop_.wast create mode 100644 src/spectests/loop_.rs diff --git a/spectests/README.md b/spectests/README.md index 062f9a57b..e257bc43d 100644 --- a/spectests/README.md +++ b/spectests/README.md @@ -43,3 +43,4 @@ There are some cases that we decided to skip for now to fasten the time to relea - `call_indirect.wast` - `call.wast` - `globals.wast` + - `loop.wast` diff --git a/spectests/loop_.wast b/spectests/loop_.wast new file mode 100644 index 000000000..41a178d5f --- /dev/null +++ b/spectests/loop_.wast @@ -0,0 +1,442 @@ +;; Test `loop` opcode + +(module + (memory 1) + + (func $dummy) + + (func (export "empty") + (loop) + (loop $l) + ) + + (func (export "singular") (result i32) + (loop (nop)) + (loop (result i32) (i32.const 7)) + ) + + (func (export "multi") (result i32) + (loop (call $dummy) (call $dummy) (call $dummy) (call $dummy)) + (loop (result i32) (call $dummy) (call $dummy) (call $dummy) (i32.const 8)) + ) + + (func (export "nested") (result i32) + (loop (result i32) + (loop (call $dummy) (block) (nop)) + (loop (result i32) (call $dummy) (i32.const 9)) + ) + ) + + (func (export "deep") (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (loop (result i32) (block (result i32) + (call $dummy) (i32.const 150) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + )) + ) + + (func (export "as-select-first") (result i32) + (select (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 3)) + ) + (func (export "as-select-mid") (result i32) + (select (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 3)) + ) + (func (export "as-select-last") (result i32) + (select (i32.const 2) (i32.const 3) (loop (result i32) (i32.const 1))) + ) + + (func (export "as-if-condition") + (loop (result i32) (i32.const 1)) (if (then (call $dummy))) + ) + (func (export "as-if-then") (result i32) + (if (result i32) (i32.const 1) (then (loop (result i32) (i32.const 1))) (else (i32.const 2))) + ) + (func (export "as-if-else") (result i32) + (if (result i32) (i32.const 1) (then (i32.const 2)) (else (loop (result i32) (i32.const 1)))) + ) + + (func (export "as-br_if-first") (result i32) + (block (result i32) (br_if 0 (loop (result i32) (i32.const 1)) (i32.const 2))) + ) + (func (export "as-br_if-last") (result i32) + (block (result i32) (br_if 0 (i32.const 2) (loop (result i32) (i32.const 1)))) + ) + + (func (export "as-br_table-first") (result i32) + (block (result i32) (loop (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0)) + ) + (func (export "as-br_table-last") (result i32) + (block (result i32) (i32.const 2) (loop (result i32) (i32.const 1)) (br_table 0 0)) + ) + + (func $func (param i32 i32) (result i32) (get_local 0)) + (type $check (func (param i32 i32) (result i32))) + (table anyfunc (elem $func)) + (func (export "as-call_indirect-first") (result i32) + (block (result i32) + (call_indirect (type $check) + (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-mid") (result i32) + (block (result i32) + (call_indirect (type $check) + (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 0) + ) + ) + ) + (func (export "as-call_indirect-last") (result i32) + (block (result i32) + (call_indirect (type $check) + (i32.const 1) (i32.const 2) (loop (result i32) (i32.const 0)) + ) + ) + ) + + (func (export "as-store-first") + (loop (result i32) (i32.const 1)) (i32.const 1) (i32.store) + ) + (func (export "as-store-last") + (i32.const 10) (loop (result i32) (i32.const 1)) (i32.store) + ) + + (func (export "as-memory.grow-value") (result i32) + (memory.grow (loop (result i32) (i32.const 1))) + ) + + (func $f (param i32) (result i32) (get_local 0)) + + (func (export "as-call-value") (result i32) + (call $f (loop (result i32) (i32.const 1))) + ) + (func (export "as-return-value") (result i32) + (loop (result i32) (i32.const 1)) (return) + ) + (func (export "as-drop-operand") + (drop (loop (result i32) (i32.const 1))) + ) + (func (export "as-br-value") (result i32) + (block (result i32) (br 0 (loop (result i32) (i32.const 1)))) + ) + (func (export "as-set_local-value") (result i32) + (local i32) (set_local 0 (loop (result i32) (i32.const 1))) (get_local 0) + ) + (func (export "as-tee_local-value") (result i32) + (local i32) (tee_local 0 (loop (result i32) (i32.const 1))) + ) + (global $a (mut i32) (i32.const 0)) + (func (export "as-set_global-value") (result i32) + (set_global $a (loop (result i32) (i32.const 1))) + (get_global $a) + ) + (func (export "as-load-operand") (result i32) + (i32.load (loop (result i32) (i32.const 1))) + ) + + (func (export "as-unary-operand") (result i32) + (i32.ctz (loop (result i32) (call $dummy) (i32.const 13))) + ) + (func (export "as-binary-operand") (result i32) + (i32.mul + (loop (result i32) (call $dummy) (i32.const 3)) + (loop (result i32) (call $dummy) (i32.const 4)) + ) + ) + (func (export "as-test-operand") (result i32) + (i32.eqz (loop (result i32) (call $dummy) (i32.const 13))) + ) + (func (export "as-compare-operand") (result i32) + (f32.gt + (loop (result f32) (call $dummy) (f32.const 3)) + (loop (result f32) (call $dummy) (f32.const 3)) + ) + ) + + (func (export "break-bare") (result i32) + (block (loop (br 1) (br 0) (unreachable))) + (block (loop (br_if 1 (i32.const 1)) (unreachable))) + (block (loop (br_table 1 (i32.const 0)) (unreachable))) + (block (loop (br_table 1 1 1 (i32.const 1)) (unreachable))) + (i32.const 19) + ) + (func (export "break-value") (result i32) + (block (result i32) + (loop (result i32) (br 1 (i32.const 18)) (br 0) (i32.const 19)) + ) + ) + (func (export "break-repeated") (result i32) + (block (result i32) + (loop (result i32) + (br 1 (i32.const 18)) + (br 1 (i32.const 19)) + (drop (br_if 1 (i32.const 20) (i32.const 0))) + (drop (br_if 1 (i32.const 20) (i32.const 1))) + (br 1 (i32.const 21)) + (br_table 1 (i32.const 22) (i32.const 0)) + (br_table 1 1 1 (i32.const 23) (i32.const 1)) + (i32.const 21) + ) + ) + ) + (func (export "break-inner") (result i32) + (local i32) + (set_local 0 (i32.const 0)) + (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (block (result i32) (br 2 (i32.const 0x1))))))) + (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (loop (result i32) (br 2 (i32.const 0x2))))))) + (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (block (result i32) (loop (result i32) (br 1 (i32.const 0x4)))))))) + (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (i32.ctz (br 1 (i32.const 0x8))))))) + (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (i32.ctz (loop (result i32) (br 2 (i32.const 0x10)))))))) + (get_local 0) + ) + (func (export "cont-inner") (result i32) + (local i32) + (set_local 0 (i32.const 0)) + (set_local 0 (i32.add (get_local 0) (loop (result i32) (loop (result i32) (br 1))))) + (set_local 0 (i32.add (get_local 0) (loop (result i32) (i32.ctz (br 0))))) + (set_local 0 (i32.add (get_local 0) (loop (result i32) (i32.ctz (loop (result i32) (br 1)))))) + (get_local 0) + ) + + (func $fx (export "effects") (result i32) + (local i32) + (block + (loop + (set_local 0 (i32.const 1)) + (set_local 0 (i32.mul (get_local 0) (i32.const 3))) + (set_local 0 (i32.sub (get_local 0) (i32.const 5))) + (set_local 0 (i32.mul (get_local 0) (i32.const 7))) + (br 1) + (set_local 0 (i32.mul (get_local 0) (i32.const 100))) + ) + ) + (i32.eq (get_local 0) (i32.const -14)) + ) + + (func (export "while") (param i64) (result i64) + (local i64) + (set_local 1 (i64.const 1)) + (block + (loop + (br_if 1 (i64.eqz (get_local 0))) + (set_local 1 (i64.mul (get_local 0) (get_local 1))) + (set_local 0 (i64.sub (get_local 0) (i64.const 1))) + (br 0) + ) + ) + (get_local 1) + ) + + (func (export "for") (param i64) (result i64) + (local i64 i64) + (set_local 1 (i64.const 1)) + (set_local 2 (i64.const 2)) + (block + (loop + (br_if 1 (i64.gt_u (get_local 2) (get_local 0))) + (set_local 1 (i64.mul (get_local 1) (get_local 2))) + (set_local 2 (i64.add (get_local 2) (i64.const 1))) + (br 0) + ) + ) + (get_local 1) + ) + + (func (export "nesting") (param f32 f32) (result f32) + (local f32 f32) + (block + (loop + (br_if 1 (f32.eq (get_local 0) (f32.const 0))) + (set_local 2 (get_local 1)) + (block + (loop + (br_if 1 (f32.eq (get_local 2) (f32.const 0))) + (br_if 3 (f32.lt (get_local 2) (f32.const 0))) + (set_local 3 (f32.add (get_local 3) (get_local 2))) + (set_local 2 (f32.sub (get_local 2) (f32.const 2))) + (br 0) + ) + ) + (set_local 3 (f32.div (get_local 3) (get_local 0))) + (set_local 0 (f32.sub (get_local 0) (f32.const 1))) + (br 0) + ) + ) + (get_local 3) + ) +) + +(assert_return (invoke "empty")) +(assert_return (invoke "singular") (i32.const 7)) +(assert_return (invoke "multi") (i32.const 8)) +(assert_return (invoke "nested") (i32.const 9)) +(assert_return (invoke "deep") (i32.const 150)) + +(assert_return (invoke "as-select-first") (i32.const 1)) +(assert_return (invoke "as-select-mid") (i32.const 2)) +(assert_return (invoke "as-select-last") (i32.const 2)) + +(assert_return (invoke "as-if-condition")) +(assert_return (invoke "as-if-then") (i32.const 1)) +(assert_return (invoke "as-if-else") (i32.const 2)) + +(assert_return (invoke "as-br_if-first") (i32.const 1)) +(assert_return (invoke "as-br_if-last") (i32.const 2)) + +(assert_return (invoke "as-br_table-first") (i32.const 1)) +(assert_return (invoke "as-br_table-last") (i32.const 2)) + +(assert_return (invoke "as-call_indirect-first") (i32.const 1)) +(assert_return (invoke "as-call_indirect-mid") (i32.const 2)) +(assert_return (invoke "as-call_indirect-last") (i32.const 1)) + +(assert_return (invoke "as-store-first")) +(assert_return (invoke "as-store-last")) + +;; SKIP_MEMORY_GROW +;; (assert_return (invoke "as-memory.grow-value") (i32.const 1)) +(assert_return (invoke "as-call-value") (i32.const 1)) +(assert_return (invoke "as-return-value") (i32.const 1)) +(assert_return (invoke "as-drop-operand")) +(assert_return (invoke "as-br-value") (i32.const 1)) +(assert_return (invoke "as-set_local-value") (i32.const 1)) +(assert_return (invoke "as-tee_local-value") (i32.const 1)) +(assert_return (invoke "as-set_global-value") (i32.const 1)) +(assert_return (invoke "as-load-operand") (i32.const 1)) + +(assert_return (invoke "as-unary-operand") (i32.const 0)) +(assert_return (invoke "as-binary-operand") (i32.const 12)) +(assert_return (invoke "as-test-operand") (i32.const 0)) +(assert_return (invoke "as-compare-operand") (i32.const 0)) + +(assert_return (invoke "break-bare") (i32.const 19)) +(assert_return (invoke "break-value") (i32.const 18)) +(assert_return (invoke "break-repeated") (i32.const 18)) +(assert_return (invoke "break-inner") (i32.const 0x1f)) + +(assert_return (invoke "effects") (i32.const 1)) + +(assert_return (invoke "while" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "while" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "while" (i64.const 2)) (i64.const 2)) +(assert_return (invoke "while" (i64.const 3)) (i64.const 6)) +(assert_return (invoke "while" (i64.const 5)) (i64.const 120)) +(assert_return (invoke "while" (i64.const 20)) (i64.const 2432902008176640000)) + +(assert_return (invoke "for" (i64.const 0)) (i64.const 1)) +(assert_return (invoke "for" (i64.const 1)) (i64.const 1)) +(assert_return (invoke "for" (i64.const 2)) (i64.const 2)) +(assert_return (invoke "for" (i64.const 3)) (i64.const 6)) +(assert_return (invoke "for" (i64.const 5)) (i64.const 120)) +(assert_return (invoke "for" (i64.const 20)) (i64.const 2432902008176640000)) + +(assert_return (invoke "nesting" (f32.const 0) (f32.const 7)) (f32.const 0)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 0)) (f32.const 0)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 2)) (f32.const 2)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 3)) (f32.const 4)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 4)) (f32.const 6)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 100)) (f32.const 2550)) +(assert_return (invoke "nesting" (f32.const 1) (f32.const 101)) (f32.const 2601)) +(assert_return (invoke "nesting" (f32.const 2) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 3) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 10) (f32.const 1)) (f32.const 1)) +(assert_return (invoke "nesting" (f32.const 2) (f32.const 2)) (f32.const 3)) +(assert_return (invoke "nesting" (f32.const 2) (f32.const 3)) (f32.const 4)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 4)) (f32.const 10.3095235825)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 100)) (f32.const 4381.54785156)) +(assert_return (invoke "nesting" (f32.const 7) (f32.const 101)) (f32.const 2601)) + +(assert_invalid + (module (func $type-empty-i32 (result i32) (loop))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-i64 (result i64) (loop))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f32 (result f32) (loop))) + "type mismatch" +) +(assert_invalid + (module (func $type-empty-f64 (result f64) (loop))) + "type mismatch" +) + +(assert_invalid + (module (func $type-value-num-vs-void + (loop (i32.const 1)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-empty-vs-num (result i32) + (loop (result i32)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-void-vs-num (result i32) + (loop (result i32) (nop)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-num-vs-num (result i32) + (loop (result i32) (f32.const 0)) + )) + "type mismatch" +) +(assert_invalid + (module (func $type-value-unreached-select (result i32) + (loop (result i64) (select (unreachable) (unreachable) (unreachable))) + )) + "type mismatch" +) + + +(assert_malformed + (module quote "(func loop end $l)") + "mismatching label" +) +(assert_malformed + (module quote "(func loop $a end $l)") + "mismatching label" +) diff --git a/src/build_spectests.rs b/src/build_spectests.rs index 2de363671..c038cbac0 100644 --- a/src/build_spectests.rs +++ b/src/build_spectests.rs @@ -15,7 +15,7 @@ static ENV_VAR: &str = "WASM_GENERATE_SPECTESTS"; static BANNER: &str = "// Rust test file autogenerated with cargo build (src/build_spectests.rs). // Please do NOT modify it by hand, as it will be reseted on next build.\n"; -const TESTS: [&str; 31] = [ +const TESTS: [&str; 32] = [ "spectests/address.wast", "spectests/align.wast", "spectests/block.wast", @@ -41,6 +41,7 @@ const TESTS: [&str; 31] = [ "spectests/i32_.wast", "spectests/i64_.wast", "spectests/labels.wast", + "spectests/loop_.wast", "spectests/memory.wast", "spectests/set_local.wast", "spectests/stack.wast", diff --git a/src/spectests/loop_.rs b/src/spectests/loop_.rs new file mode 100644 index 000000000..c80ab8b9a --- /dev/null +++ b/src/spectests/loop_.rs @@ -0,0 +1,1609 @@ +// Rust test file autogenerated with cargo build (src/build_spectests.rs). +// Please do NOT modify it by hand, as it will be reseted on next build. +// Test based on spectests/loop_.wast +#![allow( + warnings, + dead_code +)] +use crate::webassembly::{instantiate, compile, ImportObject, ResultObject, VmCtx, Export}; +use super::_common::spectest_importobject; +use wabt::wat2wasm; + + +// Line 3 +fn create_module_1() -> ResultObject { + let module_str = "(module + (type (;0;) (func (param i32 i32) (result i32))) + (type (;1;) (func)) + (type (;2;) (func (result i32))) + (type (;3;) (func (param i32) (result i32))) + (type (;4;) (func (param i64) (result i64))) + (type (;5;) (func (param f32 f32) (result f32))) + (func (;0;) (type 1)) + (func (;1;) (type 1) + loop ;; label = @1 + end + loop ;; label = @1 + end) + (func (;2;) (type 2) (result i32) + loop ;; label = @1 + nop + end + loop (result i32) ;; label = @1 + i32.const 7 + end) + (func (;3;) (type 2) (result i32) + loop ;; label = @1 + call 0 + call 0 + call 0 + call 0 + end + loop (result i32) ;; label = @1 + call 0 + call 0 + call 0 + i32.const 8 + end) + (func (;4;) (type 2) (result i32) + loop (result i32) ;; label = @1 + loop ;; label = @2 + call 0 + block ;; label = @3 + end + nop + end + loop (result i32) ;; label = @2 + call 0 + i32.const 9 + end + end) + (func (;5;) (type 2) (result i32) + loop (result i32) ;; label = @1 + block (result i32) ;; label = @2 + loop (result i32) ;; label = @3 + block (result i32) ;; label = @4 + loop (result i32) ;; label = @5 + block (result i32) ;; label = @6 + loop (result i32) ;; label = @7 + block (result i32) ;; label = @8 + loop (result i32) ;; label = @9 + block (result i32) ;; label = @10 + loop (result i32) ;; label = @11 + block (result i32) ;; label = @12 + loop (result i32) ;; label = @13 + block (result i32) ;; label = @14 + loop (result i32) ;; label = @15 + block (result i32) ;; label = @16 + loop (result i32) ;; label = @17 + block (result i32) ;; label = @18 + loop (result i32) ;; label = @19 + block (result i32) ;; label = @20 + loop (result i32) ;; label = @21 + block (result i32) ;; label = @22 + loop (result i32) ;; label = @23 + block (result i32) ;; label = @24 + loop (result i32) ;; label = @25 + block (result i32) ;; label = @26 + loop (result i32) ;; label = @27 + block (result i32) ;; label = @28 + loop (result i32) ;; label = @29 + block (result i32) ;; label = @30 + loop (result i32) ;; label = @31 + block (result i32) ;; label = @32 + loop (result i32) ;; label = @33 + block (result i32) ;; label = @34 + loop (result i32) ;; label = @35 + block (result i32) ;; label = @36 + loop (result i32) ;; label = @37 + block (result i32) ;; label = @38 + loop (result i32) ;; label = @39 + block (result i32) ;; label = @40 + call 0 + i32.const 150 + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end) + (func (;6;) (type 2) (result i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + i32.const 2 + i32.const 3 + select) + (func (;7;) (type 2) (result i32) + i32.const 2 + loop (result i32) ;; label = @1 + i32.const 1 + end + i32.const 3 + select) + (func (;8;) (type 2) (result i32) + i32.const 2 + i32.const 3 + loop (result i32) ;; label = @1 + i32.const 1 + end + select) + (func (;9;) (type 1) + loop (result i32) ;; label = @1 + i32.const 1 + end + if ;; label = @1 + call 0 + end) + (func (;10;) (type 2) (result i32) + i32.const 1 + if (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 1 + end + else + i32.const 2 + end) + (func (;11;) (type 2) (result i32) + i32.const 1 + if (result i32) ;; label = @1 + i32.const 2 + else + loop (result i32) ;; label = @2 + i32.const 1 + end + end) + (func (;12;) (type 2) (result i32) + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 1 + end + i32.const 2 + br_if 0 (;@1;) + end) + (func (;13;) (type 2) (result i32) + block (result i32) ;; label = @1 + i32.const 2 + loop (result i32) ;; label = @2 + i32.const 1 + end + br_if 0 (;@1;) + end) + (func (;14;) (type 2) (result i32) + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 1 + end + i32.const 2 + br_table 0 (;@1;) 0 (;@1;) + end) + (func (;15;) (type 2) (result i32) + block (result i32) ;; label = @1 + i32.const 2 + loop (result i32) ;; label = @2 + i32.const 1 + end + br_table 0 (;@1;) 0 (;@1;) + end) + (func (;16;) (type 0) (param i32 i32) (result i32) + get_local 0) + (func (;17;) (type 2) (result i32) + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 1 + end + i32.const 2 + i32.const 0 + call_indirect (type 0) + end) + (func (;18;) (type 2) (result i32) + block (result i32) ;; label = @1 + i32.const 2 + loop (result i32) ;; label = @2 + i32.const 1 + end + i32.const 0 + call_indirect (type 0) + end) + (func (;19;) (type 2) (result i32) + block (result i32) ;; label = @1 + i32.const 1 + i32.const 2 + loop (result i32) ;; label = @2 + i32.const 0 + end + call_indirect (type 0) + end) + (func (;20;) (type 1) + loop (result i32) ;; label = @1 + i32.const 1 + end + i32.const 1 + i32.store) + (func (;21;) (type 1) + i32.const 10 + loop (result i32) ;; label = @1 + i32.const 1 + end + i32.store) + (func (;22;) (type 2) (result i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + memory.grow) + (func (;23;) (type 3) (param i32) (result i32) + get_local 0) + (func (;24;) (type 2) (result i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + call 23) + (func (;25;) (type 2) (result i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + return) + (func (;26;) (type 1) + loop (result i32) ;; label = @1 + i32.const 1 + end + drop) + (func (;27;) (type 2) (result i32) + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 1 + end + br 0 (;@1;) + end) + (func (;28;) (type 2) (result i32) + (local i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + set_local 0 + get_local 0) + (func (;29;) (type 2) (result i32) + (local i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + tee_local 0) + (func (;30;) (type 2) (result i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + set_global 0 + get_global 0) + (func (;31;) (type 2) (result i32) + loop (result i32) ;; label = @1 + i32.const 1 + end + i32.load) + (func (;32;) (type 2) (result i32) + loop (result i32) ;; label = @1 + call 0 + i32.const 13 + end + i32.ctz) + (func (;33;) (type 2) (result i32) + loop (result i32) ;; label = @1 + call 0 + i32.const 3 + end + loop (result i32) ;; label = @1 + call 0 + i32.const 4 + end + i32.mul) + (func (;34;) (type 2) (result i32) + loop (result i32) ;; label = @1 + call 0 + i32.const 13 + end + i32.eqz) + (func (;35;) (type 2) (result i32) + loop (result f32) ;; label = @1 + call 0 + f32.const 0x1.8p+1 (;=3;) + end + loop (result f32) ;; label = @1 + call 0 + f32.const 0x1.8p+1 (;=3;) + end + f32.gt) + (func (;36;) (type 2) (result i32) + block ;; label = @1 + loop ;; label = @2 + br 1 (;@1;) + br 0 (;@2;) + unreachable + end + end + block ;; label = @1 + loop ;; label = @2 + i32.const 1 + br_if 1 (;@1;) + unreachable + end + end + block ;; label = @1 + loop ;; label = @2 + i32.const 0 + br_table 1 (;@1;) + unreachable + end + end + block ;; label = @1 + loop ;; label = @2 + i32.const 1 + br_table 1 (;@1;) 1 (;@1;) 1 (;@1;) + unreachable + end + end + i32.const 19) + (func (;37;) (type 2) (result i32) + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 18 + br 1 (;@1;) + br 0 (;@2;) + i32.const 19 + end + end) + (func (;38;) (type 2) (result i32) + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 18 + br 1 (;@1;) + i32.const 19 + br 1 (;@1;) + i32.const 20 + i32.const 0 + br_if 1 (;@1;) + drop + i32.const 20 + i32.const 1 + br_if 1 (;@1;) + drop + i32.const 21 + br 1 (;@1;) + i32.const 22 + i32.const 0 + br_table 1 (;@1;) + i32.const 23 + i32.const 1 + br_table 1 (;@1;) 1 (;@1;) 1 (;@1;) + i32.const 21 + end + end) + (func (;39;) (type 2) (result i32) + (local i32) + i32.const 0 + set_local 0 + get_local 0 + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + block (result i32) ;; label = @3 + i32.const 1 + br 2 (;@1;) + end + end + end + i32.add + set_local 0 + get_local 0 + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + loop (result i32) ;; label = @3 + i32.const 2 + br 2 (;@1;) + end + end + end + i32.add + set_local 0 + get_local 0 + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + block (result i32) ;; label = @3 + loop (result i32) ;; label = @4 + i32.const 4 + br 1 (;@3;) + end + end + end + end + i32.add + set_local 0 + get_local 0 + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + i32.const 8 + br 1 (;@1;) + i32.ctz + end + end + i32.add + set_local 0 + get_local 0 + block (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + loop (result i32) ;; label = @3 + i32.const 16 + br 2 (;@1;) + end + i32.ctz + end + end + i32.add + set_local 0 + get_local 0) + (func (;40;) (type 2) (result i32) + (local i32) + i32.const 0 + set_local 0 + get_local 0 + loop (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + br 1 (;@1;) + end + end + i32.add + set_local 0 + get_local 0 + loop (result i32) ;; label = @1 + br 0 (;@1;) + i32.ctz + end + i32.add + set_local 0 + get_local 0 + loop (result i32) ;; label = @1 + loop (result i32) ;; label = @2 + br 1 (;@1;) + end + i32.ctz + end + i32.add + set_local 0 + get_local 0) + (func (;41;) (type 2) (result i32) + (local i32) + block ;; label = @1 + loop ;; label = @2 + i32.const 1 + set_local 0 + get_local 0 + i32.const 3 + i32.mul + set_local 0 + get_local 0 + i32.const 5 + i32.sub + set_local 0 + get_local 0 + i32.const 7 + i32.mul + set_local 0 + br 1 (;@1;) + get_local 0 + i32.const 100 + i32.mul + set_local 0 + end + end + get_local 0 + i32.const -14 + i32.eq) + (func (;42;) (type 4) (param i64) (result i64) + (local i64) + i64.const 1 + set_local 1 + block ;; label = @1 + loop ;; label = @2 + get_local 0 + i64.eqz + br_if 1 (;@1;) + get_local 0 + get_local 1 + i64.mul + set_local 1 + get_local 0 + i64.const 1 + i64.sub + set_local 0 + br 0 (;@2;) + end + end + get_local 1) + (func (;43;) (type 4) (param i64) (result i64) + (local i64 i64) + i64.const 1 + set_local 1 + i64.const 2 + set_local 2 + block ;; label = @1 + loop ;; label = @2 + get_local 2 + get_local 0 + i64.gt_u + br_if 1 (;@1;) + get_local 1 + get_local 2 + i64.mul + set_local 1 + get_local 2 + i64.const 1 + i64.add + set_local 2 + br 0 (;@2;) + end + end + get_local 1) + (func (;44;) (type 5) (param f32 f32) (result f32) + (local f32 f32) + block ;; label = @1 + loop ;; label = @2 + get_local 0 + f32.const 0x0p+0 (;=0;) + f32.eq + br_if 1 (;@1;) + get_local 1 + set_local 2 + block ;; label = @3 + loop ;; label = @4 + get_local 2 + f32.const 0x0p+0 (;=0;) + f32.eq + br_if 1 (;@3;) + get_local 2 + f32.const 0x0p+0 (;=0;) + f32.lt + br_if 3 (;@1;) + get_local 3 + get_local 2 + f32.add + set_local 3 + get_local 2 + f32.const 0x1p+1 (;=2;) + f32.sub + set_local 2 + br 0 (;@4;) + end + end + get_local 3 + get_local 0 + f32.div + set_local 3 + get_local 0 + f32.const 0x1p+0 (;=1;) + f32.sub + set_local 0 + br 0 (;@2;) + end + end + get_local 3) + (table (;0;) 1 1 anyfunc) + (memory (;0;) 1) + (global (;0;) (mut i32) (i32.const 0)) + (export \"empty\" (func 1)) + (export \"singular\" (func 2)) + (export \"multi\" (func 3)) + (export \"nested\" (func 4)) + (export \"deep\" (func 5)) + (export \"as-select-first\" (func 6)) + (export \"as-select-mid\" (func 7)) + (export \"as-select-last\" (func 8)) + (export \"as-if-condition\" (func 9)) + (export \"as-if-then\" (func 10)) + (export \"as-if-else\" (func 11)) + (export \"as-br_if-first\" (func 12)) + (export \"as-br_if-last\" (func 13)) + (export \"as-br_table-first\" (func 14)) + (export \"as-br_table-last\" (func 15)) + (export \"as-call_indirect-first\" (func 17)) + (export \"as-call_indirect-mid\" (func 18)) + (export \"as-call_indirect-last\" (func 19)) + (export \"as-store-first\" (func 20)) + (export \"as-store-last\" (func 21)) + (export \"as-memory.grow-value\" (func 22)) + (export \"as-call-value\" (func 24)) + (export \"as-return-value\" (func 25)) + (export \"as-drop-operand\" (func 26)) + (export \"as-br-value\" (func 27)) + (export \"as-set_local-value\" (func 28)) + (export \"as-tee_local-value\" (func 29)) + (export \"as-set_global-value\" (func 30)) + (export \"as-load-operand\" (func 31)) + (export \"as-unary-operand\" (func 32)) + (export \"as-binary-operand\" (func 33)) + (export \"as-test-operand\" (func 34)) + (export \"as-compare-operand\" (func 35)) + (export \"break-bare\" (func 36)) + (export \"break-value\" (func 37)) + (export \"break-repeated\" (func 38)) + (export \"break-inner\" (func 39)) + (export \"cont-inner\" (func 40)) + (export \"effects\" (func 41)) + (export \"while\" (func 42)) + (export \"for\" (func 43)) + (export \"nesting\" (func 44)) + (elem (i32.const 0) 16)) + "; + let wasm_binary = wat2wasm(module_str.as_bytes()).expect("WAST not valid or malformed"); + instantiate(wasm_binary, spectest_importobject()).expect("WASM can't be instantiated") +} + +// Line 305 +fn l305_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l305_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("empty") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, ()); +} + +// Line 306 +fn l306_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l306_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("singular") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 7 as i32); +} + +// Line 307 +fn l307_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l307_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("multi") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 8 as i32); +} + +// Line 308 +fn l308_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l308_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nested") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 9 as i32); +} + +// Line 309 +fn l309_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l309_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("deep") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 150 as i32); +} + +// Line 311 +fn l311_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l311_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-select-first") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 312 +fn l312_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l312_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-select-mid") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 2 as i32); +} + +// Line 313 +fn l313_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l313_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-select-last") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 2 as i32); +} + +// Line 315 +fn l315_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l315_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-if-condition") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, ()); +} + +// Line 316 +fn l316_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l316_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-if-then") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 317 +fn l317_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l317_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-if-else") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 2 as i32); +} + +// Line 319 +fn l319_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l319_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-br_if-first") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 320 +fn l320_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l320_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-br_if-last") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 2 as i32); +} + +// Line 322 +fn l322_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l322_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-br_table-first") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 323 +fn l323_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l323_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-br_table-last") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 2 as i32); +} + +// Line 325 +fn l325_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l325_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-call_indirect-first") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 326 +fn l326_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l326_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-call_indirect-mid") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 2 as i32); +} + +// Line 327 +fn l327_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l327_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-call_indirect-last") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 329 +fn l329_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l329_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-store-first") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, ()); +} + +// Line 330 +fn l330_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l330_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-store-last") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, ()); +} + +// Line 334 +fn l334_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l334_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-call-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 335 +fn l335_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l335_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-return-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 336 +fn l336_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l336_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-drop-operand") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, ()); +} + +// Line 337 +fn l337_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l337_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-br-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 338 +fn l338_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l338_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-set_local-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 339 +fn l339_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l339_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-tee_local-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 340 +fn l340_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l340_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-set_global-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 341 +fn l341_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l341_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-load-operand") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 343 +fn l343_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l343_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-unary-operand") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 0 as i32); +} + +// Line 344 +fn l344_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l344_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-binary-operand") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 12 as i32); +} + +// Line 345 +fn l345_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l345_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-test-operand") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 0 as i32); +} + +// Line 346 +fn l346_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l346_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("as-compare-operand") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 0 as i32); +} + +// Line 348 +fn l348_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l348_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("break-bare") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 19 as i32); +} + +// Line 349 +fn l349_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l349_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("break-value") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 18 as i32); +} + +// Line 350 +fn l350_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l350_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("break-repeated") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 18 as i32); +} + +// Line 351 +fn l351_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l351_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("break-inner") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 31 as i32); +} + +// Line 353 +fn l353_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l353_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("effects") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(&VmCtx) -> i32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(&vm_context); + assert_eq!(result, 1 as i32); +} + +// Line 355 +fn l355_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l355_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("while") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(0 as i64, &vm_context); + assert_eq!(result, 1 as i64); +} + +// Line 356 +fn l356_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l356_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("while") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1 as i64, &vm_context); + assert_eq!(result, 1 as i64); +} + +// Line 357 +fn l357_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l357_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("while") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(2 as i64, &vm_context); + assert_eq!(result, 2 as i64); +} + +// Line 358 +fn l358_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l358_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("while") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(3 as i64, &vm_context); + assert_eq!(result, 6 as i64); +} + +// Line 359 +fn l359_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l359_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("while") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(5 as i64, &vm_context); + assert_eq!(result, 120 as i64); +} + +// Line 360 +fn l360_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l360_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("while") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(20 as i64, &vm_context); + assert_eq!(result, 2432902008176640000 as i64); +} + +// Line 362 +fn l362_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l362_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("for") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(0 as i64, &vm_context); + assert_eq!(result, 1 as i64); +} + +// Line 363 +fn l363_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l363_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("for") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1 as i64, &vm_context); + assert_eq!(result, 1 as i64); +} + +// Line 364 +fn l364_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l364_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("for") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(2 as i64, &vm_context); + assert_eq!(result, 2 as i64); +} + +// Line 365 +fn l365_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l365_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("for") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(3 as i64, &vm_context); + assert_eq!(result, 6 as i64); +} + +// Line 366 +fn l366_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l366_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("for") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(5 as i64, &vm_context); + assert_eq!(result, 120 as i64); +} + +// Line 367 +fn l367_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l367_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("for") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(i64, &VmCtx) -> i64 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(20 as i64, &vm_context); + assert_eq!(result, 2432902008176640000 as i64); +} + +// Line 369 +fn l369_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l369_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(0.0 as f32, 7.0 as f32, &vm_context); + assert_eq!(result, 0.0 as f32); +} + +// Line 370 +fn l370_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l370_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(7.0 as f32, 0.0 as f32, &vm_context); + assert_eq!(result, 0.0 as f32); +} + +// Line 371 +fn l371_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l371_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1.0 as f32, 1.0 as f32, &vm_context); + assert_eq!(result, 1.0 as f32); +} + +// Line 372 +fn l372_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l372_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1.0 as f32, 2.0 as f32, &vm_context); + assert_eq!(result, 2.0 as f32); +} + +// Line 373 +fn l373_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l373_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1.0 as f32, 3.0 as f32, &vm_context); + assert_eq!(result, 4.0 as f32); +} + +// Line 374 +fn l374_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l374_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1.0 as f32, 4.0 as f32, &vm_context); + assert_eq!(result, 6.0 as f32); +} + +// Line 375 +fn l375_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l375_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1.0 as f32, 100.0 as f32, &vm_context); + assert_eq!(result, 2550.0 as f32); +} + +// Line 376 +fn l376_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l376_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(1.0 as f32, 101.0 as f32, &vm_context); + assert_eq!(result, 2601.0 as f32); +} + +// Line 377 +fn l377_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l377_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(2.0 as f32, 1.0 as f32, &vm_context); + assert_eq!(result, 1.0 as f32); +} + +// Line 378 +fn l378_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l378_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(3.0 as f32, 1.0 as f32, &vm_context); + assert_eq!(result, 1.0 as f32); +} + +// Line 379 +fn l379_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l379_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(10.0 as f32, 1.0 as f32, &vm_context); + assert_eq!(result, 1.0 as f32); +} + +// Line 380 +fn l380_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l380_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(2.0 as f32, 2.0 as f32, &vm_context); + assert_eq!(result, 3.0 as f32); +} + +// Line 381 +fn l381_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l381_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(2.0 as f32, 3.0 as f32, &vm_context); + assert_eq!(result, 4.0 as f32); +} + +// Line 382 +fn l382_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l382_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(7.0 as f32, 4.0 as f32, &vm_context); + assert_eq!(result, 10.309524 as f32); +} + +// Line 383 +fn l383_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l383_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(7.0 as f32, 100.0 as f32, &vm_context); + assert_eq!(result, 4381.548 as f32); +} + +// Line 384 +fn l384_assert_return_invoke(result_object: &ResultObject, vm_context: &VmCtx) { + println!("Executing function {}", "l384_assert_return_invoke"); + let func_index = match result_object.module.info.exports.get("nesting") { + Some(&Export::Function(index)) => index, + _ => panic!("Function not found"), + }; + let invoke_fn: fn(f32, f32, &VmCtx) -> f32 = get_instance_function!(result_object.instance, func_index); + let result = invoke_fn(7.0 as f32, 101.0 as f32, &vm_context); + assert_eq!(result, 2601.0 as f32); +} + +// Line 387 +#[test] +fn l387_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 127, 3, 2, 1, 0, 10, 7, 1, 5, 0, 3, 64, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 391 +#[test] +fn l391_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 126, 3, 2, 1, 0, 10, 7, 1, 5, 0, 3, 64, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 395 +#[test] +fn l395_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 125, 3, 2, 1, 0, 10, 7, 1, 5, 0, 3, 64, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 399 +#[test] +fn l399_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 124, 3, 2, 1, 0, 10, 7, 1, 5, 0, 3, 64, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 404 +#[test] +fn l404_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 10, 9, 1, 7, 0, 3, 64, 65, 1, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 410 +#[test] +fn l410_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 127, 3, 2, 1, 0, 10, 7, 1, 5, 0, 3, 127, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 416 +#[test] +fn l416_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 127, 3, 2, 1, 0, 10, 8, 1, 6, 0, 3, 127, 1, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 422 +#[test] +fn l422_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 127, 3, 2, 1, 0, 10, 12, 1, 10, 0, 3, 127, 67, 0, 0, 0, 0, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 428 +#[test] +fn l428_assert_invalid() { + let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 127, 3, 2, 1, 0, 10, 11, 1, 9, 0, 3, 126, 0, 0, 0, 27, 11, 11]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is invalid"); +} + +// Line 436 +#[test] +fn l436_assert_malformed() { + let wasm_binary = [40, 102, 117, 110, 99, 32, 108, 111, 111, 112, 32, 101, 110, 100, 32, 36, 108, 41]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is malformed"); +} + +// Line 440 +#[test] +fn l440_assert_malformed() { + let wasm_binary = [40, 102, 117, 110, 99, 32, 108, 111, 111, 112, 32, 36, 97, 32, 101, 110, 100, 32, 36, 108, 41]; + let compilation = compile(wasm_binary.to_vec()); + assert!(compilation.is_err(), "WASM should not compile as is malformed"); +} + +#[test] +fn test_module_1() { + let result_object = create_module_1(); + let vm_context = result_object.instance.generate_context(); + // We group the calls together + l305_assert_return_invoke(&result_object, &vm_context); + l306_assert_return_invoke(&result_object, &vm_context); + l307_assert_return_invoke(&result_object, &vm_context); + l308_assert_return_invoke(&result_object, &vm_context); + l309_assert_return_invoke(&result_object, &vm_context); + l311_assert_return_invoke(&result_object, &vm_context); + l312_assert_return_invoke(&result_object, &vm_context); + l313_assert_return_invoke(&result_object, &vm_context); + l315_assert_return_invoke(&result_object, &vm_context); + l316_assert_return_invoke(&result_object, &vm_context); + l317_assert_return_invoke(&result_object, &vm_context); + l319_assert_return_invoke(&result_object, &vm_context); + l320_assert_return_invoke(&result_object, &vm_context); + l322_assert_return_invoke(&result_object, &vm_context); + l323_assert_return_invoke(&result_object, &vm_context); + l325_assert_return_invoke(&result_object, &vm_context); + l326_assert_return_invoke(&result_object, &vm_context); + l327_assert_return_invoke(&result_object, &vm_context); + l329_assert_return_invoke(&result_object, &vm_context); + l330_assert_return_invoke(&result_object, &vm_context); + l334_assert_return_invoke(&result_object, &vm_context); + l335_assert_return_invoke(&result_object, &vm_context); + l336_assert_return_invoke(&result_object, &vm_context); + l337_assert_return_invoke(&result_object, &vm_context); + l338_assert_return_invoke(&result_object, &vm_context); + l339_assert_return_invoke(&result_object, &vm_context); + l340_assert_return_invoke(&result_object, &vm_context); + l341_assert_return_invoke(&result_object, &vm_context); + l343_assert_return_invoke(&result_object, &vm_context); + l344_assert_return_invoke(&result_object, &vm_context); + l345_assert_return_invoke(&result_object, &vm_context); + l346_assert_return_invoke(&result_object, &vm_context); + l348_assert_return_invoke(&result_object, &vm_context); + l349_assert_return_invoke(&result_object, &vm_context); + l350_assert_return_invoke(&result_object, &vm_context); + l351_assert_return_invoke(&result_object, &vm_context); + l353_assert_return_invoke(&result_object, &vm_context); + l355_assert_return_invoke(&result_object, &vm_context); + l356_assert_return_invoke(&result_object, &vm_context); + l357_assert_return_invoke(&result_object, &vm_context); + l358_assert_return_invoke(&result_object, &vm_context); + l359_assert_return_invoke(&result_object, &vm_context); + l360_assert_return_invoke(&result_object, &vm_context); + l362_assert_return_invoke(&result_object, &vm_context); + l363_assert_return_invoke(&result_object, &vm_context); + l364_assert_return_invoke(&result_object, &vm_context); + l365_assert_return_invoke(&result_object, &vm_context); + l366_assert_return_invoke(&result_object, &vm_context); + l367_assert_return_invoke(&result_object, &vm_context); + l369_assert_return_invoke(&result_object, &vm_context); + l370_assert_return_invoke(&result_object, &vm_context); + l371_assert_return_invoke(&result_object, &vm_context); + l372_assert_return_invoke(&result_object, &vm_context); + l373_assert_return_invoke(&result_object, &vm_context); + l374_assert_return_invoke(&result_object, &vm_context); + l375_assert_return_invoke(&result_object, &vm_context); + l376_assert_return_invoke(&result_object, &vm_context); + l377_assert_return_invoke(&result_object, &vm_context); + l378_assert_return_invoke(&result_object, &vm_context); + l379_assert_return_invoke(&result_object, &vm_context); + l380_assert_return_invoke(&result_object, &vm_context); + l381_assert_return_invoke(&result_object, &vm_context); + l382_assert_return_invoke(&result_object, &vm_context); + l383_assert_return_invoke(&result_object, &vm_context); + l384_assert_return_invoke(&result_object, &vm_context); +} diff --git a/src/spectests/mod.rs b/src/spectests/mod.rs index 8ec4a8f0b..b87e0802b 100644 --- a/src/spectests/mod.rs +++ b/src/spectests/mod.rs @@ -28,6 +28,7 @@ mod globals; mod i32_; mod i64_; mod labels; +mod loop_; mod memory; mod set_local; mod stack;