2017-12-06 23:38:17 +01:00
|
|
|
(module
|
2019-03-01 00:01:23 +01:00
|
|
|
(type $FUNCSIG$i (func (result i32)))
|
|
|
|
(type $FUNCSIG$v (func))
|
2018-10-11 08:49:08 +02:00
|
|
|
(memory $0 0)
|
2019-02-05 17:12:10 +01:00
|
|
|
(table $0 1 funcref)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
2017-12-06 23:38:17 +01:00
|
|
|
(global $enum/Implicit.ZERO i32 (i32.const 0))
|
|
|
|
(global $enum/Implicit.ONE i32 (i32.const 1))
|
|
|
|
(global $enum/Implicit.TWO i32 (i32.const 2))
|
|
|
|
(global $enum/Implicit.THREE i32 (i32.const 3))
|
|
|
|
(global $enum/Explicit.ZERO i32 (i32.const 0))
|
|
|
|
(global $enum/Explicit.ONE i32 (i32.const 1))
|
|
|
|
(global $enum/Explicit.TWO i32 (i32.const 2))
|
|
|
|
(global $enum/Explicit.THREE i32 (i32.const 3))
|
|
|
|
(global $enum/Mixed.ZERO i32 (i32.const 0))
|
|
|
|
(global $enum/Mixed.ONE i32 (i32.const 1))
|
|
|
|
(global $enum/Mixed.THREE i32 (i32.const 3))
|
|
|
|
(global $enum/Mixed.FOUR i32 (i32.const 4))
|
|
|
|
(global $enum/NonConstant.ZERO (mut i32) (i32.const 0))
|
|
|
|
(global $enum/NonConstant.ONE (mut i32) (i32.const 0))
|
2018-01-24 03:08:09 +01:00
|
|
|
(global $enum/SelfReference.ZERO i32 (i32.const 0))
|
|
|
|
(global $enum/SelfReference.ONE i32 (i32.const 1))
|
2018-05-22 12:06:03 +02:00
|
|
|
(global $enum/enumType (mut i32) (i32.const 0))
|
2019-02-21 00:11:22 +01:00
|
|
|
(global $~lib/memory/HEAP_BASE i32 (i32.const 8))
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2018-04-15 00:34:19 +02:00
|
|
|
(export "Implicit.ZERO" (global $enum/Implicit.ZERO))
|
|
|
|
(export "Implicit.ONE" (global $enum/Implicit.ONE))
|
|
|
|
(export "Implicit.TWO" (global $enum/Implicit.TWO))
|
|
|
|
(export "Implicit.THREE" (global $enum/Implicit.THREE))
|
|
|
|
(export "Explicit.ZERO" (global $enum/Explicit.ZERO))
|
|
|
|
(export "Explicit.ONE" (global $enum/Explicit.ONE))
|
|
|
|
(export "Explicit.TWO" (global $enum/Explicit.TWO))
|
|
|
|
(export "Explicit.THREE" (global $enum/Explicit.THREE))
|
|
|
|
(export "Mixed.ZERO" (global $enum/Mixed.ZERO))
|
|
|
|
(export "Mixed.ONE" (global $enum/Mixed.ONE))
|
|
|
|
(export "Mixed.THREE" (global $enum/Mixed.THREE))
|
|
|
|
(export "Mixed.FOUR" (global $enum/Mixed.FOUR))
|
|
|
|
(export "SelfReference.ZERO" (global $enum/SelfReference.ZERO))
|
|
|
|
(export "SelfReference.ONE" (global $enum/SelfReference.ONE))
|
2017-12-06 23:38:17 +01:00
|
|
|
(start $start)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $enum/getZero (; 0 ;) (type $FUNCSIG$i) (result i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2017-12-06 23:38:17 +01:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $start:enum (; 1 ;) (type $FUNCSIG$v)
|
2018-11-08 08:04:24 +01:00
|
|
|
call $enum/getZero
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $enum/NonConstant.ZERO
|
2018-11-08 08:04:24 +01:00
|
|
|
call $enum/getZero
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $enum/NonConstant.ONE
|
|
|
|
global.get $enum/NonConstant.ZERO
|
2018-11-08 08:04:24 +01:00
|
|
|
drop
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $enum/NonConstant.ONE
|
2018-11-08 08:04:24 +01:00
|
|
|
drop
|
2017-12-06 23:38:17 +01:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $start (; 2 ;) (type $FUNCSIG$v)
|
2019-02-21 00:11:22 +01:00
|
|
|
call $start:enum
|
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $null (; 3 ;) (type $FUNCSIG$v)
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2017-12-06 23:38:17 +01:00
|
|
|
)
|