Skip to content
File

Blob: src/workerd/io/wasm/signal-decoy-memory.wat

533 bytes
1;; Module with internal memory (not exported) and signal globals.
2;; Imports a function so the imports object exists, but does NOT import memory.
3;; Used to verify that a WebAssembly.Memory in the imports object is not mistaken
4;; for the module's linear memory.
5 
6(module
7 (import "env" "log" (func $log (param i32)))
8 
9 (memory 1)
10 
11 (global (export "__instance_signal") i32 (i32.const 0))
12 (global (export "__instance_terminated") i32 (i32.const 4))
13 
14 (func (export "get_signal") (result i32)
15 (i32.load (i32.const 0))
16 )
17)