mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 03:31:44 +00:00
local flow flags, see what works
This commit is contained in:
@ -3,50 +3,60 @@
|
||||
(type $FUNCSIG$ij (func (param i64) (result i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(memory $0 1)
|
||||
(data (i32.const 16) "\01\00\00\00a")
|
||||
(data (i32.const 24) "\02\00\00\00a\00b")
|
||||
(data (i32.const 32) "\03\00\00\00a\00b\00c")
|
||||
(data (i32.const 8) "\01")
|
||||
(data (i32.const 16) "\01\00\00\00\02\00\00\00a")
|
||||
(data (i32.const 32) "\01\00\00\00\04\00\00\00a\00b")
|
||||
(data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c")
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(export "memory" (memory $0))
|
||||
(export "table" (table $0))
|
||||
(start $start)
|
||||
(func $~lib/internal/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/util/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
i32.const -2128831035
|
||||
local.set $2
|
||||
local.set $1
|
||||
local.get $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.set $3
|
||||
loop $repeat|0
|
||||
if
|
||||
block $break|0
|
||||
local.get $1
|
||||
local.get $3
|
||||
i32.ge_u
|
||||
br_if $break|0
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.add
|
||||
i32.load8_u offset=4
|
||||
local.get $2
|
||||
i32.xor
|
||||
i32.const 16777619
|
||||
i32.mul
|
||||
local.set $2
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.sub
|
||||
i32.load offset=4
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $1
|
||||
br $repeat|0
|
||||
i32.shr_u
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.set $3
|
||||
loop $repeat|0
|
||||
local.get $2
|
||||
local.get $3
|
||||
i32.ge_u
|
||||
br_if $break|0
|
||||
local.get $0
|
||||
local.get $2
|
||||
i32.add
|
||||
i32.load8_u
|
||||
local.get $1
|
||||
i32.xor
|
||||
i32.const 16777619
|
||||
i32.mul
|
||||
local.set $1
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $2
|
||||
br $repeat|0
|
||||
unreachable
|
||||
end
|
||||
unreachable
|
||||
end
|
||||
end
|
||||
local.get $2
|
||||
local.get $1
|
||||
)
|
||||
(func $~lib/internal/hash/hash32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/util/hash/hash32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 255
|
||||
i32.and
|
||||
@ -77,7 +87,7 @@
|
||||
i32.const 16777619
|
||||
i32.mul
|
||||
)
|
||||
(func $~lib/internal/hash/hash64 (; 2 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32)
|
||||
(func $~lib/util/hash/hash64 (; 2 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.wrap_i64
|
||||
@ -145,55 +155,55 @@
|
||||
)
|
||||
(func $start:std/hash (; 3 ;) (type $FUNCSIG$v)
|
||||
i32.const 0
|
||||
call $~lib/internal/hash/hashStr
|
||||
drop
|
||||
i32.const 8
|
||||
call $~lib/internal/hash/hashStr
|
||||
call $~lib/util/hash/hashStr
|
||||
drop
|
||||
i32.const 16
|
||||
call $~lib/internal/hash/hashStr
|
||||
call $~lib/util/hash/hashStr
|
||||
drop
|
||||
i32.const 24
|
||||
call $~lib/internal/hash/hashStr
|
||||
call $~lib/util/hash/hashStr
|
||||
drop
|
||||
i32.const 32
|
||||
call $~lib/internal/hash/hashStr
|
||||
i32.const 40
|
||||
call $~lib/util/hash/hashStr
|
||||
drop
|
||||
i32.const 56
|
||||
call $~lib/util/hash/hashStr
|
||||
drop
|
||||
i32.const 0
|
||||
call $~lib/internal/hash/hash32
|
||||
call $~lib/util/hash/hash32
|
||||
drop
|
||||
i32.const 1065353216
|
||||
call $~lib/internal/hash/hash32
|
||||
call $~lib/util/hash/hash32
|
||||
drop
|
||||
i32.const 1066192077
|
||||
call $~lib/internal/hash/hash32
|
||||
call $~lib/util/hash/hash32
|
||||
drop
|
||||
i32.const 0
|
||||
call $~lib/internal/hash/hash32
|
||||
call $~lib/util/hash/hash32
|
||||
drop
|
||||
i32.const 2139095040
|
||||
call $~lib/internal/hash/hash32
|
||||
call $~lib/util/hash/hash32
|
||||
drop
|
||||
i32.const 2143289344
|
||||
call $~lib/internal/hash/hash32
|
||||
call $~lib/util/hash/hash32
|
||||
drop
|
||||
i64.const 0
|
||||
call $~lib/internal/hash/hash64
|
||||
call $~lib/util/hash/hash64
|
||||
drop
|
||||
i64.const 4607182418800017408
|
||||
call $~lib/internal/hash/hash64
|
||||
call $~lib/util/hash/hash64
|
||||
drop
|
||||
i64.const 4607632778762754458
|
||||
call $~lib/internal/hash/hash64
|
||||
call $~lib/util/hash/hash64
|
||||
drop
|
||||
i64.const 0
|
||||
call $~lib/internal/hash/hash64
|
||||
call $~lib/util/hash/hash64
|
||||
drop
|
||||
i64.const 9218868437227405312
|
||||
call $~lib/internal/hash/hash64
|
||||
call $~lib/util/hash/hash64
|
||||
drop
|
||||
i64.const 9221120237041090560
|
||||
call $~lib/internal/hash/hash64
|
||||
call $~lib/util/hash/hash64
|
||||
drop
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
|
Reference in New Issue
Block a user