mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-26 13:11:52 +00:00
Implement reference counting (#592)
This commit is contained in:
@ -1,16 +1,13 @@
|
||||
(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\00w\00h\00i\00l\00e\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\00w\00h\00i\00l\00e\00.\00t\00s")
|
||||
(global $while/n (mut i32) (i32.const 10))
|
||||
(global $while/m (mut i32) (i32.const 0))
|
||||
(global $while/o (mut i32) (i32.const 0))
|
||||
(export "memory" (memory $0))
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $start:while (; 1 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
@ -31,10 +28,10 @@
|
||||
global.get $while/n
|
||||
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 $while/m
|
||||
@ -42,10 +39,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 10
|
||||
@ -80,10 +77,10 @@
|
||||
global.get $while/n
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 21
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $while/o
|
||||
@ -91,10 +88,10 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 22
|
||||
i32.const 2
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
br $continue|1
|
||||
@ -103,10 +100,10 @@
|
||||
global.get $while/n
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 24
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $while/m
|
||||
@ -114,10 +111,10 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 25
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $while/o
|
||||
@ -125,10 +122,10 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 26
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
@ -142,15 +139,15 @@
|
||||
i32.sub
|
||||
global.set $while/n
|
||||
local.get $0
|
||||
if
|
||||
if (result i32)
|
||||
global.get $while/m
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $while/m
|
||||
global.get $while/m
|
||||
local.set $0
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
local.get $0
|
||||
br_if $continue|3
|
||||
end
|
||||
global.get $while/n
|
||||
@ -158,10 +155,10 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 31
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $while/m
|
||||
@ -169,10 +166,10 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 24
|
||||
i32.const 32
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
|
Reference in New Issue
Block a user