diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index c168fa4903..c902598c7b 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,5 +1,3 @@ -// @ts-ignore: decorator -@inline export function HASH(key: T): u32 { if (isString()) { return hashStr(changetype(key)); @@ -10,63 +8,110 @@ export function HASH(key: T): u32 { if (sizeof() == 4) return hash32(reinterpret(f32(key))); if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - if (sizeof() == 1) return hash8 (u32(key)); - if (sizeof() == 2) return hash16(u32(key)); - if (sizeof() == 4) return hash32(u32(key)); + if (sizeof() <= 4) return hash32(u32(key), sizeof()); if (sizeof() == 8) return hash64(u64(key)); } return unreachable(); } -// FNV-1a 32-bit as a starting point, see: http://isthe.com/chongo/tech/comp/fnv/ +// XXHash 32-bit as a starting point, see: https://cyan4973.github.io/xxHash +// primes // @ts-ignore: decorator -@inline const FNV_OFFSET: u32 = 2166136261; - +@inline const XXH32_P1: u32 = 2654435761; // @ts-ignore: decorator -@inline const FNV_PRIME: u32 = 16777619; - -function hash8(key: u32): u32 { - return (FNV_OFFSET ^ key) * FNV_PRIME; -} +@inline const XXH32_P2: u32 = 2246822519; +// @ts-ignore: decorator +@inline const XXH32_P3: u32 = 3266489917; +// @ts-ignore: decorator +@inline const XXH32_P4: u32 = 668265263; +// @ts-ignore: decorator +@inline const XXH32_P5: u32 = 374761393; +// @ts-ignore: decorator +@inline const XXH32_SEED: u32 = 0; -function hash16(key: u32): u32 { - var v = FNV_OFFSET; - v = (v ^ ( key & 0xff)) * FNV_PRIME; - v = (v ^ ( key >> 8 )) * FNV_PRIME; - return v; +// @ts-ignore: decorator +@inline +function hash32(key: u32, len: u32 = 4): u32 { + var h: u32 = XXH32_SEED + XXH32_P5 + len; + h += key * XXH32_P3; + h = rotl(h, 17) * XXH32_P4; + h ^= h >> 15; + h *= XXH32_P2; + h ^= h >> 13; + h *= XXH32_P3; + h ^= h >> 16; + return h; } -function hash32(key: u32): u32 { - var v = FNV_OFFSET; - v = (v ^ ( key & 0xff)) * FNV_PRIME; - v = (v ^ ((key >> 8) & 0xff)) * FNV_PRIME; - v = (v ^ ((key >> 16) & 0xff)) * FNV_PRIME; - v = (v ^ ( key >> 24 )) * FNV_PRIME; - return v; +// @ts-ignore: decorator +@inline +function hash64(key: u64): u32 { + var h: u32 = XXH32_SEED + XXH32_P5 + 8; + h += key * XXH32_P3; + h = rotl(h, 17) * XXH32_P4; + h += (key >> 32) * XXH32_P3; + h = rotl(h, 17) * XXH32_P4; + h ^= h >> 15; + h *= XXH32_P2; + h ^= h >> 13; + h *= XXH32_P3; + h ^= h >> 16; + return h; } -function hash64(key: u64): u32 { - var l = key; - var h = (key >>> 32); - var v = FNV_OFFSET; - v = (v ^ ( l & 0xff)) * FNV_PRIME; - v = (v ^ ((l >> 8) & 0xff)) * FNV_PRIME; - v = (v ^ ((l >> 16) & 0xff)) * FNV_PRIME; - v = (v ^ ( l >> 24 )) * FNV_PRIME; - v = (v ^ ( h & 0xff)) * FNV_PRIME; - v = (v ^ ((h >> 8) & 0xff)) * FNV_PRIME; - v = (v ^ ((h >> 16) & 0xff)) * FNV_PRIME; - v = (v ^ ( h >> 24 )) * FNV_PRIME; - return v; +// @ts-ignore: decorator +@inline +function mix(h: u32, key: u32): u32 { + return rotl(h + key * XXH32_P2, 13) * XXH32_P1; } +// @ts-ignore: decorator +@inline function hashStr(key: string): u32 { - var v = FNV_OFFSET; - if (key !== null) { - for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { - v = (v ^ load(changetype(key) + i)) * FNV_PRIME; + if (key === null) return XXH32_SEED; + + var h: u32 = key.length << 1; + var len: usize = h; + var pos = changetype(key); + + if (len >= 16) { + let s1 = XXH32_SEED + XXH32_P1 + XXH32_P2; + let s2 = XXH32_SEED + XXH32_P2; + let s3 = XXH32_SEED; + let s4 = XXH32_SEED - XXH32_P1; + + let end = len + pos - 16; + while (pos <= end) { + s1 = mix(s1, load(pos )); + s2 = mix(s2, load(pos, 4)); + s3 = mix(s3, load(pos, 8)); + s4 = mix(s4, load(pos, 12)); + pos += 16; } + h += rotl(s1, 1) + rotl(s2, 7) + rotl(s3, 12) + rotl(s4, 18); + } else { + h += XXH32_SEED + XXH32_P5; + } + + var end = changetype(key) + len - 4; + while (pos <= end) { + h += load(pos) * XXH32_P3; + h = rotl(h, 17) * XXH32_P4; + pos += 4; } - return v; + + end = changetype(key) + len; + while (pos < end) { + h += load(pos) * XXH32_P5; + h = rotl(h, 11) * XXH32_P1; + pos++; + } + + h ^= h >> 15; + h *= XXH32_P2; + h ^= h >> 13; + h *= XXH32_P3; + h ^= h >> 16; + return h; } diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 6314777b30..6da82ba0c8 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -12,93 +12,63 @@ (data (i32.const 1112) "\01\00\00\00\04\00\00\00a\00b") (data (i32.const 1132) "\1c") (data (i32.const 1144) "\01\00\00\00\06\00\00\00a\00b\00c") - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17548)) + (data (i32.const 1164) "\1c") + (data (i32.const 1176) "\01\00\00\00\08\00\00\00a\00b\00c\00d") + (data (i32.const 1196) "\1c") + (data (i32.const 1208) "\01\00\00\00\n\00\00\00a\00b\00c\00d\00e") + (data (i32.const 1228) "\1c") + (data (i32.const 1240) "\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f") + (data (i32.const 1260) ",") + (data (i32.const 1272) "\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g") + (data (i32.const 1308) ",") + (data (i32.const 1320) "\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h") + (data (i32.const 1356) ",") + (data (i32.const 1368) "\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i") + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 17788)) (export "memory" (memory $0)) (start $~start) (func $~start - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const 0 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store - i32.const 1056 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1088 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1088 - i32.store - i32.const 1088 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1120 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1120 - i32.store - i32.const 1120 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 1152 - i32.store offset=4 - global.get $~lib/memory/__stack_pointer - i32.const 1152 - i32.store - i32.const 1152 - call $~lib/util/hash/hashStr - global.get $~lib/memory/__stack_pointer - i32.const 8 - i32.add - global.set $~lib/memory/__stack_pointer + call $start:std/hash ) (func $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 1164 + i32.const 1404 i32.lt_s if - i32.const 17568 - i32.const 17616 + i32.const 17808 + i32.const 17856 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + local.get $0 i32.store - i32.const -2128831035 - local.set $2 local.get $0 if global.get $~lib/memory/__stack_pointer local.get $0 - i32.store + i32.store offset=4 local.get $0 + local.tee $1 i32.const 20 i32.sub i32.load offset=16 @@ -106,30 +76,229 @@ i32.shr_u i32.const 1 i32.shl - local.set $3 - loop $for-loop|0 + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + i32.const 606290984 + local.set $2 + i32.const -2048144777 + local.set $4 + i32.const 1640531535 + local.set $5 local.get $1 local.get $3 - i32.lt_u + i32.add + i32.const 16 + i32.sub + local.set $7 + loop $while-continue|0 + local.get $1 + local.get $7 + i32.le_u + if + local.get $2 + local.get $1 + i32.load + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 + local.get $1 + i32.load offset=4 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $4 + local.get $6 + local.get $1 + i32.load offset=8 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $5 + local.get $1 + i32.load offset=12 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $1 + i32.const 16 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $3 + local.get $2 + i32.const 1 + i32.rotl + local.get $4 + i32.const 7 + i32.rotl + i32.add + local.get $6 + i32.const 12 + i32.rotl + i32.add + local.get $5 + i32.const 18 + i32.rotl + i32.add + i32.add + else + local.get $3 + i32.const 374761393 + i32.add + end + local.set $2 + local.get $0 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $4 + loop $while-continue|1 + local.get $1 + local.get $4 + i32.le_u if local.get $2 - local.get $0 local.get $1 + i32.load + i32.const -1028477379 + i32.mul i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|1 + end + end + local.get $0 + local.get $3 + i32.add + local.set $0 + loop $while-continue|2 + local.get $0 + local.get $1 + i32.gt_u + if + local.get $2 + local.get $1 i32.load8_u - i32.xor - i32.const 16777619 + i32.const 374761393 + i32.mul + i32.add + i32.const 11 + i32.rotl + i32.const -1640531535 i32.mul local.set $2 local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|0 + br $while-continue|2 end end end global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $start:std/hash + (local $0 f32) + (local $1 i32) + (local $2 f64) + (local $3 i64) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1056 + i32.store + i32.const 1056 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1088 + i32.store + i32.const 1088 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1120 + i32.store + i32.const 1120 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1152 + i32.store + i32.const 1152 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1184 + i32.store + i32.const 1184 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1216 + i32.store + i32.const 1216 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1248 + i32.store + i32.const 1248 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1280 + i32.store + i32.const 1280 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1328 + i32.store + i32.const 1328 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer + i32.const 1376 + i32.store + i32.const 1376 + call $~lib/util/hash/HASH<~lib/string/String|null> + global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer diff --git a/tests/compiler/std/hash.ts b/tests/compiler/std/hash.ts index b46889ba88..155caebe09 100644 --- a/tests/compiler/std/hash.ts +++ b/tests/compiler/std/hash.ts @@ -9,6 +9,12 @@ check(HASH("")); check(HASH("a")); check(HASH("ab")); check(HASH("abc")); +check(HASH("abcd")); +check(HASH("abcde")); +check(HASH("abcdef")); +check(HASH("abcdefg")); +check(HASH("abcdefgh")); +check(HASH("abcdefghi")); check(HASH(0.0)); check(HASH(1.0)); diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index cc30a79cee..018f615805 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -2,17 +2,24 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 12) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 44) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00a\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 76) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00a\00b\00\00\00\00\00\00\00\00\00") (data (i32.const 108) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\06\00\00\00a\00b\00c\00\00\00\00\00\00\00") + (data (i32.const 140) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00a\00b\00c\00d\00\00\00\00\00") + (data (i32.const 172) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\n\00\00\00a\00b\00c\00d\00e\00\00\00") + (data (i32.const 204) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00a\00b\00c\00d\00e\00f\00") + (data (i32.const 236) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 284) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\10\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 332) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\12\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) - (global $~lib/memory/__data_end i32 (i32.const 140)) - (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16524)) - (global $~lib/memory/__heap_base i32 (i32.const 16524)) + (global $~lib/memory/__data_end i32 (i32.const 380)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 16764)) + (global $~lib/memory/__heap_base i32 (i32.const 16764)) (export "memory" (memory $0)) (start $~start) (func $~lib/string/String#get:length (param $0 i32) (result i32) @@ -26,135 +33,154 @@ (func $std/hash/check (param $0 i32) (result i32) i32.const 1 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) - (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop local.get $0 - i32.wrap_i64 + i32.reinterpret_f32 local.set $1 - local.get $0 - i64.const 32 - i64.shr_u - i32.wrap_i64 + i32.const 4 local.set $2 - i32.const -2128831035 + i32.const 0 + i32.const 374761393 + i32.add + local.get $2 + i32.add local.set $3 local.get $3 local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + i32.add local.set $3 local.get $3 - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul local.set $3 local.get $3 - local.get $1 - i32.const 16 + local.get $3 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -2048144777 i32.mul local.set $3 local.get $3 - local.get $1 - i32.const 24 + local.get $3 + i32.const 13 i32.shr_u i32.xor - i32.const 16777619 - i32.mul local.set $3 local.get $3 - local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul local.set $3 local.get $3 - local.get $2 - i32.const 8 + local.get $3 + i32.const 16 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 - i32.mul local.set $3 local.get $3 + return + ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + (local $1 i64) + (local $2 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add + local.set $2 local.get $2 - i32.const 16 + local.get $1 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $2 + local.get $2 + i32.const -2048144777 i32.mul - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $2 - i32.const 24 + i32.const 13 i32.shr_u i32.xor - i32.const 16777619 + local.set $2 + local.get $2 + i32.const -1028477379 i32.mul - local.set $3 - local.get $3 + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + return ) (func $~start call $start:std/hash @@ -164,83 +190,304 @@ global.get $~lib/memory/__data_end i32.lt_s if - i32.const 16544 - i32.const 16592 + i32.const 16784 + i32.const 16832 i32.const 1 i32.const 1 call $~lib/builtins/abort unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if - i32.const 0 - local.set $2 - local.get $0 - local.set $5 + i64.const 0 + i64.store + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $0 + local.tee $1 i32.store - local.get $5 + local.get $1 + i32.const 0 + i32.eq + if + i32.const 0 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl + local.set $2 + local.get $2 local.set $3 - loop $for-loop|0 - local.get $2 + local.get $1 + local.set $4 + local.get $3 + i32.const 16 + i32.ge_u + if + i32.const 0 + i32.const -1640531535 + i32.add + i32.const -2048144777 + i32.add + local.set $5 + i32.const 0 + i32.const -2048144777 + i32.add + local.set $6 + i32.const 0 + local.set $7 + i32.const 0 + i32.const -1640531535 + i32.sub + local.set $8 local.get $3 - i32.lt_u - local.set $4 local.get $4 + i32.add + i32.const 16 + i32.sub + local.set $9 + loop $while-continue|0 + local.get $4 + local.get $9 + i32.le_u + local.set $10 + local.get $10 + if + local.get $5 + local.set $12 + local.get $4 + i32.load + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $6 + local.set $12 + local.get $4 + i32.load offset=4 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $7 + local.set $12 + local.get $4 + i32.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $7 + local.get $8 + local.set $12 + local.get $4 + i32.load offset=12 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $8 + local.get $4 + i32.const 16 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $2 + local.get $5 + i32.const 1 + i32.rotl + local.get $6 + i32.const 7 + i32.rotl + i32.add + local.get $7 + i32.const 12 + i32.rotl + i32.add + local.get $8 + i32.const 18 + i32.rotl + i32.add + i32.add + local.set $2 + else + local.get $2 + i32.const 0 + i32.const 374761393 + i32.add + i32.add + local.set $2 + end + local.get $1 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $9 + loop $while-continue|1 + local.get $4 + local.get $9 + i32.le_u + local.set $8 + local.get $8 if - local.get $1 - local.get $0 local.get $2 + local.get $4 + i32.load + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $4 + i32.const 4 i32.add + local.set $4 + br $while-continue|1 + end + end + local.get $1 + local.get $3 + i32.add + local.set $9 + loop $while-continue|2 + local.get $4 + local.get $9 + i32.lt_u + local.set $8 + local.get $8 + if + local.get $2 + local.get $4 i32.load8_u - i32.xor - i32.const 16777619 + i32.const 374761393 i32.mul - local.set $1 + i32.add + local.set $2 local.get $2 + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $4 + br $while-continue|2 end end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 end - local.get $1 - local.set $5 + local.set $13 global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $13 + return ) - (func $start:std/hash - (local $0 i32) - (local $1 f32) - (local $2 f64) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -249,360 +496,414 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 (result i32) - i32.const 0 - local.set $0 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String|null>|inlined.0 - end - call $std/hash/check + i32.const 1 drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) + block $~lib/util/hash/hashStr|inlined.1 (result i32) global.get $~lib/memory/__stack_pointer - i32.const 32 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 + local.tee $1 i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end - call $std/hash/check - drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) + local.get $1 + i32.const 0 + i32.eq + if + i32.const 0 + br $~lib/util/hash/hashStr|inlined.1 + end + local.get $1 + local.set $13 global.get $~lib/memory/__stack_pointer - i32.const 64 - local.tee $0 + local.get $13 i32.store offset=4 + local.get $13 + call $~lib/string/String#get:length i32.const 1 - drop - local.get $0 + i32.shl + local.set $2 + local.get $2 local.set $3 - global.get $~lib/memory/__stack_pointer + local.get $1 + local.set $4 local.get $3 - i32.store + i32.const 16 + i32.ge_u + if + i32.const 0 + i32.const -1640531535 + i32.add + i32.const -2048144777 + i32.add + local.set $5 + i32.const 0 + i32.const -2048144777 + i32.add + local.set $6 + i32.const 0 + local.set $7 + i32.const 0 + i32.const -1640531535 + i32.sub + local.set $8 + local.get $3 + local.get $4 + i32.add + i32.const 16 + i32.sub + local.set $9 + loop $while-continue|0 + local.get $4 + local.get $9 + i32.le_u + local.set $10 + local.get $10 + if + local.get $5 + local.set $12 + local.get $4 + i32.load + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $6 + local.set $12 + local.get $4 + i32.load offset=4 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $7 + local.set $12 + local.get $4 + i32.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $7 + local.get $8 + local.set $12 + local.get $4 + i32.load offset=12 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $8 + local.get $4 + i32.const 16 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $2 + local.get $5 + i32.const 1 + i32.rotl + local.get $6 + i32.const 7 + i32.rotl + i32.add + local.get $7 + i32.const 12 + i32.rotl + i32.add + local.get $8 + i32.const 18 + i32.rotl + i32.add + i32.add + local.set $2 + else + local.get $2 + i32.const 0 + i32.const 374761393 + i32.add + i32.add + local.set $2 + end + local.get $1 local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 + i32.add + i32.const 4 + i32.sub + local.set $9 + loop $while-continue|1 + local.get $4 + local.get $9 + i32.le_u + local.set $8 + local.get $8 + if + local.get $2 + local.get $4 + i32.load + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $4 + i32.const 4 + i32.add + local.set $4 + br $while-continue|1 + end + end + local.get $1 + local.get $3 + i32.add + local.set $9 + loop $while-continue|2 + local.get $4 + local.get $9 + i32.lt_u + local.set $8 + local.get $8 + if + local.get $2 + local.get $4 + i32.load8_u + i32.const 374761393 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $while-continue|2 + end + end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 end + local.set $13 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $13 + return + ) + (func $start:std/hash + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String|null> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 96 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end + i32.const 32 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - global.get $~lib/memory/__stack_pointer - i32.const 128 - local.tee $0 - i32.store offset=4 - i32.const 1 - drop - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + i32.const 64 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) - f32.const 0 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + i32.const 96 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) - f32.const 1 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + i32.const 128 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) - f32.const 1.100000023841858 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + i32.const 160 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) - f32.const 0 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + i32.const 192 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) - f32.const inf - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + i32.const 224 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) - f32.const nan:0x400000 - local.set $1 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + i32.const 256 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) - f64.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + i32.const 304 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) - f64.const 1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end + i32.const 352 + local.set $0 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) - f64.const 1.1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) - f64.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + f32.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) - f64.const inf - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end + f32.const 1.100000023841858 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) - f64.const nan:0x8000000000000 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + f32.const 0 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f32.const inf + call $~lib/util/hash/HASH + call $std/hash/check + drop + f32.const nan:0x400000 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 0 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 1 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 1.1 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const 0 + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const inf + call $~lib/util/hash/HASH + call $std/hash/check + drop + f64.const nan:0x8000000000000 + call $~lib/util/hash/HASH call $std/hash/check drop global.get $~lib/memory/__stack_pointer - i32.const 8 + i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f07c4f15db..cc0385aa42 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) @@ -23,6 +23,8 @@ (type $i32_f64_i32_=>_none (func (param i32 f64 i32))) (type $i32_f64_f64_=>_none (func (param i32 f64 f64))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1828,6 +1830,40 @@ local.get $1 call $~lib/rt/itcms/__link ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1942,12 +1978,9 @@ i32.store offset=4 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH + local.get $1 i32.and i32.const 2 i32.shl @@ -2371,12 +2404,9 @@ i32.store8 offset=1 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH + local.get $1 i32.and i32.const 2 i32.shl @@ -2420,36 +2450,35 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 + i32.const -1028477379 + i32.mul + i32.const 374761397 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.tee $0 local.get $0 - i32.const 8 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $0 local.get $0 - i32.const 16 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $0 local.get $0 - i32.const 24 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -2564,7 +2593,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -2631,6 +2660,38 @@ i32.const 0 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -2702,12 +2763,9 @@ i32.store offset=4 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH + local.get $1 i32.and i32.const 2 i32.shl @@ -2822,12 +2880,9 @@ i32.store8 offset=1 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH + local.get $1 i32.and i32.const 2 i32.shl @@ -2871,20 +2926,39 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $0 local.get $0 - i32.const 8 + i32.const 13 i32.shr_u i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -3001,7 +3075,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3127,7 +3201,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3172,6 +3246,38 @@ i32.add global.set $~lib/memory/__stack_pointer ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 65535 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -3244,7 +3350,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3361,7 +3467,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3519,7 +3625,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3636,7 +3742,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3681,71 +3787,48 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 + i32.const 374761401 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul local.get $0 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const -1028477379 + i32.mul + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.tee $1 local.get $1 - i32.const 8 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $1 local.get $1 - i32.const 16 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $1 local.get $1 - i32.const 24 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 @@ -3861,7 +3944,7 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3988,7 +4071,7 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4169,7 +4252,7 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4287,7 +4370,7 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4332,6 +4415,38 @@ i32.add global.set $~lib/memory/__stack_pointer ) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const -1028477379 + i32.mul + i32.const 374761397 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $1 + local.get $1 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $1 + local.get $1 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $1 + local.get $1 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load @@ -4446,8 +4561,7 @@ local.get $2 local.get $8 local.get $5 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4565,8 +4679,7 @@ local.get $2 local.get $8 local.get $5 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4611,6 +4724,52 @@ i32.add global.set $~lib/memory/__stack_pointer ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + (local $1 i32) + (local $2 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.const 374761401 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $1 + local.get $1 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $1 + local.get $1 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $1 + local.get $1 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load @@ -4725,8 +4884,7 @@ local.get $2 local.get $8 local.get $5 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4844,8 +5002,7 @@ local.get $2 local.get $8 local.get $5 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -5012,14 +5169,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -5040,23 +5190,15 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $4 local.get $0 local.get $1 - local.get $3 + local.get $4 call $~lib/map/Map#find local.tee $3 if @@ -5162,14 +5304,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5510,22 +5645,17 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $1 + local.set $3 local.get $0 i32.load - local.get $1 - local.tee $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $5 + local.get $5 local.get $0 i32.load offset=4 i32.and @@ -5666,7 +5796,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -5780,14 +5910,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -6538,12 +6661,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -6564,21 +6682,15 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $4 local.get $0 local.get $1 - local.get $3 + local.get $4 call $~lib/map/Map#find local.tee $3 if @@ -6684,12 +6796,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -6854,20 +6961,17 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store + local.get $1 + call $~lib/util/hash/HASH + local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 i32.store + local.get $1 + local.set $3 local.get $0 i32.load - local.get $1 - local.tee $3 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $5 + local.get $5 local.get $0 i32.load offset=4 i32.and @@ -7011,12 +7115,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -7745,11 +7844,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -7771,11 +7866,7 @@ i64.const 0 i64.store local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -7888,11 +7979,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -8117,11 +8204,7 @@ i64.const 0 i64.store local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8274,11 +8357,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -9031,9 +9110,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -9055,9 +9132,7 @@ i64.const 0 i64.store local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9170,9 +9245,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -9344,9 +9417,7 @@ i64.const 0 i64.store local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9499,9 +9570,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -10232,7 +10301,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -10256,7 +10325,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -10291,7 +10360,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -10973,7 +11042,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -10995,7 +11064,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11108,7 +11177,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -11280,7 +11349,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11394,7 +11463,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -12103,7 +12172,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -12125,7 +12194,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -12238,7 +12307,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -12535,7 +12604,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -12685,7 +12754,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -13402,7 +13471,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -13424,7 +13493,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -13537,7 +13606,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -13709,7 +13778,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -13859,7 +13928,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -14576,8 +14645,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -14599,8 +14667,7 @@ i64.const 0 i64.store local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -14713,8 +14780,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -14935,8 +15001,7 @@ i64.const 0 i64.store local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -15051,8 +15116,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz @@ -15769,8 +15833,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -15792,8 +15855,7 @@ i64.const 0 i64.store local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $4 global.get $~lib/memory/__stack_pointer local.get $0 @@ -15906,8 +15968,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz @@ -16128,8 +16189,7 @@ i64.const 0 i64.store local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $5 global.get $~lib/memory/__stack_pointer local.get $0 @@ -16279,8 +16339,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index a8ae8ab7df..9ee9e571ab 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -18,11 +18,13 @@ (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) @@ -2482,12 +2484,74 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - i32.const -2128831035 + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i32.const 1 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -1028477379 i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2645,23 +2709,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4457,23 +4506,8 @@ local.get $10 i32.load8_s offset=1 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4523,47 +4557,70 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + local.set $2 + i32.const 4 local.set $1 + i32.const 0 + i32.const 374761393 + i32.add local.get $1 - local.get $0 - i32.const 8 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -2048144777 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 + local.set $3 + local.get $3 + local.get $3 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -1028477379 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 + local.set $3 + local.get $3 + local.get $3 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4717,31 +4774,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4867,6 +4901,73 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i32.const 1 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -5021,23 +5122,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -5358,23 +5444,8 @@ local.get $10 i32.load8_u offset=1 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -5496,27 +5567,74 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 8 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i32.const 2 local.set $1 + i32.const 0 + i32.const 374761393 + i32.add local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -5674,27 +5792,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -6017,27 +6116,8 @@ local.get $10 i32.load16_s offset=2 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -6159,6 +6239,73 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i32.const 2 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -6313,27 +6460,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -6654,27 +6782,8 @@ local.get $10 i32.load16_u offset=2 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -6830,6 +6939,71 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i32.const 4 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -6982,31 +7156,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -7325,31 +7476,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -7471,93 +7599,87 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + (local $1 i64) (local $2 i32) - (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop local.get $0 - i32.wrap_i64 local.set $1 - local.get $0 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add + local.set $2 + local.get $2 + local.get $1 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 - local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 24 + local.set $2 + local.get $2 + local.get $2 + i32.const 15 i32.shr_u i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + local.set $2 local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul - local.set $3 - local.get $3 + local.set $2 local.get $2 - i32.const 8 + local.get $2 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $2 + local.get $2 + i32.const -1028477379 i32.mul - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $2 i32.const 16 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + local.set $2 local.get $2 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) @@ -7636,9 +7758,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7712,49 +7833,22 @@ local.get $10 i32.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -7984,9 +8078,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8060,49 +8153,22 @@ local.get $10 i64.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8210,6 +8276,88 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + (local $1 i64) + (local $2 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add + local.set $2 + local.get $2 + local.get $1 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -8287,9 +8435,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8363,49 +8510,22 @@ local.get $10 i32.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8635,9 +8755,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8711,49 +8830,22 @@ local.get $10 i64.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8861,18 +8953,84 @@ local.get $1 i32.store offset=20 ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.get $2 + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop local.get $0 - i32.load offset=4 - i32.and + i32.reinterpret_f32 + local.set $1 i32.const 4 - i32.mul + local.set $2 + i32.const 0 + i32.const 374761393 + i32.add + local.get $2 + i32.add + local.set $3 + local.get $3 + local.get $1 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) + (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 4 + i32.mul i32.add i32.load local.set $3 @@ -8938,9 +9096,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9014,38 +9171,22 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -9275,9 +9416,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9351,38 +9491,22 @@ local.get $10 f32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -9490,6 +9614,89 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + (local $1 i64) + (local $2 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add + local.set $2 + local.get $2 + local.get $1 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -9567,9 +9774,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9643,42 +9849,22 @@ local.get $10 i32.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -9908,9 +10094,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9984,42 +10169,22 @@ local.get $10 f64.load offset=8 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -11011,7 +11176,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -11021,42 +11185,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -11072,28 +11217,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -11101,12 +11227,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11149,9 +11275,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -11163,13 +11289,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11182,7 +11308,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -11190,12 +11316,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -11209,7 +11335,6 @@ (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -11219,36 +11344,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -11258,14 +11364,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -11569,28 +11675,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -11598,12 +11685,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11646,9 +11733,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -11660,13 +11747,13 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11679,7 +11766,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -11687,12 +11774,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -11717,32 +11804,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -11750,12 +11814,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11798,9 +11862,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -11812,13 +11876,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -11831,7 +11895,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -11839,12 +11903,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -11876,30 +11940,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11911,8 +11956,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -11927,16 +11972,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -11961,7 +12006,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -12677,7 +12722,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -12687,40 +12731,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -12736,26 +12763,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -12763,12 +12773,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -12811,9 +12821,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -12825,13 +12835,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -12844,7 +12854,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -12852,12 +12862,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -12871,7 +12881,6 @@ (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -12881,34 +12890,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -12918,14 +12910,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -13177,26 +13169,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -13204,12 +13179,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -13252,9 +13227,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -13266,13 +13241,13 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -13285,7 +13260,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -13293,12 +13268,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -13330,28 +13305,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13363,8 +13321,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -13379,16 +13337,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -13413,7 +13371,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -14107,7 +14065,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -14117,46 +14074,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14172,32 +14106,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -14205,12 +14116,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -14253,9 +14164,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -14267,13 +14178,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -14286,7 +14197,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -14294,12 +14205,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -14313,7 +14224,6 @@ (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -14323,40 +14233,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -14366,14 +14253,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -14625,32 +14512,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -14658,12 +14522,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -14706,9 +14570,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -14720,13 +14584,13 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 - local.get $1 + local.set $4 + local.get $4 + local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -14739,7 +14603,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -14747,12 +14611,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -14784,34 +14648,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -14823,8 +14664,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -14839,16 +14680,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -14873,7 +14714,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -15589,7 +15430,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -15599,44 +15439,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15652,30 +15471,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -15683,12 +15481,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -15731,9 +15529,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -15745,13 +15543,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -15764,7 +15562,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -15772,12 +15570,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -15791,7 +15589,6 @@ (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -15801,38 +15598,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -15842,14 +15618,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -16101,30 +15877,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -16132,12 +15887,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -16180,9 +15935,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -16194,13 +15949,13 @@ i32.const 8 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -16213,7 +15968,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -16221,12 +15976,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -16258,32 +16013,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -16295,8 +16029,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -16311,16 +16045,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -16345,7 +16079,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -17039,7 +16773,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -17049,51 +16782,27 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -17103,40 +16812,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -17146,14 +16832,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/map/Map#keys (param $0 i32) (result i32) (local $1 i32) @@ -17360,34 +17046,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -17399,8 +17062,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -17415,16 +17078,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -17449,7 +17112,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -18119,7 +17782,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -18129,46 +17791,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -18184,32 +17823,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -18217,12 +17833,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -18265,9 +17881,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -18279,13 +17895,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -18298,7 +17914,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -18306,12 +17922,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -18325,7 +17941,6 @@ (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -18335,40 +17950,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -18378,14 +17970,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -18637,47 +18229,24 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 - local.get $0 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store - local.get $7 - local.get $1 - local.get $4 - call $~lib/map/Map#find - local.set $5 - local.get $5 - if - local.get $5 - local.get $2 - call $~lib/map/MapEntry#set:value + local.get $1 + call $~lib/util/hash/HASH + local.set $3 + local.get $0 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + local.get $1 + local.get $3 + call $~lib/map/Map#find + local.set $4 + local.get $4 + if + local.get $4 + local.get $2 + call $~lib/map/MapEntry#set:value i32.const 0 drop else @@ -18718,9 +18287,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -18732,13 +18301,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -18751,7 +18320,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -18759,12 +18328,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -18796,34 +18365,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -18835,8 +18381,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -18851,16 +18397,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -18885,7 +18431,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -19554,8 +19100,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -19565,58 +19110,30 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -19625,49 +19142,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -19680,11 +19170,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -19710,27 +19200,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -19743,34 +19233,33 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -19780,44 +19269,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -19827,14 +19289,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) @@ -20073,12 +19535,11 @@ local.get $9 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -20087,49 +19548,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -20142,11 +19576,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -20172,27 +19606,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -20205,37 +19639,36 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -20245,57 +19678,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -20310,17 +19716,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -20339,21 +19745,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/map/testNumeric (local $0 i32) @@ -21021,8 +20427,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -21032,58 +20437,30 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -21092,49 +20469,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -21147,11 +20497,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -21177,27 +20527,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -21210,34 +20560,33 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -21247,44 +20596,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -21294,14 +20616,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) @@ -21540,12 +20862,11 @@ local.get $9 ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -21554,49 +20875,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -21609,11 +20903,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -21639,27 +20933,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -21672,37 +20966,36 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -21712,57 +21005,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -21777,17 +21043,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -21806,21 +21072,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/map/testNumeric (local $0 i32) @@ -22488,8 +21754,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -22499,47 +21764,30 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -22548,38 +21796,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -22592,11 +21824,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -22622,27 +21854,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -22655,34 +21887,33 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -22692,33 +21923,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -22728,14 +21943,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) @@ -22974,12 +22189,11 @@ local.get $9 ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -22988,38 +22202,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -23032,11 +22230,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -23062,27 +22260,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -23095,37 +22293,36 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -23135,46 +22332,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -23189,17 +22370,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -23218,21 +22399,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/map/testNumeric (local $0 i32) @@ -23900,8 +23081,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -23911,51 +23091,30 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -23964,42 +23123,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -24012,11 +23151,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -24042,27 +23181,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 16 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -24075,34 +23214,33 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -24112,37 +23250,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 592 @@ -24152,14 +23270,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) @@ -24398,12 +23516,11 @@ local.get $9 ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -24412,42 +23529,22 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -24460,11 +23557,11 @@ i32.eq if local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer - local.get $8 + local.get $7 i32.store - local.get $8 + local.get $7 local.get $0 i32.load offset=20 local.get $0 @@ -24490,27 +23587,27 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $6 + local.tee $5 i32.store offset=4 - local.get $6 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add call $~lib/map/Map#set:entriesOffset - local.get $7 + local.get $6 i32.const 24 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 0 @@ -24523,37 +23620,36 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $7 - local.get $5 + local.get $6 + local.get $4 i32.store end local.get $0 - local.set $8 + local.set $7 global.get $~lib/memory/__stack_pointer i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $8 + local.get $7 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -24563,50 +23659,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -24621,17 +23697,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -24650,21 +23726,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/map/testNumeric (local $0 i32) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index fc350bf5c1..4e866282c8 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) @@ -16,6 +16,8 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) @@ -1819,6 +1821,40 @@ local.get $1 call $~lib/rt/itcms/__link ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1929,12 +1965,9 @@ i32.store8 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH + local.get $1 i32.and i32.const 2 i32.shl @@ -2298,6 +2331,38 @@ i32.const 0 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761394 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -2365,12 +2430,9 @@ i32.store8 local.get $2 local.get $6 - local.get $1 local.get $7 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH + local.get $1 i32.and i32.const 2 i32.shl @@ -2433,20 +2495,39 @@ i32.add i32.load8_u ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $0 local.get $0 - i32.const 8 + i32.const 13 i32.shr_u i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -2559,7 +2640,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -2634,6 +2715,38 @@ i32.add i32.load16_s ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 65535 + i32.and + i32.const -1028477379 + i32.mul + i32.const 374761395 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 + local.get $0 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -2702,7 +2815,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -2768,36 +2881,35 @@ i32.add i32.load16_u ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + i32.const 374761397 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $0 local.get $0 - i32.const 8 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $0 local.get $0 - i32.const 16 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $0 local.get $0 - i32.const 24 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -2908,7 +3020,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3092,7 +3204,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3158,71 +3270,48 @@ i32.add i32.load ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul - local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 + i32.const 374761401 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul local.get $0 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const -1028477379 + i32.mul + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.tee $1 local.get $1 - i32.const 8 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $1 local.get $1 - i32.const 16 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $1 local.get $1 - i32.const 24 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 @@ -3334,7 +3423,7 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3541,7 +3630,7 @@ local.get $2 local.get $8 local.get $5 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3607,6 +3696,38 @@ i32.add i64.load ) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const -1028477379 + i32.mul + i32.const 374761397 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $1 + local.get $1 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $1 + local.get $1 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $1 + local.get $1 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load @@ -3717,8 +3838,7 @@ local.get $2 local.get $8 local.get $5 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -3784,6 +3904,52 @@ i32.add f32.load ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + (local $1 i32) + (local $2 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.const 374761401 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.tee $1 + local.get $1 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $1 + local.get $1 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $1 + local.get $1 + i32.const 16 + i32.shr_u + i32.xor + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load @@ -3894,8 +4060,7 @@ local.get $2 local.get $8 local.get $5 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -4083,14 +4248,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4111,23 +4269,15 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $3 call $~lib/set/Set#find i32.eqz if @@ -4408,14 +4558,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -4910,12 +5053,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4936,21 +5074,15 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 i32.store - local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $3 call $~lib/set/Set#find i32.eqz if @@ -5180,12 +5312,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -5672,11 +5799,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -5698,11 +5821,7 @@ i32.const 0 i32.store local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -5998,11 +6117,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -6497,9 +6612,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -6521,9 +6634,7 @@ i32.const 0 i32.store local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -6766,9 +6877,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -7255,7 +7364,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -7277,7 +7386,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -7573,7 +7682,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -8052,7 +8161,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8074,7 +8183,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -8317,7 +8426,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -8796,7 +8905,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8818,7 +8927,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9115,7 +9224,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -9595,7 +9704,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -9617,7 +9726,7 @@ i32.const 0 i32.store local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -9861,7 +9970,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -10341,8 +10450,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -10364,8 +10472,7 @@ i32.const 0 i32.store local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -10658,8 +10765,7 @@ local.get $0 local.get $1 local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz @@ -11139,8 +11245,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -11162,8 +11267,7 @@ i32.const 0 i32.store local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -11456,8 +11560,7 @@ local.get $0 local.get $1 local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $2 i32.eqz diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index b8021d9ff5..c862ca4524 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -13,13 +13,15 @@ (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) @@ -2477,12 +2479,74 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - i32.const -2128831035 + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.set $2 + i32.const 1 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -1028477379 i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2631,23 +2695,8 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4208,6 +4257,73 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 255 + i32.and + local.set $2 + i32.const 1 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -4353,23 +4469,8 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4566,27 +4667,74 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash16 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) (local $1 i32) - i32.const -2128831035 + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.set $2 + i32.const 2 local.set $1 + i32.const 0 + i32.const 374761393 + i32.add local.get $1 - local.get $0 - i32.const 255 - i32.and + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -2048144777 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 + local.set $3 + local.get $3 + local.get $3 + i32.const 13 i32.shr_u i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -1028477379 i32.mul - local.set $1 - local.get $1 + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4735,27 +4883,8 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4952,6 +5081,73 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 4 + i32.le_u + drop + local.get $0 + i32.const 65535 + i32.and + local.set $2 + i32.const 2 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -5097,27 +5293,8 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -5314,47 +5491,70 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + local.set $2 + i32.const 4 local.set $1 + i32.const 0 + i32.const 374761393 + i32.add local.get $1 - local.get $0 - i32.const 8 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -2048144777 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 + local.set $3 + local.get $3 + local.get $3 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -1028477379 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 + local.set $3 + local.get $3 + local.get $3 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -5499,31 +5699,8 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -5720,6 +5897,71 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + local.set $2 + i32.const 4 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + local.get $1 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -5863,31 +6105,8 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -6084,93 +6303,87 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + (local $1 i64) (local $2 i32) - (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop local.get $0 - i32.wrap_i64 local.set $1 - local.get $0 - i64.const 32 - i64.shr_u - i32.wrap_i64 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add local.set $2 - i32.const -2128831035 - local.set $3 - local.get $3 - local.get $1 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + local.get $2 local.get $1 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.wrap_i64 + i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $1 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 i32.mul - local.set $3 - local.get $3 + i32.add + local.set $2 local.get $2 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul - local.set $3 - local.get $3 + local.set $2 local.get $2 - i32.const 8 + local.get $2 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $2 + local.get $2 + i32.const -2048144777 i32.mul - local.set $3 - local.get $3 + local.set $2 local.get $2 - i32.const 16 + local.get $2 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $2 + local.get $2 + i32.const -1028477379 i32.mul - local.set $3 - local.get $3 + local.set $2 local.get $2 - i32.const 24 + local.get $2 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul - local.set $3 - local.get $3 + local.set $2 + local.get $2 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) @@ -6244,9 +6457,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -6316,49 +6528,22 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -6541,6 +6726,88 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + (local $1 i64) + (local $2 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 4 + i32.le_u + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add + local.set $2 + local.get $2 + local.get $1 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -6613,9 +6880,8 @@ (local $10 i32) (local $11 i32) (local $12 i64) - (local $13 i64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -6685,49 +6951,22 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -6908,7 +7147,73 @@ (func $~lib/set/Set#set:entriesCount (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=20 + i32.store offset=20 + ) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + local.set $1 + i32.const 4 + local.set $2 + i32.const 0 + i32.const 374761393 + i32.add + local.get $2 + i32.add + local.set $3 + local.get $3 + local.get $1 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -2048144777 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 13 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + i32.const -1028477379 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 16 + i32.shr_u + i32.xor + local.set $3 + local.get $3 + return ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) @@ -6982,9 +7287,8 @@ (local $10 i32) (local $11 i32) (local $12 f32) - (local $13 f32) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7054,38 +7358,22 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -7268,6 +7556,89 @@ local.get $1 i32.store offset=20 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + (local $1 i64) + (local $2 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + local.set $1 + i32.const 0 + i32.const 374761393 + i32.add + i32.const 8 + i32.add + local.set $2 + local.get $2 + local.get $1 + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -7340,9 +7711,8 @@ (local $10 i32) (local $11 i32) (local $12 f64) - (local $13 f64) + (local $13 i32) (local $14 i32) - (local $15 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7412,42 +7782,22 @@ local.get $11 local.get $12 call $~lib/set/SetEntry#set:key - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $13 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $14 + local.set $13 local.get $3 - local.get $14 + local.get $13 i32.const 4 i32.mul i32.add - local.set $15 + local.set $14 local.get $11 - local.get $15 + local.get $14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $15 + local.get $14 local.get $8 i32.store local.get $8 @@ -8182,7 +8532,6 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -8192,42 +8541,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8242,28 +8572,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -8271,10 +8582,10 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -8316,16 +8627,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -8338,20 +8649,20 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -8527,30 +8838,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8562,8 +8854,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -8578,16 +8870,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8612,7 +8904,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -9140,7 +9432,6 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -9150,40 +9441,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9198,26 +9472,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -9225,10 +9482,10 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -9270,16 +9527,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -9292,20 +9549,20 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -9481,28 +9738,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -9514,8 +9754,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -9530,16 +9770,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -9564,7 +9804,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -10084,7 +10324,6 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -10094,46 +10333,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -10148,32 +10364,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -10181,10 +10374,10 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -10226,16 +10419,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -10248,20 +10441,20 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -10437,34 +10630,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -10476,8 +10646,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -10492,16 +10662,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -10526,7 +10696,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -11054,54 +11224,32 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -11116,30 +11264,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -11147,10 +11274,10 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -11192,16 +11319,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -11214,20 +11341,20 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -11403,32 +11530,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11440,8 +11546,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -11456,16 +11562,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -11490,7 +11596,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -12010,7 +12116,6 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -12020,46 +12125,23 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -12074,32 +12156,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -12107,10 +12166,10 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -12152,16 +12211,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -12174,20 +12233,20 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -12363,34 +12422,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -12402,8 +12438,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -12418,16 +12454,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -12452,7 +12488,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -12960,56 +12996,32 @@ ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - local.get $0 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store - local.get $3 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -13024,32 +13036,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.set $5 global.get $~lib/memory/__stack_pointer @@ -13057,10 +13046,10 @@ i32.store local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -13102,16 +13091,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $2 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -13124,20 +13113,20 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -13313,34 +13302,11 @@ i32.store local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13352,8 +13318,8 @@ local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -13368,16 +13334,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -13402,7 +13368,7 @@ local.get $6 i32.store local.get $6 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -13909,8 +13875,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -13920,57 +13885,29 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -13979,47 +13916,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -14029,11 +13939,11 @@ i32.eq if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $0 i32.load offset=20 local.get $0 @@ -14061,16 +13971,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -14083,29 +13993,29 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $5 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) @@ -14252,12 +14162,11 @@ local.get $9 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -14267,57 +14176,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -14332,17 +14214,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -14361,21 +14243,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/set/testNumeric (local $0 i32) @@ -14874,8 +14756,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -14885,57 +14766,29 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -14944,47 +14797,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -14994,11 +14820,11 @@ i32.eq if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $0 i32.load offset=20 local.get $0 @@ -15026,16 +14852,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -15048,29 +14874,29 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $5 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) @@ -15217,12 +15043,11 @@ local.get $9 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -15232,57 +15057,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -15297,17 +15095,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -15326,21 +15124,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/set/testNumeric (local $0 i32) @@ -15839,8 +15637,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -15850,84 +15647,51 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 - i32.sub - global.set $~lib/memory/__stack_pointer - call $~stack_check - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -15937,11 +15701,11 @@ i32.eq if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $0 i32.load offset=20 local.get $0 @@ -15969,16 +15733,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $5 + local.get $4 i32.const 8 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -15991,29 +15755,29 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $5 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) @@ -16160,12 +15924,11 @@ local.get $9 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -16175,46 +15938,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -16229,17 +15976,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -16258,21 +16005,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/set/testNumeric (local $0 i32) @@ -16771,8 +16518,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -16782,50 +16528,29 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -16834,40 +16559,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -16877,11 +16582,11 @@ i32.eq if local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer - local.get $6 + local.get $5 i32.store - local.get $6 + local.get $5 local.get $0 i32.load offset=20 local.get $0 @@ -16909,16 +16614,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $5 + local.get $4 i32.const 16 i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 call $~lib/set/SetEntry#set:key i32.const 0 @@ -16931,29 +16636,29 @@ call $~lib/set/Set#set:entriesCount local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 - local.set $6 + local.set $5 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $6 + local.get $5 ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) @@ -17100,12 +16805,11 @@ local.get $9 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -17115,50 +16819,30 @@ i32.const 0 i32.store local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 return end - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -17173,17 +16857,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -17202,21 +16886,21 @@ end if local.get $0 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer - local.get $7 + local.get $6 i32.store - local.get $7 - local.get $4 + local.get $6 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 - local.set $7 + local.set $6 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $7 + local.get $6 ) (func $std/set/testNumeric (local $0 i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 01056c78d2..b278b0fb59 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1924,36 +1924,35 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 + i32.const -1028477379 + i32.mul + i32.const 374761397 + i32.add + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.tee $0 local.get $0 - i32.const 8 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -2048144777 i32.mul + local.tee $0 local.get $0 - i32.const 16 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + i32.const -1028477379 i32.mul + local.tee $0 local.get $0 - i32.const 24 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -2068,7 +2067,7 @@ local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 @@ -2416,26 +2415,36 @@ unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - if + i64.const 0 + i64.store + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store + i32.const 0 + local.get $0 + i32.eqz + br_if $~lib/util/hash/hashStr|inlined.0 + drop + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 local.get $0 + local.tee $1 i32.const 20 i32.sub i32.load offset=16 @@ -2443,34 +2452,181 @@ i32.shr_u i32.const 1 i32.shl - local.set $3 - loop $for-loop|0 + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + i32.const 606290984 + local.set $2 + i32.const -2048144777 + local.set $4 + i32.const 1640531535 + local.set $5 + local.get $1 + local.get $3 + i32.add + i32.const 16 + i32.sub + local.set $7 + loop $while-continue|0 + local.get $1 + local.get $7 + i32.le_u + if + local.get $2 + local.get $1 + i32.load + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 + local.get $1 + i32.load offset=4 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $4 + local.get $6 + local.get $1 + i32.load offset=8 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $5 + local.get $1 + i32.load offset=12 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $1 + i32.const 16 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $3 local.get $2 + i32.const 1 + i32.rotl + local.get $4 + i32.const 7 + i32.rotl + i32.add + local.get $6 + i32.const 12 + i32.rotl + i32.add + local.get $5 + i32.const 18 + i32.rotl + i32.add + i32.add + else local.get $3 - i32.lt_u + i32.const 374761393 + i32.add + end + local.set $2 + local.get $0 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $4 + loop $while-continue|1 + local.get $1 + local.get $4 + i32.le_u if - local.get $1 - local.get $0 local.get $2 + local.get $1 + i32.load + i32.const -1028477379 + i32.mul i32.add - i32.load8_u - i32.xor - i32.const 16777619 + i32.const 17 + i32.rotl + i32.const 668265263 i32.mul + local.set $2 + local.get $1 + i32.const 4 + i32.add local.set $1 + br $while-continue|1 + end + end + local.get $0 + local.get $3 + i32.add + local.set $0 + loop $while-continue|2 + local.get $0 + local.get $1 + i32.gt_u + if local.get $2 - i32.const 1 + local.get $1 + i32.load8_u + i32.const 374761393 + i32.mul i32.add + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul local.set $2 - br $for-loop|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|2 end end + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + i32.const -2048144777 + i32.mul + local.tee $0 + local.get $0 + i32.const 13 + i32.shr_u + i32.xor + i32.const -1028477379 + i32.mul + local.tee $0 + local.get $0 + i32.const 16 + i32.shr_u + i32.xor end global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - local.get $1 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2692,7 +2848,7 @@ (local $7 i32) (local $8 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -2703,9 +2859,6 @@ i64.const 0 i64.store offset=8 global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 - global.get $~lib/memory/__stack_pointer local.get $1 i32.const 1 i32.add @@ -2764,13 +2917,10 @@ global.get $~lib/memory/__stack_pointer local.get $7 i32.store offset=12 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=16 local.get $2 local.get $6 local.get $7 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and i32.const 2 @@ -2811,7 +2961,7 @@ i32.load offset=20 i32.store offset=16 global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) @@ -2833,18 +2983,15 @@ global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store - global.get $~lib/memory/__stack_pointer i32.const 1056 - i32.store offset=4 - i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store global.get $~lib/memory/__stack_pointer i32.const 1056 - i32.store offset=8 + i32.store offset=4 local.get $0 local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find @@ -2862,7 +3009,7 @@ if global.get $~lib/memory/__stack_pointer local.get $0 - i32.store offset=4 + i32.store local.get $0 local.get $0 i32.load offset=20 @@ -2890,7 +3037,7 @@ local.get $0 i32.load offset=8 local.tee $2 - i32.store + i32.store offset=8 local.get $0 local.get $0 i32.load offset=16 @@ -2954,7 +3101,7 @@ i64.const 0 i64.store local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.set $3 global.get $~lib/memory/__stack_pointer local.get $0 @@ -3084,7 +3231,7 @@ i32.const 1056 i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3092,8 +3239,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -3103,17 +3250,14 @@ global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=12 local.get $0 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer if @@ -3125,7 +3269,7 @@ i32.const 1056 i32.store offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -3133,8 +3277,8 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -3144,12 +3288,9 @@ global.get $~lib/memory/__stack_pointer i32.const 1056 i32.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 1056 - i32.store offset=12 local.get $0 i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz @@ -3164,7 +3305,7 @@ local.get $0 i32.load offset=4 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -3306,7 +3447,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -3330,7 +3471,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index c840db0621..61572c58d1 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -2685,47 +2685,70 @@ local.get $1 i32.store offset=8 ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 + (local $2 i32) + (local $3 i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul + local.set $2 + i32.const 4 local.set $1 + i32.const 0 + i32.const 374761393 + i32.add local.get $1 - local.get $0 - i32.const 8 + i32.add + local.set $3 + local.get $3 + local.get $2 + i32.const -1028477379 + i32.mul + i32.add + local.set $3 + local.get $3 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $3 + local.get $3 + local.get $3 + i32.const 15 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -2048144777 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 + local.set $3 + local.get $3 + local.get $3 + i32.const 13 i32.shr_u - i32.const 255 - i32.and i32.xor - i32.const 16777619 + local.set $3 + local.get $3 + i32.const -1028477379 i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 + local.set $3 + local.get $3 + local.get $3 + i32.const 16 i32.shr_u i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + local.set $3 + local.get $3 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2879,31 +2902,8 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry#set:value - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $12 - local.set $13 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $13 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $12 + call $~lib/util/hash/HASH local.get $1 i32.and local.set $13 @@ -4478,69 +4478,281 @@ unreachable end ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) global.get $~lib/memory/__stack_pointer - i32.const 4 + i32.const 8 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store - i32.const -2128831035 - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if - i32.const 0 - local.set $2 - local.get $0 - local.set $5 + i64.const 0 + i64.store + i32.const 1 + drop + block $~lib/util/hash/hashStr|inlined.0 (result i32) global.get $~lib/memory/__stack_pointer - local.get $5 + local.get $0 + local.tee $1 i32.store - local.get $5 + local.get $1 + i32.const 0 + i32.eq + if + i32.const 0 + br $~lib/util/hash/hashStr|inlined.0 + end + local.get $1 + local.set $13 + global.get $~lib/memory/__stack_pointer + local.get $13 + i32.store offset=4 + local.get $13 call $~lib/string/String#get:length i32.const 1 i32.shl + local.set $2 + local.get $2 local.set $3 - loop $for-loop|0 - local.get $2 + local.get $1 + local.set $4 + local.get $3 + i32.const 16 + i32.ge_u + if + i32.const 0 + i32.const -1640531535 + i32.add + i32.const -2048144777 + i32.add + local.set $5 + i32.const 0 + i32.const -2048144777 + i32.add + local.set $6 + i32.const 0 + local.set $7 + i32.const 0 + i32.const -1640531535 + i32.sub + local.set $8 local.get $3 - i32.lt_u - local.set $4 local.get $4 + i32.add + i32.const 16 + i32.sub + local.set $9 + loop $while-continue|0 + local.get $4 + local.get $9 + i32.le_u + local.set $10 + local.get $10 + if + local.get $5 + local.set $12 + local.get $4 + i32.load + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $5 + local.get $6 + local.set $12 + local.get $4 + i32.load offset=4 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $6 + local.get $7 + local.set $12 + local.get $4 + i32.load offset=8 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $7 + local.get $8 + local.set $12 + local.get $4 + i32.load offset=12 + local.set $11 + local.get $12 + local.get $11 + i32.const -2048144777 + i32.mul + i32.add + i32.const 13 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $8 + local.get $4 + i32.const 16 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $2 + local.get $5 + i32.const 1 + i32.rotl + local.get $6 + i32.const 7 + i32.rotl + i32.add + local.get $7 + i32.const 12 + i32.rotl + i32.add + local.get $8 + i32.const 18 + i32.rotl + i32.add + i32.add + local.set $2 + else + local.get $2 + i32.const 0 + i32.const 374761393 + i32.add + i32.add + local.set $2 + end + local.get $1 + local.get $3 + i32.add + i32.const 4 + i32.sub + local.set $9 + loop $while-continue|1 + local.get $4 + local.get $9 + i32.le_u + local.set $8 + local.get $8 if - local.get $1 - local.get $0 local.get $2 + local.get $4 + i32.load + i32.const -1028477379 + i32.mul + i32.add + local.set $2 + local.get $2 + i32.const 17 + i32.rotl + i32.const 668265263 + i32.mul + local.set $2 + local.get $4 + i32.const 4 i32.add + local.set $4 + br $while-continue|1 + end + end + local.get $1 + local.get $3 + i32.add + local.set $9 + loop $while-continue|2 + local.get $4 + local.get $9 + i32.lt_u + local.set $8 + local.get $8 + if + local.get $2 + local.get $4 i32.load8_u - i32.xor - i32.const 16777619 + i32.const 374761393 i32.mul - local.set $1 + i32.add + local.set $2 local.get $2 + i32.const 11 + i32.rotl + i32.const -1640531535 + i32.mul + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $4 + br $while-continue|2 end end - end - local.get $1 - local.set $5 - global.get $~lib/memory/__stack_pointer - i32.const 4 - i32.add - global.set $~lib/memory/__stack_pointer - local.get $5 + local.get $2 + local.get $2 + i32.const 15 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -2048144777 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 13 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + i32.const -1028477379 + i32.mul + local.set $2 + local.get $2 + local.get $2 + i32.const 16 + i32.shr_u + i32.xor + local.set $2 + local.get $2 + end + local.set $13 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $13 + return ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -4720,9 +4932,8 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4730,52 +4941,42 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store offset=4 - local.get $3 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $3 - global.get $~lib/memory/__stack_pointer - local.get $3 - i32.store offset=12 - local.get $3 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + local.get $2 + local.get $1 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $2 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4783,39 +4984,30 @@ i64.const 0 i64.store global.get $~lib/memory/__stack_pointer - i64.const 0 - i64.store offset=8 + i32.const 0 + i32.store offset=8 local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store offset=4 - local.get $4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $2 - i32.store offset=8 - i32.const 1 - drop - local.get $2 - local.set $4 - global.get $~lib/memory/__stack_pointer - local.get $4 - i32.store offset=12 - local.get $4 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end - call $~lib/map/Map<~lib/string/String,usize>#find + local.get $3 + local.get $1 local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store offset=8 local.get $3 + call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/map/Map<~lib/string/String,usize>#find + local.set $2 + local.get $2 i32.eqz if i32.const 624 @@ -4825,14 +5017,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - i32.const 16 + i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -4850,7 +5042,7 @@ (local $14 i32) (local $15 i32) global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.sub global.set $~lib/memory/__stack_pointer call $~stack_check @@ -4860,9 +5052,6 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - global.get $~lib/memory/__stack_pointer - i32.const 0 - i32.store offset=16 local.get $1 i32.const 1 i32.add @@ -4930,22 +5119,13 @@ local.get $10 i32.load offset=4 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $12 - local.tee $13 - i32.store offset=12 - i32.const 1 - drop - local.get $13 - local.set $15 - global.get $~lib/memory/__stack_pointer - local.get $15 - i32.store offset=16 - local.get $15 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + local.get $12 + local.set $15 + global.get $~lib/memory/__stack_pointer + local.get $15 + i32.store offset=12 + local.get $15 + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and local.set $13 @@ -4991,7 +5171,7 @@ i32.load offset=20 call $~lib/map/Map<~lib/string/String,usize>#set:entriesOffset global.get $~lib/memory/__stack_pointer - i32.const 20 + i32.const 16 i32.add global.set $~lib/memory/__stack_pointer ) @@ -5012,41 +5192,32 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - global.get $~lib/memory/__stack_pointer - local.get $1 - local.tee $3 - i32.store - i32.const 1 - drop - local.get $3 - local.set $7 - global.get $~lib/memory/__stack_pointer - local.get $7 - i32.store offset=4 - local.get $7 - call $~lib/util/hash/hashStr - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end - local.set $4 + local.get $1 + local.set $7 + global.get $~lib/memory/__stack_pointer + local.get $7 + i32.store + local.get $7 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $1 local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=8 + i32.store offset=4 local.get $7 - local.get $4 + local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value i32.const 0 @@ -5062,7 +5233,7 @@ local.set $7 global.get $~lib/memory/__stack_pointer local.get $7 - i32.store offset=4 + i32.store local.get $7 local.get $0 i32.load offset=20 @@ -5089,9 +5260,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 - i32.store - local.get $3 + local.tee $5 + i32.store offset=8 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -5103,8 +5274,8 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry<~lib/string/String,usize>#set:key i32.const 1 @@ -5113,7 +5284,7 @@ local.get $1 i32.const 1 call $~lib/rt/itcms/__link - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value i32.const 0 @@ -5126,7 +5297,7 @@ call $~lib/map/Map<~lib/string/String,usize>#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -5134,12 +5305,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry<~lib/string/String,usize>#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -5164,32 +5335,9 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.set $7 global.get $~lib/memory/__stack_pointer @@ -5197,12 +5345,12 @@ i32.store local.get $7 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 1 @@ -5249,9 +5397,9 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.store offset=4 - local.get $3 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -5263,13 +5411,13 @@ i32.const 12 i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 call $~lib/map/MapEntry#set:key i32.const 0 drop - local.get $5 + local.get $4 local.get $2 call $~lib/map/MapEntry#set:value i32.const 1 @@ -5286,7 +5434,7 @@ call $~lib/map/Map#set:entriesCount local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -5294,12 +5442,12 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load call $~lib/map/MapEntry#set:taggedNext local.get $6 - local.get $5 + local.get $4 i32.store end local.get $0 @@ -5423,7 +5571,6 @@ ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5433,51 +5580,27 @@ i32.const 0 i32.store local.get $0 - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne - local.set $3 + local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $3 + local.get $2 ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5487,40 +5610,17 @@ i32.const 0 i32.store local.get $0 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer - local.get $4 + local.get $3 i32.store - local.get $4 + local.get $3 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 624 @@ -5530,14 +5630,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - local.get $4 + local.get $3 ) (func $~lib/symbol/_Symbol.keyFor (param $0 i32) (result i32) (local $1 i32)