mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-25 20:51:44 +00:00
Implement reference counting (#592)
This commit is contained in:
@ -1,20 +1,17 @@
|
||||
(module
|
||||
(type $FUNCSIG$v (func))
|
||||
(memory $0 0)
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(global $unary/i (mut i32) (i32.const 0))
|
||||
(global $unary/I (mut i64) (i64.const 0))
|
||||
(global $unary/f (mut f32) (f32.const 0))
|
||||
(global $unary/F (mut f64) (f64.const 0))
|
||||
(export "memory" (memory $0))
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $start:unary (; 0 ;) (type $FUNCSIG$v)
|
||||
(local $0 f32)
|
||||
(local $1 f64)
|
||||
(local $2 i32)
|
||||
(local $3 i64)
|
||||
(local $0 i32)
|
||||
(local $1 i64)
|
||||
(local $2 f32)
|
||||
(local $3 f64)
|
||||
global.get $unary/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
@ -59,18 +56,18 @@
|
||||
i32.sub
|
||||
global.set $unary/i
|
||||
global.get $unary/i
|
||||
local.tee $2
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $unary/i
|
||||
local.get $2
|
||||
local.get $0
|
||||
global.set $unary/i
|
||||
global.get $unary/i
|
||||
local.tee $2
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $unary/i
|
||||
local.get $2
|
||||
local.get $0
|
||||
global.set $unary/i
|
||||
global.get $unary/I
|
||||
i64.const 1
|
||||
@ -117,18 +114,18 @@
|
||||
i64.sub
|
||||
global.set $unary/I
|
||||
global.get $unary/I
|
||||
local.tee $3
|
||||
local.tee $1
|
||||
i64.const 1
|
||||
i64.add
|
||||
global.set $unary/I
|
||||
local.get $3
|
||||
local.get $1
|
||||
global.set $unary/I
|
||||
global.get $unary/I
|
||||
local.tee $3
|
||||
local.tee $1
|
||||
i64.const 1
|
||||
i64.sub
|
||||
global.set $unary/I
|
||||
local.get $3
|
||||
local.get $1
|
||||
global.set $unary/I
|
||||
global.get $unary/f
|
||||
f32.const 1
|
||||
@ -156,11 +153,10 @@
|
||||
f32.neg
|
||||
global.set $unary/f
|
||||
global.get $unary/f
|
||||
local.tee $0
|
||||
f32.const 0
|
||||
f32.eq
|
||||
global.set $unary/i
|
||||
local.get $0
|
||||
global.get $unary/f
|
||||
f32.const 1
|
||||
f32.add
|
||||
global.set $unary/f
|
||||
@ -169,18 +165,18 @@
|
||||
f32.sub
|
||||
global.set $unary/f
|
||||
global.get $unary/f
|
||||
local.tee $0
|
||||
local.tee $2
|
||||
f32.const 1
|
||||
f32.add
|
||||
global.set $unary/f
|
||||
local.get $0
|
||||
local.get $2
|
||||
global.set $unary/f
|
||||
global.get $unary/f
|
||||
local.tee $0
|
||||
local.tee $2
|
||||
f32.const 1
|
||||
f32.sub
|
||||
global.set $unary/f
|
||||
local.get $0
|
||||
local.get $2
|
||||
global.set $unary/f
|
||||
global.get $unary/F
|
||||
f64.const 1
|
||||
@ -208,12 +204,11 @@
|
||||
f64.neg
|
||||
global.set $unary/F
|
||||
global.get $unary/F
|
||||
local.tee $1
|
||||
f64.const 0
|
||||
f64.eq
|
||||
i64.extend_i32_u
|
||||
global.set $unary/I
|
||||
local.get $1
|
||||
global.get $unary/F
|
||||
f64.const 1
|
||||
f64.add
|
||||
global.set $unary/F
|
||||
@ -222,18 +217,18 @@
|
||||
f64.sub
|
||||
global.set $unary/F
|
||||
global.get $unary/F
|
||||
local.tee $1
|
||||
local.tee $3
|
||||
f64.const 1
|
||||
f64.add
|
||||
global.set $unary/F
|
||||
local.get $1
|
||||
local.get $3
|
||||
global.set $unary/F
|
||||
global.get $unary/F
|
||||
local.tee $1
|
||||
local.tee $3
|
||||
f64.const 1
|
||||
f64.sub
|
||||
global.set $unary/F
|
||||
local.get $1
|
||||
local.get $3
|
||||
global.set $unary/F
|
||||
)
|
||||
(func $start (; 1 ;) (type $FUNCSIG$v)
|
||||
|
Reference in New Issue
Block a user