32 lines
691 B
WebAssembly Text Format
32 lines
691 B
WebAssembly Text Format
(module
|
|
(type $heap-object (sub (struct (field (mut i32)))))
|
|
(type (func (param i32) (result)))
|
|
(type (array (ref null 1)))
|
|
(type (array (ref eq)))
|
|
(func
|
|
(param i32)
|
|
(result)
|
|
(local (ref eq) (ref eq) (ref eq) (ref eq) (ref eq))
|
|
(global.get 2)
|
|
(i32.const 0)
|
|
(local.get 0)
|
|
(array.set 3)
|
|
(i32.const 1)
|
|
(global.get 1)
|
|
(global.get 0)
|
|
(array.get 2)
|
|
ref.as_non_null
|
|
(global.get 0)
|
|
(i32.const 1)
|
|
i32.sub
|
|
(global.set 0)
|
|
(return_call_ref 1))
|
|
(func
|
|
(param)
|
|
(result (ref eq))
|
|
(local (ref eq) (ref eq) (ref eq) (ref eq) (ref eq))
|
|
(ref.func 0)
|
|
(local.set 0)
|
|
(local.get 0))
|
|
(export "main" (func 0)))
|