File: imported-global-2.wast

package info (click to toggle)
binaryen 108-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,424 kB
  • sloc: cpp: 151,487; javascript: 62,522; ansic: 13,124; python: 5,260; pascal: 441; sh: 75; asm: 27; makefile: 8
file content (31 lines) | stat: -rw-r--r-- 509 bytes parent folder | download
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
(module
  (memory 256 256)

  ;; imports must not be used
  (import "env" "imported" (global $imported i32))

  (func "test1" (result i32)
    (local $temp i32)

    ;; this errors, and we never get to evalling the store after it
    (local.set $temp
      (global.get $imported)
    )

    (i32.store8
      (i32.const 13)
      (i32.const 115)
    )

    (local.get $temp)
  )

  (func "keepalive" (result i32)
    (drop
      (i32.load
        (i32.const 13)
      )
    )
    (global.get $imported)
  )
)