mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-17 00:41:32 +00:00
local flow flags, see what works
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
(type $FUNCSIG$vii (func (param i32 i32)))
|
||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s")
|
||||
(data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s")
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(global $std/pointer/one (mut i32) (i32.const 0))
|
||||
@ -17,7 +17,7 @@
|
||||
(export "memory" (memory $0))
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $~lib/internal/memory/memset (; 1 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
@ -61,7 +61,7 @@
|
||||
i32.const 0
|
||||
i32.store8
|
||||
)
|
||||
(func $~lib/internal/memory/memcpy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/util/memory/memcpy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -911,65 +911,107 @@
|
||||
i32.store8
|
||||
end
|
||||
)
|
||||
(func $~lib/internal/memory/memmove (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
i32.const 8
|
||||
local.set $2
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.eq
|
||||
if
|
||||
return
|
||||
end
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.get $0
|
||||
i32.le_u
|
||||
local.tee $3
|
||||
if (result i32)
|
||||
local.get $3
|
||||
else
|
||||
block $~lib/util/memory/memmove|inlined.0
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.eq
|
||||
br_if $~lib/util/memory/memmove|inlined.0
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.get $1
|
||||
local.get $0
|
||||
i32.le_u
|
||||
end
|
||||
if
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/internal/memory/memcpy
|
||||
return
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.lt_u
|
||||
if
|
||||
local.get $1
|
||||
i32.const 7
|
||||
i32.and
|
||||
local.get $0
|
||||
i32.const 7
|
||||
i32.and
|
||||
i32.eq
|
||||
local.tee $3
|
||||
if (result i32)
|
||||
local.get $3
|
||||
else
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.get $1
|
||||
i32.le_u
|
||||
end
|
||||
if
|
||||
loop $continue|0
|
||||
local.get $0
|
||||
i32.const 7
|
||||
i32.and
|
||||
if
|
||||
local.get $2
|
||||
i32.eqz
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/util/memory/memcpy
|
||||
br $~lib/util/memory/memmove|inlined.0
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.lt_u
|
||||
if
|
||||
local.get $1
|
||||
i32.const 7
|
||||
i32.and
|
||||
local.get $0
|
||||
i32.const 7
|
||||
i32.and
|
||||
i32.eq
|
||||
if
|
||||
loop $continue|0
|
||||
local.get $0
|
||||
i32.const 7
|
||||
i32.and
|
||||
if
|
||||
return
|
||||
local.get $2
|
||||
i32.eqz
|
||||
br_if $~lib/util/memory/memmove|inlined.0
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.set $2
|
||||
local.get $0
|
||||
local.tee $4
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $0
|
||||
local.get $1
|
||||
local.tee $3
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $1
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.load8_u
|
||||
i32.store8
|
||||
br $continue|0
|
||||
end
|
||||
end
|
||||
loop $continue|1
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.set $2
|
||||
i32.const 8
|
||||
i32.ge_u
|
||||
if
|
||||
local.get $0
|
||||
local.get $1
|
||||
i64.load
|
||||
i64.store
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.sub
|
||||
local.set $2
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.set $0
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.set $1
|
||||
br $continue|1
|
||||
end
|
||||
end
|
||||
end
|
||||
loop $continue|2
|
||||
local.get $2
|
||||
if
|
||||
local.get $0
|
||||
local.tee $4
|
||||
i32.const 1
|
||||
@ -984,79 +1026,69 @@
|
||||
local.get $3
|
||||
i32.load8_u
|
||||
i32.store8
|
||||
br $continue|0
|
||||
end
|
||||
end
|
||||
loop $continue|1
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.ge_u
|
||||
if
|
||||
local.get $0
|
||||
local.get $1
|
||||
i64.load
|
||||
i64.store
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.set $2
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.set $0
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.set $1
|
||||
br $continue|1
|
||||
br $continue|2
|
||||
end
|
||||
end
|
||||
end
|
||||
loop $continue|2
|
||||
local.get $2
|
||||
else
|
||||
local.get $1
|
||||
i32.const 7
|
||||
i32.and
|
||||
local.get $0
|
||||
i32.const 7
|
||||
i32.and
|
||||
i32.eq
|
||||
if
|
||||
local.get $0
|
||||
local.tee $4
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $0
|
||||
local.get $1
|
||||
local.tee $3
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $1
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.load8_u
|
||||
i32.store8
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.set $2
|
||||
br $continue|2
|
||||
end
|
||||
end
|
||||
else
|
||||
local.get $1
|
||||
i32.const 7
|
||||
i32.and
|
||||
local.get $0
|
||||
i32.const 7
|
||||
i32.and
|
||||
i32.eq
|
||||
if
|
||||
loop $continue|3
|
||||
local.get $0
|
||||
local.get $2
|
||||
i32.add
|
||||
i32.const 7
|
||||
i32.and
|
||||
if
|
||||
loop $continue|3
|
||||
local.get $0
|
||||
local.get $2
|
||||
i32.eqz
|
||||
i32.add
|
||||
i32.const 7
|
||||
i32.and
|
||||
if
|
||||
return
|
||||
local.get $2
|
||||
i32.eqz
|
||||
br_if $~lib/util/memory/memmove|inlined.0
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.tee $2
|
||||
local.get $0
|
||||
i32.add
|
||||
local.get $1
|
||||
local.get $2
|
||||
i32.add
|
||||
i32.load8_u
|
||||
i32.store8
|
||||
br $continue|3
|
||||
end
|
||||
end
|
||||
loop $continue|4
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.ge_u
|
||||
if
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.sub
|
||||
local.tee $2
|
||||
local.get $0
|
||||
i32.add
|
||||
local.get $1
|
||||
local.get $2
|
||||
i32.add
|
||||
i64.load
|
||||
i64.store
|
||||
br $continue|4
|
||||
end
|
||||
end
|
||||
end
|
||||
loop $continue|5
|
||||
local.get $2
|
||||
if
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
@ -1068,45 +1100,9 @@
|
||||
i32.add
|
||||
i32.load8_u
|
||||
i32.store8
|
||||
br $continue|3
|
||||
br $continue|5
|
||||
end
|
||||
end
|
||||
loop $continue|4
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.ge_u
|
||||
if
|
||||
local.get $2
|
||||
i32.const 8
|
||||
i32.sub
|
||||
local.tee $2
|
||||
local.get $0
|
||||
i32.add
|
||||
local.get $1
|
||||
local.get $2
|
||||
i32.add
|
||||
i64.load
|
||||
i64.store
|
||||
br $continue|4
|
||||
end
|
||||
end
|
||||
end
|
||||
loop $continue|5
|
||||
local.get $2
|
||||
if
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.tee $2
|
||||
local.get $0
|
||||
i32.add
|
||||
local.get $1
|
||||
local.get $2
|
||||
i32.add
|
||||
i32.load8_u
|
||||
i32.store8
|
||||
br $continue|5
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
@ -1122,7 +1118,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 79
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1133,7 +1129,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 80
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1152,7 +1148,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 84
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1164,7 +1160,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 85
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1179,7 +1175,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 88
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1194,7 +1190,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 91
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1205,7 +1201,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 93
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1223,7 +1219,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 95
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1234,7 +1230,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 96
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1245,7 +1241,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 98
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1264,7 +1260,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 101
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1276,7 +1272,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 102
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1288,7 +1284,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 103
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1301,17 +1297,17 @@
|
||||
if
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/internal/memory/memmove
|
||||
call $~lib/memory/memory.copy
|
||||
else
|
||||
local.get $0
|
||||
call $~lib/internal/memory/memset
|
||||
call $~lib/memory/memory.fill
|
||||
end
|
||||
global.get $std/pointer/one
|
||||
global.get $std/pointer/two
|
||||
i32.eq
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 106
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1323,7 +1319,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 107
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1335,7 +1331,7 @@
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 108
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1357,7 +1353,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 114
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1371,7 +1367,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 115
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1383,7 +1379,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 117
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1397,7 +1393,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 118
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1409,7 +1405,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 120
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1421,7 +1417,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 121
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1439,7 +1435,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 124
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1453,7 +1449,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 125
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1465,7 +1461,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 126
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1480,7 +1476,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 129
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
@ -1492,7 +1488,7 @@
|
||||
f32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 16
|
||||
i32.const 130
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
|
Reference in New Issue
Block a user