summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/multi-value/call-validate.js
blob: 513e11bc6e650e8470fdcfa8151971500792d2e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
wasmValidateText(`
  (module
    (func (result i32 i32)
      (i32.const 32)
      (i32.const 10)))`);

wasmValidateText(`
  (module
    (type $t (func (result i32 i32)))
    (func (type $t)
      (i32.const 32)
      (i32.const 10)))`);

wasmValidateText(`
  (module
    (func (result i32 i32)
      (block (result i32 i32)
        (i32.const 32)
        (i32.const 10))))`);

wasmValidateText(`
  (module
    (func $return-2 (result i32 i32)
      (i32.const 32)
      (i32.const 10))
    (func $tail-call (result i32 i32)
      (call 0)))`);

wasmValidateText(`
  (module
    (func $return-2 (result i32 i32)
      (i32.const 32)
      (i32.const 10))
    (func $add (result i32)
      (call 0)
      i32.add))`);

wasmValidateText(`
  (module
    (func $return-2 (param i32 i32) (result i32 i32)
      (local.get 0)
      (local.get 1))
    (func (export "run") (result i32)
      (i32.const 32)
      (i32.const 10)
      (call 0)
      i32.add))`);