summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/baseline-getglobal-scratch.js
blob: 2f4d74b91212e83db0c7e8cd47040a09b846b873 (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
48
49
50
51
52
53
54
55
56
57
58
new WebAssembly.Module(wasmTextToBinary(`
(module
    (global $g (mut i32) (i32.const 42))
    (func (param $i i32)
        local.get $i
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        unreachable
    )
)
`));

new WebAssembly.Module(wasmTextToBinary(`
(module
    (global $g (mut i32) (i32.const 42))
    (func (param $i i32)
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        global.get $g
        local.get $i
        global.set $g
        unreachable
    )
)
`));