Implement reference counting (#592)

This commit is contained in:
Daniel Wirtz
2019-06-05 23:15:39 +02:00
committed by GitHub
parent 3ed76a97f0
commit 0484a6b740
601 changed files with 261645 additions and 146131 deletions

View File

@ -1,15 +1,12 @@
(module
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s")
(table $0 1 funcref)
(elem (i32.const 0) $null)
(data (i32.const 8) "\10\00\00\00\01\00\00\00\01\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s")
(global $comma/a (mut i32) (i32.const 0))
(global $comma/b (mut i32) (i32.const 0))
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $start:comma (; 1 ;) (type $FUNCSIG$v)
(local $0 i32)
@ -25,19 +22,19 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 4
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
global.get $comma/b
if
i32.const 0
i32.const 8
i32.const 24
i32.const 5
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
global.get $comma/a
@ -45,17 +42,16 @@
i32.add
global.set $comma/a
global.get $comma/a
local.tee $0
global.set $comma/b
local.get $0
global.get $comma/a
i32.const 2
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 8
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
global.get $comma/b
@ -63,10 +59,10 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 9
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
i32.const 0
@ -78,17 +74,16 @@
i32.add
global.set $comma/a
global.get $comma/a
local.tee $0
global.set $comma/b
local.get $0
global.get $comma/a
i32.const 1
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 14
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
global.get $comma/b
@ -96,10 +91,10 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 15
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
global.get $comma/a
@ -115,10 +110,10 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 18
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
global.get $comma/b
@ -126,10 +121,10 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 19
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
i32.const 0
@ -156,10 +151,10 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 24
i32.const 22
i32.const 0
call $~lib/env/abort
call $~lib/builtins/abort
unreachable
end
)